@thalesrc/hermes 7.5.2 → 7.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -537,24 +537,28 @@ const client = new ChromeMessageClient('extension-port');
|
|
|
537
537
|
|
|
538
538
|
### Testing
|
|
539
539
|
|
|
540
|
-
Hermes uses
|
|
540
|
+
Hermes uses a modular testing structure with separate configurations for each submodule:
|
|
541
541
|
|
|
542
542
|
```bash
|
|
543
|
-
# Run all tests (
|
|
544
|
-
pnpm nx
|
|
543
|
+
# Run all tests (all submodules in parallel)
|
|
544
|
+
pnpm nx run hermes:test
|
|
545
545
|
|
|
546
|
-
# Run specific
|
|
547
|
-
pnpm nx
|
|
548
|
-
pnpm nx
|
|
549
|
-
pnpm nx test
|
|
550
|
-
pnpm nx
|
|
546
|
+
# Run specific submodule tests
|
|
547
|
+
pnpm nx run hermes:test/core # Core functionality (Node.js)
|
|
548
|
+
pnpm nx run hermes:test/worker # Web Worker tests (Browser)
|
|
549
|
+
pnpm nx run hermes:test/chrome # Chrome extension tests (Browser)
|
|
550
|
+
pnpm nx run hermes:test/broadcast # Broadcast Channel tests (Browser)
|
|
551
|
+
pnpm nx run hermes:test/iframe # Iframe communication tests (Browser)
|
|
551
552
|
|
|
552
|
-
#
|
|
553
|
-
pnpm nx
|
|
553
|
+
# Run all tests with coverage and merge reports
|
|
554
|
+
pnpm nx run hermes:test/coverage
|
|
555
|
+
|
|
556
|
+
# Debug browser tests (visible browser)
|
|
557
|
+
pnpm nx run hermes:test/headed
|
|
554
558
|
```
|
|
555
559
|
|
|
556
560
|
For detailed testing documentation, see:
|
|
557
|
-
- [TESTING-GUIDE.md](./docs/TESTING-GUIDE.md) -
|
|
561
|
+
- [TESTING-GUIDE.md](./docs/TESTING-GUIDE.md) - Complete testing guide
|
|
558
562
|
- [TEST-COMMANDS.md](./docs/TEST-COMMANDS.md) - Quick command reference
|
|
559
563
|
- [TESTING-SETUP-SUMMARY.md](./docs/TESTING-SETUP-SUMMARY.md) - Setup overview
|
|
560
564
|
|
|
@@ -570,14 +574,15 @@ pnpm nx build hermes --watch
|
|
|
570
574
|
|
|
571
575
|
### Contributing
|
|
572
576
|
|
|
573
|
-
When adding new
|
|
577
|
+
When adding new submodule support:
|
|
574
578
|
|
|
575
|
-
1. Create
|
|
576
|
-
2. Add
|
|
577
|
-
3.
|
|
578
|
-
4.
|
|
579
|
+
1. Create submodule directory in `src/`
|
|
580
|
+
2. Add test files alongside code: `*.spec.ts`
|
|
581
|
+
3. Create submodule's `vitest.config.ts` in the submodule directory
|
|
582
|
+
4. Add test target in `project.json`
|
|
583
|
+
5. Update main `test` target to include new submodule
|
|
579
584
|
|
|
580
|
-
See [TESTING-GUIDE.md](./TESTING-GUIDE.md) for details on adding new
|
|
585
|
+
See [TESTING-GUIDE.md](./docs/TESTING-GUIDE.md) for details on adding new submodules.
|
|
581
586
|
|
|
582
587
|
## License
|
|
583
588
|
|