Skip to content

Commit

Permalink
test: enable jest testing in snyk-protect workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjeffos committed Feb 26, 2021
1 parent 40ec817 commit fe0183d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/snyk-protect/jest.config.js
@@ -0,0 +1,12 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {}, // ignore .babelrc file
collectCoverage: false, // not collecting coverage for now
collectCoverageFrom: ['src/**/*.ts'],
coverageReporters: ['text-summary', 'html'],
testMatch: [
'<rootDir>/test/**/*.spec.ts',
'<rootDir>\\test\\**\\*.spec.ts', // for Windows
]
};
6 changes: 5 additions & 1 deletion packages/snyk-protect/package.json
Expand Up @@ -22,7 +22,11 @@
"node": ">=8"
},
"scripts": {
"build": "tsc"
"build": "tsc",
"test": "npm run test:unit && npm run test:acceptance",
"test:unit": "jest test/unit/*.spec.ts",
"test:acceptance": "jest test/acceptance/*.spec.ts",
"format": "prettier --write '{src,test,scripts}/**/*.{js,ts}'"
},
"keywords": [
"security",
Expand Down

0 comments on commit fe0183d

Please sign in to comment.