style / tools optis & new tools calculator
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s
This commit is contained in:
parent
6b84607b25
commit
0db35a0d2c
23 changed files with 1106 additions and 24 deletions
16
tests/toolbox-modules.test.mjs
Normal file
16
tests/toolbox-modules.test.mjs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { parseColonImportLines } from "../website/src/features/toolboxes/modules/textImport.js";
|
||||
|
||||
test("colon text import keeps urls intact after the first separator", () => {
|
||||
assert.deepEqual(parseColonImportLines("Build:https://example.com/build?class=rogue\nPotion:10"), [
|
||||
{ label: "Build", value: "https://example.com/build?class=rogue" },
|
||||
{ label: "Potion", value: "10" }
|
||||
]);
|
||||
});
|
||||
|
||||
test("colon text import accepts labels without value", () => {
|
||||
assert.deepEqual(parseColonImportLines("Simple item"), [
|
||||
{ label: "Simple item", value: "" }
|
||||
]);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue