Skip to content

Commit 0e3ae89

Browse files
Imports
1 parent 11f0bbc commit 0e3ae89

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

packages/firestore/lite/test/helpers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717

1818
import { initializeApp } from '@firebase/app-exp';
1919

20-
import * as firestore from '../index';
20+
import * as firestore from '../../lite-types';
2121

22-
import { initializeFirestore } from '../src/api/database';
23-
import { doc, collection, setDoc } from '../src/api/reference';
22+
import { initializeFirestore, doc, collection, setDoc } from '..';
2423
import {
2524
DEFAULT_PROJECT_ID,
2625
DEFAULT_SETTINGS

packages/firestore/lite/test/integration.test.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import * as firestore from '../index';
18+
import * as firestore from '../../lite-types';
1919

2020
import { initializeApp } from '@firebase/app-exp';
2121
import { expect, use } from 'chai';
@@ -52,25 +52,23 @@ import {
5252
refEqual,
5353
queryEqual,
5454
collectionGroup,
55-
getQuery
56-
} from '../src/api/reference';
57-
import { FieldPath } from '../src/api/field_path';
58-
import {
59-
DEFAULT_PROJECT_ID,
60-
DEFAULT_SETTINGS
61-
} from '../../test/integration/util/settings';
62-
import { writeBatch } from '../src/api/write_batch';
63-
import { runTransaction } from '../src/api/transaction';
64-
import { expectEqual, expectNotEqual } from '../../test/util/helpers';
65-
import { snapshotEqual } from '../src/api/snapshot';
66-
import {
55+
getQuery,
56+
FieldPath,
57+
writeBatch,
58+
runTransaction,
59+
snapshotEqual,
6760
FieldValue,
6861
deleteField,
6962
increment,
7063
serverTimestamp,
7164
arrayUnion,
7265
arrayRemove
73-
} from '../src/api/field_value';
66+
} from '..';
67+
import {
68+
DEFAULT_PROJECT_ID,
69+
DEFAULT_SETTINGS
70+
} from '../../test/integration/util/settings';
71+
import { expectEqual, expectNotEqual } from '../../test/util/helpers';
7472
import { Timestamp } from '../../src/api/timestamp';
7573

7674
use(chaiAsPromised);

packages/firestore/test/integration/api/validation.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,9 @@ apiDescribe('Validation:', (persistence: boolean) => {
776776
expect(() =>
777777
collection.where('test', '==', { test: FieldValue.arrayUnion(1) })
778778
).to.throw(
779-
'Function Query.where() called with invalid data. ' +
779+
`Function ${
780+
usesFunctionalApi() ? 'where' : 'Query.where'
781+
}() called with invalid data. ` +
780782
`${
781783
usesFunctionalApi() ? 'arrayUnion' : 'FieldValue.arrayUnion'
782784
}() can only be used with update() and set() (found in field test)`
@@ -785,7 +787,9 @@ apiDescribe('Validation:', (persistence: boolean) => {
785787
expect(() =>
786788
collection.where('test', '==', { test: FieldValue.arrayRemove(1) })
787789
).to.throw(
788-
'Function Query.where() called with invalid data. ' +
790+
`Function ${
791+
usesFunctionalApi() ? 'where' : 'Query.where'
792+
}() called with invalid data. ` +
789793
`${
790794
usesFunctionalApi() ? 'arrayRemove' : 'FieldValue.arrayRemove'
791795
}() can only be used with update() and set() (found in field test)`
@@ -862,7 +866,9 @@ apiDescribe('Validation:', (persistence: boolean) => {
862866
expect(() =>
863867
collection.where('test', '==', { test: FieldValue.increment(1) })
864868
).to.throw(
865-
'Function Query.where() called with invalid data. ' +
869+
`Function ${
870+
usesFunctionalApi() ? 'where' : 'Query.where'
871+
}() called with invalid data. ` +
866872
`${
867873
usesFunctionalApi() ? 'increment' : 'FieldValue.increment'
868874
}() can only be used with update() and set() (found in field test)`

0 commit comments

Comments
 (0)