Skip to content

Commit

Permalink
Merge pull request #744 from emberjs/remove-qunit-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue authored Aug 18, 2020
2 parents b2356ce + 13b74e0 commit 779d7c0
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions addon-test-support/qunit/index.js

This file was deleted.

File renamed without changes.
9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
// TODO: remove these `this.import` statements when the app is using using Embroider or ember-auto-import
this.import('vendor/qunit/qunit.js', { type: 'test' });
this.import('vendor/qunit/qunit.css', { type: 'test' });
this.import('vendor/ember-qunit/qunit-module.js', { type: 'test' });
this.import('vendor/ember-qunit/qunit-configuration.js', { type: 'test' });

let addonOptions = this.targetOptions();
Expand Down Expand Up @@ -84,9 +85,11 @@ module.exports = {
// so that can have our `import`'s be
// import { ... } from 'ember-qunit';

return this.preprocessJs(tree, '/', this.name, {
registry: this.registry,
});
const Funnel = require('broccoli-funnel');

let babel = this.addons.find((a) => a.name === 'ember-cli-babel');

return babel.transpileTree(new Funnel(tree, { destDir: 'ember-qunit' }));
},

setTestGenerator: function () {
Expand Down
2 changes: 2 additions & 0 deletions vendor/ember-qunit/qunit-configuration.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* globals QUnit */

(function () {
'use strict';

QUnit.config.autostart = false;
QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container' });
QUnit.config.urlConfig.push({ id: 'nolint', label: 'Disable Linting' });
Expand Down
14 changes: 14 additions & 0 deletions vendor/ember-qunit/qunit-module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* globals QUnit, define */

(function () {
'use strict';

define('qunit', ['exports'], function (exports) {
exports.default = QUnit;
exports.module = QUnit.module;
exports.test = QUnit.test;
exports.skip = QUnit.skip;
exports.only = QUnit.only;
exports.todo = QUnit.todo;
});
})();

0 comments on commit 779d7c0

Please sign in to comment.