@@ -20,10 +20,10 @@ async function loadWithStatus(status, expectedURL) {
2020 profile : "geonovum" ,
2121 } ;
2222 const doc = await makeRSDoc ( ops ) ;
23- const query = `link[href^=' ${ testedURL } ']` ;
24- const elem = doc . querySelector ( query ) ;
25- expect ( elem ) . toBeTruthy ( ) ;
26- expect ( elem . href ) . toBe ( testedURL ) ;
23+ // rel=stylesheet: for specStatus "base" the preload resource hint has the
24+ // same href, and querySelector would return that hint instead.
25+ const query = `link[rel=stylesheet][href=' ${ testedURL } ']` ;
26+ expect ( doc . querySelector ( query ) ) . toBeTruthy ( ) ;
2727 return doc ;
2828}
2929
@@ -66,9 +66,10 @@ describe("Geonovum - Style", () => {
6666 const ops = makeStandardGeoOps ( ) ;
6767 // TODO: create test specs for Geonovum?
6868 const doc = await makeRSDoc ( ops ) ;
69- const query = "script[src^='https://www.w3.org/scripts/TR/2021/fixup.js']" ;
70- const elem = doc . querySelector ( query ) ;
71- expect ( elem . src ) . toBe ( "https://www.w3.org/scripts/TR/2021/fixup.js" ) ;
69+ // 2016, not the 2021 the W3C profile emits: this is what proves the
70+ // Geonovum bundle ran. See #5409.
71+ const query = "script[src='https://www.w3.org/scripts/TR/2016/fixup.js']" ;
72+ expect ( doc . querySelector ( query ) ) . toBeTruthy ( ) ;
7273 } ) ;
7374
7475 it ( "should have a meta viewport added" , async ( ) => {
@@ -88,15 +89,15 @@ describe("Geonovum - Style", () => {
8889 } ) ;
8990
9091 it ( "shouldn't include fixup.js when noTOC is set" , async ( ) => {
91- const ops = { ... makeStandardGeoOps ( { noTOC : true } ) , profile : "geonovum" } ;
92+ const ops = makeStandardGeoOps ( { noTOC : true } ) ;
9293 const doc = await makeRSDoc ( ops ) ;
9394 const query = "script[src^='https://www.w3.org/scripts/TR/2016/fixup.js']" ;
9495 const elem = doc . querySelector ( query ) ;
9596 expect ( elem ) . toBeNull ( ) ;
9697 } ) ;
9798
9899 it ( "shouldn't include fixup.js when the deprecated noToc is set" , async ( ) => {
99- const ops = { ... makeStandardGeoOps ( { noToc : true } ) , profile : "geonovum" } ;
100+ const ops = makeStandardGeoOps ( { noToc : true } ) ;
100101 const doc = await makeRSDoc ( ops ) ;
101102 const query = "script[src^='https://www.w3.org/scripts/TR/2016/fixup.js']" ;
102103 const elem = doc . querySelector ( query ) ;
0 commit comments