Skip to content

Commit addcda1

Browse files
Think it should work now
1 parent 59f554b commit addcda1

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

packages/firestore/exp/src/api/snapshot.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ import {
2929
} from '../../../lite/src/api/snapshot';
3030
import { Firestore } from './database';
3131
import { cast } from '../../../lite/src/api/util';
32-
import { DocumentReference, Query, queryEqual } from '../../../lite';
32+
import {
33+
DocumentReference,
34+
Query,
35+
queryEqual
36+
} from '../../../lite/src/api/reference';
3337
import {
3438
changesFromSnapshot,
3539
SnapshotMetadata

packages/firestore/lite/src/api/reference.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ export function parent<T>(
526526
if (parentPath.isEmpty()) {
527527
return null;
528528
} else {
529-
return new DocumentReference(child.firestore, null, parentPath);
529+
return new DocumentReference(child.firestore, /* converter= */ null, parentPath);
530530
}
531531
} else {
532532
const doc = cast<DocumentReference<T>>(child, DocumentReference);

packages/firestore/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@
2323
"gendeps:exp": "../../scripts/exp/extract-deps.sh --types ./exp-types/index.d.ts --bundle ./dist/exp/tmp.js --output ./exp/dependencies.json",
2424
"pregendeps:lite" : "node scripts/build-bundle.js --input ./lite/index.ts --output ./dist/lite/tmp.js",
2525
"gendeps:lite": "../../scripts/exp/extract-deps.sh --types ./lite-types/index.d.ts --bundle ./dist/lite/tmp.js --output ./lite/dependencies.json",
26-
"test:exp": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/integration/api/*.test.ts' --file exp/index.ts --config ../../config/mocharc.node.js",
27-
"test:exp:persistence": "USE_MOCK_PERSISTENCE=YES TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/integration/api/*.test.ts' --require ts-node/register --require exp/index.ts --require test/util/node_persistence.ts --config ../../config/mocharc.node.js",
26+
"test:exp": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/integration/api/*.test.ts' --file exp/index.ts --config ../../config/mocharc.node.js",
27+
"test:exp:persistence": "USE_MOCK_PERSISTENCE=YES TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/integration/api/*.test.ts' --require ts-node/register --require exp/index.ts --require test/util/node_persistence.ts --config ../../config/mocharc.node.js",
2828
"test": "run-s lint test:all",
2929
"test:ci": "node ../../scripts/run_tests_in_ci.js",
3030
"test:all": "run-p test:browser test:travis test:minified test:exp test:lite",
3131
"test:browser": "karma start --single-run",
3232
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
33-
"test:node": "FIRESTORE_EMULATOR_PORT=8080 FIRESTORE_EMULATOR_PROJECT_ID=test-emulator TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",
34-
"test:node:prod": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",
35-
"test:node:persistence": "FIRESTORE_EMULATOR_PORT=8080 FIRESTORE_EMULATOR_PROJECT_ID=test-emulator USE_MOCK_PERSISTENCE=YES TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --require ts-node/register --require index.node.ts --require test/util/node_persistence.ts --config ../../config/mocharc.node.js",
36-
"test:node:persistence:prod": "USE_MOCK_PERSISTENCE=YES TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --require ts-node/register --require index.node.ts --require test/util/node_persistence.ts --config ../../config/mocharc.node.js",
33+
"test:node": "FIRESTORE_EMULATOR_PORT=8080 FIRESTORE_EMULATOR_PROJECT_ID=test-emulator TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",
34+
"test:node:prod": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --config ../../config/mocharc.node.js",
35+
"test:node:persistence": "FIRESTORE_EMULATOR_PORT=8080 FIRESTORE_EMULATOR_PROJECT_ID=test-emulator 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 --require index.node.ts --require test/util/node_persistence.ts --config ../../config/mocharc.node.js",
36+
"test:node:persistence:prod": "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 --require index.node.ts --require test/util/node_persistence.ts --config ../../config/mocharc.node.js",
3737
"test:travis": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/firestore-test-runner.ts",
3838
"test:minified": "(cd ../../integration/firestore ; yarn test)",
39-
"test:lite": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'lite/test/**/*.test.ts' --require ts-node/register --file lite/index.ts --config ../../config/mocharc.node.js",
39+
"test:lite": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'lite/test/**/*.test.ts' --require ts-node/register --file lite/index.ts --config ../../config/mocharc.node.js",
4040
"prepare": "yarn build:release"
4141
},
4242
"main": "dist/index.node.cjs.js",

scripts/emulator-testing/firestore-test-runner.ts

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ async function run(): Promise<void> {
4949
await emulator.download();
5050
await emulator.setUp();
5151
await runTest(emulator.port, emulator.projectId, true);
52+
await runTest(emulator.port, emulator.projectId, false);
5253
} finally {
5354
await emulator.tearDown();
5455
}

0 commit comments

Comments
 (0)