import { describe, test, expect } from 'vitest'
import StringUtils from "~/services/utils/stringUtils";


describe("normalize", () => {
    test("simple cases", () => {

        const assertEqual = (input: string, expected: string) => {
            expect(StringUtils.normalize(input)).toBe(expected)
        }

        assertEqual("abc", "abc")
        assertEqual("ABC", "abc")
        assertEqual("éçï", "eci")
        assertEqual("éèẽëê-ç-îïĩ-àã-öôõ-ûüũ", "eeeee c iii aa ooo uuu")
        assertEqual("  abc   ", "abc")
    })
})

describe("parseInt", () => {
    test("simple cases", () => {
        expect(StringUtils.parseInt(6)).toBe(6)
        expect(StringUtils.parseInt("6")).toBe(6)
    })
})



