work.suroh.tk/node_modules/@11ty/eleventy/test/CapitalizeTest.js

13 lines
351 B
JavaScript

import test from "ava";
import capitalize from "../src/Util/Capitalize";
test("capitalize", t => {
t.is(capitalize("hello"), "Hello");
t.is(capitalize("hello world"), "Hello World");
t.is(capitalize("Testing TESTING"), "Testing TESTING");
t.is(
capitalize("Testing TESTING", { lowercaseRestOfWord: true }),
"Testing Testing"
);
});