Skip to content

Trim html string for newlines #2163

Trim html string for newlines

Trim html string for newlines #2163

Triggered via pull request May 27, 2024 11:21
Status Failure
Total duration 3m 12s
Artifacts

jest-coverage-report.yaml

on: pull_request
test-coverage
3m 3s
test-coverage
Fit to window
Zoom out
Zoom in

Annotations

3 errors
src/translations/utils.test.ts > testGetTextsAndTranslationsForForm > Test form with translations: packages/bygger/src/translations/utils.test.ts#L451
AssertionError: expected [ { type: 'tekst', …(2) }, …(4) ] to deeply equal [ { order: '001', …(2) }, …(4) ] - Expected + Received Array [ Object { "order": "001", "text": "test", "type": "tekst", }, Object { "order": "002", "text": "Introduksjon", "type": "tekst", }, Object { "en": "Yes (Global Tekst)", "order": "003", "text": "Ja", "type": "tekst", }, Object { "nn-NO": "Eg", "order": "004", "text": "Jeg", "type": "tekst", }, Object { - "en": "Test Line break linux windows apple ", + "en": "Test Line break linuxwindowsapple", "order": "005-001", - "text": "Test linjeskift linux windows apple ", + "text": "Test linjeskift linuxwindowsapple", "type": "html", }, ] ❯ src/translations/utils.test.ts:451:20
src/translations/utils.test.ts > Skjema med globale oversettelser som inneholder linjeskift > fjerner linjeskift i tekster som skal eksporteres: packages/bygger/src/translations/utils.test.ts#L512
AssertionError: expected [ 'NAV sender svar.', '<br>', 'Se ' ] to deeply equal [ 'NAV sender svar. ', '<br>', ' Se ' ] - Expected + Received Array [ - "NAV sender svar. ", + "NAV sender svar.", "<br>", - " Se ", + "Se ", ] ❯ src/translations/utils.test.ts:512:65
test-coverage
Process completed with exit code 1.