diff --git a/.github/workflows/test-readings.yaml b/.github/workflows/test-readings.yaml index 08e641c..ffca8ed 100644 --- a/.github/workflows/test-readings.yaml +++ b/.github/workflows/test-readings.yaml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Test on: [push, pull_request] @@ -8,8 +8,8 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: oven-sh/setup-bun@v2 with: - node-version: 18 - - run: npm ci - - run: npm test + bun-version-file: package.json + - run: bun install --frozen-lockfile + - run: bun test diff --git a/bun.lockb b/bun.lockb index 0cbe8e2..4976cef 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 808437f..80b484a 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,15 @@ { "version": "1.4.0", "scripts": { - "test": "ava", "start": "bun run src/index.ts" }, "dependencies": { "pinyin-pro": "^3.18.5", - "tsimp": "^2.0.11", "yomichan-dict-builder": "^1.3.2" }, "type": "module", "devDependencies": { - "@ava/typescript": "^5.0.0", - "@types/bun": "latest", - "ava": "^6.0.1" + "@types/bun": "1.1.6" }, "name": "wikipedia-yomitan", "peerDependencies": { diff --git a/src/parse/readingParse.test.ts b/src/parse/readingParse.test.ts index f18c96f..c0fa4b7 100644 --- a/src/parse/readingParse.test.ts +++ b/src/parse/readingParse.test.ts @@ -1,4 +1,4 @@ -import test from 'ava'; +import { test, expect } from 'bun:test'; import { parseLine } from './parseLine.js'; @@ -113,9 +113,9 @@ const testCases: { for (const langTestCases of testCases) { for (const testCase of langTestCases.cases) { - test(`parseLine ${langTestCases.lang}: ${testCase.term}`, (t) => { + test(`parseLine ${langTestCases.lang}: ${testCase.term}`, () => { const { reading } = parseLine(testCase.line, langTestCases.lang); - t.is(reading, testCase.expectedReading); + expect(reading).toBe(testCase.expectedReading); }); } }