Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4870

Unit tests with qunit

$
0
0

Hi I’m new to ember and not sure why I’m getting this error You cannot use the same root element (#ember-testing) multiple times in an Ember.Application

I tried removing my other tests to isolate just this one but no luck.

import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';

module('Integration | Component | display, function(hooks) {
  setupRenderingTest(hooks);

  test('Color values', async function(assert) {
    const someThing = this.owner.lookup('component:display');
    colorOptions2 = [
    { name: "Blue", value: 1 },
    { name: "Pink", value: 2 },
  ];
    assert.equal(someThing.colorOptions, colorOptions2);
  });
});

And I have a file called display.hbs and display.js.

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4870

Trending Articles