eslint-plugin-executable-stories-vitest 2.1.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/binding.gyp +9 -0
- package/index.js +1 -0
- package/package.json +4 -8
- package/bin/intent.js +0 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eslint-plugin-executable-stories-vitest
|
|
2
2
|
|
|
3
|
-
ESLint rules for [executable-stories-vitest](https://github.com/jagreehal/executable-stories). Use with Vitest to catch common mistakes
|
|
3
|
+
ESLint rules for [executable-stories-vitest](https://github.com/jagreehal/executable-stories). Use with Vitest to catch common mistakes when writing story tests. Current Vitest usage is `story.init(task)` plus `story.given` / `story.when` / `story.then`.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -37,11 +37,11 @@ export default [...vitestExecutableStories.configs.recommended];
|
|
|
37
37
|
|
|
38
38
|
## Rules
|
|
39
39
|
|
|
40
|
-
| Rule
|
|
41
|
-
|
|
|
42
|
-
| `require-
|
|
43
|
-
| `require-test-context-for-
|
|
44
|
-
| `require-
|
|
40
|
+
| Rule | Description | Config |
|
|
41
|
+
| ----------------------------------------- | -------------------------------------------------------------------------------------------- | ----------- |
|
|
42
|
+
| `require-task-for-story-init` | `story.init(task)` must receive the Vitest `task` argument from the test callback. | recommended |
|
|
43
|
+
| `require-test-context-for-story-init` | `story.init(...)` must be called inside a `test`/`it` callback. | recommended |
|
|
44
|
+
| `require-init-before-steps` | Step and doc calls on `story` must follow `story.init(...)` in the same test. | recommended |
|
|
45
45
|
|
|
46
46
|
## Configs
|
|
47
47
|
|