Skip to content

Commit 294f1fe

Browse files
committed
fix tests
1 parent a6b53c0 commit 294f1fe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/smoke/inspect/inspect-code-cells.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
testQuartoCmd,
1414
} from "../../test.ts";
1515
import { assert } from "testing/asserts";
16+
import { normalizePath } from "../../../src/core/path.ts";
1617

1718
(() => {
1819
const input = "docs/project/book/_include.qmd";
@@ -26,7 +27,7 @@ import { assert } from "testing/asserts";
2627
verify: async (outputs: ExecuteOutput[]) => {
2728
assert(existsSync(output));
2829
const json = JSON.parse(Deno.readTextFileSync(output));
29-
const info = json.fileInformation["docs/project/book/_include.qmd"];
30+
const info = json.fileInformation[normalizePath("docs/project/book/_include.qmd")];
3031
const codeCells = info.codeCells;
3132
assertObjectMatch(info.codeCells[0], {
3233
start: 0,
@@ -65,12 +66,12 @@ import { assert } from "testing/asserts";
6566
verify: async (outputs: ExecuteOutput[]) => {
6667
assert(existsSync(output));
6768
const json = JSON.parse(Deno.readTextFileSync(output));
68-
const info = json.fileInformation["docs/inspect/10039.qmd"];
69+
const info = json.fileInformation[normalizePath("docs/inspect/10039.qmd")];
6970
const codeCells = info.codeCells;
7071
assertObjectMatch(info.codeCells[1], {
7172
"start": 14,
7273
"end": 18,
73-
"file": "docs/inspect/10039.qmd",
74+
"file": normalizePath("docs/inspect/10039.qmd"),
7475
"source": "p[[1]]\n",
7576
"language": "r",
7677
"metadata": {

0 commit comments

Comments
 (0)