Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nyc-run.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
all: true,
include: ['tests/node_modules/ts-node/**'],
exclude: ['**/*.d.ts', 'tests/node_modules/ts-node/node_modules/**'],
extension: [],
instrument: false,
'hook-require': false,
'hook-run-in-context': false,
'hook-run-in-this-context': false,
excludeNodeModules: false,
excludeAfterRemap: false,
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@
"build-configSchema": "typescript-json-schema --topRef --refs --validationKeywords allOf --out tsconfig.schema.json tsconfig.build-schema.json TsConfigSchema && node --require ./register ./scripts/create-merged-schema",
"build-pack": "node ./scripts/build-pack.js",
"test-spec": "ava",
"test-cov": "nyc ava",
"test-instrument": "nyc instrument --in-place ./tests/node_modules/ts-node",
"test-cov": "nyc --nycrc-path ./nyc-run.config.js ava",
"test": "npm run build && npm run lint && npm run test-cov --",
"test-local": "npm run lint-fix && npm run build-tsc && npm run build-pack && npm run test-spec --",
"pre-debug": "npm run build-tsc && npm run build-pack",
"coverage-summary": "nyc report",
"coverage-report": "nyc report --reporter=lcov",
"prepare": "npm run clean && npm run build-nopack",
"api-extractor": "api-extractor run --local --verbose",
Expand Down
3 changes: 3 additions & 0 deletions src/test/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ export async function installTsNode() {
try {
rimrafSync(join(TEST_DIR, 'node_modules'));
await promisify(childProcessExec)(`npm install`, { cwd: TEST_DIR });
await promisify(childProcessExec)(`npm run test-instrument`, {
cwd: ROOT_DIR,
});
const packageLockPath = join(TEST_DIR, 'package-lock.json');
existsSync(packageLockPath) && unlinkSync(packageLockPath);
break;
Expand Down