Skip to content

Commit 8c50fc7

Browse files
committed
chore(deps): upgrade dependencies
Note: For ember-qunit 5.x we had to add qunit and @ember/test-helpers as devDependencies See https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md#upgrading-from-v4x-to-v500 fix(deps): move @ember/test-waiters to dependencies (ref #184) test: add DOM fixtures & move waiter to module scope The truth comes out: I (Jacob) did not actually read all of the ember-qunit 5.x migration guide that I mentioned in a previous commit. Oops :) This commit adds the DOM fixtures as explained here: https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md#dom-fixtures It also addresses the warning triggered by accidentally recreating test waiters since `buildWaiter` was being called from within the class instead of at the module level as recommended by: https://github.com/emberjs/ember-test-waiters#use-buildwaiter-in-module-scope
1 parent d78c0a7 commit 8c50fc7

File tree

4 files changed

+726
-796
lines changed

4 files changed

+726
-796
lines changed

addon/components/plot-ly.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import EmberObject, { computed } from '@ember/object';
33
import { observes } from '@ember-decorators/object';
44
import { debounce, scheduleOnce } from '@ember/runloop';
55
import { buildWaiter } from '@ember/test-waiters';
6+
const waiter = buildWaiter('ember-cli-plotly:component-loaded');
67

78
import layout from '../templates/components/plot-ly';
89

@@ -85,10 +86,8 @@ export default class PlotlyComponent extends Component {
8586
super(...args);
8687

8788
/* global Ember */
88-
let waiter;
8989
let token;
9090
if (Ember.testing) {
91-
waiter = buildWaiter('plotly-loaded-waiter');
9291
token = waiter.beginAsync();
9392
}
9493

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,21 @@
3333
"test:ember-compatibility": "ember try:each"
3434
},
3535
"dependencies": {
36+
"@ember/test-waiters": "^2.3.2",
3637
"debug": "4.3.1",
37-
"ember-auto-import": "^1.8.0",
38+
"ember-auto-import": "^1.10.0",
3839
"ember-cli-babel": "7.23.0",
3940
"ember-cli-htmlbars": "5.3.1",
4041
"ember-decorators": "6.1.1",
4142
"ember-lodash": "4.19.5",
42-
"plotly.js": "1.57.1"
43+
"plotly.js": "1.58.3"
4344
},
4445
"devDependencies": {
4546
"@babel/core": "^7",
4647
"@ember/optional-features": "2.0.0",
47-
"@ember/test-waiters": "^2.3.0",
48-
"@glimmer/component": "^1.0.2",
49-
"@glimmer/tracking": "^1.0.2",
48+
"@ember/test-helpers": "^2.1.3",
49+
"@glimmer/component": "^1.0.3",
50+
"@glimmer/tracking": "^1.0.3",
5051
"babel-eslint": "10.1.0",
5152
"broccoli-asset-rev": "3.0.0",
5253
"ember-cli": "3.23.0",
@@ -63,18 +64,19 @@
6364
"ember-load-initializers": "2.1.2",
6465
"ember-maybe-import-regenerator": "0.1.6",
6566
"ember-md5": "1.2.0",
66-
"ember-qunit": "4.6.0",
67+
"ember-qunit": "5.1.1",
6768
"ember-resolver": "8.0.2",
6869
"ember-source": "3.23.1",
6970
"ember-source-channel-url": "3.0.0",
70-
"ember-template-lint": "^2.14.0",
71+
"ember-template-lint": "^2.15.0",
7172
"ember-truth-helpers": "3.0.0",
7273
"ember-try": "1.4.0",
7374
"eslint": "^7.15.0",
7475
"eslint-plugin-ember": "10.0.2",
7576
"eslint-plugin-node": "11.1.0",
7677
"loader.js": "4.7.0",
7778
"npm-run-all": "^4.1.5",
79+
"qunit": "2.13.0",
7880
"qunit-dom": "1.6.0",
7981
"safe-json-stringify": "1.2.0",
8082
"testdouble": "3.16.1"

tests/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
<body>
2121
{{content-for "body"}}
2222
{{content-for "test-body"}}
23+
<div id="qunit"></div>
24+
<div id="qunit-fixture">
25+
<div id="ember-testing-container">
26+
<div id="ember-testing"></div>
27+
</div>
28+
</div>
2329

2430
<script src="/testem.js" integrity=""></script>
2531
<script src="{{rootURL}}assets/vendor.js"></script>

0 commit comments

Comments
 (0)