mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 11:35:28 +00:00
Harden tests (...a bit)
This commit is contained in:
@@ -6,14 +6,12 @@ describe('export-webpack', function() {
|
||||
this.timeout(10000);
|
||||
|
||||
// hooks
|
||||
before(async () => {
|
||||
await api.build({ cwd: __dirname, bundler: 'webpack' });
|
||||
await api.export({ cwd: __dirname, bundler: 'webpack' });
|
||||
});
|
||||
before('build app', () => api.build({ cwd: __dirname, bundler: 'webpack' }));
|
||||
before('export app', () => api.export({ cwd: __dirname }));
|
||||
|
||||
// tests
|
||||
it('injects <link rel=preload> tags', () => {
|
||||
const index = fs.readFileSync(`${__dirname}/__sapper__/export/index.html`, 'utf8');
|
||||
assert.ok(/rel=preload/.test(index));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user