Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from agraboso/test-lib
Run tests against lib
- Loading branch information
Showing
10 changed files
with
5,972 additions
and
5,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
[ | ||
{ | ||
"name": "lib/index.js (min)", | ||
"path": "lib/index.js", | ||
"name": "lib/index.cjs.js (min)", | ||
"path": "lib/index.cjs.js", | ||
"limit": "10 KB", | ||
"gzip": false | ||
}, | ||
{ | ||
"name": "lib/index.js (min + gzip)", | ||
"path": "lib/index.js", | ||
"name": "lib/index.cjs.js (min + gzip)", | ||
"path": "lib/index.cjs.js", | ||
"limit": "4 KB" | ||
}, | ||
{ | ||
"name": "lib/index.umd.js (min)", | ||
"path": "lib/index.umd.js", | ||
"limit": "10 KB", | ||
"limit": "30 KB", | ||
"gzip": false | ||
}, | ||
{ | ||
"name": "lib/index.umd.js (min + gzip)", | ||
"path": "lib/index.umd.js", | ||
"limit": "4 KB" | ||
"limit": "12 KB" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = function (api) { | ||
const env = api.cache(() => process.env.NODE_ENV); | ||
|
||
const nodeTarget = env === 'test' ? 'current' : '8'; | ||
const envModules = env === 'test' ? 'commonjs' : false; | ||
|
||
const presets = [ | ||
[ | ||
"@babel/preset-env", { | ||
modules: envModules, | ||
"useBuiltIns": "usage", | ||
"targets": { | ||
"node": nodeTarget | ||
}, | ||
} | ||
] | ||
]; | ||
|
||
const plugins = []; | ||
|
||
return { | ||
presets, | ||
plugins | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
verbose: !!process.env.CI, | ||
automock: false, | ||
resetMocks: true, | ||
restoreMocks: true, | ||
resetModules: true, | ||
setupFiles: [ | ||
"./test/setupJest.js" | ||
], | ||
moduleNameMapper: { | ||
"^redux-api-middleware$": process.env.TEST_LIB ? '..' : './index' | ||
} | ||
}; |
Oops, something went wrong.