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

Doo not compatible with karma v6 #38

Open
lread opened this issue Jan 29, 2021 · 3 comments
Open

Doo not compatible with karma v6 #38

lread opened this issue Jan 29, 2021 · 3 comments

Comments

@lread
Copy link

lread commented Jan 29, 2021

A small bug in doo causes karma v6 to fail.

After a PR for the fork of doo cljs-test-runner uses is applied and released we can update cljs-test-runner to reference new doo and all will be good.

@Olical
Copy link
Owner

Olical commented Feb 1, 2021

So we just have to wait for that to be merged then I can update to that version of doo? Sounds good!

@lread
Copy link
Author

lread commented Feb 1, 2021

Yes indeedy!

@lread
Copy link
Author

lread commented Feb 2, 2021

Goodness gracious, the folks over at karma have temporarily reversed their strict parameter checking in v6.0.4.

Just the same, since the reversal is noted as temporary, we should probably still apply the v0.2.1 doo update.

Here's a way to reproduce the issue for karma v6.0.3

$ git clone https://github.com/Olical/cljs-test-runner.git
$ cd cljs-test-runner 

$ # sanity test
$ clojure -M:dev -m cljs-test-runner.main 

Testing example.partial-test

Testing example.yes-test

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.

Add the following package.json to project root:

{
  "devDependencies": {
    "karma": "6.0.3",
    "karma-chrome-launcher": "^3.1.0",
    "karma-cljs-test": "^0.1.0"
  }
}

And then install necessary npm stuff:

$ npm install -g karma-cli
$ npm install

Node test should still pass:

$ clojure -M:dev -m cljs-test-runner.main --env node

Testing example.partial-test

Testing example.yes-test

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.

But karma tests will fail:

$ clojure -M:dev -m cljs-test-runner.main --env chrome-headless
Karma - Spectacular Test Runner for JavaScript.

START - Start the server / do a single run.

Usage:
  karma start [configFile]

Positionals:
  configFile  Path to the Karma configuration file                      [string]

Options:
  --help                           Print usage and options.            [boolean]
  --port                           <integer> Port where the server is running.
  --auto-watch                     Auto watch source files and run on change.
  --detached                       Detach the server.
  --no-auto-watch                  Do not watch source files.
  --log-level                      <disable | error | warn | info | debug> Level
                                   of logging.
  --colors                         Use colors when reporting and printing logs.
  --no-colors                      Do not use colors when reporting or printing
                                   logs.
  --reporters                      List of reporters (available: dots, progress,
                                   junit, growl, coverage).
  --browsers                       List of browsers to start (eg. --browsers
                                   Chrome,ChromeCanary,Firefox).
  --capture-timeout                <integer> Kill browser if does not capture in
                                   given time [ms].
  --single-run                     Run the test when browsers captured and exit.
  --no-single-run                  Disable single-run.
  --report-slower-than             <integer> Report tests that are slower than
                                   given time [ms].
  --fail-on-empty-test-suite       Fail on empty test suite.
  --no-fail-on-empty-test-suite    Do not fail on empty test suite.
  --fail-on-failing-test-suite     Fail on failing test suite.
  --no-fail-on-failing-test-suite  Do not fail on failing test suite.
  --format-error                   A path to a file that exports the format
                                   function.                            [string]

Unknown argument: cljs-test-runner-out/cljs_test_runner.gen.js

When I update cljs-test-runner to point to doo v0.2.1, chrome-headless passes:

$ clojure -M:dev -m cljs-test-runner.main --env chrome-headless
Downloading: ingesolvoll/doo/0.2.1/doo-0.2.1.pom from clojars
Downloading: ingesolvoll/doo/0.2.1/doo-0.2.1.jar from clojars
02 02 2021 11:41:35.883:WARN [web-server]: 404: /cljs-test-runner-out/goog/deps.js
02 02 2021 11:41:35.889:WARN [web-server]: 404: /cljs-test-runner-out/cljs_deps.js
LOG: 'Testing example.partial-test'
LOG: 'Testing example.yes-test'
Chrome Headless 88.0.4324.96 (Mac OS 10.15.7): Executed 3 of 3 SUCCESS (0.019 secs / 0.002 secs)
TOTAL: 3 SUCCESS

And node still passes:

$ clojure -M:dev -m cljs-test-runner.main --env node           

Testing example.partial-test

Testing example.yes-test

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.

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