test(contract): Add Contract v1 test fixtures
- Add valid fixtures: minimal, typical, maximal - Add invalid fixtures: missing required, wrong units - Fixtures used for contract validation and round-trip testing See tests/fixtures/v1/ for test contract samples.
This commit is contained in:
5
tests/fixtures/v1/invalid-missing-required.json
vendored
Normal file
5
tests/fixtures/v1/invalid-missing-required.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"title": "Missing ID",
|
||||||
|
"fetchTime": 1738022400000
|
||||||
|
}
|
||||||
|
|
||||||
7
tests/fixtures/v1/invalid-wrong-units.json
vendored
Normal file
7
tests/fixtures/v1/invalid-wrong-units.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"id": "test-notification-004",
|
||||||
|
"title": "Wrong Time Units",
|
||||||
|
"fetchTime": 1738022400,
|
||||||
|
"scheduledTime": 1738026000
|
||||||
|
}
|
||||||
|
|
||||||
17
tests/fixtures/v1/valid-maximal.json
vendored
Normal file
17
tests/fixtures/v1/valid-maximal.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"id": "test-notification-003",
|
||||||
|
"title": "Complete Notification",
|
||||||
|
"body": "This notification includes all optional fields",
|
||||||
|
"scheduledTime": 1738026000000,
|
||||||
|
"fetchTime": 1738022400000,
|
||||||
|
"mediaUrl": "https://example.com/image.jpg",
|
||||||
|
"ttlSeconds": 7200,
|
||||||
|
"dedupeKey": "unique-key-123",
|
||||||
|
"priority": "high",
|
||||||
|
"metadata": {
|
||||||
|
"source": "test",
|
||||||
|
"category": "daily",
|
||||||
|
"tags": ["important", "daily"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
6
tests/fixtures/v1/valid-minimal.json
vendored
Normal file
6
tests/fixtures/v1/valid-minimal.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"id": "test-notification-001",
|
||||||
|
"title": "Test Notification",
|
||||||
|
"fetchTime": 1738022400000
|
||||||
|
}
|
||||||
|
|
||||||
11
tests/fixtures/v1/valid-typical.json
vendored
Normal file
11
tests/fixtures/v1/valid-typical.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"id": "test-notification-002",
|
||||||
|
"title": "Daily Update",
|
||||||
|
"body": "Your daily notification is ready",
|
||||||
|
"scheduledTime": 1738026000000,
|
||||||
|
"fetchTime": 1738022400000,
|
||||||
|
"mediaUrl": "https://example.com/image.jpg",
|
||||||
|
"ttlSeconds": 3600,
|
||||||
|
"priority": "default"
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user