Skip to content

Commit

Permalink
tests(config-helpers): restore process.cwd after mocking (#14036)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored and paulirish committed May 26, 2022
1 parent c862737 commit 3989f81
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lighthouse-core/test/config/config-helpers-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ import {createCommonjsRefs} from '../../scripts/esm-utils.js';

const {require, __dirname} = createCommonjsRefs(import.meta);

jest.mock('process', () => ({
cwd: () => jest.fn(),
}));
const originalCwd = process.cwd;
afterAll(() => {
process.cwd = originalCwd;
});

describe('.mergeConfigFragment', () => {
it('should merge properties in like Object.assign', () => {
Expand Down

0 comments on commit 3989f81

Please sign in to comment.