RVF v6 rewrite #436
Annotations
8 errors and 1 warning
Unhandled error:
packages/core/src/dom/dom.ts#L73
TypeError: elements.toSorted is not a function
❯ sortByPosition packages/core/src/dom/dom.ts:73:19
❯ getElementToFocus packages/core/src/dom/dom.ts:84:18
❯ Module.focusOrReport packages/core/src/dom/dom.ts:105:26
❯ Object.focusFirstInvalidField packages/core/src/store.ts:623:9
❯ Object.onSubmit packages/core/src/store.ts:673:17
This error originated in "packages/core/src/store.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "should validate using the provided validator at the right time". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Unhandled error:
packages/react/src/base.tsx#L439
TypeError: elements.toSorted is not a function
❯ sortByPosition packages/core/dist/<define:import.meta>:334:19
❯ Module.focusFirst packages/core/dist/<define:import.meta>:370:26
❯ Object.focus packages/react/src/base.tsx:439:7
❯ onClick packages/react/src/test/focus.test.tsx:29:33
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:338:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:221:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:94:17
This error originated in "packages/react/src/test/focus.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "should be able to manually focus fields". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
packages/react/src/test/focus.test.tsx > should be able to manually focus fields:
packages/react/src/test/focus.test.tsx#L55
Error: expect(element).toHaveFocus()
Expected element with focus:
<input
data-testid="foo"
form=":r0:"
name="foo"
value=""
/>
Received element with focus:
<button
data-testid="focus-foo"
type="button"
/>
❯ packages/react/src/test/focus.test.tsx:55:37
|
packages/react/src/test/focus.test.tsx > should be automatically focus fields when there are submit validation errors:
packages/react/src/test/focus.test.tsx#L111
Error: expect(element).toHaveFocus()
Expected element with focus:
<input
data-testid="foo"
name="foo"
value="1234"
/>
Received element with focus:
<button
data-testid="submit"
type="submit"
/>
❯ packages/react/src/test/focus.test.tsx:111:37
|
packages/react/src/test/focus.test.tsx > should focus the selected radio if that is the first invalid field:
packages/react/src/test/focus.test.tsx#L181
Error: expect(element).toHaveFocus()
Expected element with focus:
<input
checked=""
data-testid="foo-2"
form=":r2:"
name="foo"
type="radio"
value="bye"
/>
Received element with focus:
<button
data-testid="submit"
type="submit"
/>
❯ packages/react/src/test/focus.test.tsx:181:39
|
packages/react/src/test/server-errors.test.tsx > should focus the first invalid field when server validation errors are provided:
packages/react/src/useRvf.tsx#L265
TypeError: elements.toSorted is not a function
❯ packages/react/src/useRvf.tsx:265:8
❯ commitHookEffectListMount node_modules/react-dom/cjs/react-dom.development.js:23189:26
❯ commitPassiveMountOnFiber node_modules/react-dom/cjs/react-dom.development.js:24970:11
❯ commitPassiveMountEffects_complete node_modules/react-dom/cjs/react-dom.development.js:24930:9
❯ commitPassiveMountEffects_begin node_modules/react-dom/cjs/react-dom.development.js:24917:7
|
packages/remix/src/test/submission.test.tsx > should call onSubmitFailure if the call returns a validation error:
packages/remix/src/test/submission.test.tsx#L512
TestingLibraryElementError: Unable to find an element with the text: validation error. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<h2>
Unexpected Application Error!
</h2>
<h3
style="font-style: italic;"
>
elements.toSorted is not a function
</h3>
<pre
style="padding: 0.5rem; background-color: rgba(200, 200, 200, 0.5);"
>
TypeError: elements.toSorted is not a function
at sortByPosition (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:944:19)
at getElementToFocus (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:955:18)
at focusOrReport (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:972:26)
at Object.focusFirstInvalidField (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:1436:7)
at Object.syncServerValidationErrors (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:1521:13)
at /home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:2492:37
at commitHookEffectListMount (/home/runner/work/remix-validated-form/remix-validated-form/node_modules/react-dom/cjs/react-dom.development.js:23189:26)
at commitPassiveMountOnFiber (/home/runner/work/remix-validated-form/remix-validated-form/node_modules/react-dom/cjs/react-dom.development.js:24970:11)
at commitPassiveMountEffects_complete (/home/runner/work/remix-validated-form/remix-validated-form/node_modules/react-dom/cjs/react-dom.development.js:24930:9)
at commitPassiveMountEffects_begin (/home/runner/work/remix-validated-form/remix-validated-form/node_modules/react-dom/cjs/react-dom.development.js:24917:7)
</pre>
<p>
💿 Hey developer 👋
</p>
<p>
You can provide a way better UX than this when your app throws errors by providing your own
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
ErrorBoundary
</code>
or
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
errorElement
</code>
prop on your route.
</p>
</div>
</body>
Ignored nodes: comments, script, style
<body>
<div>
<h2>
Unexpected Application Error!
</h2>
<h3
style="font-style: italic;"
>
elements.toSorted is not a function
</h3>
<pre
style="padding: 0.5rem; background-color: rgba(200, 200, 200, 0.5);"
>
TypeError: elements.toSorted is not a function
at sortByPosition (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:944:19)
at getElementToFocus (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:955:18)
at focusOrReport (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:972:26)
at Object.focusFirstInvalidField (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:1436:7)
at Object.syncServerValidationErrors (/home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:1521:13)
at /home/runner/work/remix-validated-form/remix-validated-form/packages/react/src/index.ts:2492:37
at commitHookEffectListMount (/home/runner/work/remix-validated-form/remix-validated-form/node_modules/react-dom/cjs/react-dom.development.js:23189:26)
at commitPassiveMountOnFiber (/home/runner/work/remix-validated-form/remix-validated-form/node_modules/react-dom/cjs/react-dom.development.js:24970:11)
at commitPassiveMountEffects_complete (/home/runner/work/remix-validated-form/remix-validated-form/node_modules/react-dom/cjs/react-dom.development.js:24930:9)
at commitPassiveMountEffects_begin (/home/runner/wor
|
build
Process completed with exit code 1.
|
build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|