Skip to content

Commit

Permalink
fix(bench): avoid bench being recognized by expect-expect rule (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
veritem committed Mar 11, 2024
1 parent d64031a commit 8da6473
Show file tree
Hide file tree
Showing 9 changed files with 337 additions and 184 deletions.
9 changes: 0 additions & 9 deletions fixtures/.eslintrc

This file was deleted.

22 changes: 22 additions & 0 deletions fixtures/.eslintrc.json
@@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vitest/recommended",
"plugin:json/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"vitest"
],
"rules": {}
}
13 changes: 6 additions & 7 deletions fixtures/index.test.ts
@@ -1,9 +1,8 @@
import { describe, it, expect } from 'vitest'
import { bench } from 'vitest'

describe('foo', () => {
it.todo('mdmdms')

it('foo', () => {
expect(true).toBeTruthy()
bench('normal sorting', () => {
const x = [1, 5, 4, 2, 3]
x.sort((a, b) => {
return a - b
})
})
}, { time: 1000 })
7 changes: 4 additions & 3 deletions fixtures/package.json
Expand Up @@ -8,13 +8,14 @@
"lint": "eslint . --fix"
},
"keywords": [],
"author": "Makuza Mugabo Verite <mugaboverite@gmail.com> (https://veritem.me/)",
"author": "Makuza Mugabo Verite <mugaboverite@gmail.com> (https://veritemugabo.com/)",
"license": "MIT",
"dependencies": {
"eslint-plugin-vitest": "link:../",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-vitest": "^0.3.24",
"vitest": "^1.1.0"
},
"devDependencies": {
"eslint": "^8.56.0"
}
}
}

0 comments on commit 8da6473

Please sign in to comment.