Skip to content

Commit 11f0bbc

Browse files
Lint
1 parent 79dfa43 commit 11f0bbc

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

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

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,28 +1459,24 @@ apiDescribe('Validation:', (persistence: boolean) => {
14591459
}
14601460
);
14611461

1462-
validationIt.only(
1463-
persistence,
1464-
'cannot pass undefined as a field value',
1465-
db => {
1466-
const collection = db.collection('test');
1467-
if (usesFunctionalApi()) {
1468-
expect(() => collection.where('foo', '==', undefined)).to.throw(
1469-
'Function where() called with invalid data. Unsupported field value: undefined'
1470-
);
1471-
expect(() => collection.orderBy('foo').startAt(undefined)).to.throw(
1472-
'Function startAt() called with invalid data. Unsupported field value: undefined'
1473-
);
1474-
} else {
1475-
expect(() => collection.where('foo', '==', undefined)).to.throw(
1476-
'Function Query.where() requires a valid third argument, but it was undefined.'
1477-
);
1478-
expect(() => collection.orderBy('foo').startAt(undefined)).to.throw(
1479-
'Function Query.startAt() requires a valid first argument, but it was undefined.'
1480-
);
1481-
}
1462+
validationIt(persistence, 'cannot pass undefined as a field value', db => {
1463+
const collection = db.collection('test');
1464+
if (usesFunctionalApi()) {
1465+
expect(() => collection.where('foo', '==', undefined)).to.throw(
1466+
'Function where() called with invalid data. Unsupported field value: undefined'
1467+
);
1468+
expect(() => collection.orderBy('foo').startAt(undefined)).to.throw(
1469+
'Function startAt() called with invalid data. Unsupported field value: undefined'
1470+
);
1471+
} else {
1472+
expect(() => collection.where('foo', '==', undefined)).to.throw(
1473+
'Function Query.where() requires a valid third argument, but it was undefined.'
1474+
);
1475+
expect(() => collection.orderBy('foo').startAt(undefined)).to.throw(
1476+
'Function Query.startAt() requires a valid first argument, but it was undefined.'
1477+
);
14821478
}
1483-
);
1479+
});
14841480
});
14851481
});
14861482

0 commit comments

Comments
 (0)