11import 'mocha' ; // tslint:disable-line:no-import-side-effect
22import Facade from '../../Facade' ;
33import Filter from '../../types/Filter' ;
4- import { TestEntity , testEntity , TestId , testId } from '../utils/testEntity' ;
4+ import { TestEntity , testEntity , TestId } from '../utils/testEntity' ;
55
66export 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
1719export 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