Skip to content

Commit

Permalink
Fix embroider
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Aug 17, 2021
1 parent b22cb18 commit d9aba83
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 35 deletions.
14 changes: 2 additions & 12 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,14 @@
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
autoImport: {
exclude: ['qunit'],
},
});

app.import('node_modules/qunit/qunit/qunit.js', {
type: 'test',
});
let app = new EmberAddon(defaults);

app.import('node_modules/qunit/qunit/qunit.css', {
type: 'test',
});

app.import('vendor/shims/qunit.js', { type: 'test' });

try {
const { maybeEmbroider } = require('@embroider/test-setup'); // eslint-disable-line node/no-missing-require
const { maybeEmbroider } = require('@embroider/test-setup'); // eslint-disable-line node/no-extraneous-require
return maybeEmbroider(app);
} catch (e) {
// This exists, so that we can continue to support node 10 for some of our
Expand Down
10 changes: 5 additions & 5 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
{{content-for "test-body"}}

<div id="qunit"></div>
<div id="qunit-fixture"></div>

<div id="ember-testing-container">
<div id="ember-testing"></div>
<div id="qunit-fixture">
<div id="ember-testing-container">
<div id="ember-testing"></div>
</div>
</div>

<script src="/testem.js" integrity=""></script>
<script src="/testem.js" integrity="" data-embroider-ignore></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/dummy.js"></script>
Expand Down
6 changes: 6 additions & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ QUnit.testDone(function () {
let testElementReset = testElementContainer.outerHTML;
testElementContainer.innerHTML = testElementReset;
});

QUnit.start();
if (typeof Testem !== 'undefined') {
// eslint-disable-line no-undef
Testem.hookIntoTestFramework(); // eslint-disable-line no-undef
}
Empty file removed vendor/.gitkeep
Empty file.
18 changes: 0 additions & 18 deletions vendor/shims/qunit.js

This file was deleted.

0 comments on commit d9aba83

Please sign in to comment.