Skip to content

Commit

Permalink
test: edited the bind-data-test-attributes test in order to only chec…
Browse files Browse the repository at this point in the history
…k that an error is thrown
  • Loading branch information
mathieupoteriepeopledoc committed Aug 30, 2018
1 parent ad94d4f commit 5d3177b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/integration/bind-data-test-attributes-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ moduleForComponent(
if (!config.stripTestSelectors) {
test('It throws an error when a data-test-attribute is added on a tagless component', function(assert) {
assert.expect(1);
assert.expectAssertion(
() => {
this.render(
hbs`{{data-test-component tagName='' data-test-attribute=true}}`
);
},
'Assertion Failed: ember-test-selectors could not bind data-test-* properties on <dummy@component:data-test-component::ember495> automatically because tagName is empty.',
'Error is thrown properly on tagless component with data-attribute'
);
assert.expectAssertion(() => {
this.render(
hbs`{{data-test-component tagName='' data-test-attribute=true}}`
);
});
});
} else {
test('it doest not throw an error when stripTestSelectors is set to true in the config', function(assert) {
Expand Down

0 comments on commit 5d3177b

Please sign in to comment.