Skip to content

Commit 39032b9

Browse files
committed
fix #124
1 parent eb7ad1d commit 39032b9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/.env.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,7 @@ FIRST_PAGE_URL=${PROJECT_PUBLIC_HOST}/first-page
8888
MOCK_SERVER_HOST=http://localhost:${MOCK_SERVER_PORT}
8989
MOCK_SERVER_PORT=8090
9090
PROJECT_PUBLIC_HOST=${MOCK_SERVER_HOST}
91+
92+
# https://github.com/motdotla/dotenv-expand/issues/124
93+
SOURCE=12345
94+
EXPANDED=ab-$SOURCE-cd-ef-gh

tests/main.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,3 +612,13 @@ t.test('expansion for https://github.com/motdotla/dotenv-expand/issues/123', ct
612612

613613
ct.end()
614614
})
615+
616+
t.test('expansion for https://github.com/motdotla/dotenv-expand/issues/124', ct => {
617+
const dotenv = require('dotenv').config({ path: 'tests/.env.test' })
618+
dotenvExpand.expand(dotenv)
619+
620+
ct.equal(process.env.SOURCE, '12345')
621+
ct.equal(process.env.EXPANDED, 'ab-12345-cd-ef-gh')
622+
623+
ct.end()
624+
})

0 commit comments

Comments
 (0)