Skip to content

Commit eaa6aa1

Browse files
authored
Fix test:node:persistence command. (#1688)
Since our code is TypeScript we use `--require ts-node/register` for mocha to be able to run our code. We have this require in our global `../../config/mocha.node.opts` file, but it apparently isn't applied before the `--require test/util/node_persistence.ts` in our test:node:persistence command-line. So I've had to add an explicit `--require ts-node/register` to our command-line.
1 parent a5d8837 commit eaa6aa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"test:browser": "karma start --single-run",
1616
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
1717
"test:node": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --opts ../../config/mocha.node.opts",
18-
"test:node:persistence": "USE_MOCK_PERSISTENCE=YES TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --require test/util/node_persistence.ts --opts ../../config/mocha.node.opts",
18+
"test:node:persistence": "USE_MOCK_PERSISTENCE=YES TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --require ts-node/register --file index.node.ts --require test/util/node_persistence.ts --opts ../../config/mocha.node.opts",
1919
"test:emulator": "ts-node ../../scripts/emulator-testing/firestore-test-runner.ts",
2020
"prepare": "npm run build"
2121
},

0 commit comments

Comments
 (0)