Skip to content

Commit d830f92

Browse files
Merge pull request #1204 from bobisjan/adapter-class
Use native class syntax for `QUnitAdapter`
2 parents 9bb3ffa + 96a79b5 commit d830f92

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

addon/src/adapter.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import * as QUnit from 'qunit';
33

44
export function nonTestDoneCallback() {}
55

6-
let Adapter = TestAdapter.extend({
7-
init() {
8-
this.doneCallbacks = [];
9-
this.qunit = this.qunit || QUnit;
10-
},
6+
export default class QUnitAdapter extends TestAdapter {
7+
doneCallbacks = [];
8+
qunit = this.qunit || QUnit;
119

1210
asyncStart() {
1311
let currentTest = this.qunit.config.current;
@@ -16,7 +14,7 @@ let Adapter = TestAdapter.extend({
1614
? currentTest.assert.async()
1715
: nonTestDoneCallback;
1816
this.doneCallbacks.push({ test: currentTest, done });
19-
},
17+
}
2018

2119
asyncEnd() {
2220
let currentTest = this.qunit.config.current;
@@ -34,7 +32,5 @@ let Adapter = TestAdapter.extend({
3432
if (test === currentTest) {
3533
done();
3634
}
37-
},
38-
});
39-
40-
export default Adapter;
35+
}
36+
}

0 commit comments

Comments
 (0)