[Translator] Option to throw an exception instead of returning the message as is when the message is not found. #5045
test.yaml
on: pull_request
tests-php-components
3s
JavaScript Coding Style
36s
Check for UnBuilt JS Dist Files
1m 34s
tests-js
1m 50s
Matrix: tests-php
Annotations
5 errors
Check for UnBuilt JS Dist Files
Unable to process file command 'output' successfully.
|
Check for UnBuilt JS Dist Files
Invalid format ' M src/Translator/assets/dist/translator_controller.js'
|
test/translator.test.ts > Translator > trans > missing message should throw an error if `throwWhenNotFound` is true:
src/Translator/assets/test/translator.test.ts#L406
AssertionError: expected [Function] to throw an error
- Expected:
null
+ Received:
undefined
❯ test/translator.test.ts:406:16
|
test/translator.test.ts > Translator > trans > fallback behavior:
src/Translator/assets/src/translator.ts#L180
Error: No translation message with id "message_french_only" is found.
❯ Module.trans src/translator.ts:180:15
❯ test/translator.test.ts:481:20
|
tests-js
Process completed with exit code 1.
|