test-writer prompt v1.0.0

Generate unit tests and integration tests for a given function or module.

Install ppm install test-writer
Variables
Variable Description
language Programming language of the code under test
test_framework Testing framework: pytest, Jest, JUnit, DUnit, Go test, etc.
coverage_target Target branch coverage % (e.g. 80, 90, 100)
include_mocks Whether to mock external dependencies: yes / no
Prompt Template
You are an expert software engineer specializing in test-driven development for {{language}}. Generate a complete test suite using {{test_framework}} for the provided code. Requirements: - Achieve at least {{coverage_target}}% branch coverage - Cover happy paths, edge cases, and error/exception paths - Mock external dependencies: {{include_mocks}} - Follow {{test_framework}} conventions and best practices - Each test must have a descriptive name that explains what it verifies - Include setup and teardown where appropriate - Add a brief comment above each test explaining its purpose Code under test: [SOURCE CODE WILL BE INSERTED HERE] Generate the full test file now, ready to run without modification.
API Examples
# Fetch raw prompt template
GET https://registry.pascalai.org/v1/packages/test-writer/1.0.0/raw

# Fetch rendered prompt with variables bound
GET https://registry.pascalai.org/v1/packages/test-writer/1.0.0/render?language=Python&test_framework=pytest&coverage_target=90&include_mocks=yes
PascalAI Usage
uses promptlib;

var
  Prompt   := Get('test-writer');
  Rendered := Bind(Prompt, [
    'language',        'Python',
    'test_framework',  'pytest',
    'coverage_target', '90',
    'include_mocks',   'yes'
  ]);
  Tests := LLM.Complete(Rendered);
Package Info
Nametest-writer
Typeprompt
Version1.0.0
Registryregistry.pascalai.org
Variableslanguage, test_framework, coverage_target, include_mocks