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

Conflict module, causing tests to time out. #6

Open
the-simian opened this issue Apr 2, 2015 · 4 comments
Open

Conflict module, causing tests to time out. #6

the-simian opened this issue Apr 2, 2015 · 4 comments

Comments

@the-simian
Copy link

I am also using the mock-gulp-test module. In situations when you are scaffolding files that are also the names of files in the scaffolding tool, like README.md and package.json, the confilct module prompts and interrupts the test, causing it to fail.

with conflict in the pipeline

[?] Replace README.md? (Ynaxdh)  0

  0 passing (2s)
  1 failing

  1) slush-example default should make a readme:
     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
      at null.<anonymous> (E:\Users\<username>\Desktop\slush-example\node_modules\mocha\lib\runnable.js:170:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

stream.js:94
      throw er; // Unhandled stream error in pipe.
            ^
Error: 1 test failed.

when I take it out everything is ok. This is only occuring on the unit tests, is there a way around this? I've tried doing something similar to what you are doing in this

but the prompts are still causing issues.

I would also add that the .on('stop') did not work in my tests, and I had to resort to using on('task_stop'). If this is the wrong module to be submitting this issue let me know.

I haven't gone into exhaustive detail in case this is something you've encountered before. However, if you'd like more detail, let me know and I can flesh it out more throughout. Thank you very much for your hard work on this module and your time.

@aendra-rininsland
Copy link

I'm also experiencing this and it's preventing me from getting any tests whatsoever to work. I'll be fighting against this all day and might submit a PR if I'm able to figure out why it's doing this.

@aendra-rininsland
Copy link

Update: Seems this line enables the prompt to be skipped if NODE_ENV is set to "test". However, this doesn't seem to have any effect at all; the prompt remains.

@aendra-rininsland
Copy link

aendra-rininsland commented Mar 21, 2017

@the-simian My solution was to set the target directory to /tmp:

const isTesting = process.env.NODE_ENV === 'test';
gulp.src(__dirname + '/templates/**')
.pipe(conflict(isTesting ? '/tmp' : './'))
.pipe(gulp.dest('./'));

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

No branches or pull requests

2 participants