Skip to content

Commit c9ce102

Browse files
committed
Update locale-related tests
1 parent fc807dd commit c9ce102

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

‎src/embedded.test.js‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -315,16 +315,6 @@ describe('HelloSign', () => {
315315
}).toThrow(/"locale" must be a string/);
316316
});
317317

318-
test('throws if "locale" is not supported', () => {
319-
client = new HelloSign({ clientId: mockClientId });
320-
321-
expect(() => {
322-
client.open(mockSignURL, {
323-
locale: 'Mars',
324-
});
325-
}).toThrow(/"Mars" is not a supported locale/);
326-
});
327-
328318
test('appends default value for "user_culture" to the iFrame URL if "locale" is not specified', (done) => {
329319
client = new HelloSign({ clientId: mockClientId });
330320

@@ -346,12 +336,12 @@ describe('HelloSign', () => {
346336
const url = new URL(data.url);
347337

348338
expect(url.searchParams.has('user_culture')).toBe(true);
349-
expect(url.searchParams.get('user_culture')).toBe('zh_CN');
339+
expect(url.searchParams.get('user_culture')).toBe('zh-CN');
350340
done();
351341
});
352342

353343
client.open(mockSignURL, {
354-
locale: 'zh_CN',
344+
locale: 'zh-CN',
355345
});
356346
});
357347

0 commit comments

Comments
 (0)