mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
test(@astrojs/node) wait for server listening in trailing-slash tests (#10694)
* test(@astrojs/node) wait for server listening in trailing-slash tests * fix missing waitServerListen * fix import statement --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
This commit is contained in:
parent
1d26e9c7f7
commit
5c4b7bfc08
2 changed files with 8 additions and 1 deletions
|
@ -329,6 +329,7 @@ describe('Hybrid rendering', () => {
|
|||
const { startServer } = await load();
|
||||
let res = startServer();
|
||||
server = res.server;
|
||||
await waitServerListen(server.server);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as assert from 'node:assert/strict';
|
|||
import { after, before, describe, it } from 'node:test';
|
||||
import * as cheerio from 'cheerio';
|
||||
import nodejs from '../dist/index.js';
|
||||
import { loadFixture } from './test-utils.js';
|
||||
import { loadFixture, waitServerListen } from './test-utils.js';
|
||||
|
||||
/**
|
||||
* @typedef {import('../../../astro/test/test-utils').Fixture} Fixture
|
||||
|
@ -36,6 +36,7 @@ describe('Trailing slash', () => {
|
|||
const { startServer } = await load();
|
||||
let res = startServer();
|
||||
server = res.server;
|
||||
await waitServerListen(server.server);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -101,6 +102,7 @@ describe('Trailing slash', () => {
|
|||
const { startServer } = await load();
|
||||
let res = startServer();
|
||||
server = res.server;
|
||||
await waitServerListen(server.server);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -169,6 +171,7 @@ describe('Trailing slash', () => {
|
|||
const { startServer } = await load();
|
||||
let res = startServer();
|
||||
server = res.server;
|
||||
await waitServerListen(server.server);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -227,6 +230,7 @@ describe('Trailing slash', () => {
|
|||
const { startServer } = await load();
|
||||
let res = startServer();
|
||||
server = res.server;
|
||||
await waitServerListen(server.server);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -288,6 +292,7 @@ describe('Trailing slash', () => {
|
|||
const { startServer } = await load();
|
||||
let res = startServer();
|
||||
server = res.server;
|
||||
await waitServerListen(server.server);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -364,6 +369,7 @@ describe('Trailing slash', () => {
|
|||
const { startServer } = await load();
|
||||
let res = startServer();
|
||||
server = res.server;
|
||||
await waitServerListen(server.server);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
|
Loading…
Reference in a new issue