Botanique/tests/modules/string.test.ts
Mylloon d8fb65f583
Some checks failed
PR Check / lint-and-format (pull_request) Failing after 32s
move tests to parent
2024-12-10 10:24:55 +01:00

36 lines
715 B
TypeScript

import "../../src/modules/string";
import { describe, it } from "node:test";
import assert from "node:assert/strict";
describe("Capitalize", () => {
{
const name = "test";
it(name, () => {
assert.strictEqual(name.capitalize(), "Test");
});
}
{
const name = "MACHIN";
it(name, () => {
assert.strictEqual(name.capitalize(), "MACHIN");
});
}
{
const name = "tRUC";
it(name, () => {
assert.strictEqual(name.capitalize(), "TRUC");
});
}
{
const name = "Super";
it(name, () => {
assert.strictEqual(name.capitalize(), "Super");
});
}
{
it("Empty string", () => {
assert.strictEqual("".capitalize(), "");
});
}
});