translate-video.test.js 716 B

12345678910111213141516171819
  1. import {translateVideo} from '../../../src/lib/libraries/decks/translate-video.js';
  2. describe('translateVideo', () => {
  3. test('returns the id if it is not found', () => {
  4. expect(translateVideo('not-a-key', 'en')).toEqual('not-a-key');
  5. });
  6. test('returns the expected id for Japanese', () => {
  7. expect(translateVideo('intro-move-sayhello', 'ja')).toEqual('v2c2f3y2sc');
  8. });
  9. test('returns the expected id for English', () => {
  10. expect(translateVideo('intro-move-sayhello', 'en')).toEqual('rpjvs3v9gj');
  11. });
  12. test('returns the English id for non-existent locales', () => {
  13. expect(translateVideo('intro-move-sayhello', 'yum')).toEqual('rpjvs3v9gj');
  14. });
  15. });