@cheatron/native-mock
v1.0.4
Published
Pure JavaScript mock implementation of Win32 native modules for testing without native dependencies
Maintainers
Readme
@cheatron/cheatron-native-mock
This package provides a pure JavaScript/TypeScript mock implementation of @cheatron/cheatron-native.
It simulates the Windows API (Kernel32) and core classes (Process, Thread) in memory, allowing tests and development on non-Windows platforms without native dependencies.
Features
- In-Memory Kernel32: Simulates memory operations, handle management, and process/thread APIs.
- Type-Safe: Uses
win32-deffor accurate Windows API type definitions. - Dependency-Free: Removes
koffiandwin32-apiruntime dependencies. - Test Compatibility: Passes the standard
@cheatron/cheatron-nativetest suite.
Usage
This package is intended for testing and development environments where native modules cannot be loaded.
bun install
bun test