-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e0b553
commit 9c297a8
Showing
2 changed files
with
9 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); | ||
}); |