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 30, 2018
1 parent 5d3177b commit d1c9af0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
"ember-cli-inject-live-reload": "^1.6.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "^1.1.0",
"ember-debug-handlers-polyfill": "^1.1.1",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-load-initializers": "^1.0.0",
"ember-qunit-assert-helpers": "^0.2.1",
"ember-resolver": "^4.3.0",
"ember-source": "~3.2.0",
"ember-source-channel-url": "^1.0.1",
Expand Down
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 d1c9af0

Please sign in to comment.