mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-04-06 15:30:30 +08:00
chore(operators-js): Fix getFromObject mock for _global.
This commit is contained in:
parent
c6fcbc865d
commit
8b74f68397
@ -14,10 +14,11 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import global from './global.js';
|
||||
|
||||
jest.mock('@lowdefy/operators');
|
||||
|
||||
let lowdefyOperators;
|
||||
let global;
|
||||
|
||||
const input = {
|
||||
arrayIndices: [0],
|
||||
location: 'location',
|
||||
@ -25,8 +26,12 @@ const input = {
|
||||
params: 'params',
|
||||
};
|
||||
|
||||
test('global calls getFromObject', () => {
|
||||
const lowdefyOperators = import('@lowdefy/operators');
|
||||
beforeEach(async () => {
|
||||
lowdefyOperators = await import('@lowdefy/operators');
|
||||
global = (await import('./global.js')).default;
|
||||
});
|
||||
|
||||
test('global calls getFromObject', async () => {
|
||||
global(input);
|
||||
expect(lowdefyOperators.getFromObject.mock.calls).toEqual([
|
||||
[
|
||||
|
Loading…
x
Reference in New Issue
Block a user