Skip to content

Commit

Permalink
test(key-derivation): create custom jest config
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Feb 14, 2022
1 parent f4ceb1f commit 1f59cd6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
28 changes: 28 additions & 0 deletions packages/key-derivation/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const base = require('../../jest.config.base.js');
const pkg = require('./package.json');

const projectName = 'key-derivation';

module.exports = {
...base,
name: pkg.name,
displayName: pkg.name,
rootDir: '../..',
testMatch: [`<rootDir>/packages/${projectName}/**/*.spec.ts`, `<rootDir>/packages/${projectName}/**/*.e2e-spec.ts`],
// "reporters": ["default", "jest-junit"],
// "testResultsProcessor": "jest-junit",
coverageDirectory: `<rootDir>/packages/${projectName}/coverage/`,
coverageReporters: ['json'],
// "coverageReporters": ["lcov", "json"],
coverageThreshold: {
global: {
statements: 55,
branches: 35,
functions: 55,
lines: 50,
},
},
moduleDirectories: ['node_modules'],
// modulePaths: [`<rootDir>/packages/${projectName}/src/`],
};
3 changes: 2 additions & 1 deletion packages/key-derivation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"cleanup": "rimraf -rf dist coverage",
"compile": "tsc -p tsconfig.build.json",
"lint": "eslint ./ --ext .js,.ts,.tsx --quiet --fix",
"test": "jest --ci --config ../../jest.config.json ",
"test": "jest --runInBand",
"test:cov": "rimraf -rf ./coverage && jest --ci --runInBand --coverage",
"prepublishOnly": "npm run build"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/key-derivation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.json"
}

0 comments on commit 1f59cd6

Please sign in to comment.