This directory contains tests that validate the fix for Issue #5066: Unable to inject data between workers because of proxy object.
Basic tests that verify the core functionality of share() and inject() functions:
- Basic data sharing with primitive types (strings, numbers)
- Complex nested data structures (objects, arrays)
- Property access patterns that should work after the fix
Comprehensive end-to-end validation test that covers:
- Multiple data types and structures
- Data overriding scenarios
- Deep nested property access
- Key enumeration functionality
- Real-world usage patterns
npx codeceptjs run proxy_test.js
npx codeceptjs run final_test.jsnpx codeceptjs run-workers 2 proxy_test.js
npx codeceptjs run-workers 2 final_test.js- Circular Dependency Error: Fixed "Support object undefined is not defined" error in
workerStorage.js - Proxy System Enhancement: Updated container proxy system to handle dynamically shared data
- Worker Communication: Ensured data sharing works correctly between worker threads
- Key Enumeration: Made sure
Object.keys(inject())shows shared properties
All tests should pass in both single-threaded and multi-worker modes, demonstrating that:
share({ data })correctly shares data between workersinject()returns a proxy object with proper access to shared data- Both direct property access and nested object traversal work correctly
- Key enumeration shows all shared properties