Skip to content

Commit

Permalink
Improve tests for index.ts
Browse files Browse the repository at this point in the history
After integrating `@vitest/eslint-plugin` eslint complained about one

    Test has no assertions

For `tests/index.test.ts`. This test just implicitly checked wether
running extending expect will raise an exception.

We now explicitly check if an asserting includes our matchers.
  • Loading branch information
stschulte committed Sep 16, 2024
1 parent 212340c commit 449ee84
Show file tree
Hide file tree
Showing 5 changed files with 1,017 additions and 1,051 deletions.
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import vitest from '@vitest/eslint-plugin';
import gitignore from 'eslint-config-flat-gitignore';
import perfectionist from 'eslint-plugin-perfectionist';
import tseslint from 'typescript-eslint';
Expand Down Expand Up @@ -30,4 +31,11 @@ export default tseslint.config(
quotes: 'single',
semi: true,
}),
{
files: ['tests/**/*.ts'],
plugins: { vitest },
rules: {
...vitest.configs.recommended.rules,
},
},
);
Loading

0 comments on commit 449ee84

Please sign in to comment.