-
Notifications
You must be signed in to change notification settings - Fork 5
doc: add windows generated project mock test workaround #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -142,6 +142,33 @@ offckb create <your-project-name> -c <your-contract-name> | |||||||||||||
| ``` | ||||||||||||||
| - The `-c` option is optional, if not provided, the contract name defaults to `hello-world`. | ||||||||||||||
|
|
||||||||||||||
| **Note for Windows Users:** | ||||||||||||||
|
|
||||||||||||||
| To run mock tests in the generated project, you need to manually install `ckb-debugger` until [this upstream fix about ckb-testtool wasm](https://github.com/nervosnetwork/ckb-js-vm/pull/98) is applied. | ||||||||||||||
|
|
||||||||||||||
| **Installation Steps:** | ||||||||||||||
|
|
||||||||||||||
| 1. Download the latest `ckb-debugger` release for Windows from the [releases page](https://github.com/nervosnetwork/ckb-standalone-debugger/releases) | ||||||||||||||
| 2. Extract the downloaded archive (e.g., `ckb-debugger-win64.zip`) | ||||||||||||||
| 3. Add the extracted binary to your system PATH: | ||||||||||||||
| - Open "System Properties" → "Environment Variables" | ||||||||||||||
| - Under "System variables" or "User variables", find and edit the `Path` variable | ||||||||||||||
| - Click "New" and add the full path to the folder containing `ckb-debugger.exe` | ||||||||||||||
| - Click "OK" to save | ||||||||||||||
| 4. Verify installation by opening a new terminal and running: | ||||||||||||||
| ```sh | ||||||||||||||
| ckb-debugger --version | ||||||||||||||
| ``` | ||||||||||||||
| 5. Disable WASM debugger in your mock test file: | ||||||||||||||
| - Open the mock test file (e.g., `<your-contract-name>.mock.test.ts`) | ||||||||||||||
| - Comment out or delete the `verifier.setWasmDebuggerEnabled(true)` line: | ||||||||||||||
| ```typescript | ||||||||||||||
| // When using native ckb-debugger, comment out or delete the following line: | ||||||||||||||
|
Comment on lines
+164
to
+166
|
||||||||||||||
| - Comment out or delete the `verifier.setWasmDebuggerEnabled(true)` line: | |
| ```typescript | |
| // When using native ckb-debugger, comment out or delete the following line: | |
| - Delete the `verifier.setWasmDebuggerEnabled(true)` line: | |
| ```typescript | |
| // if you are using the native ckb-debugger, you can delete the following line: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent capitalization: This line uses "Windows Users" (capital U) while line 58 of the same file uses "Windows users" (lowercase u). For consistency with the existing note, this should be "Windows users".