Skip to content

Commit

Permalink
test: update
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Mar 25, 2021
1 parent 20b33fd commit d81ffab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/build/custom-webpack/custom-webpack.js
@@ -0,0 +1 @@
module.exports = require('webpack');
21 changes: 21 additions & 0 deletions test/build/custom-webpack/custom-webpack.test.js
@@ -0,0 +1,21 @@
'use strict';

const { run } = require('../../utils/test-utils');

const importLocalMock = jest.fn();
jest.setMock('import-local', importLocalMock);

describe('import local', () => {
beforeEach(() => {
importLocalMock.mockClear();
});
it('should skip import local when supplied', () => {
const { exitCode, stderr, stdout } = run(__dirname, [], {
env: { WEBPACK_PACKAGE: './custom-webpack.js' },
});
// expect(importLocalMock).toHaveBeenCalledTimes(0);
//expect(exitCode).toBe(0);
expect(stderr).toBeFalsy();
expect(stdout).toBeTruthy();
});
});

0 comments on commit d81ffab

Please sign in to comment.