feat(docs): Update documentation to embed tapbundle and clarify module exports for browser compatibility; also add CI permission settings.
This commit is contained in:
		
							
								
								
									
										21
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								readme.md
									
									
									
									
									
								
							| @@ -26,7 +26,7 @@ | ||||
| - ⏳ **Timeout Control** - Set custom timeouts for tests | ||||
| - 🔁 **Retry Logic** - Automatically retry failing tests | ||||
| - 🛠️ **Test Fixtures** - Create reusable test data | ||||
| - 📦 **Browser-Compatible** - Full browser support for tapbundle | ||||
| - 📦 **Browser-Compatible** - Full browser support with embedded tapbundle | ||||
|  | ||||
| ## Installation | ||||
|  | ||||
| @@ -143,10 +143,10 @@ tstest supports different test environments through file naming: | ||||
|  | ||||
| ### Writing Tests | ||||
|  | ||||
| tstest uses TAP (Test Anything Protocol) for test output. Use `@pushrocks/tapbundle` for the best experience: | ||||
| tstest includes a built-in TAP (Test Anything Protocol) test framework. Import it from the embedded tapbundle: | ||||
|  | ||||
| ```typescript | ||||
| import { expect, tap } from '@push.rocks/tapbundle'; | ||||
| import { expect, tap } from '@git.zone/tstest/tapbundle'; | ||||
|  | ||||
| tap.test('my awesome test', async () => { | ||||
|   const result = await myFunction(); | ||||
| @@ -156,6 +156,14 @@ tap.test('my awesome test', async () => { | ||||
| tap.start(); | ||||
| ``` | ||||
|  | ||||
| **Module Exports** | ||||
|  | ||||
| tstest provides multiple exports for different use cases: | ||||
|  | ||||
| - `@git.zone/tstest` - Main CLI and test runner functionality | ||||
| - `@git.zone/tstest/tapbundle` - Browser-compatible test framework | ||||
| - `@git.zone/tstest/tapbundle_node` - Node.js-specific test utilities | ||||
|  | ||||
| #### Test Features | ||||
|  | ||||
| **Tag-based Test Filtering** | ||||
| @@ -243,7 +251,7 @@ tap.todo('implement user deletion', async () => { | ||||
| **Browser Testing** | ||||
| ```typescript | ||||
| // test.browser.ts | ||||
| import { tap, webhelpers } from '@push.rocks/tapbundle'; | ||||
| import { tap, webhelpers } from '@git.zone/tstest/tapbundle'; | ||||
|  | ||||
| tap.test('DOM manipulation', async () => { | ||||
|   const element = await webhelpers.fixture(webhelpers.html` | ||||
| @@ -322,8 +330,9 @@ tstest test/ --quiet | ||||
|  | ||||
| ## Changelog | ||||
|  | ||||
| ### Version 1.7.0 | ||||
| - 🎉 Made `@push.rocks/tapbundle` fully browser-compatible | ||||
| ### Version 1.8.0 | ||||
| - 📦 Embedded tapbundle directly into tstest project | ||||
| - 🌐 Made tapbundle fully browser-compatible | ||||
| - 📸 Added snapshot testing with base64-encoded communication protocol | ||||
| - 🏷️ Introduced tag-based test filtering | ||||
| - 🔧 Enhanced test lifecycle hooks (beforeEach/afterEach) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user