Matthew Martin ☑ on Nostr: What's a good unit test? - One assertion at at time -- eh, maybe. - ...
What's a good unit test?
- One assertion at at time -- eh, maybe.
- Independent/isolated/controlled <-- mocking's role
- Relevant/Meaningful <--- hard
- Repeatable/deterministic <-- also mocking's role
- Automatic <- CI all the things
- Descriptive <-- long names
Published at
2024-05-17 15:07:57Event JSON
{
"id": "63724ceecfe05fe062fcb001c1e8e9bb72c6bee47deaea89cca17dc97666032e",
"pubkey": "6c79e5c5386ee1cbe5b80303c40f8d781831ef78b63ce76c726c3c0b47f622de",
"created_at": 1715958477,
"kind": 1,
"tags": [
[
"p",
"6c79e5c5386ee1cbe5b80303c40f8d781831ef78b63ce76c726c3c0b47f622de"
],
[
"e",
"809ddd219304bf65adefbb9476e76f01e7967724aebb66f2deecafb8ac7fd3ab",
"",
"root"
],
[
"proxy",
"https://mastodon.social/@mistersql/112457054783107710",
"web"
],
[
"proxy",
"https://mastodon.social/users/mistersql/statuses/112457054783107710",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/mistersql/statuses/112457054783107710",
"pink.momostr"
]
],
"content": "What's a good unit test?\n- One assertion at at time -- eh, maybe.\n- Independent/isolated/controlled \u003c-- mocking's role\n- Relevant/Meaningful \u003c--- hard\n- Repeatable/deterministic \u003c-- also mocking's role\n- Automatic \u003c- CI all the things\n- Descriptive \u003c-- long names",
"sig": "11a47f9e562b1afee785e76d1c89b890de48fa6e281d5b689f2f027de791406de2b98c52b3a783c38c2046fe2a8b629ebd5125625960878574f3c4dbc9fde057"
}