We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 932d6bf commit 568a330Copy full SHA for 568a330
tests/setup-env.js
@@ -1,8 +1,6 @@
1
import '@testing-library/jest-dom/extend-expect'
2
import jestSerializerAnsi from 'jest-serializer-ansi'
3
4
-import {configure} from '../src/config'
5
-
6
expect.addSnapshotSerializer(jestSerializerAnsi)
7
// add serializer for MutationRecord
8
expect.addSnapshotSerializer({
@@ -39,7 +37,10 @@ beforeAll(() => {
39
37
})
40
38
41
beforeEach(() => {
42
- configure({printPlaygroundLink: false})
+ // Using require here instead of importing it at the top, because the import resulted in
+ // a function being used before a test had the chance to mock it.
+ // https://github.com/testing-library/dom-testing-library/pull/852#discussion_r557077851
43
+ require('../src/config').configure({printPlaygroundLink: false})
44
45
46
afterEach(() => {
0 commit comments