Skip to content

Commit 72304b9

Browse files
authored
Merge pull request #11244 from quarto-dev/test/config-fail-error
Add test for error message regarding validation problem on _quarto.yml
2 parents 15693a5 + 84500d6 commit 72304b9

4 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
project:
2+
title: "bad-config-yaml"
3+
type: 1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "bad-config-yaml"
3+
---
4+
5+
## Quarto
6+
7+
This is a doc in a dummy project to check that error message is correct
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* config-yaml-validation.test.ts
3+
*
4+
* Copyright (C) 2024 Posit Software, PBC
5+
*
6+
*/
7+
8+
import { testQuartoCmd } from "../../test.ts";
9+
import { docs } from "../../utils.ts";
10+
import { printsMessage } from "../../verify.ts";
11+
12+
const input = docs("yaml/bad-config-yaml/subfolder/bad-config-yaml.qmd");
13+
14+
testQuartoCmd(
15+
"render",
16+
[input],
17+
[printsMessage("ERROR", /bad-config-yaml[\/\\]+_quarto[.]yml validation failed/)]
18+
);

0 commit comments

Comments
 (0)