Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
/* eslint-env node */
'use strict';

var Append = require('./lib/broccoli-append');
var path = require('path');

module.exports = {
name: 'ember-qunit-assert-helpers',

postprocessTree(type, tree) {
this._requireBuildPackages();
if (type === 'all' && this.app.tests) {
var appendPath = path.join(__dirname, '/vendor/ember-qunit-assert-helpers-loader.js');
return new Append(tree, /test-support[A-Za-z0-9-]*/, appendPath);
} else {
return tree;
}
included() {
this._super.included.apply(this, arguments);
this.import('vendor/ember-qunit-assert-helpers-loader.js', { type: 'test' });
}
};
49 changes: 0 additions & 49 deletions lib/broccoli-append.js

This file was deleted.

6 changes: 5 additions & 1 deletion vendor/ember-qunit-assert-helpers-loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* globals require */

// Loading the file here will install the asserts onto `QUnit.Assert` class.
require('ember-qunit-assert-helpers/test-support/install-qunit-asserts');
// 'ember-qunit-assert-helpers/test-support/install-qunit-asserts' is not available at the current cycle
// delay the require onto the next tick until all lazy loaded require statements are resolved
Promise.resolve().then(() => {
require('ember-qunit-assert-helpers/test-support/install-qunit-asserts');
});