Skip to main content

All Questions

Tagged with
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 ...
Marcin Rubach's user avatar
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 ...
ISkandar's user avatar
0 votes
1 answer
143 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 ...
Naresh_drake's user avatar
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 ...
jmelvin's user avatar
  • 637
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....
Nephilim700's user avatar
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 ...
Nephilim700's user avatar
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....
Sana's user avatar
  • 23
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('...
Sana's user avatar
  • 23
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 ...
Mariama Mariama's user avatar
1 vote
0 answers
63 views

Karma is not seeing test files [duplicate]

I used to use my SpecRunner.html to run Jasmine tests but I'd like to change it for Karma testrunner. However, I have problems with configuration of Karma + requirejs. This is my working tree: This ...
Hubert Kubiak's user avatar
0 votes
1 answer
510 views

Testing TypeScript modules with Jasmine and ReSharper

I have the following Jasmine test in a TypeScript file in a VS2017 project: describe("A trivial test", () => { it("Should pass", () => { expect(true).toBeTruthy(); }); }); This runs ...
fractor's user avatar
  • 1,596
0 votes
0 answers
47 views

How to set the dependency of dynamically generated .js library through require in jasmine specs

Currently I am writing jasmine specs for already developed backbone.js application. I have to write jasmine specs for each module for unit testing. I have a module in which one of the .js (say abc.js) ...
user3878988's user avatar
1 vote
1 answer
726 views

How to use Jasmine to Spy on Modules being loaded by requireJS?

So I'm using Typescript/RequireJs/Jasmine, and can't get my spy to work for modules loaded in another module. Here is my Spec: import { CrmWebApiLib } from "../../../webresources/allgnt_/scripts/...
Daryl's user avatar
  • 18.8k
0 votes
1 answer
330 views

Replacing dependencies in AMD module format with testdouble.js

I'm writing tests for a JS application using Jasmine and testdouble.js as a mocking library. I am using AMD format to organize code in modules, and RequreJS as a module loader. I was wondering how to ...
vladamon's user avatar
  • 297
1 vote
1 answer
2k views

Global variable not being assigned in Jasmine unit test

I'm having some issues with a Jasmine unit-test seeing a global variable as undefined. I'm using Squire to mock some classes with the dependencies injected via RequireJS. Here is a trimmed down ...
dajaffe's user avatar
  • 855

15 30 50 per page
1
2 3 4 5
10