@@ -5,6 +5,7 @@ import { Outputs } from "../../lib/output/output.js";
55import { TestLogger } from "../TestLogger.js" ;
66import { FileRegistry , ProjectReflection } from "../../lib/models/index.js" ;
77import type { TranslatedString } from "../../lib/internationalization/index.js" ;
8+ import { normalizePath } from "#node-utils" ;
89
910const app = getConverter2App ( ) ;
1011
@@ -46,22 +47,22 @@ describe("Output", () => {
4647
4748 it ( "Uses the --out output by default" , ( ) => {
4849 const specs = outputs . getOutputSpecs ( ) ;
49- equal ( specs , [ { name : "html" , path : resolve ( "./docs" ) } ] ) ;
50+ equal ( specs , [ { name : "html" , path : normalizePath ( resolve ( "./docs" ) ) } ] ) ;
5051 } ) ;
5152
5253 it ( "Does not use default value of --out if there is a specified output shortcut" , ( ) => {
5354 app . options . setValue ( "html" , "./html_docs" ) ;
5455 const specs = outputs . getOutputSpecs ( ) ;
55- equal ( specs , [ { name : "html" , path : resolve ( "./html_docs" ) } ] ) ;
56+ equal ( specs , [ { name : "html" , path : normalizePath ( resolve ( "./html_docs" ) ) } ] ) ;
5657 } ) ;
5758
5859 it ( "Uses --out if specified" , ( ) => {
5960 app . options . setValue ( "html" , "./html_docs" ) ;
6061 app . options . setValue ( "out" , "./out_docs" ) ;
6162 const specs = outputs . getOutputSpecs ( ) ;
6263 equal ( specs , [
63- { name : "html" , path : resolve ( "./out_docs" ) } ,
64- { name : "html" , path : resolve ( "./html_docs" ) } ,
64+ { name : "html" , path : normalizePath ( resolve ( "./out_docs" ) ) } ,
65+ { name : "html" , path : normalizePath ( resolve ( "./html_docs" ) ) } ,
6566 ] ) ;
6667 } ) ;
6768
@@ -70,7 +71,7 @@ describe("Output", () => {
7071 { name : "html" , path : "./html_docs" } ,
7172 ] ) ;
7273 const specs = outputs . getOutputSpecs ( ) ;
73- equal ( specs , [ { name : "html" , path : resolve ( "./html_docs" ) } ] ) ;
74+ equal ( specs , [ { name : "html" , path : normalizePath ( resolve ( "./html_docs" ) ) } ] ) ;
7475 } ) ;
7576
7677 it ( "Prioritizes shortcuts if both outputs and shortcuts are specified" , ( ) => {
@@ -79,7 +80,7 @@ describe("Output", () => {
7980 ] ) ;
8081 app . options . setValue ( "html" , "./html_docs2" ) ;
8182 const specs = outputs . getOutputSpecs ( ) ;
82- equal ( specs , [ { name : "html" , path : resolve ( "./html_docs2" ) } ] ) ;
83+ equal ( specs , [ { name : "html" , path : normalizePath ( resolve ( "./html_docs2" ) ) } ] ) ;
8384 } ) ;
8485
8586 it ( "Prioritizes --out if both outputs and --out are specified" , ( ) => {
@@ -88,14 +89,14 @@ describe("Output", () => {
8889 ] ) ;
8990 app . options . setValue ( "out" , "./html_docs2" ) ;
9091 const specs = outputs . getOutputSpecs ( ) ;
91- equal ( specs , [ { name : "html" , path : resolve ( "./html_docs2" ) } ] ) ;
92+ equal ( specs , [ { name : "html" , path : normalizePath ( resolve ( "./html_docs2" ) ) } ] ) ;
9293 } ) ;
9394
9495 it ( "Supports specifying a different default output name" , ( ) => {
9596 outputs . setDefaultOutputName ( "json" ) ;
9697 const specs = outputs . getOutputSpecs ( ) ;
9798 try {
98- equal ( specs , [ { name : "json" , path : resolve ( "./docs" ) } ] ) ;
99+ equal ( specs , [ { name : "json" , path : normalizePath ( resolve ( "./docs" ) ) } ] ) ;
99100 } finally {
100101 outputs . setDefaultOutputName ( "html" ) ;
101102 }
0 commit comments