diff --git a/packages/astro/test/react-component.test.js b/packages/astro/test/react-component.test.js index 4e237508cd..cca502ade7 100644 --- a/packages/astro/test/react-component.test.js +++ b/packages/astro/test/react-component.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import cheerio from 'cheerio'; -import { loadFixture } from './test-utils.js'; +import { describeIfNotWindows, loadFixture } from './test-utils.js'; let fixture; @@ -75,7 +75,7 @@ describe('React Components', () => { }); }); - describe('dev', () => { + describeIfNotWindows('dev', () => { let devServer; before(async () => { diff --git a/packages/astro/test/solid-component.test.js b/packages/astro/test/solid-component.test.js index fa7172d31e..34df0f1139 100644 --- a/packages/astro/test/solid-component.test.js +++ b/packages/astro/test/solid-component.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import cheerio from 'cheerio'; -import { loadFixture } from './test-utils.js'; +import { describeIfNotWindows, loadFixture } from './test-utils.js'; describe('Solid component', () => { let fixture; @@ -29,7 +29,7 @@ describe('Solid component', () => { }); }); - describe('dev', () => { + describeIfNotWindows('dev', () => { let devServer; before(async () => { diff --git a/packages/astro/test/svelte-component.test.js b/packages/astro/test/svelte-component.test.js index ef350af4d4..1689d62bc3 100644 --- a/packages/astro/test/svelte-component.test.js +++ b/packages/astro/test/svelte-component.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import cheerio from 'cheerio'; -import { loadFixture } from './test-utils.js'; +import { describeIfNotWindows, loadFixture } from './test-utils.js'; describe('Svelte component', () => { let fixture; @@ -28,7 +28,7 @@ describe('Svelte component', () => { }); }); - describe('dev', () => { + describeIfNotWindows('dev', () => { let devServer; before(async () => { diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index 49775c3b4a..4d32340f7e 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -6,6 +6,7 @@ import { loadConfig } from '../dist/core/config.js'; import dev from '../dist/core/dev/index.js'; import build from '../dist/core/build/index.js'; import preview from '../dist/core/preview/index.js'; +import os from 'os'; /** * @typedef {import('node-fetch').Response} Response * @typedef {import('../src/core/dev/index').DevServer} DevServer @@ -109,3 +110,7 @@ export function cli(/** @type {string[]} */ ...args) { return spawned; } + +export const isWindows = os.platform() === 'win32'; + +export const describeIfNotWindows = isWindows ? describe.skip : describe; diff --git a/packages/astro/test/vue-component.test.js b/packages/astro/test/vue-component.test.js index a02a85a3ff..d1b91865ae 100644 --- a/packages/astro/test/vue-component.test.js +++ b/packages/astro/test/vue-component.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import cheerio from 'cheerio'; -import { loadFixture } from './test-utils.js'; +import { describeIfNotWindows, loadFixture } from './test-utils.js'; describe('Vue component', () => { let fixture; @@ -43,7 +43,7 @@ describe('Vue component', () => { }); }); - describe('dev', () => { + describeIfNotWindows('dev', () => { let devServer; before(async () => {