Skip to content

Commit 9a040b4

Browse files
committed
Update tests
1 parent ea71048 commit 9a040b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/index.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const fakeInputOptions = {} as NormalizedInputOptions
1212
const externalsOptionsArbitrary = (): Arbitrary<ExternalsOptions> => fc.record({
1313
packagePath: fc.string(),
1414
builtins: fc.boolean(),
15+
builtinsPrefix: fc.oneof(fc.constant<'strip'>('strip'), fc.constant<'add'>('add')),
1516
prefixedBuiltins: fc.oneof(fc.boolean(), fc.constant<'strip'>('strip'), fc.constant<'add'>('add')),
1617
deps: fc.boolean(),
1718
devDeps: fc.boolean(),
@@ -60,6 +61,7 @@ test.serial('monorepo usage', async t => {
6061

6162
test('prefixedBuiltins === false', async t => {
6263
const plugin = externals({ prefixedBuiltins: false }) as TestedPlugin
64+
plugin.warn = () => {}
6365
await plugin.buildStart(fakeInputOptions)
6466

6567
for (const source of [ 'node:path', 'path' ]) {
@@ -69,6 +71,7 @@ test('prefixedBuiltins === false', async t => {
6971

7072
test('prefixedBuiltins === true (default)', async t => {
7173
const plugin = externals({ prefixedBuiltins: true }) as TestedPlugin
74+
plugin.warn = () => {}
7275
await plugin.buildStart(fakeInputOptions)
7376

7477
for (const source of [ 'node:path', 'path' ]) {
@@ -81,6 +84,7 @@ test('prefixedBuiltins === true (default)', async t => {
8184

8285
test('prefixedBuiltins === "strip"', async t => {
8386
const plugin = externals({ prefixedBuiltins: 'strip' }) as TestedPlugin
87+
plugin.warn = () => {}
8488
await plugin.buildStart(fakeInputOptions)
8589

8690
for (const source of [ 'node:path', 'path' ]) {
@@ -93,6 +97,7 @@ test('prefixedBuiltins === "strip"', async t => {
9397

9498
test('prefixedBuiltins === "add"', async t => {
9599
const plugin = externals({ prefixedBuiltins: 'add' }) as TestedPlugin
100+
plugin.warn = () => {}
96101
await plugin.buildStart(fakeInputOptions)
97102

98103
for (const source of [ 'node:path', 'path' ]) {

0 commit comments

Comments
 (0)