Testing
ID Wispera has a comprehensive test suite covering all packages and all three SDKs. This page explains how to run tests and what’s covered — useful for contributors validating changes and for understanding the security properties verified by the suite.Test summary
| Package | Test Files | Tests | Key Coverage |
|---|---|---|---|
@id-wispera/core | 16 | 667 | Vault, passport, detection, policy, audit, delegation, sharing, provisioning, integrations, exec, env mapping, passphrase provider, KDF migration, cross-SDK compat |
@id-wispera/cli | 1 | 47 | Display utilities (credential masking, formatting, passport cards, audit entries, detection results) |
@id-wispera/mcp-server | 4 | 24 | Policy enforcement, tool handler error wrapping, passport resource mapping, auth actor resolution |
@id-wispera/browser-extension | 8 | 171 | Storage, AES-256-GCM crypto, credential detection, patterns, security properties, API, service worker, vault client |
| Go SDK | 7 | ~169 | Passphrase provider, delegation, providers, locations, policy, provisioning, sharing |
| Python SDK | 2 | ~216 | Cross-SDK parity (201 tests), passphrase provider |
Running tests
All packages
Individual packages
Watch mode and coverage
Go SDK
Python SDK
Test categories
Unit tests
Pure function testing for masking, formatting, mapping, and parsing logic. These validate individual functions in isolation.Integration tests
Multi-module workflows such as vault → passport → audit, delegation chains, and sharing flows. These verify that components work correctly together.Security property tests
Cryptographic invariants, permission checks, and credential scrubbing. These ensure the platform’s security guarantees hold under test conditions.Cross-SDK parity tests
Behavioral equivalence across TypeScript, Python, and Go. These verify that all three SDKs produce interoperable vault files and identical behavior for the same inputs.CLI integration tests
End-to-end command workflows including exec, provisioning, and policy enforcement. These test the full CLI pipeline from command parsing to output.Security-specific tests
The test suite includes dedicated tests that validate the security properties of the platform:Browser extension crypto tests
Browser extension crypto tests
security.test.ts validates AES-256-GCM cryptographic invariants, ensures random IVs on every encryption, verifies credential masking, validates detection pattern quality, and tests sync-guard behavior.ESLint security linting
ESLint security linting
eslint-plugin-security and eslint-plugin-no-unsanitized are configured for the browser extension to catch common security anti-patterns at lint time.Passphrase provider tests
Passphrase provider tests
Verify the resolution chain order, world-readable
.env file warnings, and that no deprecation warnings are emitted for IDW_PASSPHRASE.Exec security tests
Exec security tests
Verify that
IDW_PASSPHRASE and IDW_SESSION_TOKEN are stripped from child process environments, and that credential values never appear in error messages.Policy engine tests
Policy engine tests
Verify enforcement of human owner requirements, validity period limits, delegation depth constraints, and visa type restrictions.
Cross-SDK compatibility tests
Cross-SDK compatibility tests
Verify that TypeScript, Python, and Go SDKs produce interoperable vault files and identical behavior for encryption, decryption, key derivation, and passphrase resolution.
Contributing tests
When contributing to ID Wispera, follow these guidelines:- All PRs require passing tests. The CI pipeline runs the full test suite on every pull request.
- New features need tests. Add tests that cover both the happy path and edge cases.
- Security-sensitive changes need security tests. If your change touches encryption, auth, or credential handling, add tests that verify the security properties.
- Cross-SDK changes need parity tests. If you change behavior in one SDK, ensure the corresponding tests pass in all three SDKs.
Next steps
Security architecture
Understand the encryption model and threat model that tests validate.
Policy engine
Learn about the policy rules verified by the test suite.
SDK usage
Full command reference and programmatic SDK usage.