Skip to content

Commit 52a5b4c

Browse files
authored
Merge pull request #25 from trurl-master/develop
fix: remove afterEach in the mockElementBoundingClientRect
2 parents 6260a57 + 55f55a1 commit 52a5b4c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsdom-testing-mocks",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"author": "Ivan Galiatin",
55
"license": "MIT",
66
"description": "A set of tools for emulating browser behavior in jsdom environment",

src/mocks/size.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,5 @@ export const mockElementBoundingClientRect = (
4040
toJSON: () => JSON.stringify(boundingClientRect),
4141
}));
4242

43-
afterEach(() => {
44-
element.getBoundingClientRect = savedImplementation;
45-
});
43+
return savedImplementation;
4644
};

0 commit comments

Comments
 (0)