qunit Questions
2
Solved
I am using Ember CLI and I am trying to integrate code coverage reports with the built in Qunit tests that are run with testem. I tried to use Istanbul, but I couldn't get it to find the files to i...
Odont asked 30/6, 2014 at 16:32
2
Solved
I'd like to create a basic acceptance test in ember that uploads a file.
I can mock the server with Pretender, but I need to know how to fill the input type="file" field with a file from my filesys...
Horseshoes asked 18/3, 2015 at 11:26
2
Solved
I'm trying to run qunit test cases with PhantomJS. One of my tests are hanging in when phantomJS try to access the navigator.geolocation function of DOM. same test is working fine in the browser, j...
Cognizable asked 9/4, 2013 at 5:40
2
Solved
I just found qHint, a method to integrate jsHint testing into Qunit... but it doesn't work locally (I don't mean localhost) except in Firefox.
So I wanted to add a "warning" or "notice", NOT a tes...
4
Solved
Within an ajax request how can the error callback be tested ? Is it possible to simulate a network connection error ?
$.ajax({
url: "myUrl",
type: 'post',
dataType : "json",
data : ({
myJso...
Fiord asked 17/9, 2012 at 8:49
3
Solved
I have jQuery code that when I click on a link it first hides and then removes some HTML, like so:
$(this).parent().parent().hide('slow', function () {
$(this).remove();
});
I want to make a Q...
Nitrate asked 18/11, 2011 at 14:37
4
Solved
I would like to log a quick separator to the console in each QUnit test like this:
test( "hello test", function() {
testTitle = XXX; // get "hello test" here
console.log("========= " + testTitle...
Upland asked 11/2, 2013 at 10:8
5
Solved
Sorry if this is obvious, but is there a notOK or equivalent function in QUnit, if we want to assert that a method returns false?
I can't see a way to negate OK in the documentation.
I tried:
!o...
Almita asked 1/8, 2013 at 12:57
2
I've got a repository which is integrated with travis. I've got QUnit tests which I'd like to run from grunt/node server side and AMD (requirejs). This is the source of my AMD init.js:
(function (...
Oratorian asked 22/8, 2013 at 23:40
2
Solved
Using the integrated QUnit testing framweork I need to test wether or not visiting a route causes an Error to be thrown.
There is a Handlebars helper in the route that should throw an Error under ...
Stock asked 21/1, 2015 at 5:23
1
Solved
Specs:
Ember version: 1.13.8
node: 0.10.33
npm: 2.13.4
I have
import Alias from "../../../services/alias";
....
moduleFor("controller:test", "Controller: test", {
integration: true,
...
Earthquake asked 7/12, 2015 at 1:39
2
Solved
I have a JavaScript function that does a Post to a remote API that I am looking at writing a unit test for. The method I want to test is this:
var functionToTest = function(callback, fail) {
$.aj...
Greylag asked 24/1, 2014 at 18:36
1
Solved
I want to write a custom assert function for QUnit to check if an actual string matches an expected regex. With help of this question I wrote a first basic version that works as expected:
QUnit.ex...
Manthei asked 22/10, 2015 at 9:37
1
I have some qunit tests setup to test my code that extensively uses requirejs. I use Chutzpah to perform the test running within VS. Everything works fine if I run the tests in the browser but not ...
2
I use QUnit for JavaScript unit testing, have quite a few tests already. Majority of them uses assert in the way:
ok(condition.isTrue());
These tests are run well by Visual Studio embeded tests ...
Namedropper asked 8/10, 2015 at 2:53
1
I have some unit tests that access the store. I would have thought this would be fine, so long as I wrapped them in a run callback. Unfortunately, that's not the case. I'm getting this error:
afte...
Seidler asked 6/3, 2015 at 19:11
1
Solved
I'm writing JavaScript unit tests (with the QUnit library). I need to verify that my array contains expected (and only) elements.
var array = getArrayFunction(a, b);
equal(["one", "two", "three"],...
Accrescent asked 26/9, 2015 at 1:59
1
Solved
I am new to JavaScript unit testing. I am trying to test typescript classes and my tests are also written in typescript, which somewhat looks like below:
/// <reference path="../../typings/quni...
Jelena asked 31/7, 2015 at 6:29
2
Solved
I can't get QUnit to run any test after the first. To be sure I wasn't doing something weird, I pared down the code to be as basic as possible.
test("A", function () {
ok(true, "Test A");
});
te...
Tsarism asked 6/12, 2012 at 21:16
2
I'm trying to piece karma and requirejs together. but find a big issue cannot find any answer.
I have a project using requirejs and I'm using qunit as its testing framework. they work fine before k...
Necropsy asked 11/4, 2014 at 8:23
1
Solved
I've got a fairly simple repro with an outcome I don't understand.
Make sure you have the Chutpah Test Adapter 4.0.3 installed. Using Visual Studio 2013 take the following steps:
Create a new ....
Kinlaw asked 21/7, 2015 at 13:38
2
Solved
Let's say I have a utility function that, for simplicity's sake (the real thing is complicated and irrelevant), returns the current window's querystring.
var someUtilityFunction = () {
return win...
Afroamerican asked 9/8, 2012 at 20:32
3
Solved
Is it possible to unit test javascript functions that exist within a closure, so for example, given the following:
(function() {
var a = function() {
//do something
}
window.b = function() {
...
Goles asked 8/7, 2011 at 14:51
2
I'm preparing to write some tests with Qunit for a Backbone app that is written for ES6 with babel.js applied to it so that it can run in contemporary browsers. To ensure that I have qunit set up p...
Lightless asked 27/2, 2015 at 0:40
2
Solved
Let's say you are testing a function that will call a dependency multiple times with different arguments:
var sut = {
ImportantFunction: function(dependency){
dependency("a", 1);
dependency("b"...
Unstained asked 27/4, 2015 at 15:18
© 2022 - 2024 — McMap. All rights reserved.