Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Mar 3, 2021
1 parent bab7135 commit 1471066
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ test('translate from auto to dutch', async t => {
test('test pronunciation', async t => {
const res = await translate('translator', {from: 'auto', to: 'zh-CN'});

t.is(res.pronunciation, 'Yì zhě');
// here can be 2 variants: 'Yì zhě', 'Fānyì'
t.regex(res.pronunciation, /^(Yì zhě)|(Fānyì)$/);
});

test('translate some english text setting the source language as portuguese', async t => {
Expand Down

0 comments on commit 1471066

Please sign in to comment.