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

New project tests are flaky - inconsistent results #214

Closed
jasonjoh opened this issue Feb 18, 2017 · 0 comments · Fixed by #215
Closed

New project tests are flaky - inconsistent results #214

jasonjoh opened this issue Feb 18, 2017 · 0 comments · Fixed by #215

Comments

@jasonjoh
Copy link
Contributor

When doing:

npm run test

The last 3 tests are very inconsistent. Sometimes all three assert on creates expected files. Sometimes only the last one, and sometimes they all go through. It even changes which file it says isn't there. After digging in the temp directory, all the files are actually there!

I believe this is due to how done is called in the helpers.run. On the consistent tests, it is done like:

helpers.run(path.join(__dirname, '../app')).withPrompts(answers).on('end', done);

Where in the inconsistent ones, it is like:

helpers.run(path.join(__dirname, '../app')).withArguments(argument).withPrompts(answers);
done();

I believe that the run method is async, so done is being called before it is really done, causing timing issues.

There are also some errors in the later tests with which file it is expecting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant