Allow build and test to be run from individual packages

This commit is contained in:
Andrew Branch
2020-03-16 11:00:02 -07:00
parent dff700be18
commit 90ec7d45c7
5 changed files with 9 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ module.exports = {
testMatch: ["<rootDir>/packages/*/test/**/*.test.ts"],
globals: {
"ts-jest": {
tsConfig: "./tsconfig.test.json",
tsConfig: "<rootDir>/tsconfig.test.json",
diagnostics: false
}
}

View File

@@ -16,7 +16,8 @@
"directory": "packages/definitions-parser"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"build": "tsc -b",
"test": "../../node_modules/.bin/jest --config ../../jest.config.js packages/definitions-parser"
},
"bugs": {
"url": "https://github.com/DefinitelyTyped/tools/issues"

View File

@@ -17,7 +17,8 @@
"directory": "packages/header-parser"
},
"scripts": {
"test": "jest"
"build": "tsc -b",
"test": "../../node_modules/.bin/jest --config ../../jest.config.js packages/header-parser"
},
"bugs": {
"url": "https://github.com/DefinitelyTyped/tools/issues"

View File

@@ -39,6 +39,8 @@
"@types/yargs": "^8.0.1"
},
"scripts": {
"build": "tsc -b",
"test": "../../node_modules/.bin/jest --config ../../jest.config.js packages/publisher",
"clean": "node -r source-map-support/register dist/clean.js",
"get-definitely-typed": "node -r source-map-support/register dist/get-definitely-typed.js",
"parse": "node -r source-map-support/register dist/parse-definitions.js",

View File

@@ -16,7 +16,8 @@
"directory": "packages/utils"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"build": "tsc -b",
"test": "../../node_modules/.bin/jest --config ../../jest.config.js packages/utils"
},
"bugs": {
"url": "https://github.com/DefinitelyTyped/tools/issues"