Skip to content

Commit

Permalink
tests: change hardcoded env set to vi.stubEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianRomanski committed Dec 20, 2024
1 parent da5919b commit 2e749e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/nx-verdaccio/src/plugin/caching.unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ describe('readTargetsCache', (): void => {
.mockImplementation((): Record<string, Partial<ProjectConfiguration>> => {
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 => {
Expand Down

0 comments on commit 2e749e3

Please sign in to comment.