mirror of
https://github.com/webpack/tapable.git
synced 2026-02-01 16:07:39 +00:00
test(SyncHook): tapAsync and tapPromise should throw
This commit is contained in:
parent
d84786acf1
commit
1fd8cdd06a
@ -101,4 +101,14 @@ describe("SyncHook", () => {
|
||||
expect(mock2).not.toHaveBeenLastCalledWith(1, 2);
|
||||
expect(mock0).toHaveBeenLastCalledWith(1, 2);
|
||||
});
|
||||
|
||||
it('should throw error on tapAsync', () => {
|
||||
const hook = new SyncHook(["arg1", "arg2"]);
|
||||
expect(() => hook.tapAsync()).toThrow(/tapAsync/)
|
||||
})
|
||||
|
||||
it('should throw error on tapPromise', () => {
|
||||
const hook = new SyncHook(["arg1", "arg2"]);
|
||||
expect(() => hook.tapPromise()).toThrow(/tapPromise/)
|
||||
})
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user