30 lines
841 B
TypeScript
30 lines
841 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import {
|
|
strategyProjectListPath,
|
|
strategyProjectWorkbenchPath,
|
|
} from "./project-routes";
|
|
|
|
test("solution list paths work in both application shells", () => {
|
|
assert.equal(
|
|
strategyProjectListPath("/page/strategy/qa/projects", "solution"),
|
|
"/page/strategy/qa/projects?type=solution",
|
|
);
|
|
assert.equal(
|
|
strategyProjectListPath("/official/workspace/projects/", "solution"),
|
|
"/official/workspace/projects?type=solution",
|
|
);
|
|
});
|
|
|
|
test("solution workbench paths encode ids and request the solution module", () => {
|
|
assert.equal(
|
|
strategyProjectWorkbenchPath(
|
|
"/official/workspace/projects",
|
|
"strategy-selection-a/b",
|
|
"solution",
|
|
),
|
|
"/official/workspace/projects/strategy-selection-a%2Fb?module=solution",
|
|
);
|
|
});
|