Skip to content

Commit

Permalink
improve getHTMLWebpackPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Applelo committed Aug 31, 2023
1 parent 2ca4b36 commit 171d7c3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/getHTMLWebpackPlugin.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it, vi } from 'vitest'
import { getHTMLWebpackPlugin } from '../src/helper/getHTMLWebpackPlugin'

describe('excerpt get HTMLWebpackPlugin', () => {
it('get HTMLWebpackPlugin', async () => {
const HTMLWebpackPlugin = await getHTMLWebpackPlugin()
expect(HTMLWebpackPlugin).not.toBeNull()
})

it('failed get HTMLWebpackPlugin', async () => {
vi.doMock('html-webpack-plugin', () => {})
try {
await getHTMLWebpackPlugin()
}
catch (error) {
expect(error).toBeDefined()
}
})
})

0 comments on commit 171d7c3

Please sign in to comment.