Skip to main content

All Questions

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

Karma test run throwing error on requirejs

I have the below configuration in the karma config file. frameworks: [ 'jasmine', 'requirejs' ], files: [ //App Bower components {pattern: 'public/...
Priyabrat Nanda's user avatar
5 votes
1 answer
1k views

Karma/Jasmine tests fail with error: 'Uncaught Error: Module name "simple_test.js" has not been loaded yet for context: _. Use require([])'

I am using Karma and Jasmine to run tests on my project built with React. When I try to run my Karma tests I get this error in the console: Running "karma:test" (karma) task WARN `start` method is ...
CascadiaJS's user avatar
  • 2,488
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
0 votes
1 answer
482 views

angular js dynamically loading modules + requirejs

controller.js define([ 'angular', 'app', 'underscore', 'jquery' ], function (angular, app, _, $) { 'use strict'; var module = angular.module('kibana....
Biga Gaber's user avatar
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
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
1 vote
1 answer
1k views

AngularJS, RequireJS, Karma - Test File not loading

I'm currently attempting to run tests using Karma, however I can't seem to load the Test file... this is my file structure: app controllers .. directives .. .. test ...
Gonçalo Vieira's user avatar
1 vote
0 answers
390 views

How to use request.js in karma using RequireJS?

I'm trying to write unit tests using Karma + Jasmine + RequireJS. When in my spec I use request.js I get below error: Chrome 36.0.1985 (Linux) ERROR Uncaught Error: Module name "lib/optional" has ...
Uriel González's user avatar
0 votes
0 answers
569 views

Uncaught object error with Karma

I am pretty new to jasmine and karma, but I have a rails app set up using requirejs and jasmine and I'm trying to get karma up and running. I have it running, but when I run the unit.js config file, ...
geoff swartz's user avatar
  • 5,845

15 30 50 per page