Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rm redundant test dir cleanup, rm test level gitignore and handle at root #1669

Merged
merged 5 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@

# Node dependencies
node_modules
!test/**/**/**/node_modules
test/**/node_modules

# Lock files
test/**/yarn.lock
test/**/package-json.lock

# npm-debug log
npm-debug.*
Expand All @@ -26,7 +30,6 @@ yarn-error.log
coverage
.nyc_output

# Test Compilation
# lerna log
lerna-debug.log

Expand Down
8 changes: 1 addition & 7 deletions test/config/multiple/all/multiple-config.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
'use strict';
const { stat } = require('fs');
const { resolve, join } = require('path');
const { resolve } = require('path');
const { run } = require('../../../utils/test-utils');
const rimraf = require('rimraf');

const outputPath = join(__dirname, 'binary');

describe('multiple config files', () => {
afterEach(() => rimraf.sync(outputPath));
beforeAll(() => rimraf.sync(outputPath));

it('Uses prod config from dot folder if present', (done) => {
const { stdout, stderr } = run(__dirname, [], false);
expect(stderr).toBeFalsy();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
'use strict';
const { stat } = require('fs');
const { resolve, join } = require('path');
const { resolve } = require('path');
const { run } = require('../../../utils/test-utils');
const rimraf = require('rimraf');

const outputPath = join(__dirname, 'binary');

describe('multiple dev config files with webpack.config.js', () => {
afterEach(() => rimraf.sync(outputPath));
beforeAll(() => rimraf.sync(outputPath));

it('Uses webpack.config.development.js', (done) => {
const { stdout, stderr } = run(__dirname, [], false);
expect(stderr).toBeFalsy();
Expand Down
8 changes: 1 addition & 7 deletions test/config/multiple/none and dev/dev-none-config.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
'use strict';
const { stat } = require('fs');
const { resolve, join } = require('path');
const { resolve } = require('path');
const { run } = require('../../../utils/test-utils');
const rimraf = require('rimraf');

const outputPath = join(__dirname, 'binary');

describe('multiple config files', () => {
afterEach(() => rimraf.sync(outputPath));
beforeAll(() => rimraf.sync(outputPath));

it('Uses dev config when both dev and none are present', (done) => {
const { stdout, stderr } = run(__dirname, [], false);
expect(stderr).toBeFalsy();
Expand Down
8 changes: 1 addition & 7 deletions test/config/multiple/with-mode/multiple-config.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
'use strict';
const { stat } = require('fs');
const { resolve, join } = require('path');
const { resolve } = require('path');
const { run } = require('../../../utils/test-utils');
const rimraf = require('rimraf');

const outputPath = join(__dirname, 'binary');

describe('multiple config files', () => {
afterEach(() => rimraf.sync(outputPath));
beforeAll(() => rimraf.sync(outputPath));

it('Uses dev config when development mode is supplied', (done) => {
const { stdout, stderr } = run(__dirname, ['--mode', 'development'], false);
expect(stderr).toBeFalsy();
Expand Down
3 changes: 0 additions & 3 deletions test/entry/scss/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions test/mode/mode-with-config/.gitignore

This file was deleted.

13 changes: 1 addition & 12 deletions test/output/named-bundles/output-named-bundles.test.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
'use strict';
const { statSync } = require('fs');
const { join, resolve } = require('path');
const rimraf = require('rimraf');
const { resolve } = require('path');
const { run } = require('../../utils/test-utils');

describe('output flag named bundles', () => {
const clean = () => {
rimraf.sync(join(__dirname, 'bin'));
rimraf.sync(join(__dirname, 'dist'));
rimraf.sync(join(__dirname, 'binary'));
};

beforeEach(clean);

afterAll(clean);

it('should output file given as flag instead of in configuration', () => {
const { stderr } = run(__dirname, ['-c', resolve(__dirname, 'webpack.config.js'), '--output', './binary/a.bundle.js'], false);
expect(stderr).toBeFalsy();
Expand Down
3 changes: 0 additions & 3 deletions test/stats/cli-flags/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions test/stats/config/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions test/typescript/.gitignore

This file was deleted.