Questions tagged [ember-qunit]

Unit test helpers for Ember applications.

Ember-qunit is a tool design to enhance the ability to write unit tests for Ember applications.

Ember QUnit uses your application's resolver to find and automatically create test subjects for you with the moduleFor and test helpers.

See more:

160 questions
1
vote
1 answer

Ember-CLI Generated Acceptance Test Fails

I have a very basic Ember-CLI application running with about 75 or so QUnit assertions that all pass. When I generate an acceptance test: ember generate acceptance-test games Which produces: import Ember from 'ember'; import { module, test } from…
Jon
  • 1,234
  • 2
  • 12
  • 30
1
vote
1 answer

Trying to get QUnit working with Emberjs

I'm trying to setup ember-testing with QUnit to test my Ember.js application. My problem is the app isn't rendering on the QUnit test page, and thus the visit('/') function isn't working. index.html
mrlindsey
  • 300
  • 2
  • 12
1
vote
1 answer

Where do I use Pretender to enable Ember Qunit integration tests with rails-csrf?

We are using rails-csrf in our ember-cli app. The README on rails-csrf says: Be sure to mock out the call to the csrf server endpoint. Otherwise your tests will fail with "error while processing route: [route]" messages in the browser console. For…
pjmorse
  • 9,204
  • 9
  • 54
  • 124
1
vote
1 answer

ember-cli extend assert with custom assertion helpers

In the latest ember-cli, in the unit tests the test function expect as last parameter a function which would have the assert object as first parameter. I was wondering how can I extend this object to add my own custom assertion helpers? For example…
Huafu
  • 2,445
  • 1
  • 22
  • 26
1
vote
1 answer

Making acceptence tests order dependent?

is there any way i can make tests order dependent so test 2 doesn't start until test one has finished? going to localhost:4200/tests runs them in a non deterministic manner and sometimes it goes in the correct order and works fine but other times it…
flylib
  • 1,128
  • 2
  • 10
  • 17
1
vote
0 answers

Pretender and QUnit: Error: Assertion Failed: The response from a findQuery must be an Array, not undefined

A recent update seems to have broken my tests. I'm using Pretender to mock server calls, and I'm getting the error Error: Assertion Failed: The response from a findQuery must be an Array, not undefined. Note that I don't get errors when I visit that…
NJP
  • 815
  • 1
  • 7
  • 20
1
vote
0 answers

Trigger event needs specific options in Ember integration test?

I've added custom no_results text for my Chosen component (which uses the Chosen jQuery plugin), and I'm trying to write integration tests to see if it works correctly. To do so, I need to find some way to trigger the chosen:no_results event.…
NJP
  • 815
  • 1
  • 7
  • 20
1
vote
0 answers

Ember js QUnit Test : visit with parameters

I have blow setup DEBUG: ------------------------------- ember.js:14463 DEBUG: Ember : 1.7.0 ember.js:14463 DEBUG: Ember Data : 1.0.0-beta.9 ember.js:14463 DEBUG: Handlebars : 1.3.0 ember.js:14463 DEBUG: jQuery : 2.1.1 ember.js:14463…
plzdontkillme
  • 1,497
  • 3
  • 20
  • 38
1
vote
1 answer

How can I unit test class methods in Ember-Cli

In my application I'd like to test a class method on my GooglePlaceRetriever service. I know that when testing in Ember-Cli I can use this.subject() to get an instance of the service, but I'm not sure how I can access the actual GooglePlaceRetriever…
jklina
  • 3,407
  • 27
  • 42
1
vote
1 answer

Ember-cli integration click - type error undefined is not a function

I have a new ember-cli application and am setting up an integration test to click a button on the page and display a modal window (or check for it's existence after the button is clicked). This is the integration test: import { test } from…
Matt Gifford
  • 581
  • 5
  • 5
1
vote
1 answer

Qunit: TypeError: undefined is not a function

These are the tests I've written so far. This first assertion passes. For the second I get the error: TypeError: undefined is not a function. /*global describe, it, assert */ App.rootElement =…
James White
  • 535
  • 10
  • 24
1
vote
1 answer

Integration Testing Sessions with Ember CLI

I'm simply trying to write some tests to make sure logging in and out works, including everything that goes with it. Here's what I'm doing so far: tests/integration/sessions-test.js import Ember from "ember"; import { test } from…
Zachary Nicoll
  • 339
  • 1
  • 4
  • 14
1
vote
0 answers

Ember QUnit: moduleForHelper with ember metal-views

For our ember app we want to test the handlebars helpers. Currently we use the moduleForHelper from this never merged ember-qunit PR. With ember 1.8 beta-1 (which includes the metal-views refactorings) the helper stops working. I have created the…
manuel_mitasch
  • 473
  • 3
  • 9
1
vote
1 answer

How to register a component for testing with ember-qunit?

I'm trying to use ember-qunit for testing. I have this pseudo-code here: (http://jsbin.com/zejacati/5/edit) Ember.Foo = Ember.Namespace.create(); Ember.Foo.FooComponent = Ember.Component.extend({ template:…
DimaOverflow
  • 1,513
  • 1
  • 16
  • 18
1
vote
1 answer

App.reset() fails at ember-qunit teardown

All of my ember-qunit tests have a similar setup: moduleFor('route:marketplace-search', 'Marketplace Search route', { setup: function() { setFixtures(); }, teardown: function() { App.reset(); } }); One of them is throwing an…
chriscaselas
  • 133
  • 1
  • 6