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

Failing tests on a clean setup (on Windows?) #1028

Closed
DanTup opened this issue Apr 12, 2014 · 7 comments
Closed

Failing tests on a clean setup (on Windows?) #1028

DanTup opened this issue Apr 12, 2014 · 7 comments

Comments

@DanTup
Copy link
Contributor

DanTup commented Apr 12, 2014

I followed the instructions here, but when I run grunt test:unit there are a bunch of tests that fail.

They all seem to be related to paths; and most are just slashes going the wrong way and drive letters; but some are not (eg. "path" vs "/some/pah").

  7 failing

  1) cli processArgs should parse options without configFile and set default:

      + expected - actual

      +"/cwd/karma.conf.js"
      -"M:\\cwd\\karma.conf.js"




  2) cli processArgs should set default karma.conf.coffee config file if exists:

      + expected - actual

      +"/cwd2/karma.conf.coffee"
      -"M:\\cwd2\\karma.conf.coffee"




  3) cli processArgs should resolve configFile to absolute path:

      + expected - actual

      +"/cwd/some/config.js"
      -"M:\\cwd\\some\\config.js"




  4) init scenario: should generate working config:

      + expected - actual

      +"path"
      -"/some/path"




  5) launchers/process.js _normalizeCommand should remove quotes from the cmd:

      + expected - actual

      +"/bin/brow ser"
      -"\\bin\\brow ser"




  6) middleware.runner should refresh explicit files if specified:
     TypeError: Arguments to path.resolve must be strings
    at Object.exports.resolve (path.js:116:15)
    at M:\Coding\Applications\karma\lib\middleware\runner.js:57:36
    at Array.forEach (native)
    at M:\Coding\Applications\karma\lib\middleware\runner.js:56:27
    at M:\Coding\Applications\karma\node_modules\connect\lib\middleware\json.js:81:7
    at [object Object].onEnd (M:\Coding\Applications\karma\node_modules\connect\node_modules\raw-body\index.js:109:7)
    at [object Object].g (events.js:180:16)
    at [object Object].EventEmitter.emit (events.js:92:17)
    at Context.<anonymous> (M:\Coding\Applications\karma\test\unit\middleware\runner.spec.coffee:109:13)
    at Test.Runnable.run (M:\Coding\Applications\karma\node_modules\mocha\lib\runnable.js:204:15)
    at Runner.runTest (M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:378:10)
    at M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:456:12
    at next (M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:303:14)
    at M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:313:7
    at next (M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:251:23)
    at M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:275:7
    at Hook.Runnable.run (M:\Coding\Applications\karma\node_modules\mocha\lib\runnable.js:223:5)
    at next (M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:263:10)
    at Object._onImmediate (M:\Coding\Applications\karma\node_modules\mocha\lib\runner.js:280:5)
    at processImmediate [as _immediateCallback] (timers.js:330:15)


  7) watcher watchPatterns should not watch subpaths that are already watched:

      + expected - actual

       [
      -  "/some/sub",
         "/some"
       ]
@deepak1556
Copy link
Contributor

this PR #854 should be a fix for you i guess :) Sry i dnt have a windows machine to test. Can you try that and check if it resolves ??

@DanTup
Copy link
Contributor Author

DanTup commented Apr 12, 2014

Yep; that PR fixes all failing 7 of the failing tests I posted 👍

However, the subsequent tests now fail (Chrome opens; but doesn't seem to connect/load the page). This probably happened before too, it just didn't get this far. It might be a local setup issue; not done much digging yet:

INFO [karma]: Karma v0.11.14 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
WARN [web-server]: 404: M:\Coding\TestApps\karma2\static/karma.js
WARN [launcher]: Chrome have not captured in 20000 ms, killing.
INFO [launcher]: Trying to start Chrome again (1/2).
WARN [web-server]: 404: M:\Coding\TestApps\karma2\static/karma.js
WARN [launcher]: Chrome have not captured in 20000 ms, killing.
INFO [launcher]: Trying to start Chrome again (2/2).
WARN [web-server]: 404: M:\Coding\TestApps\karma2\static/karma.js
WARN [launcher]: Chrome have not captured in 20000 ms, killing.
ERROR [launcher]: Chrome failed 2 times (timeout). Giving up.

@deepak1556
Copy link
Contributor

cool, once everything works fine we shld have tat PR updated and merged, Thanks!

@sylvain-hamel
Copy link
Contributor

the 404 might be because you have not built the project using grunt build

@DanTup
Copy link
Contributor Author

DanTup commented Apr 12, 2014

Oops, @sylvain-hamel is correct; I didn't build when I cloned the other repo!

Gets much further now; but then fails with this:

Chrome 34.0.1847 (Windows): Executed 3 of 3 SUCCESS (0.003 secs / 0.002 secs)
Running M:\Coding\TestApps\karma2\bin\karma start test/e2e/sauce/karma.conf.js --single-run --no-auto-watch
INFO [karma]: Karma v0.11.14 server started at http://localhost:9876/
INFO [launcher]: Starting browser chrome (linux) on SauceLabs
ERROR [launcher.sauce]: Can not start chrome (linux)
  Failed to start Sauce Connect:
  Error: GET https://saucelabs.com/rest/v1/undefined/tunnels?full=1:
[Error]
Fatal error: E2E test "test/e2e/sauce/karma.conf.js" failed.

Not sure why it says "linux"; I'm running on Windows (8.1).

@sylvain-hamel
Copy link
Contributor

yeah, those don't work in your pc. just run grunt test:unit not the other suites. The Travis build will tell you about the others.

@DanTup
Copy link
Contributor Author

DanTup commented Apr 12, 2014

Righto! I realise linux makes more sense now I know saucelabs is a remote service :)

Ok; then I believe if the PR is merged, this issue is resolved!

Volune added a commit to Volune/karma that referenced this issue Nov 28, 2015
Have file-list.js use path.posix instead of path itself, so the tests can expect a '/' separator on any platform.

Closes karma-runner#1028
Volune added a commit to Volune/karma that referenced this issue Nov 28, 2015
Have file-list.js use path.posix instead of path itself,
so the tests can expect a '/' separator on any platform.

Closes karma-runner#1028
Volune added a commit to Volune/karma that referenced this issue Nov 28, 2015
Have file-list.js use path.posix instead of path itself,
so the tests can expect a '/' separator on any platform.

Node 0.10 doesn't provide path.posix and will still fail on Windows.

Closes karma-runner#1028
Volune added a commit to Volune/karma that referenced this issue Nov 28, 2015
Have file-list.js use path.posix instead of path itself,
so the tests can expect a '/' separator on any platform.

Node 0.10 doesn't provide path.posix and will still fail on Windows.

Closes karma-runner#1028
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants