Skip to content

Commit

Permalink
fix: ignore real CI=true for particular spec
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Jun 11, 2021
1 parent 0faca58 commit 4137b8a
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -94,12 +94,19 @@ describe('semanticInfo - singleRun', () => {
});

it('should not create any programs ahead of time by default when there is no way to infer singleRun=true', () => {
// For when these tests themselves are running in CI, we need to ignore that for this particular spec
const originalEnvCI = process.env.CI;
process.env.CI = 'false';

/**
* Nothing to indicate it is a single run, so createProgramFromConfigFile should
* At this point there is nothing to indicate it is a single run, so createProgramFromConfigFile should
* never be called
*/
parseAndGenerateServices(code, options);
expect(createProgramFromConfigFile).not.toHaveBeenCalled();

// Restore process data
process.env.CI = originalEnvCI;
});

it('should not create any programs ahead of time when when TSESTREE_SINGLE_RUN=false, even if other inferrence criteria apply', () => {
Expand Down

0 comments on commit 4137b8a

Please sign in to comment.