From efa6cba18064fc80cfe54ba02a7b2b949d3369ab Mon Sep 17 00:00:00 2001 From: brisberg Date: Fri, 7 Aug 2020 14:32:45 -0700 Subject: [PATCH] Moved TS_NODE override to 'test' script --- docs/in-depth/testing.md | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/in-depth/testing.md b/docs/in-depth/testing.md index e225832..caa3a76 100644 --- a/docs/in-depth/testing.md +++ b/docs/in-depth/testing.md @@ -60,8 +60,8 @@ In `package.json`, add a new `test-integration` script and add the new integrati ```json "scripts": { - "test": "npm run test-unit && npm run test-integration", - "test-integration": "npm run build && TS_NODE_PROJECT='./tsconfig.test.json' mocha ./test/integration/**/*.ts", + "test": "export TS_NODE_PROJECT='./tsconfig.test.json' && npm run test-unit && npm run test-integration", + "test-integration": "npm run build && mocha test/integration/**/*.ts", } ``` diff --git a/package.json b/package.json index 3fc4853..00d52b1 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "push-main": "rollup -c --environment DEST:main", "push-pserver": "rollup -c --environment DEST:pserver", "push-sim": "rollup -c --environment DEST:sim", - "test": "npm run test-unit", - "test-unit": "TS_NODE_PROJECT='./tsconfig.test.json' mocha test/unit/**/*.ts", + "test": "export TS_NODE_PROJECT='./tsconfig.test.json' && npm run test-unit", + "test-unit": "mocha test/unit/**/*.ts", "test-integration": "echo 'See docs/in-depth/testing.md for instructions on enabling integration tests'", "watch-main": "rollup -cw --environment DEST:main", "watch-pserver": "rollup -cw --environment DEST:pserver",