0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

5,909 commits

Author SHA1 Message Date
Wonsuk Choi
75f2c0dfb6
test({svelte-query,svelte-query-devtools,vue-query}): enable 'restoreMocks' and recreate the vue-query spies in 'beforeEach' (#12274) 2026-10-22 16:09:38 +09:00
Wonsuk Choi
b923947be4
chore(oxlint.config): enable 'no-debugging-utils', 'no-dom-import', 'no-manual-cleanup' and 'no-render-in-lifecycle' from 'eslint-plugin-testing-library' (#12273) 2026-10-22 15:01:40 +09:00
Wonsuk Choi
c8359dde02
test(preact-query-persist-client): test the real 'PersistQueryClientProvider' instead of a copy and import dependencies by package name (#12272) 2026-10-22 12:19:11 +09:00
Wonsuk Choi
8ab3ac9879
test(preact-query-persist-client): remove the manual 'cleanup' already done in 'test-setup' (#12271) 2026-10-22 11:39:48 +09:00
Wonsuk Choi
bb41f83caa
chore(oxlint.config): add 'eslint-plugin-testing-library' with its DOM rules and query present elements with 'getBy' (#12269)
* chore(oxlint.config): add 'eslint-plugin-testing-library' with its DOM rules and query present elements with 'getBy'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-22 11:37:21 +09:00
Wonsuk Choi
6aaecfd450
test(react-query/transition): remove the redundant 'act' around 'fireEvent.click' (#12270) 2026-10-22 11:37:03 +09:00
Wonsuk Choi
670fc2817f
chore(oxlint.config): add 'eslint-plugin-jest-dom' with its recommended rules and assert DOM presence with 'toBeInTheDocument' (#12268) 2026-10-22 10:56:42 +09:00
Wonsuk Choi
496c4ac54b
chore(oxlint.config): enable 'vitest/consistent-each-for' to keep parameterized tests on '.each' (#12267) 2026-10-22 10:12:43 +09:00
Wonsuk Choi
883d35eb2f
chore(oxlint.config): enable 'vitest/prefer-lowercase-title' for test titles (#12266) 2026-10-22 10:11:15 +09:00
Wonsuk Choi
f5fc7ac966
chore(oxlint.config): enable 'vitest/require-top-level-describe' and move top-level tests and hooks into a 'describe' (#12265) 2026-10-22 10:11:04 +09:00
Wonsuk Choi
53060948a9
test({preact,react,solid}-query/useMutationState): use a template literal for the 'mutationFn' result (#12264) 2026-10-22 10:08:38 +09:00
Wonsuk Choi
90b5acbe0d
chore(oxlint.config): enable 'vitest-js/padding-around-after-all-blocks' (#12263) 2026-10-22 09:57:09 +09:00
Wonsuk Choi
6aaa0cb120
chore(oxlint.config): enable 'vitest-js/padding-around-describe-blocks' and separate describe blocks with a blank line (#12262) 2026-10-22 09:56:46 +09:00
Wonsuk Choi
62592ae994
chore(oxlint.config): enable 'vitest-js/padding-around-after-each-blocks' and separate 'afterEach' with a blank line (#12261) 2026-10-22 09:54:55 +09:00
Wonsuk Choi
28a8540176
chore(oxlint.config): enable 'vitest-js/padding-around-before-each-blocks' and separate 'beforeEach' with a blank line (#12260) 2026-10-22 09:54:20 +09:00
Wonsuk Choi
4a6264e8a5
chore(oxlint.config): enable 'vitest-js/padding-around-before-all-blocks' and separate 'beforeAll' with a blank line (#12259) 2026-10-22 09:48:33 +09:00
Wonsuk Choi
7cafffdbbe
chore(oxlint.config): enable 'vitest-js/padding-around-test-blocks' and separate test blocks with a blank line (#12258) 2026-10-22 09:39:09 +09:00
Wonsuk Choi
914eef777b
chore(oxlint.config): enable 'vitest-js/no-conditional-in-test' outside type tests (#12256) 2026-10-22 00:16:57 +09:00
Wonsuk Choi
d8fbf7ee4d
chore(oxlint.config): enable 'vitest-js/prefer-vi-mocked' (#12255) 2026-10-21 21:50:41 +09:00
Wonsuk Choi
ce77be5e15
test(query-test-utils): rename '__test__' to '__tests__' to match the other packages (#12254) 2026-10-21 21:19:40 +09:00
Wonsuk Choi
06d2607881
chore(oxlint.config): enable 'vitest/consistent-test-filename' (#12253) 2026-10-21 21:19:28 +09:00
Wonsuk Choi
fc845b4010
test(lit-query): assert the exact observer count and pending state instead of falling back with '?? 0' and '||' (#12252)
* test(lit-query): assert the exact observer count and pending state instead of falling back with '?? 0' and '||'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-21 21:08:08 +09:00
Wonsuk Choi
07bdb6bbec
chore(oxlint.config): enable 'vitest/require-mock-type-parameters' and type the mock functions (#12251) 2026-10-21 21:00:25 +09:00
Wonsuk Choi
5c7b9dbbce
chore(oxlint.config): enable 'vitest/prefer-strict-equal' and assert with 'toStrictEqual' (#12250)
* chore(oxlint.config): enable 'vitest/prefer-strict-equal' and assert with 'toStrictEqual'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-21 20:06:34 +09:00
Wonsuk Choi
1616702eb0
chore(oxlint.config): enable 'vitest/require-hook' and move setup code into hooks or tests (#12249) 2026-10-21 19:47:42 +09:00
Wonsuk Choi
ada9a5eff5
chore(oxlint.config): enable 'vitest/prefer-mock-return-shorthand' and use 'mockReturnValue' or 'vi.fn(implementation)' (#12248) 2026-10-21 19:27:17 +09:00
Wonsuk Choi
5ba86a672f
chore(oxlint.config): enable 'vitest/prefer-to-be' and assert primitive values with 'toBe', 'toBeNull', 'toBeUndefined' and 'toBeDefined' (#12247) 2026-10-21 19:27:02 +09:00
Wonsuk Choi
4dc1af9828
chore(oxlint.config): enable 'vitest/prefer-to-have-length' and assert lengths with 'toHaveLength' (#12246) 2026-10-21 17:38:08 +09:00
Wonsuk Choi
cdb344b074
chore(oxlint.config): enable the vitest style rules that already pass without violations (#12245) 2026-10-21 17:02:20 +09:00
Wonsuk Choi
c1dc50c36c
chore(oxlint.config): enable 'vitest/prefer-import-in-mock' and type the module mocks against the real modules (#12243) 2026-10-21 16:26:26 +09:00
Wonsuk Choi
03b3f9029f
chore(oxlint.config): enable 'vitest/prefer-expect-resolves' and assert resolved values with 'resolves' (#12244) 2026-10-21 16:25:46 +09:00
Wonsuk Choi
5393cdc265
chore(oxlint.config): enable 'vitest/prefer-mock-promise-shorthand' and use 'mockResolvedValue' and 'mockRejectedValue' (#12242) 2026-10-21 15:20:32 +09:00
Wonsuk Choi
3afe752939
chore(oxlint.config): enable 'vitest/prefer-spy-on' and spy on 'query.fetch' instead of overwriting it (#12241) 2026-10-21 15:15:50 +09:00
Wonsuk Choi
9648f0e3d6
chore(oxlint.config): enable 'vitest/prefer-called-times' and replace 'toHaveBeenCalledOnce' with 'toHaveBeenCalledTimes(1)' (#12240) 2026-10-21 15:15:28 +09:00
Wonsuk Choi
52ebbb3c7c
chore(oxlint.config): enable 'vitest/no-alias-methods' and replace 'toBeCalledWith' with 'toHaveBeenCalledWith' (#12239) 2026-10-21 15:15:13 +09:00
Wonsuk Choi
22d9966fba
chore(oxlint.config): enable 'vitest/prefer-called-with' and assert the call arguments with 'toHaveBeenCalledWith' (#12237) 2026-10-21 14:52:07 +09:00
Wonsuk Choi
25ed6ae410
chore(oxlint.config): enable 'vitest/prefer-expect-type-of' and assert the 'staleTime' type with 'toBeTypeOf' (#12236) 2026-10-21 14:50:52 +09:00
Wonsuk Choi
c51b851953
chore(oxlint.config): enable 'vitest/prefer-to-contain' and assert array membership with 'toContain' (#12235) 2026-10-21 14:48:52 +09:00
Wonsuk Choi
af28a1b461
chore(oxlint.config): enable 'vitest/prefer-equality-matcher' and compare the value directly with 'toBe' (#12234) 2026-10-21 14:48:38 +09:00
Wonsuk Choi
b7b29030c9
test(query-test-utils/sleep): use fake timers to assert it resolves exactly after the given time (#12238) 2026-10-21 14:48:06 +09:00
Wonsuk Choi
7e7a1c915e
chore(oxlint.config): enable 'vitest/require-to-throw-message' and assert the expected error messages in 'toThrow' (#12233) 2026-10-21 14:25:59 +09:00
Wonsuk Choi
1667b24614
chore(oxlint.config): enable vitest rules that already pass without violations (#12232) 2026-10-21 14:24:38 +09:00
Wonsuk Choi
01703ec5d1
test({react,preact}-query/useMutationState): add a test for updating when only the mutation state changes (#12225) 2026-10-21 12:23:08 +09:00
Wonsuk Choi
6d6b4f68c2
test(query-core/mutationObserver): add a test for calling 'mutate' inside 'onError' with the mutate options snapshot (#12224) 2026-10-21 12:22:50 +09:00
Wonsuk Choi
494a8f06e5
test(query-core/infiniteQueryObserver): add a test for 'fetchOptimistic' using the supplied infinite options after the query is recreated (#12223)
* test(query-core/infiniteQueryObserver): add a test for 'fetchOptimistic' using the supplied infinite options after the query is recreated

* test(query-core/infiniteQueryObserver): return a distinct value from the recreated query function in the 'fetchOptimistic' test
2026-10-21 12:22:38 +09:00
Wonsuk Choi
b20e5bc699
test(vue-query/useMutation): add a type test for the exported 'MutationResult' (#12222) 2026-10-21 12:22:25 +09:00
Wonsuk Choi
c808778d1d
test(vue-query-devtools/client): assert the client passed to 'setClient' by identity instead of deep equality (#12221) 2026-10-21 12:22:13 +09:00
Wonsuk Choi
3626bfc753
test(query-devtools): add isolation tests for mutation cache subscriptions on client changes and the offline toggle with a supplied online manager (#12220) 2026-10-21 12:22:01 +09:00
Wonsuk Choi
804309c39c
test(query-core/mutation): add tests for the retry and scope pause conditions of the retryer (#12219) 2026-10-21 12:21:53 +09:00
Wonsuk Choi
d28d4d29bd
test({react,preact,solid,svelte,lit}-query,angular-query-experimental): assert the data tag directly in the 'skipToken'-only 'queryOptions' type test (#12218)
* test({react,preact,solid,lit}-query,angular-query-experimental): assert the data tag directly in the 'skipToken'-only 'queryOptions' type test

* test(svelte-query/queryOptions): assert the data tag directly in the 'skipToken'-only type test
2026-10-21 10:45:16 +09:00