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

Feature: using with jasmine --reporter command line switch #392

Open
3 tasks done
apla opened this issue Mar 14, 2019 · 3 comments
Open
3 tasks done

Feature: using with jasmine --reporter command line switch #392

apla opened this issue Mar 14, 2019 · 3 comments

Comments

@apla
Copy link

apla commented Mar 14, 2019

  • I have this issue with the latest release of jasmine-spec-reporter - 4.2.1
  • I have this issue with the latest release of jasmine 3.3.1
  • I can reproduce this issue with one of the examples

Current behavior

jasmine allows to use reporter as a command line option, like jasmine --reporter=jasmine-spec-reporter, but jasmine-spec-reporter itself is not compatible.

failed to register reporter "jasmine-spec-reporter"
Report is not a constructor
TypeError: Report is not a constructor
    at runJasmine (xxx/node_modules/jasmine/lib/command.js:148:22)
    at Command.run (xxx/node_modules/jasmine/lib/command.js:56:9)
    at Object.<anonymous> (xxx/node_modules/jasmine/bin/jasmine.js:11:9)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)

Also I tried jasmine --reporter=jasmine-spec-reporter/built/spec-reporter.js. In this case, no error reported, but also reporter not works.

apla added a commit to apla/jasmine-spec-reporter that referenced this issue Apr 7, 2019
@bcaudan
Copy link
Owner

bcaudan commented Apr 21, 2019

This feature seems handy but it can only be used with the default configuration of jasmine-spec-reporter.
This feature expect that the reporter module export a constructor (jasmine/jasmine#1027 (comment)) but currently jasmine-spec-reporter export:

A way to do that without breaking the current exports could be to have a dedicated node module with only the constructor exported. IMO, it sounds a bit complicated for the benefit of this feature.

Any thoughts?

@bcaudan bcaudan mentioned this issue Jun 20, 2019
@kuebk
Copy link

kuebk commented Mar 23, 2020

Would love to get this working! <3

@bcaudan
Copy link
Owner

bcaudan commented Mar 24, 2020

I have submitted a PR to jasmine-npm, jasmine/jasmine-npm#159.

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

3 participants