Skip to content

Commit d7c0d00

Browse files
committed
chore: add test
1 parent 11746b6 commit d7c0d00

File tree

1 file changed

+16
-0
lines changed
  • packages/builder/builder-webpack-provider/tests/plugins

1 file changed

+16
-0
lines changed

packages/builder/builder-webpack-provider/tests/plugins/html.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,22 @@ describe('plugins/html', () => {
193193
expect(await builder.matchWebpackPlugin('HtmlWebpackPlugin')).toBeFalsy();
194194
});
195195

196+
it('should disable html plugin when htmlPlugin is an array and contains false', async () => {
197+
const builder = await createStubBuilder({
198+
plugins: [builderPluginEntry(), builderPluginHtml()],
199+
entry: {
200+
main: './src/main.ts',
201+
},
202+
builderConfig: {
203+
tools: {
204+
htmlPlugin: [{}, false],
205+
},
206+
},
207+
});
208+
209+
expect(await builder.matchWebpackPlugin('HtmlWebpackPlugin')).toBeFalsy();
210+
});
211+
196212
it('should support multi entry', async () => {
197213
const builder = await createStubBuilder({
198214
plugins: [builderPluginEntry(), builderPluginHtml()],

0 commit comments

Comments
 (0)