Flood Element Execution Script (repository: https://github.com/javaadpatel/Medium_FloodElement_AzureDevops)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const winston = require('./helpers/winston'); | |
const fileCleanup = require("./helpers/file-helper"); | |
const testHelpers = require("./helpers/element-test-helper"); | |
//remove all old results and logs | |
winston.info(`--- Cleaning up all old files ---`); | |
fileCleanup(); | |
// register tests to run | |
const floodTests = [ | |
"./floodTests/test.ts", | |
]; | |
winston.info("--- Starting Flood Element tests ---"); | |
// run tests | |
testHelpers.runFloodTests(floodTests) | |
//log results | |
.then(testResults => { | |
testHelpers.logResults(testResults); | |
return testResults; | |
}) | |
.then(async testResults => { | |
await testHelpers.delay(1000); | |
const testsPassedSuccessfully = testResults.every(test => test.successful === true) | |
testsPassedSuccessfully ? winston.info(`All tests passed successfully!`) : winston.info(`One/All tests passed failed!`); | |
winston.info("--- Completed Flood Element tests ---"); | |
testsPassedSuccessfully ? process.exit(0) : process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment