CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/nestjs-best-practices

NestJS patterns -- modules, DI, exception filters, validation pipes, guards, interceptors, testing, config

98

1.36x
Quality

89%

Does it follow best practices?

Impact

100%

1.36x

Average score across 12 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

testing-patterns.jsonverifiers/

{
  "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"
    }
  ]
}

tile.json