-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚸 Simplify tags to declare rules/test cases
- Loading branch information
1 parent
bdf2fe6
commit fb0d46b
Showing
16 changed files
with
170 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Invalid example | ||
|
||
* This example contains a rule in the [invalid.md](invalid.md) file | ||
* ❌ The test for this rule is expected to NOT pass | ||
|
||
## Test ouput | ||
|
||
``` | ||
npx poltergust test .\examples\invalid | ||
🔎 Testing the spectral rules from the .md files in the directory: .\examples\invalid | ||
👻 base-path-must-start-with-slash (examples\invalid\invalid.md:22) | ||
❌ Expected 0 failure(s) for rule base-path-must-start-with-slash in test (examples\invalid\invalid.md:9) | ||
But got 1 instead: | ||
{ start: 6, end: 6 } (examples\invalid\invalid.md:15) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Valid example | ||
|
||
* This example contains rules accross several markdown files: [rules1.md](rules1.md) and [rules2.md](rules2.md) | ||
* ✅ All the test declared in those files are expected to pass | ||
* Some of the rules use custom functions defined in the [functions](functions) directory | ||
* [spectral.base.yaml](spectral.base.yaml) contains the base rule files that will be used to merge the rules into. For example, it contains the extends, aliases and functions declarations | ||
* [spectral.yaml](spectral.yaml) is the output of the merge operation: [spectral.base.yaml](spectral.base.yaml) + all the rules found in [rules1.md](rules1.md) and [rules2.md](rules2.md) | ||
|
||
## Test ouput | ||
|
||
``` | ||
npx poltergust test .\examples\valid | ||
🔎 Testing the spectral rules from the .md files in the directory: .\examples\valid | ||
👻 base-path-must-start-with-slash (examples\valid\rules1.md:40) | ||
✅ Test OK (examples\valid\rules1.md:17) | ||
✅ Test OK (examples\valid\rules1.md:27) | ||
👻 operation-parameters-must-have-description (examples\valid\rules1.md:91) | ||
✅ Test OK (examples\valid\rules1.md:58) | ||
✅ Test OK (examples\valid\rules1.md:73) | ||
👻 operation-must-have-description (examples\valid\rules1.md:107) | ||
👻 operation-must-have-no-summary (examples\valid\rules1.md:122) | ||
👻 operation-must-have-at-least-one-response (examples\valid\rules1.md:135) | ||
👻 request-bodies-must-have-a-content (examples\valid\rules1.md:152) | ||
👻 path-parameters-must-be-kebab-case (examples\valid\rules2.md:49) | ||
✅ Test OK (examples\valid\rules2.md:11) | ||
👻 required-property-must-exist (examples\valid\rules2.md:96) | ||
✅ Test OK (examples\valid\rules2.md:66) | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.