zcaudate-me / example.purnam.test

Example of how to do clojurescript testing with karma
Eclipse Public License 1.0
8 stars 0 forks source link

TypeError: Object #<Object> has no method 'addMatchers' #1

Open lynndylanhurley opened 10 years ago

lynndylanhurley commented 10 years ago

All tests fail with the same error: screen shot 2014-03-16 at 7 02 10 pm

This is after a fresh clone of this repo. I'm using the following karma packages/versions:

"karma": "~0.12.0",
"karma-jasmine": "~0.2.2",
"karma-chrome-launcher": "~0.1.2"
zcaudate commented 10 years ago

you need to include purnam.test in the headers

(ns your.name.space (:require [purnam.test] ....)

Otherwise this will fail

lynndylanhurley commented 10 years ago

I get those errors when I run the tests from this repo. I haven't changed a single line of code.

Here are the failing tests: https://gist.github.com/9592665

zcaudate commented 10 years ago

you may be using an older version of karma that doesn't have jasmine built-in.

lynndylanhurley commented 10 years ago

I'm using the latest (v0.12). Which version are you using?

zcaudate commented 10 years ago

Hmmm... Im using 0.10.* - an older version. Can you try deleting the karma.js file and doing karma init in the directory to set it up again? It may be that the config file is not compatible

lynndylanhurley commented 10 years ago

No luck - I'm still getting the same errors.

This is the file that was generated after I ran karma init: https://gist.github.com/9603651

These are the resulting errors (same as before): screen shot 2014-03-17 at 12 08 35 pm

zcaudate commented 10 years ago

That's so strange. I'll install karma later today and see if I can reproduce it.

On 18/03/2014, at 4:09, Lynn Dylan Hurley notifications@github.com wrote:

No luck - I'm still getting the same errors.

This is the file that was generated after I ran karma init: https://gist.github.com/9603651

These are the resulting errors (same as before):

— Reply to this email directly or view it on GitHub.

lynndylanhurley commented 10 years ago

Cool, thanks. I'll downgrade to v0.10 and see if that helps.

zcaudate commented 10 years ago

hmmmm... I've upgraded and its fine I'm still not getting the errors. it may be easier if you email your entire project to me: z caudate.me

lynndylanhurley commented 10 years ago

It's literally just this project. Steps to reproduce the problem:

Clone this project and compile using cljsbuild:

git clone https://github.com/purnam/example.purnam.test.git
cd example.purnam.test
lein cljsbuild auto

In a new window in the same directory:

karma start

That's it.

Is there any more information that I can send that would help diagnose the issue?

zcaudate commented 10 years ago

Okay,

I upgraded to the latest version (2.2) of karma-jasmine and I have finally reproduced this error

I was using version 1.4 before and they must have changed it. You can get around it by installing the older one:

npm -g uninstall karma-jasmine npm -g install karma-jasmine@0.1.4

zcaudate commented 10 years ago

Yeah I do. I've raised an issue with the jasmine project to figure out what has changed.

On 18/03/2014, at 10:00, Lynn Dylan Hurley notifications@github.com wrote:

Ahh ok, thanks @zcaudate! Do you plan on adding support for the latest karma-jasmine?

— Reply to this email directly or view it on GitHub.