Skip to content

Commit

Permalink
fix fastboot-testing-app
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav0 committed May 13, 2023
1 parent 0245602 commit 74a747e
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import fetch from 'whatwg-fetch';

window.fetch = fetch;

function initialize(instance) {
let { request } = instance.lookup('service:fastboot');
fetch.__fastbootRequest = request;
Expand Down
4 changes: 3 additions & 1 deletion packages/ember-cli-fastboot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"glob": "^7.1.3",
"loader.js": "^4.7.0",
"mocha": "^9.1.2",
"node-fetch": "^2.6.7",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
Expand All @@ -99,7 +100,8 @@
"release-it-lerna-changelog": "^3.1.0",
"request": "^2.88.0",
"rsvp": "^4.8.3",
"webpack": "^5.58.1"
"webpack": "^5.58.1",
"whatwg-fetch": "^3.0.0"
},
"engines": {
"node": "14.* || 16.* || >=18"
Expand Down
3 changes: 2 additions & 1 deletion test-packages/basic-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"loader.js": "^4.7.0",
"mocha": "^9.1.2",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0"
"qunit-dom": "^1.2.0",
"whatwg-fetch": "^3.0.0"
},
"fastbootDependencies": [
"rsvp"
Expand Down
3 changes: 2 additions & 1 deletion test-packages/custom-fastboot-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"loader.js": "^4.7.0",
"mocha": "^9.1.2",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0"
"qunit-dom": "^1.2.0",
"whatwg-fetch": "^3.0.0"
},
"engines": {
"node": "10.* || >= 12"
Expand Down
3 changes: 2 additions & 1 deletion test-packages/custom-sandbox-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"eslint-plugin-node": "^11.1.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0"
"qunit-dom": "^1.2.0",
"whatwg-fetch": "^3.0.0"
},
"engines": {
"node": "10.* || >= 12"
Expand Down
3 changes: 2 additions & 1 deletion test-packages/ember-cli-fastboot-testing-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"eslint-plugin-node": "^11.1.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0"
"qunit-dom": "^1.2.0",
"whatwg-fetch": "^3.0.0"
},
"ember": {
"edition": "octane"
Expand Down
2 changes: 2 additions & 0 deletions test-packages/ember-cli-fastboot-testing-app/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
{{content-for "body"}}
{{content-for "test-body"}}

<div id="ember-testing"></div>

<script src="/testem.js" integrity=""></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import * as QUnit from 'qunit';
import { setup } from 'qunit-dom';
import { start } from 'ember-qunit';

setup(QUnit.assert);

setApplication(Application.create(config.APP));

start();
3 changes: 2 additions & 1 deletion test-packages/hot-swap-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"eslint-plugin-node": "^11.1.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0"
"qunit-dom": "^1.2.0",
"whatwg-fetch": "^3.0.0"
},
"engines": {
"node": "10.* || >= 12"
Expand Down

0 comments on commit 74a747e

Please sign in to comment.