Skip to content

Commit

Permalink
chore: fix blob test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasholzer committed Dec 6, 2023
1 parent 9247919 commit ccce64f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/integration/commands/deploy/deploy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,13 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co
await builder
.withNetlifyToml({
config: {
build: { functions: 'functions' },
build: { functions: 'functions', publish: 'dist' },
},
})
.withContentFile({
path: 'dist/index.html',
content: '<a href="/read-blob">get blob</a>',
})
.withContentFile({
path: '.netlify/blobs/deploy/hello',
content: 'hello from the blob',
Expand All @@ -843,18 +847,18 @@ describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('co
path: 'functions/read-blob.ts',
content: `
import { getDeployStore } from "@netlify/blobs"
import { Config, Context } from "@netlify/functions"
export default async (req: Request, context: Context) => {
import { Config } from "@netlify/functions"
export default async () => {
const store = getDeployStore()
const blob = await store.get('hello')
return new Response(blob)
}
export const config: Config = {
path: "/read-blob"
}
}
`,
})
.build()
Expand Down

0 comments on commit ccce64f

Please sign in to comment.