Norq includes a declarative test framework. Write assertions in tests.yaml and run them with norq test. Each test case verifies business requirements on compiled output – subject lines contain the right text, SMS fits in one segment, Slack has action buttons, etc.
File
tests.yaml – placed inside the notification directory alongside templates.
Test structure
tests: - name: "Email has subject" channel: email sample: "New user" assert: subject: { contains: "Welcome" }
Each test case specifies:
Field
Required
Description
name
Yes
Human-readable test name
channel
No
Channel to test (defaults to all)
sample
No
Named sample from data.samples.yaml (defaults to first)
norq lint checks structure, syntax, and deliverability rules across all 6 channels — email (contrast, spam, accessibility), SMS (encoding, segments), push (payload size, truncation), WhatsApp (template limits), Slack (block limits), and MS Teams (card size). See Lint Rules for the full list. Tests check business requirements (content, size limits, structure).
Relationship to lint
Check type
Tool
Purpose
Schema valid
norq lint
Data contract is valid JSON Schema
Templates parse
norq lint
No syntax errors
Null safety
norq lint
Nullable fields guarded with :::if
Deliverability
norq lint
Email, SMS, push, WhatsApp, Slack, MS Teams channel-specific rules
Subject has text
norq test
Business assertion
SMS fits budget
norq test
Business assertion
Slack has buttons
norq test
Business assertion
Use both in CI. Lint catches structural and quality issues; tests catch content/business issues.