File tree 1 file changed +13
-1
lines changed
packages/jest-resolve/src/__tests__
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -186,15 +186,27 @@ describe('getMockModule', () => {
186
186
describe ( 'Resolver.getModulePaths() -> nodeModulesPaths()' , ( ) => {
187
187
let moduleMap ;
188
188
189
- beforeEach ( ( ) => {
189
+ beforeAll ( ( ) => {
190
190
jest . resetModules ( ) ;
191
+ } ) ;
192
+
193
+ beforeEach ( ( ) => {
191
194
moduleMap = new ModuleMap ( {
192
195
duplicates : [ ] ,
193
196
map : [ ] ,
194
197
mocks : [ ] ,
195
198
} ) ;
196
199
} ) ;
197
200
201
+ afterEach ( ( ) => {
202
+ jest . resetModules ( ) ;
203
+ } ) ;
204
+
205
+ afterAll ( ( ) => {
206
+ jest . dontMock ( 'path' ) ;
207
+ Resolver = require ( '../' ) ;
208
+ } ) ;
209
+
198
210
it ( 'can resolve node modules relative to absolute paths in "moduleDirectories" on Windows platforms' , ( ) => {
199
211
jest . doMock ( 'path' , ( ) => path . win32 ) ;
200
212
Resolver = require ( '../' ) ;
You can’t perform that action at this time.
0 commit comments