qunit Questions
9
Solved
I have a JavaScript component in my application that handles infinite scroll pagination, and i'm trying to rewrite it to use the IntersectionObserver, as described here, however I'm having issues i...
Jettiejettison asked 29/5, 2017 at 20:34
3
Solved
I've got a single method in my namespace that I'd like to mock, but I'd prefer that all the others work normally. Is it possible to have sinon mock a specific method while leaving the others the sa...
Brodie asked 24/7, 2014 at 2:14
3
Solved
I need to read data from FormData? I try to read something like someFormatData["valueName"] but it not working.
options["fileId"] or options["file"] does not work. Also I try options.fileId same re...
Krems asked 14/2, 2013 at 14:19
4
I've had no problems sorting out mocking the success condition, but cannot seem to fathom how to mock the failure/timeout conditions when using Sinon and Qunit to test and ajax function:
My set up ...
Ukrainian asked 15/5, 2013 at 8:41
4
Up untill now I was used to write all my code inside the ready() function like:
$(document).ready(function() {
// all my code
});
Now I see that with this approach, my code is not "unit testabl...
Starnes asked 16/8, 2011 at 14:38
7
Solved
On the server side we have Rspec/Cucumber for BDD development (ruby) vowsjs (node.js)
Is there a BDD frameworks to use on web browsers (not qUnit or YUI test since these are only for TDD)?
Metalanguage asked 4/3, 2011 at 20:18
5
Solved
Is it possible to override the equivalence comparison in Javascript?
The closest I have gotten to a solution is by defining the valueOf function and invoking valueOf with a plus in front of the ob...
Hinda asked 10/5, 2012 at 18:18
5
Solved
I'm new to qunit, and am attempting to integrate it with an existing environment.
One of the issues I get on pages that utilize jQuery is this:
global failure (1, 0, 1)Rerun6 ms
Uncaught Referenc...
Journeyman asked 23/1, 2013 at 13:35
2
How do you trigger selecting an <option> in a select element in an integration test? select2 is simple enough: Simulate a ember-select2 selection in ember integration test
5
Solved
I'm trying to add unit testing for JavaScript into my web site. I use VS2013 and my project is an ASP.NET web site.
Based on recommendations (http://www.rhyous.com/2013/02/20/creating-a-qunit-test...
Mavismavra asked 5/6, 2015 at 3:46
4
I recently started working on a Rails app that has a large amount of QUnit tests already in place for testing ember. I have been charged with the task of setting the app with a CI (I decided to use...
Porche asked 11/7, 2014 at 18:19
4
Solved
working in ember-cli testing. After all tests passed it returns extra two test with errors.
Uncaught Error: Assertion Failed: calling set on destroyed object
Source : '../dist/assets/vendor.js:...
2
Solved
How do I "think in Qunit" with my own JavaScript libraries ?
I'm familiar with developing in javascript, but now I'd like to start using Qunit (with my applications in HTML/JavaScript).
I make my...
Pail asked 15/7, 2014 at 17:17
0
I'm using Qunit framework to test a front-end Web application.
I have a requirement to generate report for code coverage. For that, I'm trying to use istanbul through a gulp task. My gulpfile.js l...
Jeb asked 25/2, 2018 at 21:49
2
When I execute my tests locally they pass with no problems but when tests proceed on the server I get:
TypeError: MouseEventConstructor is not a constructor (evaluating 'new MouseEvent('mousedown'...
Coitus asked 21/3, 2017 at 14:15
1
Using sinon and sinon-qunit in our front end unit tests, and I'm struggling to understand the difference in these methods. We are using sinon.sandbox.stub() (literally that is the function, we do n...
Waites asked 27/5, 2014 at 14:32
2
When I enter 'karma start' in the WebStorms' terminal, it opens Chrome and I can start testing, when I make some changes, it reruns the tests. But what is the difference when I type Karma start or ...
Persona asked 11/11, 2013 at 19:8
1
I have to exec some code before all tests began. So I need to use QUnit hook before but in ember-qunit the only callbacks available are beforeEach and afterEach.
How can I perform that?
Megganmeggi asked 5/10, 2016 at 17:21
1
I know that there is a lot of other similar questions, however the answers don't provide a way round this problem.
I have a JavaScript file used on my website that uses the HTML 5 Web Audio and wa...
Godroon asked 9/1, 2015 at 11:29
1
Solved
I have a simple component integration test:
test('it throws error my-custom-input is called', function(assert) {
assert.throws(() => {
this.render(hbs`{{my-custom-input}}`);
}, /my-custom-in...
Heptad asked 14/3, 2017 at 8:31
2
How do we assert for equality of ES6 Maps and Sets?
For example:
// ES6 Map
var m1 = new Map();
m1.set('one', 1);
var m2 = new Map();
m2.set('two', 2);
assert.deepEqual(m1,m2); // outputs: passed...
Feltner asked 4/7, 2015 at 1:3
1
Solved
In the simplest test possible, I'm attempting to test the following function:
addPercentSign: function (oEvent, control) {
var inputVal = oEvent.getParameters().value;
var inputNumber = parseFl...
Cygnet asked 9/12, 2016 at 21:55
2
Solved
I need a way to take a screenshot during a test which uses QUnit and Karma to run inside PhantomJS 2.0.1
I've found this command:
window.top.callPhantom('render');
That doesn't throw any error ...
Tubb asked 9/1, 2016 at 14:38
1
I have several class-based helpers in my app, mostly so I can include the i18n service. Everything works nicely, however, I can't figure out a way to test them.
The auto generated test is not work...
Inweave asked 7/9, 2016 at 13:46
5
Solved
I am doing QUnit testing in an IFRAME and have a recursive JavaScript function that loads all of the scripts from the parent page into the IFRAME before starting QUnit. This works great. My problem...
Fraction asked 16/5, 2011 at 20:32
1 Next >
© 2022 - 2024 — McMap. All rights reserved.