Skip to content

Commit

Permalink
test: clean up (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Jul 1, 2021
1 parent 794b602 commit 0420b78
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 40 deletions.
3 changes: 0 additions & 3 deletions test/cases/asset-modules/test.filter.js

This file was deleted.

7 changes: 1 addition & 6 deletions test/cases/chunkFilename-as-function/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { version as webpackVersion } from 'webpack';

import Self from '../../../src';

module.exports = {
Expand All @@ -15,10 +13,7 @@ module.exports = {
plugins: [
new Self({
filename: '[name].css',
chunkFilename:
webpackVersion[0] === '4'
? '[id].[name].css'
: ({ chunk }) => `${chunk.id}.${chunk.name}.css`,
chunkFilename: ({ chunk }) => `${chunk.id}.${chunk.name}.css`,
}),
],
};
3 changes: 0 additions & 3 deletions test/cases/chunkFilename-fullhash/test.filter.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/content-entries-with-same-import/test.filter.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/dependOn-multiple-files-per-entry/test.filter.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/dependOn/test.filter.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/es-named-export-output-module/test.filter.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/output-iife/test.filter.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/output-module/test.filter.js

This file was deleted.

This file was deleted.

9 changes: 2 additions & 7 deletions test/cases/split-chunks-recursiveIssuer/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import { version as webpackVersion } from 'webpack';

import Self from '../../../src';

function recursiveIssuer(m, c) {
const issuer =
webpackVersion[0] === '4' ? m.issuer : c.moduleGraph.getIssuer(m);
const issuer = c.moduleGraph.getIssuer(m);

if (issuer) {
return recursiveIssuer(issuer, c);
}

const chunks =
// eslint-disable-next-line no-underscore-dangle
webpackVersion[0] === '4' ? m._chunks : c.chunkGraph.getModuleChunks(m);
const chunks = c.chunkGraph.getModuleChunks(m);

for (const chunk of chunks) {
return chunk.name;
Expand Down

0 comments on commit 0420b78

Please sign in to comment.