Skip to content

Commit

Permalink
test: Fix broken translation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jun 3, 2020
1 parent fb04579 commit a07382b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ describe('createUpdatedTranslatable()', () => {

it('creates new translation if the specified translation does not exist', () => {
const formValue = {
name: 'New Name AA',
name: 'New Name AF',
};
const result = createUpdatedTranslatable({
translatable: product,
updatedFields: formValue,
languageCode: LanguageCode.aa,
languageCode: LanguageCode.af,
defaultTranslation: {
languageCode: LanguageCode.aa,
languageCode: LanguageCode.af,
name: product.name || '',
},
});

expect(result.translations[2]).toEqual({
languageCode: LanguageCode.aa,
name: 'New Name AA',
languageCode: LanguageCode.af,
name: 'New Name AF',
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ describe('TranslationUpdater', () => {
it('correctly marks translations for addition', async () => {
const updated: Array<TranslationInput<Product>> = [
{
languageCode: LanguageCode.aa,
languageCode: LanguageCode.af,
name: '',
slug: '',
description: '',
},
{
languageCode: LanguageCode.za,
languageCode: LanguageCode.zh,
name: '',
slug: '',
description: '',
Expand All @@ -86,7 +86,7 @@ describe('TranslationUpdater', () => {
description: '',
},
{
languageCode: LanguageCode.za,
languageCode: LanguageCode.zh,
name: '',
slug: '',
description: '',
Expand Down

0 comments on commit a07382b

Please sign in to comment.