computmaxer / karma-jasmine-html-reporter-livereload

A Karma plugin. Dynamically displays tests results at debug.html page and can be reloaded with livereload
https://www.npmjs.org/package/karma-jasmine-html-reporter-livereload
MIT License
5 stars 3 forks source link

<ERROR> jasmineRequire is not defined #1

Open chandru9279 opened 10 years ago

chandru9279 commented 10 years ago

Firefox 32.0.0 (Windows 8.1) ERROR ReferenceError: jasmineRequire is not defined at c:/Work/Repos/Sample-project/BuildScripts/Gulp/node_modules/karma-jasmine-html-reporter-livereload/src/lib/html.jasmine.reporter.js?fa4cadff90361c3ec47708eb7dced39e8903df19:24

Same issue in the parent project karma-jasmine-html-reporter as well, but I cant find it on github

chandru9279 commented 10 years ago

I noticed port number 35729 is hardcoded in livereload.

Please try to avoid that hardcoded port, I use 9000 as the port for my karma instance.

sinedied commented 10 years ago

Same error here (jasmineRequire is not defined), any idea how to fix it?

chandru9279 commented 10 years ago
"karma-htmlfile-reporter": "^0.1.2"

works well for me.

sinedied commented 10 years ago

Not the same: this reporter has not livereload of passing specs available in debug.html page of karma :/

From what I understand, this reported is only compatible with Jasmine 2.0, hence the error.

mikejr83 commented 9 years ago

I'm thinking this isn't maintained. I've forked the repo and started to look into it, but I'm not sure how it ever worked. To address @chandru9279, I removed the hardcoded port number. The problem I'm facing testing this is that there is no such livereload.js file for the reporter to load. I use a livereload plugin for gulp watch on a connect server so I'm going to see if that will work.

computmaxer commented 9 years ago

The port for livereload is not the karma port. This works by having a livereload listener running in parallel with karma, on a different port. Checkout gulp-livereload and an example usage here

Livereload uses port 35729 always, so that is why it is hardcoded

mikejr83 commented 9 years ago

@computmaxer that makes things a bit clearer. So, in my case where I'm starting karma from my gulp script I can also fire up livereload at the same time. I was under the impression that this was trying to use the same "livereload" that karma uses on its standard run page.

warpdesign commented 9 years ago

Apparently, latest version of karma breaks plugins that need to be injected. Here you will find a workaround for the jasmineRequire is not definederror: https://github.com/taras42/karma-jasmine-html-reporter/issues/4

halionn commented 8 years ago

Same error here

cmloegcmluin commented 7 years ago

same error