diff --git a/.taprc b/.taprc index 31b6314..3b6cba0 100644 --- a/.taprc +++ b/.taprc @@ -1,2 +1 @@ -jobs: 1 test-ignore: (\/|^)test/(helpers|fixtures)\/ diff --git a/test/html-webpack-plugin-as-argument.test.js b/test/html-webpack-plugin-as-argument.test.js index 8e737ad..9f47e80 100644 --- a/test/html-webpack-plugin-as-argument.test.js +++ b/test/html-webpack-plugin-as-argument.test.js @@ -8,15 +8,15 @@ const DynamicCdnWebpackPlugin = require('..').default; const runWebpack = require('./helpers/run-webpack.js'); const cleanDir = require('./helpers/clean-dir.js'); -t.test('html-webpack-plugin', async t => { - await cleanDir(path.resolve(__dirname, './fixtures/output/html-webpack-plugin')); +t.test('html-webpack-plugin-as-argument', async t => { + await cleanDir(path.resolve(__dirname, './fixtures/output/html-webpack-plugin-as-argument')); await runWebpack({ context: path.resolve(__dirname, './fixtures/app'), output: { publicPath: '/', - path: path.resolve(__dirname, './fixtures/output/html-webpack-plugin'), + path: path.resolve(__dirname, './fixtures/output/html-webpack-plugin-as-argument'), }, entry: { @@ -26,12 +26,12 @@ t.test('html-webpack-plugin', async t => { plugins: [new HtmlWebpackPlugin(), new DynamicCdnWebpackPlugin({}, HtmlWebpackPlugin)], }); - const indexFile = await fs.readFile(path.resolve(__dirname, './fixtures/output/html-webpack-plugin/index.html'), { encoding: 'utf-8' }); + const indexFile = await fs.readFile(path.resolve(__dirname, './fixtures/output/html-webpack-plugin-as-argument/index.html'), { encoding: 'utf-8' }); t.ok(indexFile.includes('src="/app.js"')); t.ok(indexFile.includes('src="https://unpkg.com/react@15.6.1/dist/react.js"')); - const output = await fs.readFile(path.resolve(__dirname, './fixtures/output/html-webpack-plugin/app.js')); + const output = await fs.readFile(path.resolve(__dirname, './fixtures/output/html-webpack-plugin-as-argument/app.js')); // NOTE: not inside t.notOk to prevent ava to display whole file in console const doesIncludeReact = output.includes('PureComponent'); diff --git a/test/no-html-webpack-plugin.test.js b/test/no-html-webpack-plugin.test.js index 3ba96bb..3d3d78f 100644 --- a/test/no-html-webpack-plugin.test.js +++ b/test/no-html-webpack-plugin.test.js @@ -8,15 +8,15 @@ const DynamicCdnWebpackPlugin = require('..').default; const runWebpack = require('./helpers/run-webpack.js'); const cleanDir = require('./helpers/clean-dir.js'); -t.test('html-webpack-plugin', async t => { - await cleanDir(path.resolve(__dirname, './fixtures/output/html-webpack-plugin')); +t.test('no-html-webpack-plugin', async t => { + await cleanDir(path.resolve(__dirname, './fixtures/output/no-html-webpack-plugin')); await runWebpack({ context: path.resolve(__dirname, './fixtures/app'), output: { publicPath: '/', - path: path.resolve(__dirname, './fixtures/output/html-webpack-plugin'), + path: path.resolve(__dirname, './fixtures/output/no-html-webpack-plugin'), }, entry: { @@ -30,12 +30,12 @@ t.test('html-webpack-plugin', async t => { ], }); - const indexFile = await fs.readFile(path.resolve(__dirname, './fixtures/output/html-webpack-plugin/index.html'), { encoding: 'utf-8' }); + const indexFile = await fs.readFile(path.resolve(__dirname, './fixtures/output/no-html-webpack-plugin/index.html'), { encoding: 'utf-8' }); t.ok(indexFile.includes('src="/app.js"')); t.ok(!indexFile.includes('src="https://unpkg.com/react@15.6.1/dist/react.js"')); - const output = await fs.readFile(path.resolve(__dirname, './fixtures/output/html-webpack-plugin/app.js')); + const output = await fs.readFile(path.resolve(__dirname, './fixtures/output/no-html-webpack-plugin/app.js')); // NOTE: not inside t.notOk to prevent ava to display whole file in console const doesIncludeReact = output.includes('PureComponent');