Skip to content

Commit

Permalink
Merge with VsTestV2 recent fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rameshkg07 committed Aug 20, 2022
1 parent ee1ea61 commit cd1eb06
Show file tree
Hide file tree
Showing 8 changed files with 679 additions and 679 deletions.
10 changes: 5 additions & 5 deletions Tasks/VsTestV3/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ describe('VsTest Suite', function() {
const inputDataContractInterfaceFileContents = fs.readFileSync('../Tasks/VsTestV3/inputdatacontract.ts', 'utf8').toString();
const listOfInterfaces = inputDataContractInterfaceFileContents.replace(/export interface (.*) \{([\s][^{}]*)+\}(\s)*/g, '$1 ').trim().split(' ');

const interfacesDictionary : { [key: string] : any } = <{ [key: string] : any} >{};
const interfacesDictionary: { [key: string]: any } = <{ [key: string]: any }>{};

listOfInterfaces.forEach(interfaceName => {
const regex = new RegExp(interfaceName + ' \\{\\s([\\s][^\\{\\}]*)+\\}');
const interfaceContents = inputDataContractInterfaceFileContents.match(regex)[1];

const interfaceProperties = interfaceContents.replace(/(\w+) \: (\w+([\[\]])*)\;/g, '$1 $2').split('\n');
const interfacePropertiesDictionary : { [key: string] : string } = <{ [key: string] : string }>{};
const interfacePropertiesDictionary: { [key: string]: string } = <{ [key: string]: string }>{};
interfaceProperties.forEach(property => {
property = property.trim();
interfacePropertiesDictionary[property.split(' ')[0]] = property.split(' ')[1];
Expand All @@ -47,12 +47,12 @@ describe('VsTest Suite', function() {
console.log('#######################################################################################################################');
console.log('Ensure that the interfaces file is well formatted without extra newlines or whitespaces as the parser this test uses depends on the correct formatting of the inputdatacontract.ts file');
console.log('#######################################################################################################################');

checkParity(inputDataContractParityToolOutput, interfacesDictionary, interfacesDictionary.InputDataContract);

function checkParity(dataContractObject: any, interfacesDictionary: any, subInterface: any) {

if (dataContractObject === null || dataContractObject === undefined ) {
if (dataContractObject === null || dataContractObject === undefined) {
return;
}

Expand Down Expand Up @@ -81,4 +81,4 @@ describe('VsTest Suite', function() {

done();
});
});
});
2 changes: 1 addition & 1 deletion Tasks/VsTestV3/make.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dest": "./"
},
{
"url": "https://testexecution.blob.core.windows.net/testexecution/12117206/TestAgent.zip",
"url": "https://testexecution.blob.core.windows.net/testexecution/17144597/TestAgent.zip",
"dest": "./Modules"
},
{
Expand Down
2 changes: 1 addition & 1 deletion Tasks/VsTestV3/nondistributedtest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ export class NonDistributedTest {

private inputDataContract: InputDataContract;
private sourceFilter: string[] = tl.getDelimitedInput('testAssemblyVer2', '\n', true);
}
}
2 changes: 1 addition & 1 deletion Tasks/VsTestV3/outputstream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ export class StringErrorWritable extends stream.Writable {

return line.substring(startIndex, endIndex);
}
}
}
26 changes: 13 additions & 13 deletions Tasks/VsTestV3/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cd1eb06

Please sign in to comment.