Skip to content

Commit

Permalink
deleted used try catch instead of assert.throw
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieupoteriepeopledoc committed Aug 31, 2018
1 parent 66290fc commit fd08e65
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/bind-data-test-attributes-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ 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(() => {
try {
this.render(
hbs`{{data-test-component tagName='' data-test-attribute=true}}`
);
});
assert.ok(false, 'this should not be called');
} catch (e) {
assert.ok(true, 'this is called');
}
});
} 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 fd08e65

Please sign in to comment.