Botanique/tests/modules/string.test.ts
Mylloon a790ddf377
All checks were successful
Publish latest version / build (push) Successful in 2m11s
tests: use node:test (#210)
Close #201

Tests run much faster and we don't need as much as libs

Reviewed-on: #210
Co-authored-by: Mylloon <kennel.anri@tutanota.com>
Co-committed-by: Mylloon <kennel.anri@tutanota.com>
2024-12-14 11:43:09 +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(), "");
});
}
});