Skip to content

Commit

Permalink
apply comments
Browse files Browse the repository at this point in the history
  • Loading branch information
koh110 committed Nov 28, 2020
1 parent 4b48002 commit cd929e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions lighthouse-core/test/config/config-helpers-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ jest.mock('process', () => ({
}));

describe('resolveModule', () => {
const configFixturePath = path.resolve(__dirname, '../fixtures/config');

beforeEach(() => {
process.cwd = jest.fn(() => configFixturePath);
});

it('lighthouse and plugins are installed in the same path', () => {
const pluginName = 'chrome-launcher';
const pathToPlugin = resolveModule(pluginName, null, 'plugin');
assert.equal(pathToPlugin, require.resolve(pluginName));
});

describe('plugin paths to a file', () => {
const configFixturePath = path.resolve(__dirname, '../fixtures/config');

beforeEach(() => {
process.cwd = jest.fn(() => configFixturePath);
});

it('relative to the current working directory', () => {
const pluginName = 'lighthouse-plugin-config-helper';
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cd929e6

Please sign in to comment.