File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 44 revealjs :
55 jump-to-slide : false
66_quarto :
7- test :
7+ tests :
88 revealjs :
99 ensureFileRegexMatches :
1010 - ["jumpToSlide.*false,"]
Original file line number Diff line number Diff line change @@ -78,8 +78,12 @@ async function guessFormat(fileName: string): Promise<string[]> {
7878}
7979
8080//deno-lint-ignore no-explicit-any
81- function hasTestSpecs ( metadata : any ) : boolean {
82- return metadata ?. [ "_quarto" ] ?. [ "tests" ] != undefined ;
81+ function hasTestSpecs ( metadata : any , input : string ) : boolean {
82+ const hasTestSpecs = metadata ?. [ "_quarto" ] ?. [ "tests" ] != undefined
83+ if ( ! hasTestSpecs && metadata ?. [ "_quarto" ] ?. [ "test" ] != undefined ) {
84+ throw new Error ( `Test is ${ input } is using 'test' in metadata instead of 'tests'. This is probably a typo.` ) ;
85+ }
86+ return hasTestSpecs
8387}
8488
8589interface QuartoInlineTestSpec {
@@ -231,7 +235,7 @@ for (const { path: fileName } of files) {
231235
232236 const testSpecs : QuartoInlineTestSpec [ ] = [ ] ;
233237
234- if ( hasTestSpecs ( metadata ) ) {
238+ if ( hasTestSpecs ( metadata , input ) ) {
235239 testSpecs . push ( ...resolveTestSpecs ( input , metadata ) ) ;
236240 } else {
237241 const formats = await guessFormat ( input ) ;
You can’t perform that action at this time.
0 commit comments