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 May 24, 2022
1 parent 6e262f2 commit 48d069d
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 48d069d

Please sign in to comment.