@@ -41,6 +41,8 @@ const dashboardSchemaYml = fs.readFileSync(process.cwd() + '/tests/mocks/schemas
4141const dashboardSchemaExpectedJson = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/expected/dashboard.json' ) ;
4242const dashboardWithSourcesSchemaYml = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/dashboard-with-sources.yml' ) ;
4343const dashboardWithSourcesSchemaExpectedJson = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/expected/dashboard-with-sources.json' ) ;
44+ const dashboardWithLinksSchemaExpectedJson = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/expected/dashboard-with-links.json' ) ;
45+ const dashboardWithLinksSchemaYml = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/dashboard-with-links.yml' ) ;
4446const previewSchemaYml = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/preview.yml' ) ;
4547const previewSchemaExpected = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/expected/preview.json' ) ;
4648const sectionExampleYML = fs . readFileSync ( process . cwd ( ) + '/tests/mocks/schemas/section-example.yml' ) ;
@@ -131,6 +133,7 @@ describe('Test validation functions', () => {
131133 const newWithRedirectSchema = ymljs . parse ( newWithRedirectSchemaYml . toString ( ) ) ;
132134 const dashboardSchema = ymljs . parse ( dashboardSchemaYml . toString ( ) ) ;
133135 const dashboardWithSourcesSchema = ymljs . parse ( dashboardWithSourcesSchemaYml . toString ( ) ) ;
136+ const dashboardWithLinksSchema = ymljs . parse ( dashboardWithLinksSchemaYml . toString ( ) ) ;
134137 const previewSchema = ymljs . parse ( previewSchemaYml . toString ( ) ) ;
135138 const sectionSchema = ymljs . parse ( sectionExampleYML . toString ( ) ) ;
136139 const settingsSchema = ymljs . parse ( settingsYML . toString ( ) ) ;
@@ -160,6 +163,7 @@ describe('Test validation functions', () => {
160163 const planningData = Validator . execute ( planningSchema , true , '/test/data17.json' ) ;
161164 const settingsData = Validator . execute ( settingsSchema , true , '/test/data18.json' ) ;
162165 const dashboardWithSourcesData = Validator . execute ( dashboardWithSourcesSchema , true , '/test/data19.json' ) ;
166+ const dashboardWithLinksData = Validator . execute ( dashboardWithLinksSchema , true , '/test/data20.json' ) ;
163167
164168 sinon . assert . match ( browseData , JSON . parse ( browseSchemaExpectedJson . toString ( ) ) ) ;
165169 sinon . assert . match ( browseWithCanCreateData , JSON . parse ( browseWithCanCreateSchemaExpectedJson . toString ( ) ) ) ;
@@ -179,6 +183,7 @@ describe('Test validation functions', () => {
179183 sinon . assert . match ( newWithRedirectData , JSON . parse ( newWithRedirectSchemaExpectedJson . toString ( ) ) ) ;
180184 sinon . assert . match ( dashboardData , JSON . parse ( dashboardSchemaExpectedJson . toString ( ) ) ) ;
181185 sinon . assert . match ( dashboardWithSourcesData , JSON . parse ( dashboardWithSourcesSchemaExpectedJson . toString ( ) ) ) ;
186+ sinon . assert . match ( dashboardWithLinksData , JSON . parse ( dashboardWithLinksSchemaExpectedJson . toString ( ) ) ) ;
182187 sinon . assert . match ( previewData , JSON . parse ( previewSchemaExpected . toString ( ) ) ) ;
183188 sinon . assert . match ( sectionData , JSON . parse ( sectionExampleExpected . toString ( ) ) ) ;
184189 sinon . assert . match ( settingsData , JSON . parse ( settingsExpected . toString ( ) ) ) ;
0 commit comments