Skip to content

Commit 5940f0e

Browse files
committed
chore: test
1 parent 2dea9b5 commit 5940f0e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tests/integration/100.command.dev.test.cjs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Handlers are meant to be async outside tests
21
const path = require('path')
32

43
// eslint-disable-next-line ava/use-test
@@ -1020,6 +1019,10 @@ test('should have only allowed environment variables set', async (t) => {
10201019
handler: () => new Response(`${JSON.stringify(Deno.env.toObject())}`),
10211020
name: 'env',
10221021
})
1022+
.withContentFile({
1023+
content: 'FROM_ENV="YAS"',
1024+
path: '.env',
1025+
})
10231026

10241027
await builder.buildAsync()
10251028

@@ -1040,16 +1043,21 @@ test('should have only allowed environment variables set', async (t) => {
10401043
)
10411044
const envKeys = Object.keys(response)
10421045

1043-
t.false(envKeys.includes('DENO_DEPLOYMENT_ID'))
1044-
// t.true(envKeys.includes('DENO_DEPLOYMENT_ID'))
1045-
// t.is(response.DENO_DEPLOYMENT_ID, 'xxx=')
1046+
t.true(envKeys.includes('PATH'))
1047+
10461048
t.true(envKeys.includes('DENO_REGION'))
10471049
t.is(response.DENO_REGION, 'local')
1050+
10481051
t.true(envKeys.includes('NETLIFY_DEV'))
10491052
t.is(response.NETLIFY_DEV, 'true')
1053+
10501054
t.true(envKeys.includes('SECRET_ENV'))
10511055
t.is(response.SECRET_ENV, 'true')
10521056

1057+
t.true(envKeys.includes('FROM_ENV'))
1058+
t.is(response.FROM_ENV, 'YAS')
1059+
1060+
t.false(envKeys.includes('DENO_DEPLOYMENT_ID'))
10531061
t.false(envKeys.includes('NODE_ENV'))
10541062
t.false(envKeys.includes('DEPLOY_URL'))
10551063
t.false(envKeys.includes('URL'))

0 commit comments

Comments
 (0)