Skip to content

Interface: SeedComment ​

Defined in: src/testing/seed.ts:14

Semantic, provider-agnostic seed model for fake instances.

Consumer tests describe what exists — people, posts, comments, notifications — and each fake instance derives its provider's wire responses from this store. Specs never touch endpoint paths or wire shapes for content; mock()/calls() remain for error injection and asserting outgoing requests.

Field names follow threadiverse's canonical types (post.name, comment.content) so tests assert on the same names they seed.

Properties ​

PropertyTypeDescriptionDefined in
childCount?numberOverrides the count derived from seeded descendants — set it to model replies that exist server-side but were never seeded.src/testing/seed.ts:19
contentstring-src/testing/seed.ts:20
creatorSeedPerson-src/testing/seed.ts:21
deletedbooleanDeleted by its creator (mutated by delete writes)src/testing/seed.ts:23
idnumber-src/testing/seed.ts:24
myVote-1 | 0 | 1The logged-in user's vote (mutated by like writes)src/testing/seed.ts:26
pathstring-src/testing/seed.ts:27
postSeedPost-src/testing/seed.ts:28
published?stringISO 8601; defaults to the fake's fixed "now"src/testing/seed.ts:30
savedbooleanSaved by the logged-in user (mutated by save writes)src/testing/seed.ts:32
scorenumberBase score at myVote 0; the logged-in user's vote is added on topsrc/testing/seed.ts:34