Lines Matching refs:t

22 export function test(t) {  argument
24 t.expect(result).toBeDefined();
25 t.expect(typeof result).toBe('string');
26 t.expect(result.length > 0).toBe(true);
30 t.expect(result).toBeDefined();
31 t.expect(Array.isArray(result)).toBe(true);
34 t.describe(`Localization methods`, () => {
35 t.it('expect to getLocales return preferred locales', () => {
37 t.expect(locales.length).toBeGreaterThanOrEqual(1);
52 t.expect(regionCode).toBeDefined();
53 t.expect(currencyCode).toBeDefined();
54 t.expect(currencySymbol).toBeDefined();
55 t.expect(decimalSeparator).toBeDefined();
56 t.expect(digitGroupingSeparator).toBeDefined();
57 t.expect(textDirection).toBeDefined();
59 t.expect(['rtl', 'ltr'].includes(textDirection)).toBe(true);
61 t.expect(measurementSystem).toBeDefined();
63 t.expect(['metric', 'us', 'uk'].includes(measurementSystem)).toBe(true);
67 t.it('expect getCalendars to return at least a single calendar', () => {
69 t.expect(calendars.length).toBeGreaterThanOrEqual(1);
71 t.expect(calendar).toBeDefined();
72 t.expect(timeZone).toBeDefined();
74 t.expect(uses24hourClock).toBeDefined();
76 t.expect(typeof uses24hourClock).toBe('boolean');
78 t.expect(firstWeekday).toBeDefined();
80 t.expect(typeof firstWeekday).toBe('number');
84 t.it('expect async to return locale', async () => {
105 t.expect(locales[0]).toBe(Localization.locale);
106 t.expect(typeof isRTL).toBe('boolean');
107 t.expect(typeof isMetric).toBe('boolean');
116 t.describe(`Localization defines constants`, () => {
117 t.it('Gets the region', async () => {
123 t.it('Gets the locale', async () => {
126 t.it('Gets the preferred locales', async () => {
129 t.expect(result.length > 0).toBe(true);
130 t.expect(result[0]).toBe(Localization.locale);
132 t.it('Gets ISO currency codes', async () => {
137 t.it('Gets the timezone', async () => {
143 t.it('Gets the layout direction (ltr only)', async () => {
145 t.expect(typeof result).toBe('boolean');
146 t.expect(result).toBe(false);
148 t.it('Gets the measurement system (metric)', async () => {
150 t.expect(typeof result).toBe('boolean');
152 t.it('Gets the decimal separator', async () => {
155 t.it('Gets the grouping separator', async () => {
157 t.expect(result).toBeDefined();
158 t.expect(typeof result).toBe('string');
161 t.it('Gets the currency', async () => {
167 t.describe(`Localization works with i18n-js`, () => {
173 t.it('expect language to match strings (en, pl, fr supported)', async () => {
181 t.expect(translation[target]).toBe(i18n.t(target));