@@ -125,26 +125,23 @@ This script generates:
125125 - Correct icon path (usually ` ../../../../.icons/your-icon.svg ` )
126126 - Proper tags that describe your module
1271273 . ** Create tests for your module:**
128- - ** New modules** : Create ` .tftest.hcl ` files and test with ` terraform test `
129- - ** Existing modules ** : Keep ` main.test.ts ` files and test with ` bun test `
128+ - ** New modules** : Create ` * .tftest.hcl` files and test with ` terraform test `
129+ - ** TypeScript tests ** : Create ` main.test.ts ` files if your module runs scripts or has business logic that Terraform tests can't cover
130130 - ** Both approaches** are supported
1311314 . ** Add any scripts** or additional files your module needs
132132
133133### 4. Test and Submit
134134
135135``` bash
136136# Test your module
137- # For new modules with .tftest.hcl:
138137cd registry/[namespace]/modules/[module-name]
138+
139+ # Required: Test Terraform functionality
139140terraform init -upgrade
140141terraform test -verbose
141142
142- # For existing modules with main.test.ts:
143- bun test registry/[namespace]/modules/[module-name]
144-
145- # Run all tests in the repo
146- bun test # All TypeScript tests
147- ./scripts/terraform_test_all.sh # All Terraform tests
143+ # Optional: Test TypeScript files if you have main.test.ts
144+ bun test main.test.ts
148145
149146# Format code
150147bun run fmt
@@ -352,8 +349,8 @@ coder templates push test-[template-name] -d .
352349terraform init -upgrade
353350terraform test -verbose
354351
355- # Test all modules
356- ./scripts/terraform_test_all.sh
352+ # Optional: If you have TypeScript tests
353+ bun test main.test.ts
357354```
358355
359356### 3. Maintain Backward Compatibility
@@ -403,7 +400,7 @@ Example: `https://github.com/coder/registry/compare/main...your-branch?template=
403400
404401- ` main.tf ` - Terraform code
405402- ** Tests** :
406- - ` *.tftest.hcl ` files with ` terraform test ` (to test terraform specific logoc )
403+ - ` *.tftest.hcl ` files with ` terraform test ` (to test terraform specific logic )
407404 - ` main.test.ts ` file with ` bun test ` (to test business logic, i.e., ` coder_script ` to install a package.)
408405- ` README.md ` - Documentation with frontmatter
409406
@@ -504,6 +501,6 @@ When reporting bugs, include:
5045012 . ** No tests** or broken tests
5055023 . ** Hardcoded values** instead of variables
5065034 . ** Breaking changes** without defaults
507- 5 . ** Not running** formatting (` bun run fmt ` ) and tests (` bun test` or ` terraform test` ) before submitting
504+ 5 . ** Not running** formatting (` bun run fmt ` ) and tests (` terraform test` , and ` bun test main.test.ts ` if applicable ) before submitting
508505
509506Happy contributing! 🚀
0 commit comments