Skip to content

Commit f80bcd8

Browse files
authored
Merge pull request ember-fastboot#776 from kiwiupover/move-asset-rewriting-test
Move asset rewriting test to test-packages/basic-app
2 parents 1fd42ba + 1b2121f commit f80bcd8

File tree

2 files changed

+21
-31
lines changed

2 files changed

+21
-31
lines changed

packages/ember-cli-fastboot/test/asset-rewriting-test.js

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const chai = require('chai');
2+
const expect = chai.expect;
3+
const glob = require("glob");
4+
const execa = require("execa");
5+
6+
chai.use(require('chai-fs'));
7+
8+
describe('rewriting HTML', function () {
9+
this.timeout(100000);
10+
11+
it('builds an index.html that points to the browser build', async function () {
12+
13+
await execa("yarn", ["build", "--environment=production"]);
14+
15+
let appPath = glob.sync('dist/assets/basic-app-*.js')[0];
16+
let matches = appPath.match(/dist\/assets\/basic-app-(.*).js/);
17+
let appSHA = matches[1];
18+
19+
expect('dist/index.html').to.have.content.that.match(new RegExp(appSHA));
20+
});
21+
});

0 commit comments

Comments
 (0)