Move legacy v3 support to own controllers #19683
Annotations
10 errors
Running Unit Tests:
[31mError: Error: connect ECONNREFUSED :#L1
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at flushUnexpectedConsoleCalls (../node_modules/jest-fail-on-console/index.js:34:13)
at Object.<anonymous> (../node_modules/jest-fail-on-console/index.js:110:7)
|
Running Unit Tests:
undefined#L1
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at flushUnexpectedConsoleCalls (../node_modules/jest-fail-on-console/index.js:34:13)
at Object.<anonymous> (../node_modules/jest-fail-on-console/index.js:110:7)
|
Running Unit Tests:
undefined#L1
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at flushUnexpectedConsoleCalls (../node_modules/jest-fail-on-console/index.js:34:13)
at Object.<anonymous> (../node_modules/jest-fail-on-console/index.js:110:7)
|
Running Unit Tests:
[31mError: Error: connect ECONNREFUSED :#L1
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at flushUnexpectedConsoleCalls (../node_modules/jest-fail-on-console/index.js:34:13)
at Object.<anonymous> (../node_modules/jest-fail-on-console/index.js:110:7)
|
Running Unit Tests:
frontend/packages/ux-editor/src/components/Preview/Preview.test.tsx#L16
TestingLibraryElementError: Unable to find an element with the title: [mockedText(ux_editor.preview)].
Ignored nodes: comments, script, style
<body>
<div>
<div
class="Toastify"
/>
<div
class="root"
>
<button
class="fds-btn fds-focus fds-btn--sm fds-btn--tertiary fds-btn--first fds-btn--icon-only closePreviewButton studioButton smallWithIconOnly"
title="[mockedText(ux_editor.close_preview)]"
type="button"
>
<span
class="innerContainer"
>
<span
aria-hidden="true"
class="iconWrapper"
>
<svg
aria-labelledby="title-r0"
fill="none"
focusable="false"
font-size="1.5rem"
height="1em"
role="img"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<title
id="title-r0"
>
1
</title>
<path
clip-rule="evenodd"
d="M13.5 3.75a.75.75 0 0 1 .75.75v4.19l4.72-4.72a.75.75 0 1 1 1.06 1.06l-4.72 4.72h4.19a.75.75 0 0 1 0 1.5h-6a.75.75 0 0 1-.75-.75v-6a.75.75 0 0 1 .75-.75M3.75 13.5a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-4.19l-4.72 4.72a.75.75 0 0 1-1.06-1.06l4.72-4.72H4.5a.75.75 0 0 1-.75-.75"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
</span>
</button>
<div
class="root"
>
<div
class="spinnerWrapper"
>
<svg
class="fds-spinner fds-spinner--interaction"
data-testid="studio-spinner-test-id"
style="width: 40px; height: 40px;"
viewBox="0 0 50 50"
>
<title>
[mockedText(preview.loading_preview_controller)]
</title>
<circle
class="fds-spinner__background"
cx="25"
cy="25"
fill="none"
r="20"
stroke-width="5"
/>
<circle
class="fds-spinner__circle"
cx="25"
cy="25"
fill="none"
r="20"
stroke-width="5"
/>
</svg>
</div>
</div>
</div>
</div>
</body>
at Object.getElementError (../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByTitle (packages/ux-editor/src/components/Preview/Preview.test.tsx:16:19)
|
Running Unit Tests:
frontend/packages/ux-editor/src/components/Preview/Preview.test.tsx#L25
TestingLibraryElementError: Unable to find an accessible element with the role "checkbox" and name "[mockedText(ux_editor.mobilePreview)]"
Here are the accessible roles:
button:
Name "[mockedText(ux_editor.close_preview)]":
<button
class="fds-btn fds-focus fds-btn--sm fds-btn--tertiary fds-btn--first fds-btn--icon-only closePreviewButton studioButton smallWithIconOnly"
title="[mockedText(ux_editor.close_preview)]"
type="button"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<div
class="Toastify"
/>
<div
class="root"
>
<button
class="fds-btn fds-focus fds-btn--sm fds-btn--tertiary fds-btn--first fds-btn--icon-only closePreviewButton studioButton smallWithIconOnly"
title="[mockedText(ux_editor.close_preview)]"
type="button"
>
<span
class="innerContainer"
>
<span
aria-hidden="true"
class="iconWrapper"
>
<svg
aria-labelledby="title-r2"
fill="none"
focusable="false"
font-size="1.5rem"
height="1em"
role="img"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<title
id="title-r2"
>
1
</title>
<path
clip-rule="evenodd"
d="M13.5 3.75a.75.75 0 0 1 .75.75v4.19l4.72-4.72a.75.75 0 1 1 1.06 1.06l-4.72 4.72h4.19a.75.75 0 0 1 0 1.5h-6a.75.75 0 0 1-.75-.75v-6a.75.75 0 0 1 .75-.75M3.75 13.5a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-4.19l-4.72 4.72a.75.75 0 0 1-1.06-1.06l4.72-4.72H4.5a.75.75 0 0 1-.75-.75"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
</span>
</button>
<div
class="root"
>
<div
class="spinnerWrapper"
>
<svg
class="fds-spinner fds-spinner--interaction"
data-testid="studio-spinner-test-id"
style="width: 40px; height: 40px;"
viewBox="0 0 50 50"
>
<title>
[mockedText(preview.loading_preview_controller)]
</title>
<circle
class="fds-spinner__background"
cx="25"
cy="25"
fill="none"
r="20"
stroke-width="5"
/>
<circle
class="fds-spinner__circle"
cx="25"
cy="25"
fill="none"
r="20"
stroke-width="5"
/>
</svg>
</div>
</div>
</div>
</div>
</body>
at Object.getElementError (../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByRole (packages/ux-editor/src/components/Preview/Preview.test.tsx:25:33)
|
Running Unit Tests:
frontend/packages/ux-editor/src/components/Preview/Preview.test.tsx#L47
TestingLibraryElementError: Unable to find an element with the text: [mockedText(preview.limitations_info)]. 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>
<div
class="Toastify"
/>
<div
class="root"
>
<button
class="fds-btn fds-focus fds-btn--sm fds-btn--tertiary fds-btn--first fds-btn--icon-only closePreviewButton studioButton smallWithIconOnly"
title="[mockedText(ux_editor.close_preview)]"
type="button"
>
<span
class="innerContainer"
>
<span
aria-hidden="true"
class="iconWrapper"
>
<svg
aria-labelledby="title-r5"
fill="none"
focusable="false"
font-size="1.5rem"
height="1em"
role="img"
viewBox="0 0 24 24"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<title
id="title-r5"
>
1
</title>
<path
clip-rule="evenodd"
d="M13.5 3.75a.75.75 0 0 1 .75.75v4.19l4.72-4.72a.75.75 0 1 1 1.06 1.06l-4.72 4.72h4.19a.75.75 0 0 1 0 1.5h-6a.75.75 0 0 1-.75-.75v-6a.75.75 0 0 1 .75-.75M3.75 13.5a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-4.19l-4.72 4.72a.75.75 0 0 1-1.06-1.06l4.72-4.72H4.5a.75.75 0 0 1-.75-.75"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
</span>
</button>
<div
class="root"
>
<div
class="spinnerWrapper"
>
<svg
class="fds-spinner fds-spinner--interaction"
data-testid="studio-spinner-test-id"
style="width: 40px; height: 40px;"
viewBox="0 0 50 50"
>
<title>
[mockedText(preview.loading_preview_controller)]
</title>
<circle
class="fds-spinner__background"
cx="25"
cy="25"
fill="none"
r="20"
stroke-width="5"
/>
<circle
class="fds-spinner__circle"
cx="25"
cy="25"
fill="none"
r="20"
stroke-width="5"
/>
</svg>
</div>
</div>
</div>
</div>
</body>
at Object.getElementError (../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (packages/ux-editor/src/components/Preview/Preview.test.tsx:47:44)
|
Running Unit Tests:
[31mError: Error: connect ECONNREFUSED :#L1
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
|
Running Unit Tests:
frontend/packages/ux-editor/src/components/Preview/Preview.test.tsx#L84
expect(received).toBe(expected) // Object.is equality
Expected: "http://localhost/app-specific-preview/testOrg/testApp?selectedLayoutSet=test-layout-set#/instance/51001/f1e23d45-6789-1bcd-8c34-56789abcdef0/Task_1/Side1"
Received: undefined
at Object.toBe (packages/ux-editor/src/components/Preview/Preview.test.tsx:84:59)
|
Running Unit Tests:
undefined#L1
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Error: connect ECONNREFUSED ::1:80
at Object.dispatchError (../node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:63:19)
at Request.<anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at ClientRequest.<anonymous> (../node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at processTicksAndRejections (../node:internal/process/task_queues:82:21) {
type: 'XMLHttpRequest'
}
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at VirtualConsole.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-environment-jsdom/build/index.js:63:23)
at VirtualConsole.emit (node:events:517:28)
at Object.dispatchError (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js:66:53)
at Request.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:655:18)
at Request.emit (node:events:529:35)
at ClientRequest.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js:121:14)
at ClientRequest.emit (node:events:517:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at flushUnexpectedConsoleCalls (../node_modules/jest-fail-on-console/index.js:34:13)
at Object.<anonymous> (../node_modules/jest-fail-on-console/index.js:110:7)
|
Loading