codeceptjs 3.5.12-beta.7 → 3.5.12-beta.9
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/lib/helper/MockServer.js +6 -0
- package/package.json +1 -1
- package/typings/types.d.ts +6 -3
package/lib/helper/MockServer.js
CHANGED
|
@@ -151,6 +151,8 @@ class MockServer {
|
|
|
151
151
|
/**
|
|
152
152
|
* Start the mock server
|
|
153
153
|
* @param {number} [port] start the mock server with given port
|
|
154
|
+
*
|
|
155
|
+
* @returns void
|
|
154
156
|
*/
|
|
155
157
|
async startMockServer(port) {
|
|
156
158
|
const _config = { ...config };
|
|
@@ -162,6 +164,8 @@ class MockServer {
|
|
|
162
164
|
/**
|
|
163
165
|
* Stop the mock server
|
|
164
166
|
*
|
|
167
|
+
* @returns void
|
|
168
|
+
*
|
|
165
169
|
*/
|
|
166
170
|
async stopMockServer() {
|
|
167
171
|
await mock.stop();
|
|
@@ -206,6 +210,8 @@ class MockServer {
|
|
|
206
210
|
*
|
|
207
211
|
* @param {CodeceptJS.MockInteraction|object} interaction add behavior to the mock server
|
|
208
212
|
*
|
|
213
|
+
* @returns void
|
|
214
|
+
*
|
|
209
215
|
*/
|
|
210
216
|
async addInteractionToMockServer(interaction) {
|
|
211
217
|
await mock.addInteraction(interaction);
|
package/package.json
CHANGED
package/typings/types.d.ts
CHANGED
|
@@ -1895,12 +1895,14 @@ declare namespace CodeceptJS {
|
|
|
1895
1895
|
/**
|
|
1896
1896
|
* Start the mock server
|
|
1897
1897
|
* @param [port] - start the mock server with given port
|
|
1898
|
+
* @returns void
|
|
1898
1899
|
*/
|
|
1899
|
-
startMockServer(port?: number):
|
|
1900
|
+
startMockServer(port?: number): any;
|
|
1900
1901
|
/**
|
|
1901
1902
|
* Stop the mock server
|
|
1903
|
+
* @returns void
|
|
1902
1904
|
*/
|
|
1903
|
-
stopMockServer():
|
|
1905
|
+
stopMockServer(): any;
|
|
1904
1906
|
/**
|
|
1905
1907
|
* An interaction adds behavior to the mock server
|
|
1906
1908
|
*
|
|
@@ -1938,8 +1940,9 @@ declare namespace CodeceptJS {
|
|
|
1938
1940
|
* });
|
|
1939
1941
|
* ```
|
|
1940
1942
|
* @param interaction - add behavior to the mock server
|
|
1943
|
+
* @returns void
|
|
1941
1944
|
*/
|
|
1942
|
-
addInteractionToMockServer(interaction: CodeceptJS.MockInteraction | any):
|
|
1945
|
+
addInteractionToMockServer(interaction: CodeceptJS.MockInteraction | any): any;
|
|
1943
1946
|
}
|
|
1944
1947
|
/**
|
|
1945
1948
|
* Nightmare helper wraps [Nightmare](https://github.com/segmentio/nightmare) library to provide
|