Skip to content

Commit dd96dd5

Browse files
committed
Remove noDeprecations tests
1 parent cade173 commit dd96dd5

File tree

2 files changed

+8
-40
lines changed

2 files changed

+8
-40
lines changed

tests/integration/components/component-dot-dollar-test.js

+8-12
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,17 @@ module('Integration | Component | component-dot-dollar', function(hooks) {
1919
this.setJQueryElement = ($) => this.$element = $;
2020
});
2121

22-
test('it implements Component.$()', function(assert) {
23-
return assert.noDeprecations(async () => {
24-
await render(hbs`{{jquery-component id="jq" setJQueryElement=setJQueryElement}}`);
22+
test('it implements Component.$()', async function(assert) {
23+
await render(hbs`{{jquery-component id="jq" setJQueryElement=setJQueryElement}}`);
2524

26-
assert.ok(this.$element, 'Component.$() is available');
27-
assert.ok(this.$element instanceof jQuery, 'Component.$() returns a jQuery object');
28-
assert.equal(this.$element.get(0), this.element.querySelector('#jq'), 'Component.$() is a jQuery wrapper around Component.element');
29-
});
25+
assert.ok(this.$element, 'Component.$() is available');
26+
assert.ok(this.$element instanceof jQuery, 'Component.$() returns a jQuery object');
27+
assert.equal(this.$element.get(0), this.element.querySelector('#jq'), 'Component.$() is a jQuery wrapper around Component.element');
3028
});
3129

32-
test('it implements Component.$(selector)', function(assert) {
33-
return assert.noDeprecations(async () => {
34-
await render(hbs`{{#jquery-component id="jq" selector="div" setJQueryElement=setJQueryElement}}<div id="child"/>{{/jquery-component}}`);
30+
test('it implements Component.$(selector)', async function(assert) {
31+
await render(hbs`{{#jquery-component id="jq" selector="div" setJQueryElement=setJQueryElement}}<div id="child"/>{{/jquery-component}}`);
3532

36-
assert.equal(this.$element.get(0), this.element.querySelector('#child'), 'Component.$(selector) is a jQuery object of the child elements matching selector');
37-
});
33+
assert.equal(this.$element.get(0), this.element.querySelector('#child'), 'Component.$(selector) is a jQuery object of the child elements matching selector');
3834
});
3935
});

tests/test-helper.js

-28
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,8 @@
1-
import QUnit from 'qunit';
2-
import { registerDeprecationHandler } from '@ember/debug';
31
import Application from '../app';
42
import config from '../config/environment';
53
import { setApplication } from '@ember/test-helpers';
64
import { start } from 'ember-qunit';
75

8-
let deprecations;
9-
10-
registerDeprecationHandler((message, options, next) => {
11-
// in case a deprecation is issued before a test is started
12-
if (!deprecations) {
13-
deprecations = [];
14-
}
15-
16-
deprecations.push(message);
17-
next(message, options);
18-
});
19-
20-
QUnit.testStart(function() {
21-
deprecations = [];
22-
});
23-
24-
QUnit.assert.noDeprecations = async function(callback) {
25-
let originalDeprecations = deprecations;
26-
deprecations = [];
27-
28-
await callback();
29-
this.deepEqual(deprecations, [], 'Expected no deprecations during test.');
30-
31-
deprecations = originalDeprecations;
32-
};
33-
346
setApplication(Application.create(config.APP));
357

368
start();

0 commit comments

Comments
 (0)