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

Function runUrlTests

src/test/url.tests.js:70–96  ·  view source on GitHub ↗
(writeOutput)

Source from the content-addressed store, hash-verified

68}
69
70export async function runUrlTests(writeOutput) {
71 const runner = new TestRunner("URL / SAF URIs");
72
73 for (const joinCase of JOIN_CASES) {
74 runner.test(joinCase.name, (test) => {
75 assertJoinCase(test, joinCase);
76 });
77 }
78
79 for (const trailingSlashCase of TRAILING_SLASH_CASES) {
80 runner.test(trailingSlashCase.name, (test) => {
81 test.assert(
82 Url.areSame(trailingSlashCase.a, trailingSlashCase.b),
83 "Folder URLs differing only by a trailing slash should be same",
84 );
85 });
86 }
87
88 runner.test("Android SAF leading slash", (test) => {
89 assertJoinCase(test, {
90 ...JOIN_CASES[0],
91 segment: "/index.html",
92 });
93 });
94
95 return await runner.run(writeOutput);
96}

Callers

nothing calls this directly

Calls 2

assertJoinCaseFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected