Skip to main content

All Questions

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
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
-1 votes
1 answer
485 views

AVA Unit Test: Use gulp-ava to test global functions

I'm new on using AVA for JS unit tests and I immediately hit a rock: My situation is that I want to run a gulp task to run the AVA tests and watch the test files, and in the test file I wrote I need ...
J. Doe's user avatar
  • 1
0 votes
1 answer
338 views

Decouple Knockout dependencies in Jasmine unit tests

I am introducing javascript unit tests to my company's application. I've worked predominantly with AngularJS, but their framework of choice is Knockout. The code is relatively modular in design (...
cidthecoatrack's user avatar
5 votes
1 answer
705 views

State of Jasmine Unit Test support of Resharper 2017: Debug mode and AMD modules supported?

I currently use Chutzpah to run and debug Jasmine Unit tests that include AMD/require.js modules. I would like switch to the test runner of Resharper 2017. However, Resharper does not seem to fully ...
Stefan's user avatar
  • 11.6k
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 ...
laskdjf's user avatar
  • 1,172
0 votes
1 answer
848 views

Writing Unit Testing With Jasmine , Require JS in Karma for Angular JS?

I have Done a Library Management App with Angular JS and Mongo Lab will Act as a DB Part, I am facing issuse with Require JS Dependency While Crating Unit test Case Error: [$injector:modulerr] Failed ...
Siva G's user avatar
  • 1,178
0 votes
0 answers
72 views

How can I write a unit test for Loading AngularJS Components With RequireJS After Application Bootstrap?

I write a unit testing for angular js applications. the bootstrap for this app loading dynamically. when I write the unit test for this always error happen like didn't find the module or unknown ...
Ahmed Gaber - Biga's user avatar
3 votes
2 answers
607 views

Mocking an anonymous module call in Jasmine using requireJs

Current unit testing setup: Jasmine 2.1 RequireJs 2.1.15 Chutzpah 3.2.6 In our code base we have a number of modules which are loaded in through requireJs to abstract out functionality. For example ...
WestDiscGolf's user avatar
  • 4,108
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
0 votes
0 answers
225 views

JavaScript unit tests with Jasmine and RequireJS

In my visual studio I have two projects one of them provide functionality for SharePoint page and another one for testing purposes. In the first project I have few view modules that use RequireJS as ...
nelly2k's user avatar
  • 781
2 votes
1 answer
253 views

How to inject module in test for requirejs to unit test application?

I have two modules, ModuleA and ModuleB. ModuleB depends on ModuleA. But as far as I know requirejs is kind of service locator. So how do I unit test this kind of pattern in my code. define('moduleA'...
toy's user avatar
  • 12k
1 vote
2 answers
1k views

Set specific port when running jasmine test with Resharper?

When running jasmine test with resharper in a browser or phantom, I notice it starts with a random port like (localhost:2341), is it possible to tell resharper that we want to run the tests in a ...
Beelphegor's user avatar

15 30 50 per page