test/integration/dt2js_integration.test.js
/**
 * Test each file by running dt2js script on it and then validating
 * output with ajv.
 */
Test each file by running dt2js script on it and then validating
output with ajv.
Test each file by running dt2js script on it and then validating output with ajv .
async function defineTests () {
  const examplesData = await loadExamplesData()
  describe('dt2js CLI integration test', function () {
    this.timeout(20000)
    examplesData.forEach(data => {
      context(`for file ${data.fpath}`, () => {
        data.names.forEach(typeName => {
          it(`should convert ${typeName}`, async () => {
            const schema = await dt2jsCLI(data.fpath, typeName)
            validateJsonSchema(schema)
          })
        })
      })
    })
  })
}
async function defineTests ( ) { const examplesData = await loadExamplesData ( ) describe ( 'dt2js CLI integration test' , function ( ) { this . timeout ( 20000 ) examplesData . forEach ( data => { context ( ` ${ data . fpath } ` , ( ) => { data . names . forEach ( typeName => { it ( ` ${ typeName } ` , async ( ) => { const schema = await dt2jsCLI ( data . fpath , typeName ) validateJsonSchema ( schema ) } ) } ) } ) } ) } ) }
Test each file by running dt2js script on it and then validating
 output with ajv.
Test each file by running dt2js script on it and then validating output with ajv .