🔧 Configures Jest

This commit is contained in:
Bruce Markham
2020-03-28 23:55:28 -04:00
parent ded3c1ea17
commit fa05a91192
3 changed files with 8 additions and 2 deletions

6
jest.config.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = {
transform: {'^.+\\.ts?$': 'ts-jest'},
testEnvironment: 'node',
testRegex: '/tests/.*\\.(test|spec)?\\.(ts|tsx)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node']
};

View File

@@ -7,7 +7,7 @@
],
"main": "lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0",
"test": "jest",
"build.cpygrammars": "cpy proleap-vb6/src/main/antlr4/io/proleap/vb6/*.g4 ./antlr4ts_out/",
"build.antlr4ts": "antlr4ts -visitor antlr4ts_out/*.g4",
"postbuild.antlr4ts": "rimraf antlr4ts_out/*.g4",

View File

@@ -8,5 +8,5 @@
"esModuleInterop": true
},
"include": ["index.ts", "antlr4ts_out"],
"exclude": ["node_modules", "proleap-vb6", "**/__tests__/*"]
"exclude": ["node_modules", "proleap-vb6", "tests/**"]
}