NestJS patterns -- modules, DI, exception filters, validation pipes, guards, interceptors, testing, config
98
89%
Does it follow best practices?
Impact
100%
1.36xAverage score across 12 eval scenarios
Passed
No known issues
{
"instruction": "Test NestJS services using Test.createTestingModule with mocked providers",
"relevant_when": "Agent writes unit tests for NestJS services or controllers",
"context": "NestJS provides Test.createTestingModule to create isolated testing modules. Dependencies should be mocked using useValue with jest.fn() stubs. Use module.get<T>(Token) to retrieve the service under test. Test controllers and services separately.",
"sources": [
{
"type": "file",
"filename": "skills/nestjs-best-practices/SKILL.md",
"tile": "tessl-labs/nestjs-best-practices@0.2.0"
}
],
"checklist": [
{
"name": "test-create-testing-module",
"rule": "Agent uses Test.createTestingModule to create an isolated module for unit tests",
"relevant_when": "Agent writes unit tests for NestJS services or controllers"
},
{
"name": "mock-dependencies",
"rule": "Agent mocks service dependencies using useValue with jest.fn() stubs in the testing module providers",
"relevant_when": "Agent writes unit tests for NestJS services that have dependencies"
},
{
"name": "module-get-service",
"rule": "Agent uses module.get<T>(ServiceClass) to retrieve the service instance from the testing module",
"relevant_when": "Agent sets up NestJS unit tests"
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
nestjs-best-practices
verifiers