Skip to content

Commit e392ce5

Browse files
committed
Prevent test from bleeding into the global expect
1 parent 0217052 commit e392ce5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/api/hook.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ describe('hook', () => {
128128

129129
// Regression test for https://gitter.im/unexpectedjs/unexpected?at=5fb42b73747be107c1c76095
130130
it('should not break `this` in clones created after installing the hook', function () {
131-
expect.hook(function (next) {
131+
const parentExpect = expect.clone();
132+
parentExpect.hook(function (next) {
132133
return function (context, ...rest) {
133134
return next(context, ...rest);
134135
};

0 commit comments

Comments
 (0)