ember-fastboot-addon-tests icon indicating copy to clipboard operation
ember-fastboot-addon-tests copied to clipboard

Timeout when adding package with prompts

Open kimroen opened this issue 7 years ago • 3 comments

The installer for an addon might try to add some files to your addon. If the addon already has those files, you'll get prompts like these:

Overwrite path/to/file.js? (Yndeh)

This is fine in normal circumstances, but if you specify this addon as a package to be installed in your setupTest, the test will time out on this prompt with not much to go on:

index "before all" hook:
     Error: Timeout of 600000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

I'm having a hard time coming up with suggestions on how to resolve this, because the various use cases will surely want to handle it in different ways. In my case, I don't want to overwrite the file, because I've supplied the file in my fixture the way I want to have it.

kimroen avatar Sep 17 '17 16:09 kimroen

The particular use case I am having is in this PR: https://github.com/kimroen/ember-cli-document-title/pull/62

I'm trying to add ember-cli-head as a dependecy in the test, which requires me to create an app/templates/head.hbs file. The test times out on the prompt Overwrite app/templates/head.hbs? (Yndeh).

This can be seen by turning on debug for both ember-fastboot-addon-tests and ember-cli-addon-tests:

DEBUG=ember-fastboot-addon-tests,ember-cli-addon-tests ember fastboot:test

If I kill the right ember process at the right time, the test completes.

kimroen avatar Sep 17 '17 16:09 kimroen

I see that this is a problem, had this in my mind already, but I don't see an easy solution as well...

The underlying problem is more related to ember-cli-addon-tests, which does the heavy lifting here. Created an issue there: https://github.com/tomdale/ember-cli-addon-tests/issues/157

simonihmig avatar Sep 18 '17 12:09 simonihmig

Thank you for raising the issue in the appropriate place. I'll try to think of a workaround for now, but I'd be very curious about what a good API could be from the perspective of this addon.

kimroen avatar Sep 18 '17 19:09 kimroen