|
|
|
@@ -38,15 +38,24 @@ export class TsTest {
|
|
|
|
const tapCombinator = new TapCombinator(); // lets create the TapCombinator
|
|
|
|
const tapCombinator = new TapCombinator(); // lets create the TapCombinator
|
|
|
|
for (const fileNameArg of fileNamesToRun) {
|
|
|
|
for (const fileNameArg of fileNamesToRun) {
|
|
|
|
switch (true) {
|
|
|
|
switch (true) {
|
|
|
|
|
|
|
|
case process.env.CI && fileNameArg.includes('.nonci.'):
|
|
|
|
|
|
|
|
console.log('!!!!!!!!!!!');
|
|
|
|
|
|
|
|
console.log(`not running testfile ${fileNameArg}, sinc we are CI and file name includes '.nonci.' tag`);
|
|
|
|
|
|
|
|
console.log('!!!!!!!!!!!');
|
|
|
|
|
|
|
|
break;
|
|
|
|
case fileNameArg.endsWith('.browser.ts'):
|
|
|
|
case fileNameArg.endsWith('.browser.ts'):
|
|
|
|
const tapParserBrowser = await this.runInChrome(fileNameArg);
|
|
|
|
const tapParserBrowser = await this.runInChrome(fileNameArg);
|
|
|
|
tapCombinator.addTapParser(tapParserBrowser);
|
|
|
|
tapCombinator.addTapParser(tapParserBrowser);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case fileNameArg.endsWith('.both.ts'):
|
|
|
|
case fileNameArg.endsWith('.both.ts'):
|
|
|
|
|
|
|
|
console.log('>>>>>>> TEST PART 1: chrome');
|
|
|
|
const tapParserBothBrowser = await this.runInChrome(fileNameArg);
|
|
|
|
const tapParserBothBrowser = await this.runInChrome(fileNameArg);
|
|
|
|
tapCombinator.addTapParser(tapParserBothBrowser);
|
|
|
|
tapCombinator.addTapParser(tapParserBothBrowser);
|
|
|
|
|
|
|
|
console.log(cs(`|`.repeat(16), 'cyan'));
|
|
|
|
|
|
|
|
console.log(''); // force new line
|
|
|
|
|
|
|
|
console.log('>>>>>>> TEST PART 2: node');
|
|
|
|
const tapParserBothNode = await this.runInNode(fileNameArg);
|
|
|
|
const tapParserBothNode = await this.runInNode(fileNameArg);
|
|
|
|
tapCombinator.addTapParser(tapParserBothBrowser);
|
|
|
|
tapCombinator.addTapParser(tapParserBothNode);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
const tapParserNode = await this.runInNode(fileNameArg);
|
|
|
|
const tapParserNode = await this.runInNode(fileNameArg);
|
|
|
|
@@ -63,7 +72,7 @@ export class TsTest {
|
|
|
|
public async runInNode(fileNameArg: string): Promise<TapParser> {
|
|
|
|
public async runInNode(fileNameArg: string): Promise<TapParser> {
|
|
|
|
console.log(`${cs('=> ', 'blue')} Running ${cs(fileNameArg, 'orange')} in node.js runtime.`);
|
|
|
|
console.log(`${cs('=> ', 'blue')} Running ${cs(fileNameArg, 'orange')} in node.js runtime.`);
|
|
|
|
console.log(`${cs(`= `.repeat(32), 'cyan')}`);
|
|
|
|
console.log(`${cs(`= `.repeat(32), 'cyan')}`);
|
|
|
|
const tapParser = new TapParser(fileNameArg);
|
|
|
|
const tapParser = new TapParser(fileNameArg + ':node');
|
|
|
|
|
|
|
|
|
|
|
|
// tsrun options
|
|
|
|
// tsrun options
|
|
|
|
let tsrunOptions = '';
|
|
|
|
let tsrunOptions = '';
|
|
|
|
@@ -202,7 +211,7 @@ export class TsTest {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
console.log(`${cs('=> ', 'blue')} See the result captured from the chromium execution:`);
|
|
|
|
console.log(`${cs('=> ', 'blue')} See the result captured from the chromium execution:`);
|
|
|
|
// lets create the tap parser
|
|
|
|
// lets create the tap parser
|
|
|
|
const tapParser = new TapParser(fileNameArg);
|
|
|
|
const tapParser = new TapParser(fileNameArg + ':chrome');
|
|
|
|
tapParser.handleTapLog(evaluation);
|
|
|
|
tapParser.handleTapLog(evaluation);
|
|
|
|
return tapParser;
|
|
|
|
return tapParser;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|