Skip to content

Commit

Permalink
Make tests robust (#1072)
Browse files Browse the repository at this point in the history
* Do not warn about nested callbacks in tests

The tests are always deeper nested than regular files. So accept
deeper nesting in these files.

* Make the tests robust

Currently the tests often fail because of timeouts. This increases
the maximum timeout for these tests to prevent that from happening.
  • Loading branch information
BridgeAR authored and SBoudrias committed May 21, 2018
1 parent 0d97e24 commit b4f1bfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/prompt-suggestion.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const FileEditor = require('mem-fs-editor');
const Storage = require('../lib/util/storage');
const promptSuggestion = require('../lib/util/prompt-suggestion');

/* eslint max-nested-callbacks: ["warn", 6] */

describe('PromptSuggestion', () => {
beforeEach(function () {
this.memFs = env.createEnv().sharedFs;
Expand Down
6 changes: 5 additions & 1 deletion test/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ const shell = require('shelljs');
const sinon = require('sinon');
const Base = require('..');

/* eslint max-nested-callbacks: ["warn", 5] */

const tmpdir = path.join(os.tmpdir(), 'yeoman-user');

describe('Base#user', () => {
describe('Base#user', function () {
this.timeout(5000);

beforeEach(function () {
this.prevCwd = process.cwd();
this.tmp = tmpdir;
Expand Down

0 comments on commit b4f1bfc

Please sign in to comment.