Skip to content

Commit

Permalink
test: run tests in sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Nov 15, 2024
1 parent 3117329 commit 4584f76
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
],
"scripts": {
"clean": "rimraf .tap node_modules types",
"test": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage",
"test:integration": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage test/integration/**/*.test.mjs",
"test:unit": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage test/*.test.mjs",
"test:tasks": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage test/tasks/*.test.mjs",
"test": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage --jobs=0",
"test:integration": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage --jobs=0 test/integration/**/*.test.mjs",
"test:unit": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage --jobs=0 test/*.test.mjs",
"test:tasks": "cross-env HTTP_PORT=0 LOG_LEVEL=fatal tap --timeout 60 --disable-coverage --jobs=0 test/tasks/*.test.mjs",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"format:check": "prettier -c .",
Expand Down
4 changes: 2 additions & 2 deletions test/alias.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify();
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/alias-legacy.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function exec(cmd) {
}

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify();
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
6 changes: 3 additions & 3 deletions test/integration/alias.test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fastify from "fastify";
import { promises as fs } from "node:fs";
import os, { type } from "node:os";
import os from "node:os";
import { exec as execCallback } from "child_process";
import { join, basename } from "node:path";
import { test, beforeEach, afterEach } from "tap";
Expand All @@ -22,10 +22,10 @@ function exec(cmd) {
}

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify();
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/integrity.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/login.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/map.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/meta.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/package.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ function exec(cmd) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/version.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ function exec(cmd, opts = {}) {

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/integrity.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify();
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/login.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const __dirname = dirname(__filename);

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/meta.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

beforeEach(async (t) => {
const server = fastify({ logger: false });
const server = fastify();
const memSink = new Sink();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/publish-files-definitions.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const config = (files, server, token, cwd) => ({

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/publish.map.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const __dirname = dirname(__filename);

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/publish.package.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const __dirname = dirname(__filename);

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/version.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const __dirname = dirname(__filename);

beforeEach(async (t) => {
const memSink = new Sink();
const server = fastify({ logger: false });
const server = fastify();
const service = new EikService({ customSink: memSink });
server.register(service.api());
await server.register(service.api());
const address = await server.listen({
host: "127.0.0.1",
port: 0,
Expand Down

0 comments on commit 4584f76

Please sign in to comment.