diff --git a/projects/nx-verdaccio/src/plugin/caching.unit-test.ts b/projects/nx-verdaccio/src/plugin/caching.unit-test.ts index a493633..e1117a7 100644 --- a/projects/nx-verdaccio/src/plugin/caching.unit-test.ts +++ b/projects/nx-verdaccio/src/plugin/caching.unit-test.ts @@ -100,13 +100,13 @@ describe('readTargetsCache', (): void => { .mockImplementation((): Record> => { return MOCK_TARGETS_CACHE; }); - process.env.NX_CACHE_PROJECT_GRAPH = 'true'; + vi.stubEnv("NX_CACHE_PROJECT_GRAPH", 'true') }); afterEach((): void => { existsSyncSpy.mockRestore(); readJsonFileSpy.mockRestore(); - delete process.env.NX_CACHE_PROJECT_GRAPH; + vi.clearAllMocks(); }); it('should call existSync once with correct argument', (): void => {