Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DON'T MERGE) Testing our test environment #571

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"build": "yarn clean && tsc -p ./tsconfig.json && tsc -p ./examples/tsconfig.json",
"prepack": "yarn build && yarn test",
"postpublish": "git push --follow-tags",
"test": "yarn test:fast && yarn test:slow && yarn test:external",
"test:fast": "cross-env LOCAL_GIT_DIRECTORY=./git/ jest --runInBand --silent --config ./jest.fast.config.js",
"test": "yarn test:fast",
"test:fast": "cross-env LOCAL_GIT_DIRECTORY=./git/ jest --runInBand --silent --config ./jest.fast.config.js test/fast/environment-test.ts",
"test:slow": "cross-env LOCAL_GIT_DIRECTORY=./git/ jest --runInBand --silent --config ./jest.slow.config.js",
"test:external": "jest --runInBand --silent --config ./jest.external.config.js",
"download-git": "node ./script/download-git.js",
Expand Down
8 changes: 8 additions & 0 deletions test/fast/environment-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,12 @@ describe('environment variables', () => {
delete process.env.GIT_EXEC_PATH
}
})

it.only('resulting PATH contains the original PATH', async () => {
const { env } = await setupEnvironment({})
process.stderr.write(`${Object.keys({ ...process.env }).join(', ')}`)
process.stderr.write(`Path: ${process.env.Path}\n`)
process.stderr.write(`PATH: ${process.env.PATH}\n`)
expect((<any>env)['PATH']).toContain(process.env.PATH)
})
})
Loading