diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..968276b --- /dev/null +++ b/jest.config.js @@ -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'] +}; diff --git a/package.json b/package.json index 32b0f4e..7e715b0 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tsconfig.json b/tsconfig.json index 911d39f..7dd1655 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,5 +8,5 @@ "esModuleInterop": true }, "include": ["index.ts", "antlr4ts_out"], - "exclude": ["node_modules", "proleap-vb6", "**/__tests__/*"] + "exclude": ["node_modules", "proleap-vb6", "tests/**"] }