Skip to content

Commit 2cbf8cb

Browse files
authored
Enabled publish (#5)
2 parents 9ffa00a + 7324521 commit 2cbf8cb

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/CODEOWNERS

Whitespace-only changes.

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ jobs:
4343
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
4444

4545
- name: Publish
46-
run: npx --no release-it -- --ci --dry-run
46+
run: npx --no release-it -- --ci
4747
continue-on-error: true

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ To create a full integration test for this scenario would be extremely complex,
8383

8484
Instead of constantly being on the backfoot and your CI breaking because another company updated their systems, mocking those dependencies provides a level of stability at the sacrifice of real world resemblance.
8585

86+
### How is this similar/different than enzyme's shallow?
87+
88+
Enzyme's shallow would be able to mock all the imports for you by calling `shallow(<Parent />)`. This library requires you to:
89+
90+
1. Use `jest.unstable_mockModule` to mock all the child components the Parent component is dependent on
91+
1. Dynamically load the Parent component after mocking all the child components
92+
93+
Theoretically if you mocked all the children a Parent component was dependent on, it would be fairly similar to Enzyme's shallow render.
94+
8695
## Goals
8796

8897
### Dependencies

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"jest": "^29.0.0",
5959
"react": "^18.0.0"
6060
},
61-
"private": "true",
6261
"repository": "github:snowcoders/jest-react-mock-utils",
6362
"scripts": {
6463
"build": "concurrently \"npm:build:*\"",

0 commit comments

Comments
 (0)