Skip to content

Commit 18fcc3e

Browse files
committed
tests(utils): support travis build context tests
1 parent 09458a4 commit 18fcc3e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/utils/test/build-context.test.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ describe('build-context.js', () => {
1616
envBefore = process.env;
1717
process.env = {};
1818
for (const [key, value] of Object.entries(envBefore)) {
19-
if (key.startsWith('LHCI')) continue;
20-
if (key.startsWith('TRAVIS')) continue;
21-
if (key.startsWith('GITHUB')) continue;
22-
if (key.startsWith('CI')) continue;
19+
if (key.startsWith('LHCI_')) continue;
20+
if (key.startsWith('TRAVIS_')) continue;
21+
if (key.startsWith('GITHUB_')) continue;
22+
if (key.startsWith('CI_')) continue;
2323
process.env[key] = value;
2424
}
2525
});
@@ -55,6 +55,7 @@ describe('build-context.js', () => {
5555

5656
describe('#getCurrentBranch()', () => {
5757
it('should not throw', () => {
58+
if (process.env.CI) return; // CI-based runs rely on the env overrides
5859
buildContext.getCurrentBranch(hash);
5960
});
6061

0 commit comments

Comments
 (0)