otter
otter copied to clipboard
[draft] test: example of usage of ng-mocks for the unit tests
Proposed change
When unit testing a component, we want to mock all (most of) its dependencies, this can be tedious
ng-mocks already does that with very limited code to add on our side
It can put spys on all dependencies and make it easy to mock a specific implementation as well
Related issues
- :bug: Fixes #(issue)
- :rocket: Feature #(issue)
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 0eccb5f2e1f70d1d6fedc59942abccf4e7bf6e8a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 10 targets
-
nx run-many --target=test-int --parallel 3 -
nx run-many --target=build --projects=eslint-plugin --parallel 3 -
nx run-many --target=test-e2e --parallel 3 -
nx affected --target=test --parallel 3 --cacheDirectory=D:\a\otter\otter/.cache/jest --base=remotes/origin/main -
nx run-many --target=publish --parallel 3 --nx-bail --userconfig .verdaccio/conf/.npmrc-logged --tag=latest --@o3r:registry=http://127.0.0.1:4873 --@ama-sdk:registry=http://127.0.0.1:4873 --@ama-terasu:registry=http://127.0.0.1:4873 -
nx run ama-sdk-schematics:build-swagger -
nx affected --target=test --parallel 3 --cacheDirectory=/home/runner/work/otter/otter/.cache/jest --base=remotes/origin/main -
nx affected --target=lint --parallel 3 --base=remotes/origin/main --configuration ci -
nx run-many --target=build --parallel 3 -
nx run-many --target=build-swagger --parallel 3
Sent with 💌 from NxCloud.