-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: useIsomorphicLayoutEffect 테스트 파일 변경 (#73)
* test: useIsomorphicLayoutEffect 테스트 파일 변경 * chore: codecod build 추가 * chore: workflow 수정 * test: coverage 추가
- Loading branch information
Showing
23 changed files
with
326 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@modern-kit/react': patch | ||
'@modern-kit/types': patch | ||
'@modern-kit/utils': patch | ||
--- | ||
|
||
chore: codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-2.6 MB
.yarn/cache/@rollup-rollup-win32-ia32-msvc-npm-4.16.4-e28109541a-10c0.zip
Binary file not shown.
Binary file added
BIN
+20.1 KB
.yarn/cache/@vitest-coverage-istanbul-npm-1.5.2-81922aa75e-c4e236dc29.zip
Binary file not shown.
Binary file added
BIN
+35.7 KB
.yarn/cache/istanbul-lib-coverage-npm-3.2.2-5c0526e059-6c7ff21067.zip
Binary file not shown.
Binary file added
BIN
+72 KB
.yarn/cache/istanbul-lib-instrument-npm-6.0.2-dac42bd5eb-405c6ac037.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+37.9 KB
.yarn/cache/istanbul-lib-source-maps-npm-5.0.4-9de86ebc9c-48b4829459.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
changesetIgnorePatterns: | ||
- .github/** | ||
- .yarn/cache/** | ||
- "**/*.spec.{js,ts}" | ||
- packages/docs/** | ||
|
||
compressionLevel: 0 | ||
|
||
enableGlobalCache: false | ||
|
||
yarnPath: .yarn/releases/yarn-4.0.1.cjs | ||
|
||
supportedArchitectures: | ||
os: ["current", "darwin", "linux", "win32"] | ||
cpu: ["current", "x64" , "ia32", "arm64"] | ||
cpu: | ||
- x64 | ||
- arm64 | ||
os: | ||
- darwin | ||
- linux | ||
- win32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
packages/react/src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.client.spec.tsx
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
packages/react/src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.server.spec.tsx
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
packages/react/src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useEffect, useLayoutEffect } from 'react'; | ||
|
||
describe('useIsomorphicLayoutEffect', () => { | ||
const originWindow = global.window; | ||
|
||
afterEach(() => { | ||
vi.resetModules(); | ||
}); | ||
|
||
it('should be useEffect in server environment', async () => { | ||
Object.defineProperty(global, 'window', { | ||
value: undefined, | ||
}); | ||
|
||
const { useIsomorphicLayoutEffect } = await import('.'); | ||
expect(useIsomorphicLayoutEffect).toEqual(useEffect); | ||
}); | ||
|
||
it('should be useLayoutEffect in client environment', async () => { | ||
Object.defineProperty(global, 'window', { | ||
value: originWindow, | ||
}); | ||
|
||
const { useIsomorphicLayoutEffect } = await import('.'); | ||
expect(useIsomorphicLayoutEffect).toEqual(useLayoutEffect); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.