Skip to content

Commit 9f6a2d9

Browse files
committedFeb 19, 2025
added mockAssertConfigure in Datastore
1 parent ab8f61b commit 9f6a2d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎packages/datastore/__tests__/DataStore/sanityCheck.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'fake-indexeddb/auto';
2+
import { Amplify } from '@aws-amplify/core';
23
import { DataStore as DataStoreType } from '../../src/datastore/datastore';
34
import { Predicates } from '../../src/predicates';
45
import {
@@ -10,6 +11,10 @@ import {
1011
pause,
1112
} from '../helpers';
1213

14+
jest.spyOn(Amplify, 'assertConfigured').mockImplementation(jest.fn());
15+
jest.spyOn(Amplify, 'configure').mockImplementation(jest.fn());
16+
jest.spyOn(Amplify, 'getConfig').mockReturnValue({});
17+
1318
let { DataStore } = getDataStore() as {
1419
DataStore: typeof DataStoreType;
1520
};

0 commit comments

Comments
 (0)