File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 1
1
const { resolve} = require ( 'path' )
2
2
const { render} = require ( '../pure' )
3
- const { getConfig, configure} = require ( "../config" ) ;
4
-
5
- let originalConfig
6
- beforeEach ( ( ) => {
7
- originalConfig = getConfig ( )
8
- configure ( { asyncUtilTimeout : 15000 , renderAwaitTime : 300 } )
9
- } )
10
-
11
- afterEach ( ( ) => {
12
- configure ( originalConfig )
13
- } )
14
3
15
4
test ( 'Should expect error codes when intended' , async ( ) => {
16
5
const instance = await render ( 'node' , [ resolve ( __dirname , './execute-scripts/throw.js' ) ] )
Original file line number Diff line number Diff line change 1
1
import jestSnapshotSerializerAnsi from 'jest-snapshot-serializer-ansi'
2
2
import '../src/extend-expect' ;
3
+ import { configure , getConfig } from "../src/config" ;
3
4
4
5
expect . addSnapshotSerializer ( jestSnapshotSerializerAnsi )
5
6
// add serializer for MutationRecord
@@ -46,5 +47,14 @@ afterAll(() => {
46
47
jest . restoreAllMocks ( )
47
48
} )
48
49
50
+ jest . setTimeout ( 20000 )
49
51
50
- jest . setTimeout ( 7000 )
52
+ let originalConfig
53
+ beforeAll ( ( ) => {
54
+ originalConfig = getConfig ( )
55
+ configure ( { asyncUtilTimeout : 15000 , renderAwaitTime : 800 } )
56
+ } )
57
+
58
+ afterAll ( ( ) => {
59
+ configure ( originalConfig )
60
+ } )
You can’t perform that action at this time.
0 commit comments