File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import '@testing-library/jest-dom/extend-expect'
2
2
import jestSerializerAnsi from 'jest-serializer-ansi'
3
3
4
- import { configure } from '../src/config'
5
-
6
4
expect . addSnapshotSerializer ( jestSerializerAnsi )
7
5
// add serializer for MutationRecord
8
6
expect . addSnapshotSerializer ( {
@@ -39,7 +37,10 @@ beforeAll(() => {
39
37
} )
40
38
41
39
beforeEach ( ( ) => {
42
- configure ( { printPlaygroundLink : false } )
40
+ // Using require here instead of importing it at the top, because the import resulted in
41
+ // a function being used before a test had the chance to mock it.
42
+ // https://github.com/testing-library/dom-testing-library/pull/852#discussion_r557077851
43
+ require ( '../src/config' ) . configure ( { printPlaygroundLink : false } )
43
44
} )
44
45
45
46
afterEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments