Skip to content

Commit

Permalink
test: disable node@22.7 Module syntax detection for zisi tests (#6802)
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Aug 26, 2024
1 parent c433aa6 commit a67732f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/integration/commands/dev/dev.zisi.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,23 @@ describe.concurrent.each(testMatrix)('withSiteBuilder with args: $args', ({ args

test('Should not use the ZISI function bundler if not using esbuild', async (t) => {
await withSiteBuilder(t, async (builder) => {
builder.withNetlifyToml({ config: { functions: { directory: 'functions' } } }).withContentFile({
path: path.join('functions', 'esm-function', 'esm-function.js'),
content: `
builder
.withNetlifyToml({ config: { functions: { directory: 'functions' } } })
.withContentFile({
path: path.join('functions', 'esm-function', 'package.json'),
content: JSON.stringify({ type: 'commonjs' }),
})
.withContentFile({
path: path.join('functions', 'esm-function', 'esm-function.js'),
content: `
export async function handler(event, context) {
return {
statusCode: 200,
body: 'esm',
};
}
`,
})
})

await builder.build()

Expand All @@ -106,6 +112,10 @@ export async function handler(event, context) {
await withSiteBuilder(t, async (builder) => {
builder
.withNetlifyToml({ config: { functions: { directory: 'functions', node_bundler: 'esbuild' } } })
.withContentFile({
path: path.join('functions', 'esm-function', 'package.json'),
content: JSON.stringify({ type: 'commonjs' }),
})
.withContentFile({
path: path.join('functions', 'esm-function', 'esm-function.js'),
content: `
Expand Down

1 comment on commit a67732f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,222
  • Package size: 313 MB
  • Number of ts-expect-error directives: 977

Please sign in to comment.