azure-pipelines-tasks-webdeployment-common 4.243.1 → 4.245.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Tests/L0CopyDirectory.js
CHANGED
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.runCopyDirectoryTests = void 0;
|
|
13
13
|
const assert = require("assert");
|
|
14
|
-
const
|
|
14
|
+
const libMocker = require("azure-pipelines-task-lib/lib-mocker");
|
|
15
15
|
const path = require("path");
|
|
16
16
|
function runCopyDirectoryTests() {
|
|
17
17
|
const fileList = [];
|
|
@@ -64,18 +64,18 @@ function runCopyDirectoryTests() {
|
|
|
64
64
|
console.log(message);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
libMocker.registerMock('azure-pipelines-task-lib/task', taskLibMock);
|
|
68
|
+
libMocker.registerMock('./packageUtility', {});
|
|
69
|
+
libMocker.registerMock('./ziputility', {});
|
|
70
|
+
libMocker.registerAllowable('../utility');
|
|
71
|
+
libMocker.enable({
|
|
72
72
|
useCleanCache: true,
|
|
73
73
|
warnOnReplace: false,
|
|
74
74
|
warnOnUnregistered: false
|
|
75
75
|
});
|
|
76
76
|
}));
|
|
77
77
|
after(() => {
|
|
78
|
-
|
|
78
|
+
libMocker.disable();
|
|
79
79
|
});
|
|
80
80
|
beforeEach(() => {
|
|
81
81
|
mkdirPCount = 0;
|
package/Tests/L0CopyDirectory.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as assert from "assert";
|
|
2
|
-
import * as
|
|
2
|
+
import * as libMocker from "azure-pipelines-task-lib/lib-mocker";
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
|
|
5
5
|
export function runCopyDirectoryTests(): void {
|
|
@@ -56,12 +56,12 @@ export function runCopyDirectoryTests(): void {
|
|
|
56
56
|
console.log(message);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
libMocker.registerMock('azure-pipelines-task-lib/task', taskLibMock);
|
|
60
|
+
libMocker.registerMock('./packageUtility', {});
|
|
61
|
+
libMocker.registerMock('./ziputility', {});
|
|
62
|
+
libMocker.registerAllowable('../utility');
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
libMocker.enable({
|
|
65
65
|
useCleanCache: true,
|
|
66
66
|
warnOnReplace: false,
|
|
67
67
|
warnOnUnregistered: false
|
|
@@ -69,7 +69,7 @@ export function runCopyDirectoryTests(): void {
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
after(() => {
|
|
72
|
-
|
|
72
|
+
libMocker.disable();
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
beforeEach(() => {
|
|
@@ -11,11 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.runGenerateWebCongigTests = void 0;
|
|
13
13
|
const assert = require("assert");
|
|
14
|
-
const
|
|
14
|
+
const libMocker = require("azure-pipelines-task-lib/lib-mocker");
|
|
15
15
|
function runGenerateWebCongigTests() {
|
|
16
16
|
let webConfigContents;
|
|
17
17
|
before(() => {
|
|
18
|
-
|
|
18
|
+
libMocker.registerMock('azure-pipelines-task-lib/task', {
|
|
19
19
|
writeFile: function (_file, data, _options) {
|
|
20
20
|
console.log("web.config contents: " + data);
|
|
21
21
|
webConfigContents = data;
|
|
@@ -24,20 +24,20 @@ function runGenerateWebCongigTests() {
|
|
|
24
24
|
console.log("##[debug]: " + message);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
libMocker.registerMock('fs', {
|
|
28
28
|
readFileSync: function (_path, _format) {
|
|
29
29
|
return "{NodeStartFile};{Handler}";
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
libMocker.registerAllowable("../webconfigutil");
|
|
33
|
+
libMocker.enable({
|
|
34
34
|
useCleanCache: true,
|
|
35
35
|
warnOnReplace: false,
|
|
36
36
|
warnOnUnregistered: false
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
after(() => {
|
|
40
|
-
|
|
40
|
+
libMocker.disable();
|
|
41
41
|
});
|
|
42
42
|
beforeEach(() => {
|
|
43
43
|
webConfigContents = "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as assert from "assert";
|
|
2
|
-
import * as
|
|
2
|
+
import * as libMocker from "azure-pipelines-task-lib/lib-mocker";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export function runGenerateWebCongigTests() {
|
|
@@ -7,7 +7,7 @@ export function runGenerateWebCongigTests() {
|
|
|
7
7
|
|
|
8
8
|
before(() => {
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
libMocker.registerMock('azure-pipelines-task-lib/task', {
|
|
11
11
|
writeFile: function (_file: string, data: string, _options: any): void {
|
|
12
12
|
console.log("web.config contents: " + data);
|
|
13
13
|
webConfigContents = data;
|
|
@@ -17,15 +17,15 @@ export function runGenerateWebCongigTests() {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
libMocker.registerMock('fs', {
|
|
21
21
|
readFileSync: function (_path: string, _format: string): string {
|
|
22
22
|
return "{NodeStartFile};{Handler}"
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
libMocker.registerAllowable("../webconfigutil");
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
libMocker.enable({
|
|
29
29
|
useCleanCache: true,
|
|
30
30
|
warnOnReplace: false,
|
|
31
31
|
warnOnUnregistered: false
|
|
@@ -33,7 +33,7 @@ export function runGenerateWebCongigTests() {
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
after(() => {
|
|
36
|
-
|
|
36
|
+
libMocker.disable();
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
beforeEach(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azure-pipelines-tasks-webdeployment-common",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.245.0",
|
|
4
4
|
"description": "Common Lib for MSDeploy Utility",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/semver": "^7.5.4",
|
|
35
35
|
"@types/winreg": "^1.2.34",
|
|
36
|
-
"mocha": "^6.2.3",
|
|
37
36
|
"nyc": "^15.1.0",
|
|
38
37
|
"typescript": "4.0.2"
|
|
39
38
|
}
|