Skip to content

Commit

Permalink
added prompt fix for add tests that fail occasionally because of wron…
Browse files Browse the repository at this point in the history
…g cache versions (#2694)
  • Loading branch information
bestander committed Feb 14, 2017
1 parent 67e7aaa commit 9ddb00e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions __tests__/package-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ import Config from '../src/config.js';
import makeTemp from './_temp.js';
import * as fs from '../src/util/fs.js';
import * as constants from '../src/constants.js';
import inquirer from 'inquirer';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

// automatically chose the first available version if cached does not fit
inquirer.prompt = jest.fn((questions) => {
const chosenVersion = questions[0].choices[0];
return Promise.resolve({package: chosenVersion});
});

const path = require('path');

// regexp which verifies that cache path contains semver + hash
Expand Down

0 comments on commit 9ddb00e

Please sign in to comment.