Skip to content

Commit 23105f0

Browse files
committed
Prevent test from bleeding into the global expect
(cherry picked from commit e392ce5)
1 parent b22f917 commit 23105f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/api/hook.js

+2-1
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)