mirror of
https://github.com/coder/registry.git
synced 2026-06-02 20:48:14 +00:00
08ed594bfd
Closes #194 alongside #325 ## Description This PR adds the missing base layer of validation for all Coder template README files, ensuring that they all follow a consistent structure when processed by the Registry website's build step. It also updates a few README files to match the new standards. ## Type of Change - [ ] New module - [x] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [x] Other ## Testing & Validation - [x] Tests pass (`bun test`) - [x] Code formatted (`bun run fmt`) - [x] Changes tested locally
23 lines
376 B
Go
23 lines
376 B
Go
package main
|
|
|
|
import (
|
|
_ "embed"
|
|
"testing"
|
|
)
|
|
|
|
//go:embed testSamples/sampleReadmeBody.md
|
|
var testBody string
|
|
|
|
func TestValidateCoderResourceReadmeBody(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
t.Run("Parses a valid README body with zero issues", func(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
errs := validateCoderModuleReadmeBody(testBody)
|
|
for _, e := range errs {
|
|
t.Error(e)
|
|
}
|
|
})
|
|
}
|