2024-12-10 10:24:55 +01:00
|
|
|
import "../../src/modules/string";
|
2024-09-27 20:49:36 +02:00
|
|
|
|
2024-12-10 10:04:15 +01:00
|
|
|
import { describe, it } from "node:test";
|
|
|
|
import assert from "node:assert/strict";
|
|
|
|
|
2024-09-27 20:49:36 +02:00
|
|
|
describe("Capitalize", () => {
|
|
|
|
{
|
|
|
|
const name = "test";
|
2024-12-10 10:04:15 +01:00
|
|
|
it(name, () => {
|
|
|
|
assert.strictEqual(name.capitalize(), "Test");
|
2024-09-27 20:49:36 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const name = "MACHIN";
|
2024-12-10 10:04:15 +01:00
|
|
|
it(name, () => {
|
|
|
|
assert.strictEqual(name.capitalize(), "MACHIN");
|
2024-09-27 20:49:36 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const name = "tRUC";
|
2024-12-10 10:04:15 +01:00
|
|
|
it(name, () => {
|
|
|
|
assert.strictEqual(name.capitalize(), "TRUC");
|
2024-09-27 20:49:36 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const name = "Super";
|
2024-12-10 10:04:15 +01:00
|
|
|
it(name, () => {
|
|
|
|
assert.strictEqual(name.capitalize(), "Super");
|
2024-09-27 20:49:36 +02:00
|
|
|
});
|
|
|
|
}
|
2024-10-08 20:55:16 +02:00
|
|
|
{
|
2024-12-10 10:21:56 +01:00
|
|
|
it("Empty string", () => {
|
|
|
|
assert.strictEqual("".capitalize(), "");
|
2024-10-08 20:55:16 +02:00
|
|
|
});
|
|
|
|
}
|
2024-09-27 20:49:36 +02:00
|
|
|
});
|