Skip to content

Commit

Permalink
tests: remove unnecessary jest babel transform (#11664)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored Nov 13, 2020
1 parent fea7ffc commit 078feb1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ module.exports = {
'**/clients/test/**/*-test.js',
'**/docs/**/*.test.js',
],
transform: {},
};
4 changes: 2 additions & 2 deletions lighthouse-cli/test/cli/bin-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

/* eslint-env jest */

const bin = require('../../bin.js');

jest.mock('../../run.js', () => ({runLighthouse: jest.fn()}));
jest.mock('../../cli-flags.js', () => ({getFlags: jest.fn()}));
jest.mock('../../sentry-prompt.js', () => ({askPermission: jest.fn()}));
jest.mock('../../../lighthouse-core/lib/sentry.js', () => ({init: jest.fn()}));
jest.mock('lighthouse-logger', () => ({setLevel: jest.fn()}));
jest.mock('update-notifier', () => () => ({notify: () => {}}));

const bin = require('../../bin.js');

/** @type {jest.Mock} */
let getCLIFlagsFn;
/** @type {jest.Mock} */
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-core/test/gather/gather-runner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/* eslint-env jest */

jest.mock('../../lib/stack-collector.js', () => () => Promise.resolve([]));

const Gatherer = require('../../gather/gatherers/gatherer.js');
const GatherRunner_ = require('../../gather/gather-runner.js');
const assert = require('assert').strict;
Expand All @@ -20,8 +22,6 @@ const Connection = require('../../gather/connections/connection.js');
const {createMockSendCommandFn} = require('./mock-commands.js');
const {makeParamsOptional} = require('../test-utils.js');

jest.mock('../../lib/stack-collector.js', () => () => Promise.resolve([]));

const GatherRunner = {
afterPass: makeParamsOptional(GatherRunner_.afterPass),
beginRecording: makeParamsOptional(GatherRunner_.beginRecording),
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-core/test/runner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
'use strict';

jest.mock('../lib/stack-collector.js', () => () => Promise.resolve([]));

const Runner = require('../runner.js');
const GatherRunner = require('../gather/gather-runner.js');
const driverMock = require('./gather/fake-driver.js');
Expand All @@ -21,8 +23,6 @@ const i18n = require('../lib/i18n/i18n.js');

/* eslint-env jest */

jest.mock('../lib/stack-collector.js', () => () => Promise.resolve([]));

describe('Runner', () => {
const defaultGatherFn = opts => Runner._gatherArtifactsFromBrowser(
opts.requestedUrl,
Expand Down

0 comments on commit 078feb1

Please sign in to comment.