diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 7e22fb7..0000000 --- a/jest.config.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * The Jest configuration object. - * @see http://facebook.github.io/jest/docs/configuration.html - */ -module.exports = { - collectCoverage: true, - collectCoverageFrom: [ - "/src/**/*.ts", - ], - coveragePathIgnorePatterns: [ - ".*Tests\.ts", - ".*Spec\.ts", - "index.ts", - "src/quantity/.*" - ], - coverageThreshold: { - global: { - branches: 95, - functions: 95, - lines: 95, - statements: 95, - }, - }, - globals: { - "ts-jest": { - tsConfigFile: "src/tsconfig.json", - }, - }, - moduleFileExtensions: ["js", "json", "ts"], - testEnvironment: "jsdom", - testMatch: ["/src/**/__test__/**/*Tests.ts"], - transform: { - "^.+\\.ts$": "/node_modules/ts-jest/preprocessor.js", - }, - verbose: true, -}; diff --git a/jest.config.json b/jest.config.json new file mode 100644 index 0000000..3c31eb6 --- /dev/null +++ b/jest.config.json @@ -0,0 +1,32 @@ +{ + "collectCoverage": true, + "collectCoverageFrom": [ + "/src/**/*.ts" + ], + "coveragePathIgnorePatterns": [ + ".*Tests\\.ts", + ".*Spec\\.ts", + "index.ts", + "src/quantity/.*" + ], + "coverageThreshold": { + "global": { + "branches": 95, + "functions": 95, + "lines": 95, + "statements": 95 + } + }, + "globals": { + "ts-jest": { + "tsConfigFile": "src/tsconfig.json" + } + }, + "moduleFileExtensions": ["js", "json", "ts"], + "testEnvironment": "jsdom", + "testMatch": ["/src/**/__test__/**/*Tests.ts"], + "transform": { + "^.+\\.ts$": "/node_modules/ts-jest/preprocessor.js" + }, + "verbose": true +} \ No newline at end of file diff --git a/package.json b/package.json index 2ddd53a..f04c4d1 100644 --- a/package.json +++ b/package.json @@ -13,14 +13,15 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "scripts": { + "build": "npm-run-all -s codegen compile:src", "codegen": "npm-run-all -s compile:codegen node:codegen", "compile:src": "tsc -p src", "compile:codegen": "tsc -p codegen", "lint": "tslint -p src/tsconfig.json -c tslint.json '{src,codegen}/**/*.ts'", "lint:fix": "yarn lint --fix", "node:codegen": "node codegen/dist/emit", - "test": "jest --config jest.config.js", - "verify": "npm-run-all -s codegen compile:src lint test" + "test": "jest --config jest.config.json", + "verify": "npm-run-all -s build lint test" }, "devDependencies": { "@types/jest": "^22.2.3",