add: story and some tests

This commit is contained in:
2026-03-25 21:56:27 -07:00
parent 98b14220e7
commit 7626b5618a
6 changed files with 1158 additions and 0 deletions
+30
View File
@@ -33,6 +33,36 @@ Generally conform to resource-oriented design describe in
https://google.aip.dev/general. Read aip.md for a summary. All proto service
methods should be annotated with google.api.http hints and path variables.
When writing tests, always split the error cases into a different test. For example:
```go
func TestThing(t *testing.T) {
for _, tc := range []struct{
name string
}{
{"test1"},
} {
t.Run(tc.name, func() {
got, err := Thing()
if err != nil { t.Fatalf("Got err=%v; want nil", err)}
})
}
}
func TestThingErrors(t *testing.T) {
for _, tc := range []struct{
name string
}{
{"test1"},
} {
t.Run(tc.name, func() {
_, err := Thing()
if err == nil { t.Fatalf("Got nil err; want err")}
// Test thing
})
}
}
```
## Frontend/Typescript
Do not alter package.json directly, instead, use the CLI tool `npm`.