1
1
import 'mocha' ; // tslint:disable-line:no-import-side-effect
2
2
import Facade from '../../Facade' ;
3
3
import Filter from '../../types/Filter' ;
4
- import { TestEntity , testEntity , TestId , testId } from '../utils/testEntity' ;
4
+ import { TestEntity , testEntity , TestId } from '../utils/testEntity' ;
5
5
6
6
export type FilterAsserter = ( filter : Filter < TestEntity > ) => Promise < void > ;
7
7
@@ -11,13 +11,15 @@ export interface Opts {
11
11
readonly assertNoEntityFilter : FilterAsserter ;
12
12
readonly assertAllEntitiesFilter : FilterAsserter ;
13
13
}
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 } ;
16
18
17
19
export default ( opts : Opts ) => {
18
20
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 } ) ;
21
23
} ;
22
24
23
25
it ( 'should not filter when using no filter' , async ( ) => {
0 commit comments