allure-npm
allure-npm copied to clipboard
TypeScript Support
Currently the command line tool has no type support. It would be nice if we could provide a minimal type definition so we can do this in TypeScript without having any type errors thrown:
import allure from 'allure-commandline'
const generation = allure(['generate', 'allure-results'])
return new Promise<void>((resolve, reject) => {
const generationTimeout = setTimeout(
() => reject(new Error('Could not generate Allure report')),
5000)
generation.on('exit', function() {
clearTimeout(generationTimeout)
console.log('Allure report successfully generated')
resolve()
})
})