All Questions
150
questions
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 (...
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. ...
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, ...
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/...
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 ...
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 ...
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.
...
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....
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 ...
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 ...
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 ...
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">&...
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 ...
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 ...
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/...