Skip to content

Commit

Permalink
chore: rm redundant test dir cleanup, rm test level gitignore and han…
Browse files Browse the repository at this point in the history
…dle at root (#1669)

* chore: remove test level gitignores, handle in root

* chore: rm redundant test dir removals

* chore: rm redundant test dir removals

Co-authored-by: James George <jamesgeorge998001@gmail.com>
  • Loading branch information
anshumanv and jamesgeorge007 authored Jul 6, 2020
1 parent 91b5152 commit 98056bc
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 57 deletions.
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.

0 comments on commit 98056bc

Please sign in to comment.