Skip to content

Commit 913190d

Browse files
committed
some more typescript tests
1 parent 2abf1c0 commit 913190d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/typescript/custom-types/t.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ function expectErrorWhenKeyNotInNamespace(t: TFunction<'alternate'>) {
2727

2828
t('foobar.barfoo', 'some default value');
2929
t('foobar.barfoo', { defaultValue: 'some default value' });
30+
31+
// t('not.yet.existing', 'some default value');
32+
// t('not.yet.existing', { defaultValue: 'some default value' });
3033
}
3134

3235
function i18nextTUsage() {
@@ -45,6 +48,12 @@ function i18nextTUsage() {
4548
i18next.t('bar', { ns: 'custom', defaultValue: 'some default value' });
4649
// i18next.t('bar', { defaultValue: 'some default value' });
4750
// i18next.t('bar', 'some default value');
51+
52+
// i18next.t('custom:no.existing.yet', { defaultValue: 'some default value' });
53+
// i18next.t('custom:no.existing.yet', 'some default value');
54+
// i18next.t('no.existing.yet', { ns: 'custom', defaultValue: 'some default value' });
55+
// i18next.t('no.existing.yet', { defaultValue: 'some default value' });
56+
// i18next.t('no.existing.yet', 'some default value');
4857
}
4958

5059
function expectErrorWhenInvalidKeyWithI18nextT() {

0 commit comments

Comments
 (0)