Skip to main content

All Questions

Tagged with
68 votes
5 answers
39k views

Getting requirejs to work with Jasmine

I first want to say that I am new to RequireJS and even newer to Jasmine. I am having some issues with the SpecRunner and require JS. I have been following the tutorials of Uzi Kilon and Ben Nadel (...
The Sheek Geek's user avatar
29 votes
2 answers
10k views

Does Jasmine 2.0 really not work with require.js?

I'm setting up my SpecRunner.html/.js, RequireConfig.js, my paths and my shims just like I have with earlier release candidates of Jasmine + RequireJs, but now my test methods show Jasmine undefined. ...
Darin's user avatar
  • 338
20 votes
1 answer
12k views

KarmaJS, Jasmine, RequireJS, etc: How to Use Require for Testing Modules

Running Karma + Jasmine Tests with RequireJS -- Getting off the ground Help! . . . _ _ _ . . . SOS! Currently, I have an exercise project up for getting comfortable with KarmaJS -- and Unit Testing, ...
Cody's user avatar
  • 9,906
11 votes
2 answers
4k views

BlanketJS + Jasmine 2.0 not working

I have been testing with Jasmine 2.0.0 and it works without any problem. But there's a problem when I append BlanketJS to my code. I used a specRunner(https://github.com/alex-seville/blanket/blob/...
SJ Baek's user avatar
  • 138
11 votes
3 answers
3k views

Testing javascript with Chutzpah and requirejs

I just wonder if there is a simple tutorial showing how to test javascript in visual studio with Chutzpah, require.js and jasmine. Basically, i want to run the tests without using an .html file so ...
ppoliani's user avatar
  • 4,854
10 votes
2 answers
5k views

Configuring Grunt, Jasmine and RequireJS all together

I'm a complete noob with Jasmine and RequireJS so any help is appreciated. We have the following directory structure /assets /libs <- populated by Jam /scripts /tests I'm trying to ...
BarendB's user avatar
  • 277
8 votes
2 answers
1k views

How to write testable requirejs modules

I am new to unit testing so I might be missing something, but how am I supposed to structure requirejs modules in order to make them fully testable? Consider the elegant revealing module pattern. ...
GEMI's user avatar
  • 2,259
8 votes
2 answers
6k views

"Error: Mismatched anonymous define()" with Karma + RequireJS + Jasmine

I am stuck now for a while trying to get unit testing set up and runnning. I have an AngularJS front-end loaded with RequireJS and r.js optimized for production, so it's all nicely in one single file....
robbash's user avatar
  • 1,073
8 votes
2 answers
1k views

Squire is breaking other tests

I'm using Karma, Jasmine, Jasmine.Async, Sinon and Chai. The good news...this test works correctly. The dependency is mocked, spies get called, and intentionally breaking the test subject results in ...
Dom Barker's user avatar
  • 1,918
8 votes
2 answers
468 views

require using AMD pattern gives error for jQuery UI events

In my code test.js is dependent on jquery-ui which does not uses require AMD pattern and test.spec.js dependent on jquery-ui, test.js which uses AMD pattern. Can we load dependency of jquery-ui in ...
Rahul Rajput's user avatar
  • 1,437
8 votes
1 answer
2k views

JavaScript dependency injection using RequireJS, Jasmine and testr

I've just looking for dependency injection in my unit test strategy using RequireJS and Jasmine. I really like the idea behind testr and I have tried to setup testr following the examples in github ...
aschiavoni's user avatar
7 votes
4 answers
5k views

Jasmine + JSTestDriver + Coverage + RequireJS

Wow, what a mess. This is the scenario. Backbone driven JS app. RequireJS for AMD functionality, initialized like this: <script data-main="js/main" src="js/require.js" type="text/javascript">&...
Bernardo's user avatar
  • 1,030
6 votes
2 answers
4k views

Grunt test for UMD

I'm trying to figure out the best approach to testing a Javascript module definition using a UMD factory, similar to this: https://github.com/umdjs/umd/blob/master/returnExportsGlobal.js I don't want ...
badsyntax's user avatar
  • 9,592
5 votes
2 answers
3k views

Chutzpah and Jasmine 2.0 and RequrieJs

I'm having some bother getting Chutzpah to work with requireJs/jasmine 2.0. This method worked for version 1.3 but now for jasmine version 2.0 chutzpah has stopped picking up the tests. I upgraded ...
Neil's user avatar
  • 5,239
5 votes
3 answers
8k views

test not running on karma/jasmine/require.js 'There is no timestamp for *lib*!' error

I change the code, extend some functionality and add new unittest for that. Now, when I run my unit tests with karma (test framework - jasmine), it throw me an error 'There is no timestamp for /libs/...
Ph0en1x's user avatar
  • 10.1k

15 30 50 per page
1
2 3 4 5
10