From fa34759a10e917207b454fd4b413f9e3ce418945 Mon Sep 17 00:00:00 2001 From: yosuke-furukawa Date: Fri, 15 Mar 2024 11:28:53 +0900 Subject: [PATCH] fix test for e2e --- packages/typed/package.json | 4 ++-- packages/typed/src/commands/__tests__/gen-swagger.test.ts | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/typed/package.json b/packages/typed/package.json index d3ce99a6..300ba4aa 100644 --- a/packages/typed/package.json +++ b/packages/typed/package.json @@ -1,6 +1,6 @@ { "name": "@agreed/typed", - "version": "6.0.1", + "version": "6.0.2", "main": "./lib/types.js", "types": "./lib/types.d.ts", "license": "MIT", @@ -10,7 +10,7 @@ }, "author": "Akito Ito ", "scripts": { - "test": "node --import tsx --test src/__tests__/server.ts", + "test": "node --import tsx --test src/__tests__/**.ts src/**/__tests__/**.ts", "lint": "tslint ./src/**/*.ts", "lintfix": "tslint ./src/**/*.ts --fix", "tsc": "tsc", diff --git a/packages/typed/src/commands/__tests__/gen-swagger.test.ts b/packages/typed/src/commands/__tests__/gen-swagger.test.ts index 8e23f615..0eb599e6 100644 --- a/packages/typed/src/commands/__tests__/gen-swagger.test.ts +++ b/packages/typed/src/commands/__tests__/gen-swagger.test.ts @@ -1,8 +1,10 @@ import * as path from "path"; import "../../hook"; import { run } from "../gen-swagger"; +import test from "node:test"; +import assert from "node:assert"; -test.skip("e2e testing", () => { +test("e2e testing", () => { const agreedPath = path.resolve(__dirname, "../../__tests__/data/agreed.ts"); const swagger = run({ path: agreedPath, @@ -13,6 +15,5 @@ test.skip("e2e testing", () => { host: "", disablePathNumber: false }); - - expect(swagger).toMatchSnapshot(); + assert.strictEqual(swagger.info.title, "testing"); });