Skip to content

Commit 8d57993

Browse files
Lint
1 parent 0dcdd71 commit 8d57993

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

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

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -145,26 +145,30 @@ apiDescribe('Validation:', (persistence: boolean) => {
145145
}
146146
);
147147

148-
validationIt(persistence, 'disallows changing settings after use', db => {
149-
let errorMsg =
150-
'Firestore has already been started and its settings can no ' +
151-
'longer be changed. ';
148+
validationIt(
149+
persistence,
150+
'disallows changing settings after use',
151+
async db => {
152+
let errorMsg =
153+
'Firestore has already been started and its settings can no ' +
154+
'longer be changed. ';
155+
156+
if (usesFunctionalApi()) {
157+
errorMsg +=
158+
'initializeFirestore() cannot be called after calling ' +
159+
'getFirestore()';
160+
} else {
161+
errorMsg +=
162+
'You can only call settings() before calling any other ' +
163+
'methods on a Firestore object.';
164+
}
152165

153-
if (usesFunctionalApi()) {
154-
errorMsg +=
155-
'initializeFirestore() cannot be called after calling ' +
156-
'getFirestore()';
157-
} else {
158-
errorMsg +=
159-
'You can only call settings() before calling any other ' +
160-
'methods on a Firestore object.';
166+
await db.doc('foo/bar').set({});
167+
expect(() =>
168+
db.settings({ host: 'something-else.example.com' })
169+
).to.throw(errorMsg);
161170
}
162-
163-
db.doc('foo/bar').set({});
164-
expect(() =>
165-
db.settings({ host: 'something-else.example.com' })
166-
).to.throw(errorMsg);
167-
});
171+
);
168172

169173
validationIt(persistence, 'enforces minimum cache size', () => {
170174
const db = newTestFirestore('test-project');

0 commit comments

Comments
 (0)