Curriculum Idioms & ecosystem Testing exercise 1 · mcq
Testing
Pick the file naming convention that the Go toolchain
recognises as a test file. (Run go test ./... and only
these files participate.)
TypeScript: convention is .test.ts or __tests__/...;
enforced by your test runner config. Go's rule is baked
into go test.
TypeScript reference
About this theme
Go has a testing package in the standard library. Tests live next to code in _test.go files. The pattern is table-driven: a slice of (name, input, want) tuples plus t.Run(name, ...) for subtests. No assertion library required — if got != want { t.Errorf(...) } is the whole vocabulary.