Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Mar 19, 2019
1 parent 3e0b553 commit 9c297a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use strict';

module.exports = {
extends: 'recommended'
extends: 'recommended',
rules: {
quotes: 'single'
}
};
17 changes: 5 additions & 12 deletions tests/integration/components/shadow-dom/component-test.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { find, render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';

module('Integration | Component | shadow-dom', function(hooks) {
setupRenderingTest(hooks);

test('it renders', async function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });

await render(hbs`{{shadow-dom}}`);

assert.dom(this.element).hasText('');

// Template block usage:
await render(hbs`
{{#shadow-dom}}
<div id='internal'></div>
<ShadowDom @selector='#internal'>
template block text
{{/shadow-dom}}
</ShadowDom>
`);

assert.dom(this.element).hasText('template block text');
assert.equal(find('#internal').shadowRoot.textContent.trim(), 'template block text');
});
});

0 comments on commit 9c297a8

Please sign in to comment.