test(config-audit): add marketplace-small/medium/large scanner fixtures
This commit is contained in:
parent
94ce70186c
commit
5a4f29fd14
14 changed files with 222 additions and 0 deletions
14
plugins/config-audit/tests/fixtures/marketplace-large/.claude/settings.json
vendored
Normal file
14
plugins/config-audit/tests/fixtures/marketplace-large/.claude/settings.json
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(npm run *)",
|
||||
"Read(src/**)",
|
||||
"Read(packages/**)",
|
||||
"Read(plugins/**)",
|
||||
"Write(dist/**)"
|
||||
],
|
||||
"deny": ["Read(./.env)", "Read(**/secrets/**)"]
|
||||
},
|
||||
"effortLevel": "high"
|
||||
}
|
||||
9
plugins/config-audit/tests/fixtures/marketplace-large/.claude/shared-errors.md
vendored
Normal file
9
plugins/config-audit/tests/fixtures/marketplace-large/.claude/shared-errors.md
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Shared Error-Handling Patterns
|
||||
|
||||
- Subclass `Error` with typed messages
|
||||
- Never swallow errors silently
|
||||
- Prefer `Result<T, E>` return types in business logic
|
||||
- Log only at boundaries, never inside pure functions
|
||||
- Validate inputs only at the system edge
|
||||
- Treat all third-party API responses as untrusted input
|
||||
- Bail early on contract violations rather than degrading silently
|
||||
7
plugins/config-audit/tests/fixtures/marketplace-large/.claude/shared-naming.md
vendored
Normal file
7
plugins/config-audit/tests/fixtures/marketplace-large/.claude/shared-naming.md
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Shared Naming Conventions
|
||||
|
||||
- `camelCase` for variables, function parameters, function names
|
||||
- `PascalCase` for classes, interfaces, type aliases
|
||||
- `UPPER_SNAKE_CASE` for module-level constants
|
||||
- kebab-case for filenames and directory names
|
||||
- `_leading_underscore` for unused parameters explicitly retained
|
||||
9
plugins/config-audit/tests/fixtures/marketplace-large/.claude/shared-tests.md
vendored
Normal file
9
plugins/config-audit/tests/fixtures/marketplace-large/.claude/shared-tests.md
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Shared Test Patterns
|
||||
|
||||
- One fixture per scenario under `tests/fixtures/{name}/`
|
||||
- `describe(...)` + `it(...)` from `node:test`
|
||||
- Co-locate tests with their implementation as `*.test.mjs`
|
||||
- Prefer table-driven tests for permutations
|
||||
- Reset module-level state in `beforeEach` to keep tests isolated
|
||||
- Use `execFile` for CLI subprocess tests
|
||||
- Avoid mocks for I/O at fixture boundaries — read real files instead
|
||||
Loading…
Add table
Add a link
Reference in a new issue