The Trans Directory
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: format path.test.ts

+24 -6
+24 -6
quartz/util/path.test.ts
··· 319 319 test("from index", () => { 320 320 assert.strictEqual(path.resolveRelative("index" as FullSlug, "index" as FullSlug), "./") 321 321 assert.strictEqual(path.resolveRelative("index" as FullSlug, "abc" as FullSlug), "./abc") 322 - assert.strictEqual(path.resolveRelative("index" as FullSlug, "abc/def" as FullSlug), "./abc/def") 323 - assert.strictEqual(path.resolveRelative("index" as FullSlug, "abc/def/ghi" as FullSlug), "./abc/def/ghi") 322 + assert.strictEqual( 323 + path.resolveRelative("index" as FullSlug, "abc/def" as FullSlug), 324 + "./abc/def", 325 + ) 326 + assert.strictEqual( 327 + path.resolveRelative("index" as FullSlug, "abc/def/ghi" as FullSlug), 328 + "./abc/def/ghi", 329 + ) 324 330 }) 325 331 326 332 test("from nested page", () => { 327 333 assert.strictEqual(path.resolveRelative("abc/def" as FullSlug, "index" as FullSlug), "../") 328 334 assert.strictEqual(path.resolveRelative("abc/def" as FullSlug, "abc" as FullSlug), "../abc") 329 - assert.strictEqual(path.resolveRelative("abc/def" as FullSlug, "abc/def" as FullSlug), "../abc/def") 330 - assert.strictEqual(path.resolveRelative("abc/def" as FullSlug, "ghi/jkl" as FullSlug), "../ghi/jkl") 335 + assert.strictEqual( 336 + path.resolveRelative("abc/def" as FullSlug, "abc/def" as FullSlug), 337 + "../abc/def", 338 + ) 339 + assert.strictEqual( 340 + path.resolveRelative("abc/def" as FullSlug, "ghi/jkl" as FullSlug), 341 + "../ghi/jkl", 342 + ) 331 343 }) 332 344 333 345 test("with index paths", () => { 334 346 assert.strictEqual(path.resolveRelative("abc/index" as FullSlug, "index" as FullSlug), "../") 335 - assert.strictEqual(path.resolveRelative("abc/def/index" as FullSlug, "index" as FullSlug), "../../") 347 + assert.strictEqual( 348 + path.resolveRelative("abc/def/index" as FullSlug, "index" as FullSlug), 349 + "../../", 350 + ) 336 351 assert.strictEqual(path.resolveRelative("index" as FullSlug, "abc/index" as FullSlug), "./abc/") 337 - assert.strictEqual(path.resolveRelative("abc/def" as FullSlug, "abc/index" as FullSlug), "../abc/") 352 + assert.strictEqual( 353 + path.resolveRelative("abc/def" as FullSlug, "abc/index" as FullSlug), 354 + "../abc/", 355 + ) 338 356 }) 339 357 340 358 test("with simple slugs", () => {