File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
packages/jest-resolve/src/__tests__ Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -186,15 +186,27 @@ describe('getMockModule', () => {
186186describe ( 'Resolver.getModulePaths() -> nodeModulesPaths()' , ( ) => {
187187 let moduleMap ;
188188
189- beforeEach ( ( ) => {
189+ beforeAll ( ( ) => {
190190 jest . resetModules ( ) ;
191+ } ) ;
192+
193+ beforeEach ( ( ) => {
191194 moduleMap = new ModuleMap ( {
192195 duplicates : [ ] ,
193196 map : [ ] ,
194197 mocks : [ ] ,
195198 } ) ;
196199 } ) ;
197200
201+ afterEach ( ( ) => {
202+ jest . resetModules ( ) ;
203+ } ) ;
204+
205+ afterAll ( ( ) => {
206+ jest . unmock ( 'path' , ( ) => path . win32 ) ;
207+ Resolver = require ( '../' ) ;
208+ } ) ;
209+
198210 it ( 'can resolve node modules relative to absolute paths in "moduleDirectories" on Windows platforms' , ( ) => {
199211 jest . doMock ( 'path' , ( ) => path . win32 ) ;
200212 Resolver = require ( '../' ) ;
You can’t perform that action at this time.
0 commit comments