All Questions
81
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 ...
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....
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 ...
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 ...
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) ...
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/...
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 ...
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 ...
-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 ...
3
votes
1
answer
318
views
Coverage.json not generated with Jasmine RequireJS and Istanbul in grunt
I have trying to generate coverage report based from grunt using grunt-template-jasmine-istanbul. The Specs are executed correctly but no coverage report is generated.
Below is my code in the config ...
0
votes
0
answers
81
views
Running Jasmine tests from Node against code that uses RequireJS
Is it possible to run Jasmine from Node to test code that uses RequireJS?
I am using the Jasmine NPM. I can run some tests from Node but can't work out how to test my code that uses RequireJS.
V2 of ...
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
101
views
Angular-Jasmine, loading json
I am trying to load json from local folder and then feed it into function to test it. Here is what I am trying to do:
it('should be able to use treatExpResultJSON() function to treat incoming JSON', ...
0
votes
1
answer
64
views
How to make requirejs to work with jasmine and blanketjs for code coverage?
I was working on generating code coverage report using blanketjs.
Click here .
But I am finding difficulty in achieving the same.
Here's my code :
require(['jquery', 'boot', 'JasmineBlanket'], ...
1
vote
0
answers
138
views
Istanbul coverage with built React JavaScript and Jasmine
I have a built version of a React module that I'm testing successfully with Jasmine but when I try to use Istanbul to determine my tests coverage it shows that I'm only testing the Require.js Define ...