@@ -19,7 +19,7 @@ import languages from '../../../lib/languages.js'
19
19
import { tags } from '#src/content-render/liquid/extended-markdown.js'
20
20
import releaseNotesSchema from '../lib/release-notes-schema.js'
21
21
import learningTracksSchema from '../lib/learning-tracks-schema.js'
22
- import { renderContent } from '#src/content-render/index.js'
22
+ import { renderContent , liquid } from '#src/content-render/index.js'
23
23
import getApplicableVersions from '../../../lib/get-applicable-versions.js'
24
24
import { allVersions } from '../../../lib/all-versions.js'
25
25
import { getDiffFiles } from '../lib/diff-files.js'
@@ -467,7 +467,7 @@ describe('lint markdown content', () => {
467
467
await Promise . all (
468
468
yamlScheduledWorkflows . map ( async ( snippet ) => {
469
469
// If we don't parse the Liquid first, yaml loading chokes on {% raw %} tags
470
- const rendered = await renderContent . liquid . parseAndRender ( snippet , context )
470
+ const rendered = await liquid . parseAndRender ( snippet , context )
471
471
const parsed = yaml . load ( rendered )
472
472
return parsed . on . schedule
473
473
} )
@@ -669,7 +669,7 @@ describe('lint markdown content', () => {
669
669
// If Liquid can't parse the file, it'll throw an error.
670
670
// For example, the following is invalid and will fail this test:
671
671
// {% if currentVersion ! "github-ae@latest" % }
672
- expect ( ( ) => renderContent . liquid . parse ( content ) ) . not . toThrow ( )
672
+ expect ( ( ) => liquid . parse ( content ) ) . not . toThrow ( )
673
673
} )
674
674
675
675
if ( ! markdownRelPath . includes ( 'data/reusables' ) ) {
@@ -679,7 +679,7 @@ describe('lint markdown content', () => {
679
679
)
680
680
681
681
for ( const key of fmKeysWithLiquid ) {
682
- expect ( ( ) => renderContent . liquid . parse ( frontmatterData [ key ] ) ) . not . toThrow ( )
682
+ expect ( ( ) => liquid . parse ( frontmatterData [ key ] ) ) . not . toThrow ( )
683
683
}
684
684
} )
685
685
}
@@ -963,10 +963,7 @@ describe('lint GHES release notes', () => {
963
963
964
964
for ( const key in toLint ) {
965
965
if ( ! toLint [ key ] ) continue
966
- expect (
967
- ( ) => renderContent . liquid . parse ( toLint [ key ] ) ,
968
- `${ key } contains invalid liquid`
969
- ) . not . toThrow ( )
966
+ expect ( ( ) => liquid . parse ( toLint [ key ] ) , `${ key } contains invalid liquid` ) . not . toThrow ( )
970
967
}
971
968
} )
972
969
} )
@@ -1030,10 +1027,7 @@ describe('lint GHAE release notes', () => {
1030
1027
1031
1028
for ( const key in toLint ) {
1032
1029
if ( ! toLint [ key ] ) continue
1033
- expect (
1034
- ( ) => renderContent . liquid . parse ( toLint [ key ] ) ,
1035
- `${ key } contains invalid liquid`
1036
- ) . not . toThrow ( )
1030
+ expect ( ( ) => liquid . parse ( toLint [ key ] ) , `${ key } contains invalid liquid` ) . not . toThrow ( )
1037
1031
}
1038
1032
} )
1039
1033
} )
@@ -1117,10 +1111,7 @@ describe('lint learning tracks', () => {
1117
1111
} )
1118
1112
1119
1113
toLint . forEach ( ( element ) => {
1120
- expect (
1121
- ( ) => renderContent . liquid . parse ( element ) ,
1122
- `${ element } contains invalid liquid`
1123
- ) . not . toThrow ( )
1114
+ expect ( ( ) => liquid . parse ( element ) , `${ element } contains invalid liquid` ) . not . toThrow ( )
1124
1115
} )
1125
1116
} )
1126
1117
} )
0 commit comments