Skip to content

Commit 1f99f13

Browse files
authored
Added jest new file. (#20020)
1 parent acffc7d commit 1f99f13

File tree

13 files changed

+94
-22
lines changed

13 files changed

+94
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import tl = require('azure-pipelines-task-lib/task');
2+
import utils = require('../utils');
3+
import constants = require('../constants');
4+
5+
export async function executeJestTests(testsToBeExecuted: string[]): Promise<number> {
6+
7+
// jest execution will be added
8+
/*executable = npm
9+
args = test
10+
*/
11+
12+
console.log("jest changes1");
13+
return 1;
14+
}

Tasks/AzureTestPlanV0/automatedTestInvoker.ts

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { executeMavenTests } from './Invokers/maveninvoker'
44
import { executeGradleTests } from './Invokers/gradleinvoker'
55
import { ciDictionary } from './ciEventLogger';
66
import { executeGoTests } from './Invokers/goinvoker';
7+
import { executeJestTests } from './Invokers/jestinvoker';
8+
79
export async function testInvoker(testsToBeExecuted: string[], ciData: ciDictionary): Promise<number> {
810

911
const testLanguage = tl.getInput('testLanguageInput', true);
@@ -41,6 +43,12 @@ export async function testInvoker(testsToBeExecuted: string[], ciData: ciDiction
4143
ciData["isGoExecution"] = true;
4244
break;
4345

46+
case 'Jest':
47+
exitCode = await executeJestTests(testsToBeExecuted);
48+
tl.debug(`Execution Status Code for Jest: ${exitCode}`);
49+
ciData["isJestExecution"] = true;
50+
break;
51+
4452
default:
4553
console.log('Invalid test Language Input selected.');
4654
ciData["NoLanguageInput"] = true;

Tasks/AzureTestPlanV0/task.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 0,
1616
"Minor": 241,
17-
"Patch": 4
17+
"Patch": 6
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -80,7 +80,8 @@
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
8282
"Python": "Python",
83-
"Go": "Go"
83+
"Go": "Go",
84+
"Jest": "Jest"
8485
}
8586
},
8687
{

Tasks/AzureTestPlanV0/task.loc.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 0,
1616
"Minor": 241,
17-
"Patch": 4
17+
"Patch": 6
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -80,7 +80,8 @@
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
8282
"Python": "Python",
83-
"Go": "Go"
83+
"Go": "Go",
84+
"Jest": "Jest"
8485
}
8586
},
8687
{
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|0.241.4
2-
Node20-225|0.241.5
1+
Default|0.241.6
2+
Node20-225|0.241.7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import tl = require('azure-pipelines-task-lib/task');
2+
import utils = require('../utils');
3+
import constants = require('../constants');
4+
5+
export async function executeJestTests(testsToBeExecuted: string[]): Promise<number> {
6+
7+
// jest execution will be added
8+
/*executable = npm
9+
args = test
10+
*/
11+
12+
console.log("jest changes1");
13+
return 1;
14+
}

_generated/AzureTestPlanV0/automatedTestInvoker.ts

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { executeMavenTests } from './Invokers/maveninvoker'
44
import { executeGradleTests } from './Invokers/gradleinvoker'
55
import { ciDictionary } from './ciEventLogger';
66
import { executeGoTests } from './Invokers/goinvoker';
7+
import { executeJestTests } from './Invokers/jestinvoker';
8+
79
export async function testInvoker(testsToBeExecuted: string[], ciData: ciDictionary): Promise<number> {
810

911
const testLanguage = tl.getInput('testLanguageInput', true);
@@ -41,6 +43,12 @@ export async function testInvoker(testsToBeExecuted: string[], ciData: ciDiction
4143
ciData["isGoExecution"] = true;
4244
break;
4345

46+
case 'Jest':
47+
exitCode = await executeJestTests(testsToBeExecuted);
48+
tl.debug(`Execution Status Code for Jest: ${exitCode}`);
49+
ciData["isJestExecution"] = true;
50+
break;
51+
4452
default:
4553
console.log('Invalid test Language Input selected.');
4654
ciData["NoLanguageInput"] = true;

_generated/AzureTestPlanV0/task.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 0,
1616
"Minor": 241,
17-
"Patch": 4
17+
"Patch": 6
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -80,7 +80,8 @@
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
8282
"Python": "Python",
83-
"Go": "Go"
83+
"Go": "Go",
84+
"Jest": "Jest"
8485
}
8586
},
8687
{
@@ -177,7 +178,7 @@
177178
"MultipleMatchingGradlewFound": "Multiple gradlew files found. Selecting the first matched instance"
178179
},
179180
"_buildConfigMapping": {
180-
"Default": "0.241.4",
181-
"Node20-225": "0.241.5"
181+
"Default": "0.241.6",
182+
"Node20-225": "0.241.7"
182183
}
183184
}

_generated/AzureTestPlanV0/task.loc.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 0,
1616
"Minor": 241,
17-
"Patch": 4
17+
"Patch": 6
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -80,7 +80,8 @@
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
8282
"Python": "Python",
83-
"Go": "Go"
83+
"Go": "Go",
84+
"Jest": "Jest"
8485
}
8586
},
8687
{
@@ -177,7 +178,7 @@
177178
"MultipleMatchingGradlewFound": "ms-resource:loc.messages.MultipleMatchingGradlewFound"
178179
},
179180
"_buildConfigMapping": {
180-
"Default": "0.241.4",
181-
"Node20-225": "0.241.5"
181+
"Default": "0.241.6",
182+
"Node20-225": "0.241.7"
182183
}
183184
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import tl = require('azure-pipelines-task-lib/task');
2+
import utils = require('../utils');
3+
import constants = require('../constants');
4+
5+
export async function executeJestTests(testsToBeExecuted: string[]): Promise<number> {
6+
7+
// jest execution will be added
8+
/*executable = npm
9+
args = test
10+
*/
11+
12+
console.log("jest changes1");
13+
return 1;
14+
}

_generated/AzureTestPlanV0_Node20/automatedTestInvoker.ts

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { executeMavenTests } from './Invokers/maveninvoker'
44
import { executeGradleTests } from './Invokers/gradleinvoker'
55
import { ciDictionary } from './ciEventLogger';
66
import { executeGoTests } from './Invokers/goinvoker';
7+
import { executeJestTests } from './Invokers/jestinvoker';
8+
79
export async function testInvoker(testsToBeExecuted: string[], ciData: ciDictionary): Promise<number> {
810

911
const testLanguage = tl.getInput('testLanguageInput', true);
@@ -41,6 +43,12 @@ export async function testInvoker(testsToBeExecuted: string[], ciData: ciDiction
4143
ciData["isGoExecution"] = true;
4244
break;
4345

46+
case 'Jest':
47+
exitCode = await executeJestTests(testsToBeExecuted);
48+
tl.debug(`Execution Status Code for Jest: ${exitCode}`);
49+
ciData["isJestExecution"] = true;
50+
break;
51+
4452
default:
4553
console.log('Invalid test Language Input selected.');
4654
ciData["NoLanguageInput"] = true;

_generated/AzureTestPlanV0_Node20/task.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 0,
1616
"Minor": 241,
17-
"Patch": 5
17+
"Patch": 7
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -80,7 +80,8 @@
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
8282
"Python": "Python",
83-
"Go": "Go"
83+
"Go": "Go",
84+
"Jest": "Jest"
8485
}
8586
},
8687
{
@@ -181,7 +182,7 @@
181182
"MultipleMatchingGradlewFound": "Multiple gradlew files found. Selecting the first matched instance"
182183
},
183184
"_buildConfigMapping": {
184-
"Default": "0.241.4",
185-
"Node20-225": "0.241.5"
185+
"Default": "0.241.6",
186+
"Node20-225": "0.241.7"
186187
}
187188
}

_generated/AzureTestPlanV0_Node20/task.loc.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 0,
1616
"Minor": 241,
17-
"Patch": 5
17+
"Patch": 7
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -80,7 +80,8 @@
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
8282
"Python": "Python",
83-
"Go": "Go"
83+
"Go": "Go",
84+
"Jest": "Jest"
8485
}
8586
},
8687
{
@@ -181,7 +182,7 @@
181182
"MultipleMatchingGradlewFound": "ms-resource:loc.messages.MultipleMatchingGradlewFound"
182183
},
183184
"_buildConfigMapping": {
184-
"Default": "0.241.4",
185-
"Node20-225": "0.241.5"
185+
"Default": "0.241.6",
186+
"Node20-225": "0.241.7"
186187
}
187188
}

0 commit comments

Comments
 (0)