Skip to content

Commit 8364be9

Browse files
committed
moving asset-rewriting-test to basic app
1 parent 1fd42ba commit 8364be9

2 files changed

Lines changed: 21 additions & 31 deletions

File tree

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.only('rewriting HTML', function () {
9+
this.timeout(50000);
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)