/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/lib/array.test.ts
12 строк
377 B
Paweł Kuna
Enable `astro/tsconfigs/strictest` in the preview package (#2834)
08 авг 2026, 01:51
Не верифицирован
08 авг 2026, 01:51
16e1403
Код
Авторство
О чём код?
import { describe, expect, it } from 'vitest' import { requireIndex } from './array' describe('requireIndex', () => { it('returns the entry at the given index', () => { expect(requireIndex(['a', 'b', 'c'], 1)).toBe('b') }) it('throws when the index is out of bounds', () => { expect(() => requireIndex(['a'], 5)).toThrow('Expected an entry at index 5') }) })