ibm-cloud-sdk-core 4.3.2-beta → 4.3.2-beta-2

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.
@@ -13,7 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import expect from 'expect';
16
+ // eslint-disable-next-line import/no-extraneous-dependencies
17
+ import { expect } from '@jest/globals';
17
18
  /**
18
19
  * This module provides a set of helper methods used to reduce code duplication in the generated unit tests
19
20
  * for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
@@ -14,12 +14,10 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
17
  Object.defineProperty(exports, "__esModule", { value: true });
21
18
  exports.expectToBePromise = exports.getOptions = exports.checkForSuccessfulExecution = exports.checkUserHeader = exports.checkMediaHeaders = exports.checkUrlAndMethod = void 0;
22
- var expect_1 = __importDefault(require("expect"));
19
+ // eslint-disable-next-line import/no-extraneous-dependencies
20
+ var globals_1 = require("@jest/globals");
23
21
  /**
24
22
  * This module provides a set of helper methods used to reduce code duplication in the generated unit tests
25
23
  * for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
@@ -34,8 +32,8 @@ var expect_1 = __importDefault(require("expect"));
34
32
  * @param method - The HTTP method for the request, from the API definition
35
33
  */
36
34
  function checkUrlAndMethod(options, url, method) {
37
- (0, expect_1.default)(options.url).toEqual(url);
38
- (0, expect_1.default)(options.method).toEqual(method);
35
+ (0, globals_1.expect)(options.url).toEqual(url);
36
+ (0, globals_1.expect)(options.method).toEqual(method);
39
37
  }
40
38
  exports.checkUrlAndMethod = checkUrlAndMethod;
41
39
  /**
@@ -49,8 +47,8 @@ exports.checkUrlAndMethod = checkUrlAndMethod;
49
47
  */
50
48
  function checkMediaHeaders(createRequestMock, accept, contentType) {
51
49
  var headers = createRequestMock.mock.calls[0][0].defaultOptions.headers;
52
- (0, expect_1.default)(headers.Accept).toEqual(accept);
53
- (0, expect_1.default)(headers['Content-Type']).toEqual(contentType);
50
+ (0, globals_1.expect)(headers.Accept).toEqual(accept);
51
+ (0, globals_1.expect)(headers['Content-Type']).toEqual(contentType);
54
52
  }
55
53
  exports.checkMediaHeaders = checkMediaHeaders;
56
54
  /**
@@ -64,7 +62,7 @@ exports.checkMediaHeaders = checkMediaHeaders;
64
62
  */
65
63
  function checkUserHeader(createRequestMock, userHeaderName, userHeaderValue) {
66
64
  var headers = createRequestMock.mock.calls[0][0].defaultOptions.headers;
67
- (0, expect_1.default)(headers[userHeaderName]).toEqual(userHeaderValue);
65
+ (0, globals_1.expect)(headers[userHeaderName]).toEqual(userHeaderValue);
68
66
  }
69
67
  exports.checkUserHeader = checkUserHeader;
70
68
  /**
@@ -75,7 +73,7 @@ exports.checkUserHeader = checkUserHeader;
75
73
  */
76
74
  function checkForSuccessfulExecution(createRequestMock) {
77
75
  var sdkParams = createRequestMock.mock.calls[0][0];
78
- (0, expect_1.default)(typeof sdkParams).toEqual('object');
76
+ (0, globals_1.expect)(typeof sdkParams).toEqual('object');
79
77
  }
80
78
  exports.checkForSuccessfulExecution = checkForSuccessfulExecution;
81
79
  /**
@@ -97,6 +95,6 @@ exports.getOptions = getOptions;
97
95
  * @param sdkPromise - the Promise returned by an SDK method
98
96
  */
99
97
  function expectToBePromise(sdkPromise) {
100
- (0, expect_1.default)(typeof sdkPromise.then).toBe('function');
98
+ (0, globals_1.expect)(typeof sdkPromise.then).toBe('function');
101
99
  }
102
100
  exports.expectToBePromise = expectToBePromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ibm-cloud-sdk-core",
3
- "version": "4.3.2-beta",
3
+ "version": "4.3.2-beta-2",
4
4
  "description": "Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.",
5
5
  "main": "./index.js",
6
6
  "typings": "./es/index.d.ts",
@@ -35,8 +35,6 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@types/debug": "^4.1.12",
38
- "@types/file-type": "~5.2.1",
39
- "@types/isstream": "^0.1.0",
40
38
  "@types/node": "~10.14.19",
41
39
  "@types/tough-cookie": "^4.0.0",
42
40
  "axios": "1.6.8",