test: update error test for vite@2.9.x (#2877)
* test: update error test for vite@2.9.x * chore: add link to old tests
This commit is contained in:
parent
bababd8461
commit
a49f0490c0
1 changed files with 17 additions and 10 deletions
|
@ -1,4 +1,5 @@
|
||||||
import { isWindows, loadFixture } from './test-utils.js';
|
import { isWindows, loadFixture } from './test-utils.js';
|
||||||
|
import { expect } from 'chai';
|
||||||
|
|
||||||
describe('Error display', () => {
|
describe('Error display', () => {
|
||||||
if (isWindows) return;
|
if (isWindows) return;
|
||||||
|
@ -12,15 +13,21 @@ describe('Error display', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Astro', () => {
|
describe('Astro', async () => {
|
||||||
it('properly detect syntax errors in template', async () => {
|
// This test is skipped because it will hang on vite@2.8.x
|
||||||
try {
|
// TODO: unskip test once vite@2.9.x lands
|
||||||
devServer = await fixture.startDevServer();
|
// See pre-integration system test: https://github.com/withastro/astro/blob/0f376a7c52d3a22ff32b33e0afc34dd306ed70c4/packages/astro/test/errors.test.js
|
||||||
} catch (err) {
|
it.skip('properly detect syntax errors in template', async () => {
|
||||||
return;
|
try {
|
||||||
}
|
devServer = await fixture.startDevServer();
|
||||||
await devServer.stop();
|
} catch (err) {
|
||||||
throw new Error('Expected to throw on startup');
|
return;
|
||||||
});
|
}
|
||||||
|
|
||||||
|
// This is new behavior in vite@2.9.x, previously the server would throw on startup
|
||||||
|
const res = await fixture.fetch('/astro-syntax-error');
|
||||||
|
await devServer.stop();
|
||||||
|
expect(res.status).to.equal(500, `Successfully responded with 500 Error for invalid file`);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue