FIle watching not working with custom test file #314

Closed
m4nuC opened this Issue Nov 2, 2013 · 8 comments

Comments

Projects
None yet
6 participants

m4nuC commented Nov 2, 2013

Is it possible to have testem watch my source file when using a custom test runner page? I have tried adding them to scr_files but no luck.

Collaborator

airportyh commented Nov 5, 2013

It should work even if you don't have a src_files declaration. See https://github.com/airportyh/testem/tree/master/examples/jasmine_custom.

Could you post a gist that demonstrates the problem? Then I can help you debug.

m4nuC commented Nov 6, 2013

Thanks i'd appreciate your input, here is my current test folder https://github.com/m4nuC/zLib/blob/master/tests/.

okonet commented Dec 23, 2013

I also confirm that watcher doesn't trigger test runner restart. Here is my testem.json

{
  "test_page": "spec/index.mustache",
  "before_tests": "grunt before_tests",
  "serve_files": ["tmp/spec/**/*.js"],
  "watch_files": [
    "app/**!(components)/*.coffee",
    "spec/**/*.coffee"
  ],
  "launch_in_dev": ["PhantomJS"],
  "launch_in_ci": ["PhantomJS"]
}

I use coffee script in my project so it took me some time to realize that I've to use a custom grunt task which compiles specs before running the suit. But it has been working on 0.5.x quite fine. After upgrade to 0.6.1 it doesn't triggers the runner restart after I edit coffee source files.

:bump:

Collaborator

airportyh commented Jan 24, 2014

It must be this line https://github.com/airportyh/testem/blob/master/lib/dev/index.js#L165 where it is preventing the newly requested files from being watched. The rationale being that if you are specifying "serve_files", you don't want trigger retest when the .js files - which are generated - change, which could cause glitchy multiple firing effects. I don't understand your exact use case though. Can I see perhaps a runnable gist? Or at least the source of the custom test page.

Contributor

rwjblue commented Apr 27, 2014

I put together a simple static file repo that demonstrates the problem:

https://github.com/rjackson/testem-reload-failure

@airportyh - It seems like this is supposed to be working. Am I doing something wrong here?

@rwjblue rwjblue referenced this issue in ember-cli/ember-cli Apr 27, 2014

Merged

Use new `tmp/output` location for Testem. #463

Collaborator

airportyh commented Apr 29, 2014

@rjackson here's a fix to your example here rjackson/testem-reload-failure#1. You've simply included testem's client-side script with the wrong path.

Collaborator

airportyh commented Apr 29, 2014

Anyone else with this problem who would like to chime in? Otherwise I will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment