| 50 | ]; |
| 51 | |
| 52 | function 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 | |
| 70 | export async function runUrlTests(writeOutput) { |
| 71 | const runner = new TestRunner("URL / SAF URIs"); |