MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / assertJoinCase

Function assertJoinCase

src/test/url.tests.js:52–68  ·  view source on GitHub ↗
(
	test,
	{ folderUrl, activeLocation, expectedJoined, segment },
)

Source from the content-addressed store, hash-verified

50];
51
52function assertJoinCase(
53 test,
54 { folderUrl, activeLocation, expectedJoined, segment },
55) {
56 const joined = Url.join(activeLocation, segment || "index.html");
57
58 test.assert(joined !== null, "Joining the SAF URL should return a value");
59 test.assertEqual(
60 joined,
61 expectedJoined,
62 "Joined URL should match the expected SAF file URI",
63 );
64 test.assert(
65 !Url.areSame(folderUrl, joined),
66 "Folder URL and joined file URL should not be considered the same",
67 );
68}
69
70export async function runUrlTests(writeOutput) {
71 const runner = new TestRunner("URL / SAF URIs");

Callers 1

runUrlTestsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected