11import assert from "node:assert" ;
2- import { normalizeConfig as config , mergeToc , readConfig } from "../src/config.js" ;
2+ import { normalizeConfig as config , mergeToc , readConfig , setCurrentDate } from "../src/config.js" ;
33
44const root = "test/input/build/config" ;
55
66describe ( "readConfig(undefined, root)" , ( ) => {
7+ before ( ( ) => setCurrentDate ( new Date ( "2024-01-11T01:02:03" ) ) ) ;
78 it ( "imports the config file at the specified root" , async ( ) => {
89 assert . deepStrictEqual ( await readConfig ( undefined , "test/input/build/config" ) , {
910 root : "test/input/build/config" ,
@@ -18,7 +19,8 @@ describe("readConfig(undefined, root)", () => {
1819 title : undefined ,
1920 toc : { label : "On this page" , show : true } ,
2021 pager : true ,
21- footer : 'Built with <a href="https://observablehq.com/" target=_blank>Observable</a>' ,
22+ footer :
23+ 'Built with <a href="https://observablehq.com/" target="_blank">Observable</a> on <a title="2024-01-11T01:02:03">Jan 11, 2024</a>.' ,
2224 deploy : {
2325 workspace : "acme" ,
2426 project : "bi"
@@ -34,7 +36,8 @@ describe("readConfig(undefined, root)", () => {
3436 title : undefined ,
3537 toc : { label : "Contents" , show : true } ,
3638 pager : true ,
37- footer : 'Built with <a href="https://observablehq.com/" target=_blank>Observable</a>' ,
39+ footer :
40+ 'Built with <a href="https://observablehq.com/" target="_blank">Observable</a> on <a title="2024-01-11T01:02:03">Jan 11, 2024</a>.' ,
3841 deploy : null
3942 } ) ;
4043 } ) ;
0 commit comments