Skip to content

Commit

Permalink
Test with bun
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Jul 11, 2024
1 parent 848c5d2 commit 8fd9fe2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test-readings.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node.js CI
name: Test

on: [push, pull_request]

Expand All @@ -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
Binary file modified bun.lockb
Binary file not shown.
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/parse/readingParse.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import test from 'ava';
import { test, expect } from 'bun:test';

import { parseLine } from './parseLine.js';

Expand Down Expand Up @@ -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);
});
}
}

0 comments on commit 8fd9fe2

Please sign in to comment.