Skip to main content

All Questions

Tagged with
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 ...
0 votes
1 answer
236 views

Testing events with RequireJs + Karma + Jasmine

i'm trying to find a way to test events. Like in topic title my stack is RequireJs + Karma + Jasmine. I dont want to use jQuery or any not essential external libraries. There's icon-utils code i use ...
0 votes
0 answers
215 views

Squirejs : requirejs is not defined

We have an amd/requirejs based web app. We came to a point to add a unit testing to our code. Googling returned that squireJs is best amd-require based mocking library. after installing, The problem ...
0 votes
1 answer
145 views

Chutzpah doesn't detect jasmine tests in Typescript with AMD modules

We are trying to figure out a approach for UI testing and felt chutzpah will be a nice option. I wrote jasmine tests using typescript and requirejs. Chutzpah is able to detect the sample tests which ...
1 vote
0 answers
28 views

RequireJS data-main does not load from html files at different paths

Using RequireJS successfully for a single page application for quite some time. Finally adding JS unit tests to exercise model classes. I have a single config for src modules and another for test ...
3 votes
1 answer
2k views

Jasmine specs not being executed when injecting dependencies with Squire.js

I am attempting to run some Jasmine unit tests for a Backbone view, mocking out dependencies in Squire. The dependencies of my view are a Baseview, an ICanHaz template and an i18n translation. I ...
0 votes
0 answers
25 views

Defining requirejs controllers in jasmine test giving undefined

I have a requires controller file which defines Backbone Models and Views into its structure and then with every different functionality of the model it invokes its corresponding Rest Web Service call....
3 votes
2 answers
643 views

PhantomJS not playing nice with RequireJS+Jasmine

I have some tests running with RequireJS and Jasmine. I have a Jasmine test harness file that looks like this: <html> <head> <meta charset="utf-8" /> <link rel="...
0 votes
1 answer
1k views

"define is not defined" - jasmine-node requirejs in Nodejs

I am trying to run jasmine tests on files that are using requirejs. I have a require.config.js file which provides all the configuration for the requirejs and I am passing to this command to run the ...
0 votes
1 answer
826 views

Jasmine Testing knockout.js with requirejs

I am having trouble getting my Jasmine test file to get data from my knockoutjs files. I am able to create knockout observables and test those in the the spec file but not other files. For some reason ...
1 vote
0 answers
404 views

Executing 0 of 0 Error on running unit test cases using Karma and Jasmine

I want to run the test cases using karma and jasmine. I have done the following, but it is giving error like: Error: Chrome 59.0.3071 (Linux 0.0.0): Executed 0 of 0 ERROR (0.12 secs / 0 secs) karma....
0 votes
1 answer
1k views

Uncaught Error: Mismatched anonymous define() module: function in karma and jasmine unit testing with requirejs [duplicate]

I am trying to run unit test cases for my controllers, I have tried the following but getting the below error, please let me know to run this test successfully. Thanks in advance. spec.js: describe('...
5 votes
2 answers
1k views

How can I get istanbul working with node, mocha, jasmine and require js

I have an existing test suite that runs fine in node.js using mocha, require and jasmine, with the tests being run via a psake powershell script. I am attempting to add test coverage, so to run the ...
0 votes
1 answer
292 views

stView.el is undefined while testing Backbone view with jasmine

I'm using Jasmine for unit testing to test an application with Backbone.js (and it's the first time that I'm working with them both so I'm a little bit stuck :/ ) Here is my Backbone view ...
0 votes
2 answers
781 views

RequireJS optimiser not loading paths from external config?

I'm using r.js through grunt-contrib-requirejs and haven't had any problems with it so far, until I wanted to split up my config into a separate file so that both testem and my app could share the ...

15 30 50 per page
1
2 3 4 5
10