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 28f81d4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 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
6 changes: 5 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,8 +49,12 @@
"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"
},
"fastbootDependencies": [
"whatwg-fetch"
],
"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();

0 comments on commit 28f81d4

Please sign in to comment.