Skip to content

Commit

Permalink
Re-enable error recovery test (#3396)
Browse files Browse the repository at this point in the history
* Re-enable error recovery test

* Doing some debugging

* Remove extra debugging

* longer wait

* make it wait even longer just to check

* Wait a very long time

* await the change, and then a little bit

* Give a longer timeout for the error recovery test

* OK, make it *very* long

* Run error tests separately

* Get rid of wait
  • Loading branch information
matthewp authored May 18, 2022
1 parent ef32b7c commit 6cec1b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"dev": "astro-scripts dev \"src/**/*.ts\"",
"postbuild": "astro-scripts copy \"src/**/*.astro\"",
"benchmark": "node test/benchmark/dev.bench.js && node test/benchmark/build.bench.js",
"test": "mocha --exit --timeout 20000 --ignore **/lit-element.test.js && mocha --timeout 20000 **/lit-element.test.js",
"test": "mocha --exit --timeout 20000 --ignore **/lit-element.test.js --ignore **/errors.test.js && mocha --timeout 20000 **/lit-element.test.js && mocha --timeout 20000 **/errors.test.js",
"test:match": "mocha --timeout 20000 -g",
"test:e2e": "playwright test e2e"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/astro/test/errors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as cheerio from 'cheerio';
describe('Error display', () => {
if (isWindows) return;

/** @type {import('./test-utils').Fixture} */
let fixture;
let devServer;

Expand Down Expand Up @@ -32,7 +33,7 @@ describe('Error display', () => {
});
});

describe('Framework components', () => {
describe('Framework components', function() {
let devServer;

before(async () => {
Expand All @@ -43,8 +44,7 @@ describe('Error display', () => {
await devServer.stop();
});

// Skip until https://github.com/withastro/astro/pull/3376 is revisited
it.skip('Errors recover when fixed', async () => {
it('Errors recover when fixed', async () => {
let html = await fixture.fetch('/svelte-syntax-error').then((res) => res.text());

// 1. Verify an error message is being shown.
Expand Down
1 change: 1 addition & 0 deletions packages/astro/test/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ polyfill(globalThis, {
* @property {() => Promise<PreviewServer>} preview
* @property {() => Promise<void>} clean
* @property {() => Promise<App>} loadTestAdapterApp
* @property {() => Promise<void>} onNextChange
*/

/**
Expand Down

0 comments on commit 6cec1b8

Please sign in to comment.