Skip to content

feat: changes UseAsynTask to return tuple #29

feat: changes UseAsynTask to return tuple

feat: changes UseAsynTask to return tuple #29

Triggered via push July 3, 2025 17:02
Status Failure
Total duration 57s
Artifacts

cd.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

9 errors
Verify / Test
Process completed with exit code 1.
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > And the hook is executed again > When the task fails > Then it should return the state in line with type of `AsyncTaskFailed`: packages/react/src/helpers/tasks.test.ts#L179
TypeError: result.current.execute is not a function ❯ packages/react/src/helpers/tasks.test.ts:179:32 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:48:24 ❯ process.env.NODE_ENV.exports.act node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:789:22 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ packages/react/src/helpers/tasks.test.ts:178:15
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > And the hook is executed again > When the task succeeds > Then it should return the state in line with type of `AsyncTaskSuccess` with updated data: packages/react/src/helpers/tasks.test.ts#L149
TypeError: result.current.execute is not a function ❯ packages/react/src/helpers/tasks.test.ts:149:32 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:48:24 ❯ process.env.NODE_ENV.exports.act node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:789:22 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ packages/react/src/helpers/tasks.test.ts:148:15
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > And the hook is executed again > When the task is in progress > Then it should return the state in line with type of `AsyncTaskLoading`: packages/react/src/helpers/tasks.test.ts#L122
TypeError: result.current.execute is not a function ❯ packages/react/src/helpers/tasks.test.ts:122:32 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:48:24 ❯ process.env.NODE_ENV.exports.act node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:789:22 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ packages/react/src/helpers/tasks.test.ts:121:15
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > And the hook is executed for the first time > When the task fails > Then it should return the state in line with type of `AsyncTaskFailed`: packages/react/src/helpers/tasks.test.ts#L99
TypeError: result.current.execute is not a function ❯ packages/react/src/helpers/tasks.test.ts:99:32 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:48:24 ❯ process.env.NODE_ENV.exports.act node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:789:22 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ packages/react/src/helpers/tasks.test.ts:98:15
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > And the hook is executed for the first time > When the tasks succeeds > Then it should support void as success data: packages/react/src/helpers/tasks.test.ts#L78
TypeError: result.current.execute is not a function ❯ packages/react/src/helpers/tasks.test.ts:78:32 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:48:24 ❯ process.env.NODE_ENV.exports.act node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:789:22 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ packages/react/src/helpers/tasks.test.ts:77:15
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > And the hook is executed for the first time > When the tasks succeeds > Then it should return the state in line with type of `AsyncTaskSuccess`: packages/react/src/helpers/tasks.test.ts#L59
TypeError: result.current.execute is not a function ❯ packages/react/src/helpers/tasks.test.ts:59:32 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:48:24 ❯ process.env.NODE_ENV.exports.act node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:789:22 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ packages/react/src/helpers/tasks.test.ts:58:15
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > And the hook is executed for the first time > When the task is in progress > Then it should return the state in line with type of `AsyncTaskLoading`: packages/react/src/helpers/tasks.test.ts#L38
TypeError: result.current.execute is not a function ❯ packages/react/src/helpers/tasks.test.ts:38:31 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:48:24 ❯ process.env.NODE_ENV.exports.act node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:789:22 ❯ node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected][email protected]._qn67khqhfabd7toracvqel7ny4/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ packages/react/src/helpers/tasks.test.ts:37:9
packages/react/src/helpers/tasks.test.ts > Given the 'useAsyncTask' hook > When rendered for the first time > Then it should return state in line with type of `AsyncTaskIdle`: packages/react/src/helpers/tasks.test.ts#L26
AssertionError: expected [ [Function], { called: false, …(3) } ] to match object { called: false, loading: false, …(2) } - Expected: { "called": false, "data": undefined, "error": undefined, "loading": false, } + Received: [ [Function anonymous], { "called": false, "data": undefined, "error": undefined, "loading": false, }, ] ❯ packages/react/src/helpers/tasks.test.ts:26:30