Skip to content

Commit

Permalink
chore: disable local-mode-tests on windows (#841)
Browse files Browse the repository at this point in the history
Something about the local mode tests makes it occasionally break in windows on CI. Specifically, the inspector fails to connect to the miniflare process, and ends up spamming "waiting for connection" in the logs. I'm disabling these tests since they're for sanity only right now, and we have a fuller suite of tests for windows in the main package anyway.

Fixes #776
  • Loading branch information
threepointone authored Apr 25, 2022
1 parent 32f6108 commit f80f21a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/local-mode-tests/tests/module.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const isWindows = process.platform === "win32";
let wranglerProcess: ChildProcess;

beforeAll(async () => {
// These tests break in CI for windows, so we're disabling them for now
if (isWindows) return;

wranglerProcess = spawn(
"npx",
[
Expand All @@ -41,6 +44,9 @@ beforeAll(async () => {
});

afterAll(async () => {
// These tests break in CI for windows, so we're disabling them for now
if (isWindows) return;

await new Promise((resolve, reject) => {
wranglerProcess.once("exit", (code) => {
if (!code) {
Expand All @@ -54,6 +60,9 @@ afterAll(async () => {
});

it("renders", async () => {
// These tests break in CI for windows, so we're disabling them for now
if (isWindows) return;

const response = await waitUntilReady("http://localhost:9001/");
const text = await response.text();
expect(text).toMatchInlineSnapshot(`
Expand Down
9 changes: 9 additions & 0 deletions examples/local-mode-tests/tests/sw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const isWindows = process.platform === "win32";
let wranglerProcess: ChildProcess;

beforeAll(async () => {
// These tests break in CI for windows, so we're disabling them for now
if (isWindows) return;

wranglerProcess = spawn(
"npx",
[
Expand All @@ -41,6 +44,9 @@ beforeAll(async () => {
});

afterAll(async () => {
// These tests break in CI for windows, so we're disabling them for now
if (isWindows) return;

await new Promise((resolve, reject) => {
wranglerProcess.once("exit", (code) => {
if (!code) {
Expand All @@ -54,6 +60,9 @@ afterAll(async () => {
});

it("renders", async () => {
// These tests break in CI for windows, so we're disabling them for now
if (isWindows) return;

const response = await waitUntilReady("http://localhost:9002/");
const text = await response.text();
expect(text).toMatchInlineSnapshot(`
Expand Down

0 comments on commit f80f21a

Please sign in to comment.