Skip to content

Commit

Permalink
fix #124
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Nov 16, 2024
1 parent eb7ad1d commit 39032b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ FIRST_PAGE_URL=${PROJECT_PUBLIC_HOST}/first-page
MOCK_SERVER_HOST=http://localhost:${MOCK_SERVER_PORT}
MOCK_SERVER_PORT=8090
PROJECT_PUBLIC_HOST=${MOCK_SERVER_HOST}

# https://github.com/motdotla/dotenv-expand/issues/124
SOURCE=12345
EXPANDED=ab-$SOURCE-cd-ef-gh
10 changes: 10 additions & 0 deletions tests/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,13 @@ t.test('expansion for https://github.com/motdotla/dotenv-expand/issues/123', ct

ct.end()
})

t.test('expansion for https://github.com/motdotla/dotenv-expand/issues/124', ct => {
const dotenv = require('dotenv').config({ path: 'tests/.env.test' })
dotenvExpand.expand(dotenv)

ct.equal(process.env.SOURCE, '12345')
ct.equal(process.env.EXPANDED, 'ab-12345-cd-ef-gh')

ct.end()
})

0 comments on commit 39032b9

Please sign in to comment.