Skip to content

Commit dd6902e

Browse files
committed
Add two new checks for better coverage
1 parent da3b100 commit dd6902e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

async.test.js

+16
Original file line numberDiff line numberDiff line change
@@ -844,5 +844,21 @@ modes.forEach((logic) => {
844844
)
845845
).toBe('hello'.toString)
846846
})
847+
848+
test('async + deterministic function', async () => {
849+
logic.addMethod('test', async () => '1337', { deterministic: true })
850+
expect(
851+
await logic.run({
852+
test: true
853+
})
854+
).toBe('1337')
855+
})
856+
857+
test('async + determistic function inside array', async () => {
858+
logic.addMethod('test', async () => '1337', { deterministic: true })
859+
expect(
860+
await logic.run([{ test: true }, { test: true }])
861+
).toStrictEqual(['1337', '1337'])
862+
})
847863
})
848864
})

0 commit comments

Comments
 (0)