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

13 lines
351 B
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
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"
);
});