Skip to content

Commit

Permalink
style: fix with tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
JingWangTW authored and wovalle committed Jan 12, 2021
1 parent 8766b3b commit 63d5677
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions src/BaseFirestoreRepository.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,10 @@ describe('BaseFirestoreRepository', () => {
});

it('must filter with whereNotEqualTo', async () => {
const list = await bandRepository.whereNotEqualTo('name', 'Porcupine Tree').find();
expect(list.length).toEqual(1);
expect(list[0].formationYear).toEqual(1983);
});
const list = await bandRepository.whereNotEqualTo('name', 'Porcupine Tree').find();
expect(list.length).toEqual(1);
expect(list[0].formationYear).toEqual(1983);
});

it('must filter with whereGreaterThan', async () => {
const list = await bandRepository.whereGreaterThan('formationYear', 1983).find();
Expand Down Expand Up @@ -444,8 +444,8 @@ describe('BaseFirestoreRepository', () => {
});

it('must filter with whereNotIn', async () => {
const list = await bandRepository.whereNotIn('formationYear', [1965]).find();
expect(list.length).toEqual(2);
const list = await bandRepository.whereNotIn('formationYear', [1965]).find();
expect(list.length).toEqual(2);
});

it('should throw with whereArrayContainsAny and more than 10 items in val array', async () => {
Expand All @@ -463,9 +463,11 @@ describe('BaseFirestoreRepository', () => {
});

it('should throw with whereNotIn and more than 10 items in val array', async () => {
expect(async () => {
await bandRepository.whereNotIn('formationYear', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]).find();
}).rejects.toThrow(Error);
expect(async () => {
await bandRepository
.whereNotIn('formationYear', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
.find();
}).rejects.toThrow(Error);
});

it('must filter with two or more operators', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export enum FirestoreOperators {
arrayContains = 'array-contains',
arrayContainsAny = 'array-contains-any',
in = 'in',
notIn = 'not-in'
notIn = 'not-in',
}

export interface IFireOrmQueryLine {
Expand Down

0 comments on commit 63d5677

Please sign in to comment.