Path: blob/main/tests/unit/case-conversion/case-conversion.test.ts
6451 views
/*1* case-conversion.test.ts2*3* Copyright (C) 2020-2023 Posit Software, PBC4*5*/67import { unitTest } from "../../test.ts";8import { assert } from "testing/asserts";9import {10camelToKebab,11} from "../../../src/core/config.ts";1213//https://github.com/quarto-dev/quarto-cli/issues/735814// deno-lint-ignore require-await15unitTest("case convention - camelToKebab", async () => {16assert(camelToKebab("fooBar") === "foo-bar", "Invalid camelToKebab conversion");17assert(camelToKebab("fooBarBaz") === "foo-bar-baz", "Invalid camelToKebab conversion");18assert(camelToKebab("fragmentInURL") === "fragment-in-url", "Invalid camelToKebab conversion");19assert(camelToKebab("URLFragment") === "url-fragment", "Invalid camelToKebab conversion");20assert(camelToKebab("isURLHTMLString") === "is-urlhtml-string", "Invalid camelToKebab conversion");21assert(camelToKebab("isURLHTML") === "is-urlhtml", "Invalid camelToKebab conversion");22});232425