Created
September 5, 2017 08:47
-
-
Save benmurden/977a15878d8ddd8f46303c44bf050b3d to your computer and use it in GitHub Desktop.
Fixed Ember.js component test
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
import { moduleForComponent, test } from 'ember-qunit'; | |
import hbs from 'htmlbars-inline-precompile'; | |
moduleForComponent('foo-bar', 'Integration | Component | foo bar', { | |
integration: true | |
}); | |
test('it renders', function(assert) { | |
// Set any properties with this.set('myProperty', 'value'); | |
// Handle any actions with this.on('myAction', function(val) { ... }); | |
this.render(hbs`{{foo-bar}}`); | |
assert.equal(this.$().text().trim(), ''); | |
}); | |
test('renders block content', function(assert) { | |
// Template block usage: | |
this.render(hbs` | |
{{#foo-bar}} | |
template block text | |
{{/foo-bar}} | |
`); | |
assert.equal(this.$().text().trim(), 'template block text'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment