@@ -124,18 +124,27 @@ This script generates:
124124 - Accurate description and usage examples
125125 - Correct icon path (usually ` ../../../../.icons/your-icon.svg ` )
126126 - Proper tags that describe your module
127- 3 . ** Create at least one ` .tftest.hcl ` ** to test your module with ` terraform test `
127+ 3 . ** 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 `
130+ - ** Both approaches** are supported
1281314 . ** Add any scripts** or additional files your module needs
129132
130133### 4. Test and Submit
131134
132135``` bash
133- # Test your module (from the module directory)
136+ # Test your module
137+ # For new modules with .tftest.hcl:
138+ cd registry/[namespace]/modules/[module-name]
134139terraform init -upgrade
135140terraform test -verbose
136141
137- # Or run all tests in the repo
138- ./scripts/terraform_test_all.sh
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
139148
140149# Format code
141150bun run fmt
@@ -393,7 +402,9 @@ Example: `https://github.com/coder/registry/compare/main...your-branch?template=
393402### Every Module Must Have
394403
395404- ` main.tf ` - Terraform code
396- - One or more ` .tftest.hcl ` files - Working tests with ` terraform test `
405+ - ** Tests** (choose one):
406+ - ` .tftest.hcl ` files with ` terraform test ` (preferred for new modules)
407+ - ` main.test.ts ` file with ` bun test ` (existing modules)
397408- ` README.md ` - Documentation with frontmatter
398409
399410### Every Template Must Have
@@ -493,6 +504,6 @@ When reporting bugs, include:
4935042 . ** No tests** or broken tests
4945053 . ** Hardcoded values** instead of variables
4955064 . ** Breaking changes** without defaults
496- 5 . ** Not running** formatting (` bun run fmt ` ) and tests (` terraform test ` ) before submitting
507+ 5 . ** Not running** formatting (` bun run fmt ` ) and tests (` bun test ` or ` terraform test ` ) before submitting
497508
498509Happy contributing! 🚀
0 commit comments