Skip to content

Commit

Permalink
Replace mocha with vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
simnalamburt committed Oct 8, 2024
1 parent b95e6cc commit 1cd13ff
Show file tree
Hide file tree
Showing 3 changed files with 848 additions and 418 deletions.
11 changes: 5 additions & 6 deletions test/index.js → index.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Parser = require('..')
const assert = require('assert')
import { assert, test } from 'vitest'
import Parser from './index.ts'

describe('Parser', () => {
it('should emit "message" events', (done) => {
test('should emit "message" events', () =>
new Promise((done) => {
const parser = new Parser()
let n = 0

Expand Down Expand Up @@ -44,5 +44,4 @@ describe('Parser', () => {
parser.write(
':[email protected] JOIN #express\r\n',
)
})
})
}))
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"@types/debug": "^4.1.5",
"@types/node": "^20",
"microbundle": "^0.15",
"mocha": "^10",
"prettier": "^3.0.0",
"typescript": "^5"
"typescript": "^5",
"vitest": "^2.1.2"
},
"scripts": {
"build": "microbundle -f cjs,modern --target node --compress",
"test": "tsc && mocha && prettier --check .",
"test": "tsc && vitest && prettier --check .",
"fmt": "prettier --write ."
},
"main": "dist/slate-irc-parser.js",
Expand Down
Loading

0 comments on commit 1cd13ff

Please sign in to comment.