jamesshore / quixote

CSS unit and integration testing
Other
848 stars 45 forks source link

ReferenceError: Can't find variable: require #38

Closed Turbie333 closed 7 years ago

Turbie333 commented 7 years ago

I get this error when trying to run my first test. I have tried searching for solutions and most point to using npm to install browserify and watchify but this doesn't seem to help either.

jamesshore commented 7 years ago

Try starting with the example project: https://github.com/jamesshore/quixote/tree/master/example

jamesshore commented 7 years ago

(The error you're getting is the result of not having a CommonJS module loader. If you're not familiar with CommonJS, it's hard to explain briefly. But the example project has everything you need already set up for you.)

Turbie333 commented 7 years ago

I am already using karma for unit testing and now want to use quixote for css testing. I installed quixote via NPM and can't seem to get it working. I am using the same code from the example video just to see if I can get it running but I am getting the error specified above.

jamesshore commented 7 years ago

Your problem is most likely due to Karma mis-configuration. Did you run the example project?

(Not the example code in the video, but the whole project located in the /example directory.)

jamesshore commented 7 years ago

You can also use the karma-quixote plugin. If you do that, remove the require("quixote") line.

jamesshore commented 7 years ago

@wfsandoval12 I'm closing this issue due to lack of response. If you still need help, please re-open it.