Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Commit a92f7c8

Browse files
committed
fix(tests): Fixes filter tests.
1 parent 380b87b commit a92f7c8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/tests/utils/filterTest.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'mocha'; // tslint:disable-line:no-import-side-effect
22
import Facade from '../../Facade';
33
import Filter from '../../types/Filter';
4-
import { TestEntity, testEntity, TestId, testId } from '../utils/testEntity';
4+
import { TestEntity, testEntity, TestId } from '../utils/testEntity';
55

66
export type FilterAsserter = (filter: Filter<TestEntity>) => Promise<void>;
77

@@ -11,13 +11,15 @@ export interface Opts {
1111
readonly assertNoEntityFilter: FilterAsserter;
1212
readonly assertAllEntitiesFilter: FilterAsserter;
1313
}
14-
export const firstEntity = { ...testEntity, stringProp: 'a', numberProp: 1 };
15-
export const secondEntity = { ...testEntity, stringProp: 'b', numberProp: 2 };
14+
const firstId = { id: 'test_id_1' };
15+
const secondId = { id: 'test_id_2' };
16+
export const firstEntity = { ...testEntity, ...firstId, stringProp: 'a', numberProp: 1 };
17+
export const secondEntity = { ...testEntity, ...secondId, stringProp: 'b', numberProp: 2 };
1618

1719
export default (opts: Opts) => {
1820
const createTestEntities = async () => {
19-
await opts.facade.createEntity({ id: testId, entity: firstEntity });
20-
await opts.facade.createEntity({ id: testId, entity: secondEntity });
21+
await opts.facade.createEntity({ id: firstId, entity: firstEntity });
22+
await opts.facade.createEntity({ id: secondId, entity: secondEntity });
2123
};
2224

2325
it('should not filter when using no filter', async () => {

0 commit comments

Comments
 (0)