Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/commands/dev/programmatic-netlify-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import process from 'process'

import { NetlifyDev } from '@netlify/dev'

import { NETLIFYDEVWARN, log } from '../../utils/command-helpers.js'
import { NETLIFYDEVLOG, NETLIFYDEVWARN, log } from '../../utils/command-helpers.js'
import type { EnvironmentVariables } from '../../utils/types.js'

interface StartNetlifyDevOptions {
Expand Down Expand Up @@ -56,6 +56,7 @@ export const startNetlifyDev = async ({

if (process.env.NETLIFY_DB_URL) {
env.NETLIFY_DB_URL = { sources: ['internal'], value: process.env.NETLIFY_DB_URL }
log(`${NETLIFYDEVLOG} Local DB ready: ${process.env.NETLIFY_DB_URL}`)
}

return netlifyDev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ describe('@netlify/dev integration', () => {
const body = await response.text()
console.log(body)
t.expect(body).toEqual(JSON.stringify({ sum: 2 }))
t.expect(server.output).toMatch(/Local DB ready: postgres:\/\/localhost:\d+\/postgres/)
})
})
})
Expand All @@ -63,6 +64,7 @@ describe('@netlify/dev integration', () => {

t.expect(response.status).toBe(200)
t.expect(body).toEqual(JSON.stringify({ url: '' }))
t.expect(server.output).not.toContain('Local DB ready:')
})
})
})
Expand Down
Loading