image
Akan.js
English
DocsConventionsReferencesCheatsheet
image
Akan.js
DocsConventionsReferencesCheatsheet
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2026 Akan.js All rights reserved.
System managed bybassman
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
Next
Authorization

Testing

In Akan apps, start testing from signals. A signal test checks the real business flow through the generated fetch API before you spend time on UI details.
  • Test signup, permission, validation, and state transitions at the API layer.
  • Move repeated setup into small helper functions.
  • Keep long scenarios as several clear steps.

Spec Helper

A spec helper creates test users, agents, and sample data. The test file can then read like a user story instead of a setup script.
article.signal.spec.ts

Test File

The test file imports helpers, prepares an agent, calls signals through fetch, and checks the result.
article.signal.test.ts

What To Test

  • Happy path: create, update, publish, archive.
  • Permission: guest cannot publish, owner can edit, admin can remove.
  • Validation: missing title, invalid date, duplicated accountId.
  • State transition: draft to published, pending to approved.
  • External dependency: file upload, payment callback, message publish.

Command

Run app tests from the workspace root. Add `--write false` when you want to avoid writing snapshots or generated output during a check.
Run tests

Tips

  • Create data through signals when possible so the test uses the same rules as the app.
  • Use helpers for setup, but keep assertions in the test file.
  • Test one important behavior per `it` block.
Testing
Spec Helper
Test File
What To Test
Command
Tips