specmatic 0.65.2 → 0.65.3
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/.babelrc +12 -12
- package/.github/workflows/npm-publish.yml +14 -5
- package/.github/workflows/test.yml +17 -0
- package/README.md +6 -0
- package/dist/lib/index.js +10 -5
- package/package.json +2 -5
- package/src/app.d.ts +1 -1
- package/src/bin/__tests__/core.ts +4 -4
- package/src/bin/core.ts +10 -14
- package/src/bin/index.ts +1 -1
- package/src/config.ts +1 -1
- package/src/index.ts +1 -7
- package/src/lib/__tests__/index.ts +92 -66
- package/src/lib/index.ts +14 -8
- /package/{mockStub.json → sample-mock-stub.json} +0 -0
- /package/{specmatic.json → sample-specmatic.json} +0 -0
package/.babelrc
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
2
|
+
"presets": [
|
|
3
|
+
"@babel/typescript",
|
|
4
|
+
[
|
|
5
|
+
"@babel/preset-env",
|
|
6
|
+
{
|
|
7
|
+
"targets": {
|
|
8
|
+
"esmodules": true
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
2
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
3
3
|
|
|
4
|
-
name:
|
|
4
|
+
name: publish
|
|
5
5
|
|
|
6
6
|
on:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
workflow_run:
|
|
8
|
+
workflows: ["test"]
|
|
9
|
+
types:
|
|
10
|
+
- completed
|
|
10
11
|
|
|
11
12
|
jobs:
|
|
12
13
|
build-and-publish:
|
|
14
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
13
15
|
runs-on: ubuntu-latest
|
|
14
16
|
steps:
|
|
15
17
|
- uses: actions/checkout@v2
|
|
@@ -17,8 +19,15 @@ jobs:
|
|
|
17
19
|
with:
|
|
18
20
|
node-version: 14
|
|
19
21
|
- run: npm install
|
|
20
|
-
- run: npm test
|
|
21
22
|
- run: npm run build
|
|
23
|
+
- run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
|
|
24
|
+
- name: Create Tag
|
|
25
|
+
id: create_tag
|
|
26
|
+
uses: jaywcjlove/create-tag-action@main
|
|
27
|
+
if: env.previous_tag
|
|
28
|
+
with:
|
|
29
|
+
package-path: ./package.json
|
|
30
|
+
release: true
|
|
22
31
|
- uses: JS-DevTools/npm-publish@v1
|
|
23
32
|
with:
|
|
24
33
|
check-version: true
|
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Specmatic Framework Node Module
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
3
6
|
This node module is a thin wrapper over the [standalone executable jar](https://specmatic.in/getting_started.html#setup). All core capabilities are in the main [Specmatic project](https://github.com/znsio/specmatic). The purpose of this wrapper module is to act as a convenience to help with below aspects.
|
|
4
7
|
* Easy installation and upgrade of the jar file in node projects through npm
|
|
5
8
|
* JS helper library which provides to do various setup steps like start, stop the specmatic stub server, installing specs etc. These helpers methods can be used inside a setup file inside a javascript project programmatically instead of using cli scripts.
|
|
@@ -21,6 +24,9 @@ Tests for Free – Specmatic parses your API Specification files and based on th
|
|
|
21
24
|
|
|
22
25
|
Check [Documentation](https://specmatic.in/documentation.html) for more information on cli commands and arguments.
|
|
23
26
|
|
|
27
|
+
## Sample Repo
|
|
28
|
+
https://github.com/znsio/specmatic-order-backend-nodejs
|
|
29
|
+
|
|
24
30
|
## Programmatic Access
|
|
25
31
|
|
|
26
32
|
Specmatic JS library exposes some of the commands as methods that can be run programmatically from any javascript testing framework, during setup or test phases.
|
package/dist/lib/index.js
CHANGED
|
@@ -62,7 +62,7 @@ var stopStub = javaProcess => {
|
|
|
62
62
|
|
|
63
63
|
exports.stopStub = stopStub;
|
|
64
64
|
|
|
65
|
-
var test = (
|
|
65
|
+
var test = (host, port, specs) => {
|
|
66
66
|
var specsPath = _path.default.resolve(specs + '');
|
|
67
67
|
|
|
68
68
|
var cmd = "java -jar ".concat(specmaticJarPath, " test");
|
|
@@ -88,10 +88,15 @@ var setExpectations = (stubPath, stubServerBaseUrl) => {
|
|
|
88
88
|
var stubResponse = require(_path.default.resolve(stubPath));
|
|
89
89
|
|
|
90
90
|
console.log('Setting expectations');
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
return new Promise((resolve, _reject) => {
|
|
92
|
+
(0, _nodeFetch.default)("".concat(stubServerBaseUrl ? stubServerBaseUrl : "http://localhost:9000/", "_specmatic/expectations"), {
|
|
93
|
+
method: 'POST',
|
|
94
|
+
body: JSON.stringify(stubResponse)
|
|
95
|
+
}).then(json => {
|
|
96
|
+
console.log(json);
|
|
97
|
+
resolve(true);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
95
100
|
};
|
|
96
101
|
|
|
97
102
|
exports.setExpectations = setExpectations;
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specmatic",
|
|
3
|
-
"version": "0.65.
|
|
3
|
+
"version": "0.65.3",
|
|
4
4
|
"description": "Node wrapper for Specmatic",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "jest",
|
|
8
|
-
"build": "npm test && rimraf dist && ./node_modules/.bin/babel src --extensions '.ts,.js' --ignore '**/__tests__/*.ts' -d dist"
|
|
9
|
-
"build-and-publish-patch": "npm run build && npm version patch && npm publish",
|
|
10
|
-
"build-and-publish-minor": "npm run build && npm version minor && npm publish",
|
|
11
|
-
"build-and-publish-major": "npm run build && npm version major && npm publish"
|
|
8
|
+
"build": "npm test && rimraf dist && ./node_modules/.bin/babel src --extensions '.ts,.js' --ignore '**/__tests__/*.ts' -d dist"
|
|
12
9
|
},
|
|
13
10
|
"repository": {
|
|
14
11
|
"type": "git",
|
package/src/app.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
declare module 'exec-sh';
|
|
1
|
+
declare module 'exec-sh';
|
|
@@ -6,8 +6,8 @@ import { specmaticJarPathLocal } from '../../config';
|
|
|
6
6
|
jest.mock('exec-sh');
|
|
7
7
|
|
|
8
8
|
test('arguments to be passed correctly to Specmatic lib', () => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const testArgs = ['node', 'index.js', 'stub', '*.specmatic', '--data', 'src/mocks', '--host', 'localhost', '--port', '8000'];
|
|
10
|
+
startSpecmaticServer(testArgs);
|
|
11
|
+
expect(execSh.mock.calls[0][0]).toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} ${testArgs.slice(2).join(' ')}`);
|
|
12
|
+
expect(execSh).toHaveBeenCalledTimes(1);
|
|
13
13
|
});
|
package/src/bin/core.ts
CHANGED
|
@@ -3,20 +3,16 @@ import path from 'path';
|
|
|
3
3
|
import { specmaticJarPathLocal } from '../config';
|
|
4
4
|
|
|
5
5
|
const callSpecmaticCli = (args?: string[]) => {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const specmaticJarPath = path.resolve(specmaticJarPathLocal);
|
|
7
|
+
const cliArgs = (args || process.argv).slice(2).join(' ');
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
process.exit(err.code);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
);
|
|
9
|
+
console.log('starting specmatic server', cliArgs);
|
|
10
|
+
execSh(`java -jar ${specmaticJarPath} ${cliArgs}`, {}, (err: any) => {
|
|
11
|
+
if (err) {
|
|
12
|
+
console.log('Exit code: ', err.code);
|
|
13
|
+
process.exit(err.code);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
20
16
|
};
|
|
21
17
|
|
|
22
|
-
export default callSpecmaticCli;
|
|
18
|
+
export default callSpecmaticCli;
|
package/src/bin/index.ts
CHANGED
package/src/config.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const specmaticJarPathLocal = './node_modules/specmatic/specmatic.jar';
|
|
2
2
|
export const specmaticJarPathRemote = 'https://github.com/znsio/specmatic/releases/download/0.24.2/specmatic.jar';
|
|
3
|
-
export const specmatic = 'specmatic.json'
|
|
3
|
+
export const specmatic = 'specmatic.json'
|
package/src/index.ts
CHANGED
|
@@ -3,120 +3,146 @@ import fetch from 'node-fetch';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { ChildProcess } from 'child_process';
|
|
5
5
|
import { mock as jestMock } from 'jest-mock-extended';
|
|
6
|
-
import { Readable } from
|
|
6
|
+
import { Readable } from 'stream';
|
|
7
7
|
|
|
8
8
|
import * as specmatic from '../';
|
|
9
9
|
import { startStub, stopStub, printJarVersion, setExpectations } from '../';
|
|
10
10
|
import { specmaticJarPathLocal } from '../../config';
|
|
11
|
-
import mockStub from '../../../
|
|
11
|
+
import mockStub from '../../../sample-mock-stub.json';
|
|
12
12
|
|
|
13
13
|
jest.mock('exec-sh');
|
|
14
14
|
jest.mock('node-fetch');
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
16
|
+
const CONTRACT_YAML_FILE_PATH = './contracts';
|
|
17
|
+
const STUB_DIR_PATH = './data';
|
|
18
|
+
const HOST = 'localhost';
|
|
19
|
+
const PORT = '8000';
|
|
20
|
+
|
|
20
21
|
const javaProcessMock = jestMock<ChildProcess>();
|
|
21
22
|
const readableMock = jestMock<Readable>();
|
|
22
23
|
javaProcessMock.stdout = readableMock;
|
|
23
24
|
javaProcessMock.stderr = readableMock;
|
|
24
25
|
|
|
25
26
|
beforeEach(() => {
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
execSh.mockReset();
|
|
28
|
+
fetch.mockReset();
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
test('startStub method starts the specmatic stub server', async () => {
|
|
31
|
-
|
|
32
|
+
execSh.mockReturnValue(javaProcessMock);
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
startStub(HOST, PORT, STUB_DIR_PATH).then(javaProcess => {
|
|
35
|
+
expect(javaProcess).toBe(javaProcessMock);
|
|
36
|
+
});
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
readableMock.on.mock.calls[0][1]('Stub server is running');
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
expect(execSh).toHaveBeenCalledTimes(1);
|
|
41
|
+
expect(execSh.mock.calls[0][0]).toBe(
|
|
42
|
+
`java -jar ${path.resolve(specmaticJarPathLocal)} stub --data=${path.resolve(STUB_DIR_PATH)} --host=${HOST} --port=${PORT}`
|
|
43
|
+
);
|
|
42
44
|
});
|
|
43
45
|
|
|
44
46
|
test('startStub method stubDir is optional', async () => {
|
|
45
|
-
|
|
47
|
+
execSh.mockReturnValue(javaProcessMock);
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
startStub(HOST, PORT).then(javaProcess => {
|
|
50
|
+
expect(javaProcess).toBe(javaProcessMock);
|
|
51
|
+
});
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
readableMock.on.mock.calls[0][1]('Stub server is running');
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} stub --host=${host} --port=${port}`);
|
|
55
|
+
expect(execSh).toHaveBeenCalledTimes(1);
|
|
56
|
+
expect(execSh.mock.calls[0][0]).toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} stub --host=${HOST} --port=${PORT}`);
|
|
56
57
|
});
|
|
57
58
|
|
|
58
59
|
test('startStub method host and port are optional', async () => {
|
|
59
|
-
|
|
60
|
+
execSh.mockReturnValue(javaProcessMock);
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
startStub().then(javaProcess => {
|
|
63
|
+
expect(javaProcess).toBe(javaProcessMock);
|
|
64
|
+
});
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
readableMock.on.mock.calls[0][1]('Stub server is running');
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
.toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} stub`);
|
|
68
|
+
expect(execSh).toHaveBeenCalledTimes(1);
|
|
69
|
+
expect(execSh.mock.calls[0][0]).toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} stub`);
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
test('stopStub method stops any running stub server', () => {
|
|
73
|
-
|
|
73
|
+
stopStub(javaProcessMock);
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
expect(readableMock.removeAllListeners).toHaveBeenCalledTimes(2);
|
|
76
|
+
expect(javaProcessMock.removeAllListeners).toHaveBeenCalledTimes(1);
|
|
77
|
+
expect(javaProcessMock.kill).toHaveBeenCalledTimes(1);
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
test('test runs the contract tests', function (done) {
|
|
81
|
-
specmatic.test(
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
specmatic.test(HOST, PORT, CONTRACT_YAML_FILE_PATH).then(result => {
|
|
82
|
+
expect(result).toBeTruthy();
|
|
83
|
+
done();
|
|
84
|
+
});
|
|
85
|
+
execSh.mock.calls[0][2](); //Execute the callback
|
|
86
|
+
expect(execSh).toHaveBeenCalledTimes(1);
|
|
87
|
+
expect(execSh.mock.calls[0][0]).toBe(
|
|
88
|
+
`java -jar ${path.resolve(specmaticJarPathLocal)} test ${path.resolve(CONTRACT_YAML_FILE_PATH)} --host=${HOST} --port=${PORT}`
|
|
89
|
+
);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test('test runs the contract tests with host and port optional', function (done) {
|
|
93
|
+
specmatic.test().then(result => {
|
|
94
|
+
expect(result).toBeTruthy();
|
|
95
|
+
done();
|
|
84
96
|
});
|
|
85
97
|
execSh.mock.calls[0][2](); //Execute the callback
|
|
86
98
|
expect(execSh).toHaveBeenCalledTimes(1);
|
|
87
|
-
expect(execSh.mock.calls[0][0])
|
|
88
|
-
|
|
89
|
-
|
|
99
|
+
expect(execSh.mock.calls[0][0]).toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} test`);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
test('test runs the contract tests with contracts path optional', function (done) {
|
|
103
|
+
specmatic.test(HOST, PORT).then(result => {
|
|
104
|
+
expect(result).toBeTruthy();
|
|
105
|
+
done();
|
|
106
|
+
});
|
|
107
|
+
execSh.mock.calls[0][2](); //Execute the callback
|
|
108
|
+
expect(execSh).toHaveBeenCalledTimes(1);
|
|
109
|
+
expect(execSh.mock.calls[0][0]).toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} test --host=${HOST} --port=${PORT}`);
|
|
110
|
+
});
|
|
90
111
|
|
|
91
112
|
test('printJarVersion', () => {
|
|
92
|
-
|
|
113
|
+
printJarVersion();
|
|
93
114
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
.toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} --version`);
|
|
115
|
+
expect(execSh).toHaveBeenCalledTimes(1);
|
|
116
|
+
expect(execSh.mock.calls[0][0]).toBe(`java -jar ${path.resolve(specmaticJarPathLocal)} --version`);
|
|
97
117
|
});
|
|
98
118
|
|
|
99
|
-
test('setExpectations with default baseUrl',
|
|
100
|
-
|
|
101
|
-
|
|
119
|
+
test('setExpectations with default baseUrl', done => {
|
|
120
|
+
fetch.mockReturnValue(Promise.resolve('{}'));
|
|
121
|
+
setExpectations(path.resolve('./sample-mock-stub.json')).then(result => {
|
|
122
|
+
expect(result).toBeTruthy();
|
|
123
|
+
done();
|
|
124
|
+
});
|
|
102
125
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
126
|
+
expect(fetch).toHaveBeenCalledTimes(1);
|
|
127
|
+
expect(fetch.mock.calls[0][0]).toBe('http://localhost:9000/_specmatic/expectations');
|
|
128
|
+
expect(fetch.mock.calls[0][1]).toMatchObject({
|
|
129
|
+
method: 'POST',
|
|
130
|
+
body: JSON.stringify(mockStub),
|
|
131
|
+
});
|
|
109
132
|
});
|
|
110
133
|
|
|
111
|
-
test('setExpectations with a different baseUrl for the stub server',
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
test('setExpectations with a different baseUrl for the stub server', done => {
|
|
135
|
+
fetch.mockReturnValue(Promise.resolve('{}'));
|
|
136
|
+
const stubServerBaseUrl = 'http://localhost:8000/';
|
|
137
|
+
setExpectations(path.resolve('./sample-mock-stub.json'), stubServerBaseUrl).then(result => {
|
|
138
|
+
expect(result).toBeTruthy();
|
|
139
|
+
done();
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
expect(fetch).toHaveBeenCalledTimes(1);
|
|
143
|
+
expect(fetch.mock.calls[0][0]).toBe(`${stubServerBaseUrl}_specmatic/expectations`);
|
|
144
|
+
expect(fetch.mock.calls[0][1]).toMatchObject({
|
|
145
|
+
method: 'POST',
|
|
146
|
+
body: JSON.stringify(mockStub),
|
|
147
|
+
});
|
|
122
148
|
});
|
package/src/lib/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ChildProcess } from 'child_process';
|
|
|
6
6
|
|
|
7
7
|
const specmaticJarPath = path.resolve(specmaticJarPathLocal);
|
|
8
8
|
|
|
9
|
-
const startStub = (host?: string, port?: string, stubDir?: string)
|
|
9
|
+
const startStub = (host?: string, port?: string, stubDir?: string): Promise<ChildProcess> => {
|
|
10
10
|
const stubs = path.resolve(stubDir + '');
|
|
11
11
|
|
|
12
12
|
var cmd = `java -jar ${specmaticJarPath} stub`;
|
|
@@ -25,7 +25,7 @@ const startStub = (host?: string, port?: string, stubDir?: string) : Promise<Chi
|
|
|
25
25
|
javaProcess.stdout.on('data', function (data: String) {
|
|
26
26
|
console.log('STDOUT: ' + data);
|
|
27
27
|
if (data.indexOf('Stub server is running') > -1) {
|
|
28
|
-
|
|
28
|
+
resolve(javaProcess);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
javaProcess.stderr.on('data', function (data: String) {
|
|
@@ -42,7 +42,7 @@ const stopStub = (javaProcess: ChildProcess) => {
|
|
|
42
42
|
javaProcess.kill();
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
const test = (
|
|
45
|
+
const test = (host?: string, port?: string, specs?: string): Promise<boolean> => {
|
|
46
46
|
const specsPath = path.resolve(specs + '');
|
|
47
47
|
|
|
48
48
|
var cmd = `java -jar ${specmaticJarPath} test`;
|
|
@@ -63,14 +63,20 @@ const test = (specs?: string, host?: string, port?: string): Promise<boolean> =>
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
const setExpectations = (stubPath: string, stubServerBaseUrl?: string) => {
|
|
66
|
+
const setExpectations = (stubPath: string, stubServerBaseUrl?: string): Promise<boolean> => {
|
|
67
67
|
const stubResponse = require(path.resolve(stubPath));
|
|
68
68
|
|
|
69
69
|
console.log('Setting expectations');
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
|
|
71
|
+
return new Promise((resolve, _reject) => {
|
|
72
|
+
fetch(`${stubServerBaseUrl ? stubServerBaseUrl : `http://localhost:9000/`}_specmatic/expectations`, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
body: JSON.stringify(stubResponse),
|
|
75
|
+
}).then(json => {
|
|
76
|
+
console.log(json);
|
|
77
|
+
resolve(true);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
const printJarVersion = () => {
|
|
File without changes
|
|
File without changes
|