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

karma tape rollup karma-tap setup #23

Closed
thisconnect opened this issue Oct 24, 2016 · 9 comments
Closed

karma tape rollup karma-tap setup #23

thisconnect opened this issue Oct 24, 2016 · 9 comments

Comments

@thisconnect
Copy link

Hi

I am trying to setup karma, tape, karma-rollup-plugin and karma-tap, see test repo:
https://github.com/thisconnect/test-karma-rollup-tape

As rollup can not bundle tape (rollup/issues/1072) my current approach is to browserify tape first and add that to the karma files, see karma.config.js

The tests run fine in the browser but, as far as I understand, the tap output is not picked up by karma-tap. See screenshot below

I am new to karma and hope that I didn't miss something obvious.

karma-browser-error

TAP version 13
adapter.js:65 # simple tape test
adapter.js:65 ok 1 foo
adapter.js:65 
adapter.js:65 1..1
adapter.js:65 # tests 1
adapter.js:65 # pass  1
adapter.js:65 
adapter.js:65 SUCCESS # simple tape test
 foo
adapter.js:65 Skipped 0 tests
adapter.js:65 # ok
adapter.js:65 
debug.js:21 Uncaught {
  "ok": true,
  "id": 1,
  "name": "foo"
}
@bySabi
Copy link
Owner

bySabi commented Oct 24, 2016

@thisconnect it works if you set singleRun to true. I don´t sure at this time is this normal or a karma-tap-pretty-reporter issue or a not implemented

Any help welcome and thanks for repro repo, helpme a lot.

@thisconnect
Copy link
Author

oooo... I had this config there and set to false all the time, I thought I go crazy. .. THANK YOU SO MUCH!!

thisconnect pushed a commit to thisconnect/test-karma-rollup-tape that referenced this issue Oct 24, 2016
@bySabi
Copy link
Owner

bySabi commented Oct 24, 2016

This line will not work with current karma-tap-pretty-reporter, API change on ver 3.x.x.

// tapReporter: { prettifier: 'tap-spec' }

Now must:

// tapReporter: { prettifier: require('tap-spec') }

@thisconnect
Copy link
Author

yes next is to make

  • it pretty (with singleRun: true)
  • and see if I get singleRun + autoWatch + karma-tap-pretty-reporter to work.

I might open an issue for karma-tap-pretty-reporter and reference it here so you could see it. Closing this. Thanks again!!

thisconnect pushed a commit to thisconnect/test-karma-rollup-tape that referenced this issue Oct 24, 2016
@thisconnect
Copy link
Author

Oh in the meantime you replied again thanks!

This line will not work with current karma-tap-pretty-reporter, API change on ver 3.x.x.
tapReporter: { prettifier: 'tap-spec' }
Now must
tapReporter: { prettifier: require('tap-spec') }

found it, it is

tapReporter: { prettify: require('tap-spec') }

I have updated the test repo https://github.com/thisconnect/test-karma-rollup-tape

@thisconnect
Copy link
Author

Please feel free to fork and keep my test repo if you think it is useful for others that want to use rollup.js

@bySabi
Copy link
Owner

bySabi commented Oct 24, 2016

One last thing. If you wanna test autowatch mode true... singleRun must be set to false

@bySabi
Copy link
Owner

bySabi commented Oct 24, 2016

Add a LICENSE and update README of test-karma-rollup-tape and I will add to karma-tap example list.

@thisconnect
Copy link
Author

thisconnect commented Oct 24, 2016

One last thing. If you wanna test autowatch mode true... singleRun must be set to false

yes I just tried that, works very nicely!

Add a LICENSE and update README of test-karma-rollup-tape and I will add to karma-tap example list.

Ok, but I need to move it away from my thisconnect user. If you don't want it I put it on my other github user.
ignore

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