/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
packages/framework/src/utils/string.utils.test.ts
21 строка
593 B
Adam Chmara
chore(root): apply biome formatter & linter fixes NV-6436 (#8838)
31 июл 2025, 14:59
Не верифицирован
31 июл 2025, 14:59
855fb8f
Код
Авторство
О чём код?
import { describe, expect, it } from 'vitest'; import { toConstantCase } from './string.utils'; describe('convert to constant case', () => { it('converts properties correctly', () => { const myTestObject = { aProperty: 'A_PROPERTY', someMoreWords: 'SOME_MORE_WORDS', single: 'SINGLE', ALLCAPS: 'ALLCAPS', StartWithCap: 'START_WITH_CAP', }; Object.entries(myTestObject).reduce((_acc, [prop, value]: [string, string]) => { const converted = toConstantCase(prop); expect(converted).toEqual(value); return ''; }, ''); }); });