Skip to content

feat: support strapi v5 #523

feat: support strapi v5

feat: support strapi v5 #523

GitHub Actions / unittest report (node=20) succeeded Dec 12, 2024 in 0s

839 passed, 0 failed and 28 skipped

Tests passed successfully

✅ reports/jest-junit.xml

867 tests were completed in 17s with 839 passed, 0 failed and 28 skipped.

Test suite Passed Failed Skipped Time
plugin/server/src/config/tests/config.test.ts 8✅ 226ms
plugin/server/src/controllers/tests/translate-controller.test.ts 5✅ 242ms
plugin/server/src/services/tests/chunks-service.test.ts 6✅ 3s
plugin/server/src/services/tests/format-service.test.ts 5✅ 232ms
plugin/server/src/services/tests/translate-service.test.ts 3✅ 252ms
plugin/server/src/utils/tests/clean-data.test.ts 11✅ 298ms
plugin/server/src/utils/tests/delete-fields.test.ts 14✅ 284ms
plugin/server/src/utils/tests/populate-all.test.ts 12✅ 286ms
plugin/server/src/utils/tests/translatable-fields.test.ts 15✅ 1s
plugin/server/src/utils/tests/translate-relations.test.ts 86✅ 26⚪ 1s
plugin/server/src/utils/tests/update-uids.test.ts 2✅ 171ms
providers/deepl/src/lib/tests/deepl.test.ts 32✅ 2⚪ 16s
providers/deepl/src/lib/tests/parse-locale.test.ts 607✅ 683ms
providers/libretranslate/src/lib/tests/client.test.ts 20✅ 3s
providers/libretranslate/src/lib/tests/libretranslate.test.ts 13✅ 10s

✅ plugin/server/src/config/tests/config.test.ts

config
  ✅ default provider is dummy
  ✅ setting translate relations to false
  ✅ changing translated field types
  ✅ fails with translated field types not array
  ✅ fails with translateRelations not a boolean
  ✅ fails with providerOptions not object or undefined
  ✅ fails with translated fields not being in correct schema
  ✅ fails with translated fields of unhandled field type

✅ plugin/server/src/controllers/tests/translate-controller.test.ts

translate controller
  ✅ should call translate service
  ✅ bad request if source locale is missing
  ✅ bad request if target locale is missing
  ✅ not found if content type does not exist
  ✅ id has to be a number or string

✅ plugin/server/src/services/tests/chunks-service.test.ts

chunks
  ✅ no properties leaves text array unchanged
  ✅ chunks are not longer than maxLength
  ✅ chunks are not bigger than byte size
  ✅ reduce function creates original array
  ✅ reduce function creates original array when fields are bigger than byteSize
  ✅ chunks are neither longer than maxLength nor bigger than maxByteSize

✅ plugin/server/src/services/tests/format-service.test.ts

format
  ✅ markdown to html
  ✅ markdown to html in list
  ✅ html to markdown in list
  ✅ html to markdown and back
  ✅ markdown to html and back

✅ plugin/server/src/services/tests/translate-service.test.ts

provider service › translate
  ✅ single field
  ✅ no fields
  ✅ multiple and nested fields

✅ plugin/server/src/utils/tests/clean-data.test.ts

clean data
  ✅ simple content type other field removed
  ✅ content type relation transformed to id
  ✅ content type relation null kept
  ✅ content type multiple relation transformed to id
  ✅ component other field removed
  ✅ component null returned
  ✅ nested component other field removed
  ✅ content type with component other field removed
  ✅ content type with repeatable component other fields removed
  ✅ content type with component null kept
  ✅ content type with dynamic zone __component kept and other fields removed

✅ plugin/server/src/utils/tests/delete-fields.test.ts

delete fields › single delete fields
  ✅ translated field ignored
  ✅ copied field ignored
  ✅ deleted field is deleted
  ✅ other field ignored
  ✅ deleted component field is deleted
  ✅ component with translated field ignored
  ✅ component with copied field ignored
  ✅ component with deleted field has field deleted
  ✅ repeated component field with deleted field has fields deleted
  ✅ nested component with deleted fields has fields deleted
  ✅ dynamic zone field with deleted fields has fields deleted
delete fields › filter all deleted fields
  ✅ simple content type translated ignored
  ✅ complex content type translated ignored
  ✅ complex content type with deleted fields has fields deleted

✅ plugin/server/src/utils/tests/populate-all.test.ts

populate all
  ✅ simple content type returns just undefined
  ✅ simple content type localized returns undefined
  ✅ content type with relation populate only id
  ✅ content type with multiple relations populate only id
  ✅ content type with component populate all
  ✅ content type with repeatable component populate all
  ✅ content type with dynamic zone populate all
  ✅ content type with dynamic zone with component relation populate id
  ✅ nested component has max depth
  ✅ media is fully populated if requested
  ✅ media is not fully populated by default
  ✅ relations are fully populated if requested

✅ plugin/server/src/utils/tests/translatable-fields.test.ts

translatable fields › get translate fields
  ✅ text field translated
  ✅ text field without configuration translated
  ✅ text field copy not translated
  ✅ text field delete not translated
  ✅ other field not translated
  ✅ component field translated nested
  ✅ component field without configuration translated nested
  ✅ component field with field without configuration translated nested
  ✅ component with copy field not translated
  ✅ component with delete field not translated
  ✅ repeated component field translated
  ✅ nested component field translated
  ✅ dynamic zone field translated
translatable fields › get all translatable fields
  ✅ simple content type translated
  ✅ complex content type translated

✅ plugin/server/src/utils/tests/translate-relations.test.ts

relation › one to one, relation localized: true, both ways: true
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › one to one, relation localized: false, both ways: true
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › one to one, relation localized: true, both ways: false
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › one to one, relation localized: false, both ways: false
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › one to many, relation localized: true, both ways: true
  ✅ is translated
  ✅ remove if a relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › one to many, relation localized: false, both ways: true
  ✅ is translated
  ✅ remove if a relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › one to many, relation localized: true, both ways: false
  ✅ is translated
  ✅ remove if a relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › one to many, relation localized: false, both ways: false
  ✅ is translated
  ✅ remove if a relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › many to one, relation localized: true, both ways: true
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › many to one, relation localized: false, both ways: true
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › many to one, relation localized: true, both ways: false
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › many to one, relation localized: false, both ways: false
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › many to many, relation localized: true
  ✅ is translated
  ✅ remove if a relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › many to many, relation localized: false
  ✅ is translated
  ✅ remove if a relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to one, relation localized: true
  ✅ null component ignored
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to one, relation localized: true › repeatable
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to one, relation localized: false
  ✅ null component ignored
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to one, relation localized: false › repeatable
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to many, relation localized: true
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to many, relation localized: true › repeatable
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to many, relation localized: false
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › components › one to many, relation localized: false › repeatable
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › dynamiczone › one to one, relation localized: true
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › dynamiczone › one to one, relation localized: false
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › dynamiczone › one to many, relation localized: true
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › dynamiczone › one to many, relation localized: false
  ✅ is translated
  ✅ remove if relation translation is missing
  ✅ missing relation not translated
  ⚪ wrong locale of relation is not translated
relation › config do not translate relations
  ✅ is not translated
relation › plugin options › copy oneToOne with relation both ways = true and localized = true
  ✅ copied only if relation is not localized and does not go both ways
relation › plugin options › copy oneToOne with relation both ways = true and localized = false
  ✅ copied only if relation is not localized and does not go both ways
relation › plugin options › copy oneToOne with relation both ways = false and localized = true
  ✅ copied only if relation is not localized and does not go both ways
relation › plugin options › copy oneToOne with relation both ways = false and localized = false
  ✅ copied only if relation is not localized and does not go both ways
relation › plugin options › default behavior is translate
  ✅ is translated

✅ plugin/server/src/utils/tests/update-uids.test.ts

update uids
  ✅ simple content type without uid not changed
  ✅ simple content type with uid not changed

✅ providers/deepl/src/lib/tests/deepl.test.ts

deepl provider › usage › for free api true, with key valid true › succeeds
  ✅ with valid key
deepl provider › usage › for free api true, with key valid false › fails
  ✅ with invalid key
deepl provider › usage › for free api false, with key valid true › succeeds
  ✅ with valid key
deepl provider › usage › for free api false, with key valid false › fails
  ✅ with invalid key
deepl provider › translate › for free api true, with key valid true › succeeds
  ✅ with single text
  ✅ with multiple texts
  ✅ with missing text
  ✅ with markdown texts
  ✅ with more than 50 texts
  ✅ with all fields together more than request size limit
  ✅ with a field larger than request size limit
  ⚪ with fields larger than request size limit count of new lines preserved
  ✅ with some fields larger than request size limit
deepl provider › translate › for free api true, with key valid true › fails
  ✅ with missing target language
deepl provider › translate › for free api true, with key valid false › fails
  ✅ with invalid key
  ✅ with missing target language
deepl provider › translate › for free api false, with key valid true › succeeds
  ✅ with single text
  ✅ with multiple texts
  ✅ with missing text
  ✅ with markdown texts
  ✅ with more than 50 texts
  ✅ with all fields together more than request size limit
  ✅ with a field larger than request size limit
  ⚪ with fields larger than request size limit count of new lines preserved
  ✅ with some fields larger than request size limit
deepl provider › translate › for free api false, with key valid true › fails
  ✅ with missing target language
deepl provider › translate › for free api false, with key valid false › fails
  ✅ with invalid key
  ✅ with missing target language
deepl provider › setup › provider options
  ✅ key used
  ✅ URL used
deepl provider › setup › provider options › api options used
  ✅ uses formality when provided
  ✅ does not use tagHandling even if provided
deepl provider › setup › environment variables
  ✅ env var key used
  ✅ env var URL used

✅ providers/deepl/src/lib/tests/parse-locale.test.ts

locale parser › succeeds
  ✅ for supported locale aig
  ✅ for supported locale bah
  ✅ for supported locale bg
  ✅ for supported locale bg-BG
  ✅ for supported locale zh
  ✅ for supported locale zh-Hans
  ✅ for supported locale zh-CN
  ✅ for supported locale zh-Hans-CN
  ✅ for supported locale zh-Hans-HK
  ✅ for supported locale zh-Hans-MO
  ✅ for supported locale zh-Hans-SG
  ✅ for supported locale zh-Hant
  ✅ for supported locale zh-Hant-HK
  ✅ for supported locale zh-Hant-MO
  ✅ for supported locale zh-Hant-TW
  ✅ for supported locale cs
  ✅ for supported locale cs-CZ
  ✅ for supported locale da
  ✅ for supported locale da-DK
  ✅ for supported locale nl
  ✅ for supported locale nl-AW
  ✅ for supported locale nl-BE
  ✅ for supported locale nl-CW
  ✅ for supported locale nl-NL
  ✅ for supported locale nl-SX
  ✅ for supported locale en
  ✅ for supported locale en-AI
  ✅ for supported locale en-AS
  ✅ for supported locale en-AU
  ✅ for supported locale en-AT
  ✅ for supported locale en-BB
  ✅ for supported locale en-BE
  ✅ for supported locale en-BZ
  ✅ for supported locale en-BM
  ✅ for supported locale en-BW
  ✅ for supported locale en-IO
  ✅ for supported locale en-BI
  ✅ for supported locale en-CM
  ✅ for supported locale en-CA
  ✅ for supported locale en-KY
  ✅ for supported locale en-CX
  ✅ for supported locale en-CC
  ✅ for supported locale en-CK
  ✅ for supported locale en-CY
  ✅ for supported locale en-DK
  ✅ for supported locale en-DG
  ✅ for supported locale en-DM
  ✅ for supported locale en-EG
  ✅ for supported locale en-ER
  ✅ for supported locale en-EU
  ✅ for supported locale en-FK
  ✅ for supported locale en-FJ
  ✅ for supported locale en-FI
  ✅ for supported locale en-GM
  ✅ for supported locale en-DE
  ✅ for supported locale en-GH
  ✅ for supported locale en-GI
  ✅ for supported locale en-GD
  ✅ for supported locale en-GU
  ✅ for supported locale en-GG
  ✅ for supported locale en-GY
  ✅ for supported locale en-HK
  ✅ for supported locale en-IN
  ✅ for supported locale en-IE
  ✅ for supported locale en-IM
  ✅ for supported locale en-IL
  ✅ for supported locale en-JM
  ✅ for supported locale en-JE
  ✅ for supported locale en-KE
  ✅ for supported locale en-KI
  ✅ for supported locale en-KW
  ✅ for supported locale en-LS
  ✅ for supported locale en-MO
  ✅ for supported locale en-MG
  ✅ for supported locale en-MW
  ✅ for supported locale en-MY
  ✅ for supported locale en-MT
  ✅ for supported locale en-MH
  ✅ for supported locale en-MU
  ✅ for supported locale en-FM
  ✅ for supported locale en-MS
  ✅ for supported locale en-NA
  ✅ for supported locale en-NR
  ✅ for supported locale en-NL
  ✅ for supported locale en-NZ
  ✅ for supported locale en-NG
  ✅ for supported locale en-NU
  ✅ for supported locale en-NF
  ✅ for supported locale en-MP
  ✅ for supported locale en-NO
  ✅ for supported locale en-PA
  ✅ for supported locale en-PK
  ✅ for supported locale en-PW
  ✅ for supported locale en-PG
  ✅ for supported locale en-PH
  ✅ for supported locale en-PN
  ✅ for supported locale en-PR
  ✅ for supported locale en-RW
  ✅ for supported locale en-WS
  ✅ for supported locale en-SA
  ✅ for supported locale en-SC
  ✅ for supported locale en-SL
  ✅ for supported locale en-SG
  ✅ for supported locale en-SX
  ✅ for supported locale en-SI
  ✅ for supported locale en-SB
  ✅ for supported locale en-SS
  ✅ for supported locale en-SH
  ✅ for supported locale en-KN
  ✅ for supported locale en-LC
  ✅ for supported locale svc
  ✅ for supported locale vic
  ✅ for supported locale en-SD
  ✅ for supported locale en-SZ
  ✅ for supported locale en-SE
  ✅ for supported locale en-CH
  ✅ for supported locale en-TZ
  ✅ for supported locale en-TK
  ✅ for supported locale en-TO
  ✅ for supported locale en-TT
  ✅ for supported locale en-TV
  ✅ for supported locale en-ZA
  ✅ for supported locale en-AE
  ✅ for supported locale en-UM
  ✅ for supported locale en-VI
  ✅ for supported locale en-US-POSIX
  ✅ for supported locale en-UG
  ✅ for supported locale en-GB
  ✅ for supported locale en-US
  ✅ for supported locale en-VU
  ✅ for supported locale en-ZM
  ✅ for supported locale en-ZW
  ✅ for supported locale et
  ✅ for supported locale et-EE
  ✅ for supported locale fi
  ✅ for supported locale fi-FI
  ✅ for supported locale fr
  ✅ for supported locale fr-BE
  ✅ for supported locale fr-BJ
  ✅ for supported locale fr-BF
  ✅ for supported locale fr-BI
  ✅ for supported locale fr-CM
  ✅ for supported locale fr-CA
  ✅ for supported locale fr-CF
  ✅ for supported locale fr-TD
  ✅ for supported locale fr-KM
  ✅ for supported locale fr-CG
  ✅ for supported locale fr-CD
  ✅ for supported locale fr-CI
  ✅ for supported locale fr-DJ
  ✅ for supported locale fr-GQ
  ✅ for supported locale fr-FR
  ✅ for supported locale fr-GF
  ✅ for supported locale fr-GA
  ✅ for supported locale fr-GP
  ✅ for supported locale fr-GN
  ✅ for supported locale fr-LU
  ✅ for supported locale fr-MG
  ✅ for supported locale fr-ML
  ✅ for supported locale fr-MQ
  ✅ for supported locale fr-YT
  ✅ for supported locale fr-MC
  ✅ for supported locale fr-NE
  ✅ for supported locale fr-RW
  ✅ for supported locale fr-RE
  ✅ for supported locale fr-BL
  ✅ for supported locale fr-MF
  ✅ for supported locale fr-MU
  ✅ for supported locale fr-SN
  ✅ for supported locale fr-CH
  ✅ for supported locale fr-TG
  ✅ for supported locale de
  ✅ for supported locale de-AT
  ✅ for supported locale de-BE
  ✅ for supported locale de-DE
  ✅ for supported locale de-LI
  ✅ for supported locale de-LU
  ✅ for supported locale de-CH
  ✅ for supported locale el
  ✅ for supported locale el-CY
  ✅ for supported locale el-GR
  ✅ for supported locale hu
  ✅ for supported locale hu-HU
  ✅ for supported locale id
  ✅ for supported locale id-ID
  ✅ for supported locale it
  ✅ for supported locale it-IT
  ✅ for supported locale it-CH
  ✅ for supported locale ja
  ✅ for supported locale ja-JP
  ✅ for supported locale ko
  ✅ for supported locale ko-KR
  ✅ for supported locale lv
  ✅ for supported locale lv-LV
  ✅ for supported locale lir
  ✅ for supported locale lt
  ✅ for supported locale lt-LT
  ✅ for supported locale nb
  ✅ for supported locale nb-NO
  ✅ for supported locale pl
  ✅ for supported locale pl-PL
  ✅ for supported locale pt
  ✅ for supported locale pt-AO
  ✅ for supported locale pt-BR
  ✅ for supported locale pt-GW
  ✅ for supported locale pt-MZ
  ✅ for supported locale pt-PT
  ✅ for supported locale pt-ST
  ✅ for supported locale ro
  ✅ for supported locale ro-MD
  ✅ for supported locale ro-RO
  ✅ for supported locale ru
  ✅ for supported locale ru-MD
  ✅ for supported locale ru-RU
  ✅ for supported locale ru-UA
  ✅ for supported locale sk
  ✅ for supported locale sk-SK
  ✅ for supported locale sl
  ✅ for supported locale sl-SI
  ✅ for supported locale es
  ✅ for supported locale es-AR
  ✅ for supported locale es-BO
  ✅ for supported locale es-CL
  ✅ for supported locale es-CO
  ✅ for supported locale es-CR
  ✅ for supported locale es-DO
  ✅ for supported locale es-EC
  ✅ for supported locale es-SV
  ✅ for supported locale es-GQ
  ✅ for supported locale es-GT
  ✅ for supported locale es-HN
  ✅ for supported locale es-419
  ✅ for supported locale es-MX
  ✅ for supported locale es-NI
  ✅ for supported locale es-PA
  ✅ for supported locale es-PY
  ✅ for supported locale es-PE
  ✅ for supported locale es-PR
  ✅ for supported locale es-ES
  ✅ for supported locale es-US
  ✅ for supported locale es-UY
  ✅ for supported locale es-VE
  ✅ for supported locale sv
  ✅ for supported locale sv-FI
  ✅ for supported locale sv-SE
  ✅ for supported locale tr
  ✅ for supported locale tr-TR
  ✅ for supported locale tch
  ✅ for supported locale uk
  ✅ for supported locale uk-UA
locale parser › fails
  ✅ for unsupported locale af
  ✅ for unsupported locale af-NA
  ✅ for unsupported locale af-ZA
  ✅ for unsupported locale agq
  ✅ for unsupported locale agq-CM
  ✅ for unsupported locale ak
  ✅ for unsupported locale ak-GH
  ✅ for unsupported locale sq
  ✅ for unsupported locale sq-AL
  ✅ for unsupported locale am
  ✅ for unsupported locale am-ET
  ✅ for unsupported locale ar
  ✅ for unsupported locale ar-DZ
  ✅ for unsupported locale ar-BH
  ✅ for unsupported locale ar-EG
  ✅ for unsupported locale ar-IQ
  ✅ for unsupported locale ar-JO
  ✅ for unsupported locale ar-KW
  ✅ for unsupported locale ar-LB
  ✅ for unsupported locale ar-LY
  ✅ for unsupported locale ar-MA
  ✅ for unsupported locale ar-OM
  ✅ for unsupported locale ar-QA
  ✅ for unsupported locale ar-SA
  ✅ for unsupported locale ar-SD
  ✅ for unsupported locale ar-SY
  ✅ for unsupported locale ar-TN
  ✅ for unsupported locale ar-AE
  ✅ for unsupported locale ar-001
  ✅ for unsupported locale ar-YE
  ✅ for unsupported locale hy
  ✅ for unsupported locale hy-AM
  ✅ for unsupported locale as
  ✅ for unsupported locale as-IN
  ✅ for unsupported locale ast
  ✅ for unsupported locale ast-ES
  ✅ for unsupported locale asa
  ✅ for unsupported locale asa-TZ
  ✅ for unsupported locale az
  ✅ for unsupported locale az-Cyrl
  ✅ for unsupported locale az-Cyrl-AZ
  ✅ for unsupported locale az-Latn
  ✅ for unsupported locale az-Latn-AZ
  ✅ for unsupported locale ksf
  ✅ for unsupported locale ksf-CM
  ✅ for unsupported locale bm
  ✅ for unsupported locale bm-ML
  ✅ for unsupported locale bas
  ✅ for unsupported locale bas-CM
  ✅ for unsupported locale eu
  ✅ for unsupported locale eu-ES
  ✅ for unsupported locale be
  ✅ for unsupported locale be-BY
  ✅ for unsupported locale bem
  ✅ for unsupported locale bem-ZM
  ✅ for unsupported locale bez
  ✅ for unsupported locale bez-TZ
  ✅ for unsupported locale bn
  ✅ for unsupported locale bn-BD
  ✅ for unsupported locale bn-IN
  ✅ for unsupported locale brx
  ✅ for unsupported locale brx-IN
  ✅ for unsupported locale bs
  ✅ for unsupported locale bs-BA
  ✅ for unsupported locale br
  ✅ for unsupported locale br-FR
  ✅ for unsupported locale my
  ✅ for unsupported locale my-MM
  ✅ for unsupported locale ca
  ✅ for unsupported locale ca-ES
  ✅ for unsupported locale ckb
  ✅ for unsupported locale kmr
  ✅ for unsupported locale sdh
  ✅ for unsupported locale tzm
  ✅ for unsupported locale tzm-Latn
  ✅ for unsupported locale tzm-Latn-MA
  ✅ for unsupported locale chr
  ✅ for unsupported locale chr-US
  ✅ for unsupported locale cgg
  ✅ for unsupported locale cgg-UG
  ✅ for unsupported locale swc
  ✅ for unsupported locale swc-CD
  ✅ for unsupported locale kw
  ✅ for unsupported locale kw-GB
  ✅ for unsupported locale hr
  ✅ for unsupported locale hr-HR
  ✅ for unsupported locale dua
  ✅ for unsupported locale dua-CM
  ✅ for unsupported locale dv
  ✅ for unsupported locale ebu
  ✅ for unsupported locale ebu-KE
  ✅ for unsupported locale eo
  ✅ for unsupported locale ee
  ✅ for unsupported locale ee-GH
  ✅ for unsupported locale ee-TG
  ✅ for unsupported locale ewo
  ✅ for unsupported locale ewo-CM
  ✅ for unsupported locale fo
  ✅ for unsupported locale fo-FO
  ✅ for unsupported locale fil
  ✅ for unsupported locale fil-PH
  ✅ for unsupported locale ff
  ✅ for unsupported locale ff-SN
  ✅ for unsupported locale gl
  ✅ for unsupported locale gl-ES
  ✅ for unsupported locale lao
  ✅ for unsupported locale lg
  ✅ for unsupported locale lg-UG
  ✅ for unsupported locale ka
  ✅ for unsupported locale ka-GE
  ✅ for unsupported locale gu
  ✅ for unsupported locale gu-IN
  ✅ for unsupported locale guz
  ✅ for unsupported locale guz-KE
  ✅ for unsupported locale ha
  ✅ for unsupported locale ha-Latn
  ✅ for unsupported locale ha-Latn-GH
  ✅ for unsupported locale ha-Latn-NE
  ✅ for unsupported locale ha-Latn-NG
  ✅ for unsupported locale haw
  ✅ for unsupported locale haw-US
  ✅ for unsupported locale he
  ✅ for unsupported locale he-IL
  ✅ for unsupported locale hi
  ✅ for unsupported locale hi-IN
  ✅ for unsupported locale is
  ✅ for unsupported locale is-IS
  ✅ for unsupported locale ig
  ✅ for unsupported locale ig-NG
  ✅ for unsupported locale smn
  ✅ for unsupported locale smn-FI
  ✅ for unsupported locale ga
  ✅ for unsupported locale ga-IE
  ✅ for unsupported locale dyo
  ✅ for unsupported locale dyo-SN
  ✅ for unsupported locale kea
  ✅ for unsupported locale kea-CV
  ✅ for unsupported locale kab
  ✅ for unsupported locale kab-DZ
  ✅ for unsupported locale kl
  ✅ for unsupported locale kl-GL
  ✅ for unsupported locale kln
  ✅ for unsupported locale kln-KE
  ✅ for unsupported locale kam
  ✅ for unsupported locale kam-KE
  ✅ for unsupported locale kn
  ✅ for unsupported locale kn-IN
  ✅ for unsupported locale kaa
  ✅ for unsupported locale kk
  ✅ for unsupported locale kk-Cyrl
  ✅ for unsupported locale kk-Cyrl-KZ
  ✅ for unsupported locale km
  ✅ for unsupported locale km-KH
  ✅ for unsupported locale ki
  ✅ for unsupported locale ki-KE
  ✅ for unsupported locale rw
  ✅ for unsupported locale rw-RW
  ✅ for unsupported locale kok
  ✅ for unsupported locale kok-IN
  ✅ for unsupported locale khq
  ✅ for unsupported locale khq-ML
  ✅ for unsupported locale ses
  ✅ for unsupported locale ses-ML
  ✅ for unsupported locale nmg
  ✅ for unsupported locale nmg-CM
  ✅ for unsupported locale ky
  ✅ for unsupported locale lag
  ✅ for unsupported locale lag-TZ
  ✅ for unsupported locale ln
  ✅ for unsupported locale ln-CG
  ✅ for unsupported locale ln-CD
  ✅ for unsupported locale lu
  ✅ for unsupported locale lu-CD
  ✅ for unsupported locale luo
  ✅ for unsupported locale luo-KE
  ✅ for unsupported locale luy
  ✅ for unsupported locale luy-KE
  ✅ for unsupported locale mk
  ✅ for unsupported locale mk-MK
  ✅ for unsupported locale jmc
  ✅ for unsupported locale jmc-TZ
  ✅ for unsupported locale mgh
  ✅ for unsupported locale mgh-MZ
  ✅ for unsupported locale kde
  ✅ for unsupported locale kde-TZ
  ✅ for unsupported locale mg
  ✅ for unsupported locale mg-MG
  ✅ for unsupported locale ms
  ✅ for unsupported locale ms-BN
  ✅ for unsupported locale ms-MY
  ✅ for unsupported locale ml
  ✅ for unsupported locale ml-IN
  ✅ for unsupported locale mt
  ✅ for unsupported locale mt-MT
  ✅ for unsupported locale gv
  ✅ for unsupported locale gv-GB
  ✅ for unsupported locale mr
  ✅ for unsupported locale mr-IN
  ✅ for unsupported locale mas
  ✅ for unsupported locale mas-KE
  ✅ for unsupported locale mas-TZ
  ✅ for unsupported locale mer
  ✅ for unsupported locale mer-KE
  ✅ for unsupported locale mn
  ✅ for unsupported locale mfe
  ✅ for unsupported locale mfe-MU
  ✅ for unsupported locale mua
  ✅ for unsupported locale mua-CM
  ✅ for unsupported locale naq
  ✅ for unsupported locale naq-NA
  ✅ for unsupported locale ne
  ✅ for unsupported locale ne-IN
  ✅ for unsupported locale ne-NP
  ✅ for unsupported locale se
  ✅ for unsupported locale se-FI
  ✅ for unsupported locale se-NO
  ✅ for unsupported locale se-SE
  ✅ for unsupported locale nd
  ✅ for unsupported locale nd-ZW
  ✅ for unsupported locale nn
  ✅ for unsupported locale nn-NO
  ✅ for unsupported locale nus
  ✅ for unsupported locale nus-SD
  ✅ for unsupported locale nyn
  ✅ for unsupported locale nyn-UG
  ✅ for unsupported locale or
  ✅ for unsupported locale or-IN
  ✅ for unsupported locale om
  ✅ for unsupported locale om-ET
  ✅ for unsupported locale om-KE
  ✅ for unsupported locale ps
  ✅ for unsupported locale ps-AF
  ✅ for unsupported locale fa
  ✅ for unsupported locale fa-AF
  ✅ for unsupported locale fa-IR
  ✅ for unsupported locale pa
  ✅ for unsupported locale pa-Arab
  ✅ for unsupported locale pa-Arab-PK
  ✅ for unsupported locale pa-Guru
  ✅ for unsupported locale pa-Guru-IN
  ✅ for unsupported locale rm
  ✅ for unsupported locale rm-CH
  ✅ for unsupported locale rof
  ✅ for unsupported locale rof-TZ
  ✅ for unsupported locale rn
  ✅ for unsupported locale rn-BI
  ✅ for unsupported locale rwk
  ✅ for unsupported locale rwk-TZ
  ✅ for unsupported locale saq
  ✅ for unsupported locale saq-KE
  ✅ for unsupported locale sg
  ✅ for unsupported locale sg-CF
  ✅ for unsupported locale sbp
  ✅ for unsupported locale sbp-TZ
  ✅ for unsupported locale sa
  ✅ for unsupported locale gd
  ✅ for unsupported locale gd-GB
  ✅ for unsupported locale seh
  ✅ for unsupported locale seh-MZ
  ✅ for unsupported locale sr
  ✅ for unsupported locale sr-Cyrl
  ✅ for unsupported locale sr-Cyrl-BA
  ✅ for unsupported locale sr-Cyrl-ME
  ✅ for unsupported locale sr-Cyrl-RS
  ✅ for unsupported locale sr-Latn
  ✅ for unsupported locale sr-Latn-BA
  ✅ for unsupported locale sr-Latn-ME
  ✅ for unsupported locale sr-Latn-RS
  ✅ for unsupported locale ksb
  ✅ for unsupported locale ksb-TZ
  ✅ for unsupported locale sn
  ✅ for unsupported locale sn-ZW
  ✅ for unsupported locale ii
  ✅ for unsupported locale ii-CN
  ✅ for unsupported locale si
  ✅ for unsupported locale si-LK
  ✅ for unsupported locale xog
  ✅ for unsupported locale xog-UG
  ✅ for unsupported locale so
  ✅ for unsupported locale so-DJ
  ✅ for unsupported locale so-ET
  ✅ for unsupported locale so-KE
  ✅ for unsupported locale so-SO
  ✅ for unsupported locale sw
  ✅ for unsupported locale sw-KE
  ✅ for unsupported locale sw-TZ
  ✅ for unsupported locale gsw
  ✅ for unsupported locale gsw-CH
  ✅ for unsupported locale shi
  ✅ for unsupported locale shi-Latn
  ✅ for unsupported locale shi-Latn-MA
  ✅ for unsupported locale shi-Tfng
  ✅ for unsupported locale shi-Tfng-MA
  ✅ for unsupported locale dav
  ✅ for unsupported locale dav-KE
  ✅ for unsupported locale tg
  ✅ for unsupported locale ta
  ✅ for unsupported locale ta-IN
  ✅ for unsupported locale ta-LK
  ✅ for unsupported locale twq
  ✅ for unsupported locale twq-NE
  ✅ for unsupported locale mi
  ✅ for unsupported locale te
  ✅ for unsupported locale te-IN
  ✅ for unsupported locale teo
  ✅ for unsupported locale teo-KE
  ✅ for unsupported locale teo-UG
  ✅ for unsupported locale th
  ✅ for unsupported locale th-TH
  ✅ for unsupported locale bo
  ✅ for unsupported locale bo-CN
  ✅ for unsupported locale bo-IN
  ✅ for unsupported locale ti
  ✅ for unsupported locale ti-ER
  ✅ for unsupported locale ti-ET
  ✅ for unsupported locale to
  ✅ for unsupported locale to-TO
  ✅ for unsupported locale tk
  ✅ for unsupported locale ur
  ✅ for unsupported locale ur-IN
  ✅ for unsupported locale ur-PK
  ✅ for unsupported locale ug
  ✅ for unsupported locale ug-CN
  ✅ for unsupported locale uz
  ✅ for unsupported locale uz-Arab
  ✅ for unsupported locale uz-Arab-AF
  ✅ for unsupported locale uz-Cyrl
  ✅ for unsupported locale uz-Cyrl-UZ
  ✅ for unsupported locale uz-Latn
  ✅ for unsupported locale uz-Latn-UZ
  ✅ for unsupported locale vai
  ✅ for unsupported locale vai-Latn
  ✅ for unsupported locale vai-Latn-LR
  ✅ for unsupported locale vai-Vaii
  ✅ for unsupported locale vai-Vaii-LR
  ✅ for unsupported locale val
  ✅ for unsupported locale val-ES
  ✅ for unsupported locale ca-ES-valencia
  ✅ for unsupported locale vi
  ✅ for unsupported locale vi-VN
  ✅ for unsupported locale vun
  ✅ for unsupported locale vun-TZ
  ✅ for unsupported locale cy
  ✅ for unsupported locale cy-GB
  ✅ for unsupported locale yav
  ✅ for unsupported locale yav-CM
  ✅ for unsupported locale yo
  ✅ for unsupported locale yo-NG
  ✅ for unsupported locale dje
  ✅ for unsupported locale dje-NE
  ✅ for unsupported locale zu
  ✅ for unsupported locale zu-ZA
locale parser
  ✅ uses locale mapping
  ✅ does not parse en to EN as that is deprecated
  ✅ does not parse pt to PT as that is deprecated
  ✅ source language is parsed without specific locale
  ✅ source language is parsed without specific locale even with locale map

✅ providers/libretranslate/src/lib/tests/client.test.ts

libretranslate client › init
  ✅ sets LocaleInformation default values
  ✅ sets LocaleInformation according to server response
libretranslate client › getLocaleInformation
  ✅ works for ok response
  ✅ throws Error for non ok response code 404
  ✅ throws Error for non ok response code 400
  ✅ throws Error for non ok response code 500
  ✅ throws Error for non ok response code 403
  ✅ throws Error for network error
libretranslate client › translateText
  ✅ does not throw for ok response
  ✅ uses API key if supplied
  ✅ passes parameters correctly
  ✅ passes parameters correctly
  ✅ throws Error for non ok response code 404
  ✅ throws Error for non ok response code 400
  ✅ throws Error for non ok response code 500
  ✅ throws Error for non ok response code 403
  ✅ throws Error for network error
libretranslate client › parseLocales
  ✅ works as expected without localeInformation
  ✅ throws for unsupported locales
  ✅ does not throw for supported locales

✅ providers/libretranslate/src/lib/tests/libretranslate.test.ts

libretranslate provider › usage
  ✅ is undefined
libretranslate provider › translate › succeeds
  ✅ with single text
  ✅ with multiple texts
  ✅ with missing text
  ✅ with markdown texts
  ✅ with more than more texts than limit
  ✅ with all fields together more than request size limit
  ✅ with a field larger than request size limit
  ✅ with some fields larger than request size limit
  ✅ with rate limiting
libretranslate provider › translate › fails
  ✅ with missing target language
  ✅ with missing source language
libretranslate provider › init
  ✅ throws when no URL is provided