Prechádzať zdrojové kódy

test(app-boot): unlink hmr alias junctions before removing the target

Huanqi Cao 2 mesiacov pred
rodič
commit
22d30852f7

+ 2 - 2
packages/boot/app-boot/tests/hmr-config.spec.ts

@@ -62,7 +62,7 @@ describe('HMR exact config paths', () => {
       expect(cacheHas).toHaveBeenCalledWith(expected)
     } finally {
       await ctx.fiber.dispose()
-      rmSync(alias, { force: true })
+      unlinkSync(alias)
       rmSync(target, { recursive: true, force: true })
     }
   })
@@ -78,7 +78,7 @@ describe('HMR exact config paths', () => {
         .rejects.toThrow('config path already registered')
     } finally {
       await ctx.fiber.dispose()
-      rmSync(alias, { force: true })
+      unlinkSync(alias)
       rmSync(target, { recursive: true, force: true })
     }
   })