qunit Questions
3
Solved
I am trying to setup a QUnit environment using requirejs and grunt-contrib-qunit.
Here is what I have.
gruntfile:
qunit: {
all: {
options: {
urls: [
'http://localhost:8000/qunit/qunit-test-...
Sooty asked 3/4, 2015 at 15:52
3
Solved
How can I write a QUnit test for this:
function doSomethingWithAjax() {
$.ajax({
url: '/GetHelloWorld',
success: function(data) { $("#responseFromServer").text(data); },
});
}
Mockjax+qunit ...
2
I've created a jQuery UI Widget that resizes a DIV/thing to fill up the browser screen. It all works fine but now I want to create unit tests for testing that it's resizing and keeping to boundarie...
Field asked 4/7, 2013 at 9:57
2
Solved
It appears the Qunit test methods aren't available even though I'm pretty sure I am importing them correctly.
I get the following errors:
unit/models/friend-test.js: line 11, col 3, 'ok' is not ...
Microfiche asked 24/2, 2015 at 17:29
5
I have been investigating the best way to do JS unit testing in our maven CI environment. What I currently have cobbled together is the following in my maven project:
qunit resources (JS/CSS file...
2
Solved
I would like to run blanket.js with qunit in my Ember-Cli app - I would like to avoid adding in grunt for only this purpose
Tried to use npm install --save-dev blanket ( putting it in the node_mod...
Nondisjunction asked 30/6, 2014 at 20:33
3
Solved
I want to start testing the JavaScript in my Rails apps with qUnit and I'm wondering how to keep the test JavaScript and test runner HTML page under version control (I'm using Git, of course) but k...
Jesusa asked 1/4, 2010 at 5:11
2
I need to test my script at different viewport sizes. In my tests I'd like to change the viewport size of PhantomJS by setting page.viewportSize. I'm running my tests through grunt-contrib-qunit an...
Apologize asked 14/5, 2013 at 20:32
1
Solved
I try to connect together our cicleCI with browserstack and run our integration_test and unit tests not only with PhantomJS but on real Firefox and Internet Explorer as well, using Browserstack ser...
Neustria asked 1/8, 2014 at 6:14
0
I've got an ember-cli app that's using Ember Data and I'm trying to write an acceptance test that covers the failure case of submitting a form to ask a question. In the test, I'm mocking the respon...
Calumet asked 28/7, 2014 at 16:44
2
I'm using Grunt, PhantomJS, and the "watch" plugin to run my QUnit tests while I develop (separate from CI). I'd like to be able to focus on a specific QUnit module while I'm working on the code th...
1
Solved
I realized that the QUnit.module provides setup and teardown callbacks surrounding each tests.
QUnit.module("unrelated test", {
setup: function() {
var usedAcrossTests = "hello";
}
});
QUnit.te...
Wendolynwendt asked 20/6, 2014 at 5:24
2
Solved
I'd like to add new assertions to QUnit.
I've done something this:
QUnit.extend(QUnit.assert, {
increases: function(measure, block, message){
var before = measure();
block();
var after = measu...
Clippers asked 19/10, 2013 at 22:44
2
Solved
I notice in the documentation there is a way to pass custom configuration into a module:
requirejs.config({
baseUrl: './js',
paths: {
jquery: 'libs/jquery-1.9.1',
jqueryui: 'libs/jquery-ui-1.9...
Honaker asked 9/5, 2013 at 18:5
2
Solved
We are trying to implement QUnit JavaScript tests for a JS-heavy web app. We are struggling to find a way to successfully test methods that involve jQuery AJAX requests. For example, we have the fo...
Alexia asked 24/2, 2012 at 13:31
1
I am trying to get my Unit Tests working in Grunt, when I execute my index file in the browser the tests run successfully, however when I run the tests with grunt qunit it cannot recognise any test...
Griffith asked 8/1, 2014 at 15:44
3
I have the following function
var redirect = function() {
window.location.href = "http://www.google.com";
}
I want to test this function using qUnit.
The problem is, when I call up the HTML do...
Frenzy asked 30/8, 2011 at 8:39
2
Solved
I have started using Qunit to test my JS code. I am looking into JSCoverage to generate the coverage reports later. We have a CI server (Jenkins) which already do a few things with our PHP code and...
Dotted asked 28/2, 2012 at 13:8
1
Solved
I'm having issues getting coveralls to work. I've created a simple project here.
It seems to be outputting the report correctly, but I'm definitely missing a step somewhere because coveralls doesn...
Harte asked 18/3, 2014 at 20:19
2
Solved
I've recently started using QUnit to unit test my JavaScript and I'm a little confused by a feature in there documentation: expect().
According to the docs, expect() is designed to:
[s]pecify h...
Brooklynese asked 21/2, 2013 at 1:38
2
This is my first sof post so forgive my format and organization of thought. I've made a great effort to solve my problem before posting this. Part of my issue could be lack of knowledge with packag...
1
Solved
Trying to test-drive my first ember.js app. Using ember app kit.
Puzzled by how qunit works with selectors (I assumed that jquery selectors would work, and they do - for the most part...).
My han...
Unrobe asked 4/2, 2014 at 22:57
1
Solved
how does one test a code inside a callback function using sinon.js framework for mocking?
JSFiddle: http://jsfiddle.net/ruslans/CE5e2/
var service = function () {
return {
getData: function (ca...
Panzer asked 4/2, 2014 at 14:52
1
I am creating Qunit tests which are running on grunt server. In the test when I am trying to use "console.log" to log some output to the console, it is not printing anything in the console.
Current...
Wriggly asked 2/1, 2014 at 10:19
2
Solved
I've been looking at two libraries for doing unit tests on the front-end.
QUnit - http://qunitjs.com/
Jasmine - http://jasmine.github.io/
Jasmine is clearly more BDD focused than QUnit althoug...
Latonialatoniah asked 9/8, 2013 at 20:52
© 2022 - 2024 — McMap. All rights reserved.