diff --git a/tests/.env.test b/tests/.env.test index 4bb2ea5..d6d3712 100644 --- a/tests/.env.test +++ b/tests/.env.test @@ -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 diff --git a/tests/main.js b/tests/main.js index d305de1..0beba14 100644 --- a/tests/main.js +++ b/tests/main.js @@ -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() +})