Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize test config, upgrade (some) devDeps, add named export #70

Merged
merged 11 commits into from
Feb 10, 2022
22 changes: 20 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
### custom ###

# build output
build/
# test coverage output
coverage/

### Node ###

# Logs
logs
*.log
npm-debug.log*

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

.DS_Store
*~
# dotenv environment variables file
.env
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
# default is the very old 0.10.48; match local version instead
node_js: '8.9'
node_js: '10.16.0'

before_script: npm run lint
script: npm test -- --coverage
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
<!-- releases / versioning -->
[![package-json](https://img.shields.io/github/package-json/v/agilgur5/react-signature-canvas.svg)](https://npmjs.org/package/react-signature-canvas)
[![releases](https://img.shields.io/github/tag-pre/agilgur5/react-signature-canvas.svg)](https://github.com/agilgur5/react-signature-canvas/releases)
[![commits](https://img.shields.io/github/commits-since/agilgur5/react-signature-canvas/v1.0.5.svg)](https://github.com/agilgur5/react-signature-canvas/commits/master)
[![commits](https://img.shields.io/github/commits-since/agilgur5/react-signature-canvas/v1.0.5.svg)](https://github.com/agilgur5/react-signature-canvas/commits/main)
<br><!-- downloads -->
[![dt](https://img.shields.io/npm/dt/react-signature-canvas.svg)](https://npmjs.org/package/react-signature-canvas)
[![dy](https://img.shields.io/npm/dy/react-signature-canvas.svg)](https://npmjs.org/package/react-signature-canvas)
[![dm](https://img.shields.io/npm/dm/react-signature-canvas.svg)](https://npmjs.org/package/react-signature-canvas)
[![dw](https://img.shields.io/npm/dw/react-signature-canvas.svg)](https://npmjs.org/package/react-signature-canvas)
<br><!-- status / activity -->
[![build status](https://img.shields.io/travis/agilgur5/react-signature-canvas/master.svg)](https://travis-ci.org/agilgur5/react-signature-canvas)
[![code coverage](https://img.shields.io/codecov/c/gh/agilgur5/react-signature-canvas/master.svg)](https://codecov.io/gh/agilgur5/react-signature-canvas)
[![build status](https://img.shields.io/travis/com/agilgur5/react-signature-canvas/main.svg)](https://app.travis-ci.com/github/agilgur5/react-signature-canvas/branches)
[![code coverage](https://img.shields.io/codecov/c/gh/agilgur5/react-signature-canvas/main.svg)](https://codecov.io/gh/agilgur5/react-signature-canvas)
<br>
[![NPM](https://nodei.co/npm/react-signature-canvas.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/package/react-signature-canvas)
<br>
Expand Down
12 changes: 5 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
module.exports = {
moduleNameMapper: {
// allow importing of Jest as an ES Module (https://github.com/facebook/jest/pull/7571#issuecomment-498634094)
'^jest$': '<rootDir>/test-utils/jest-export.js'
},
// Jest 24 defaults to JSDOM 11, upgrade to 15 to support canvas@2
testEnvironment: 'jest-environment-jsdom-fifteen',
setupFilesAfterEnv: [
// configure enzyme w/ react adapter
'<rootDir>/test-utils/configure-enzyme.js',
'<rootDir>/test/config/configure-enzyme.js',
// polyfill window.resizeTo
'<rootDir>/test-utils/window-resizeTo.js'
'window-resizeto/polyfill'
],
transform: {
// use babel-jest@23 for babel@6 support (https://github.com/facebook/jest/issues/8230#issuecomment-479470547)
'\\.js$': require.resolve('babel-jest')
},
coveragePathIgnorePatterns: [
'/node_modules/', // default
'<rootDir>/test-utils/' // ignore test-utils
'<rootDir>/test/' // ignore any test helper files
]
}
Loading