Commit c5865128 authored by Hanwen Cheng's avatar Hanwen Cheng Committed by Thibaut Sardan
Browse files

docs: add debug unit test command into package.json (#501)



* test: add debug unit test command into package.json

* Update README.md
Co-Authored-By: default avatarThibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update README.md
Co-Authored-By: default avatarThibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update README.md
Co-Authored-By: default avatarThibaut Sardan <33178835+Tbaut@users.noreply.github.com>
parent df1b3ff1
Pipeline #71636 failed with stages
in 9 minutes and 15 seconds
......@@ -117,6 +117,18 @@ Corresponding data:
}
```
#### Unit Test
Run `yarn test` for all the units test.
If debugging is needed:
1. Insert `debugger;` in the code where you think it fails.
2. Run `yarn test:debug`
3. Open a new tab in Chrome and go to `chrome://inspect`
4. Click the `inspect` button of target under `Remote Target`
5. Back to the terminal, choose one of the node watch commands to run the tests again.
#### Integration Test
Parity Signer is integrated with [Detox](https://github.com/wix/Detox) E2E testing. Detox has very detailed [documentation](https://github.com/wix/Detox/blob/master/docs/README.md).
......
......@@ -21,6 +21,7 @@
"postinstall": "npx jetify && chmod +x ./scripts/fix-rn-camera-path.sh && ./scripts/fix-rn-camera-path.sh ./node_modules/react-native-camera/ios/RNCamera.xcodeproj/project.pbxproj",
"start": "NODE_OPTIONS=--max_old_space_size=8192 react-native start",
"test": "jest",
"test:debug": "node --inspect node_modules/.bin/jest --watch --runInBand",
"test-rust": "cd ./rust/signer && cargo test && cd ../..",
"build-e2e:android": "detox build -c android.emu.debug -l info",
"test-e2e:android": "detox test -c android.emu.debug -l info --noStackTrace",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment