@futdevpro/nts-dynamo 1.9.50 → 1.10.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.
- package/.eslintrc.json +1 -0
- package/.github/workflows/main.yml +57 -3
- package/build/_collections/archive.util.spec.d.ts +2 -0
- package/build/_collections/archive.util.spec.d.ts.map +1 -0
- package/build/_collections/archive.util.spec.js +21 -0
- package/build/_collections/archive.util.spec.js.map +1 -0
- package/build/_models/control-models/api-call-params.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/api-call-params.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/api-call-params.control-model.spec.js +82 -0
- package/build/_models/control-models/api-call-params.control-model.spec.js.map +1 -0
- package/build/_models/control-models/app-params.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/app-params.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/app-params.control-model.spec.js +59 -0
- package/build/_models/control-models/app-params.control-model.spec.js.map +1 -0
- package/build/_models/control-models/app-system-controls.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/app-system-controls.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/app-system-controls.control-model.spec.js +26 -0
- package/build/_models/control-models/app-system-controls.control-model.spec.js.map +1 -0
- package/build/_models/control-models/endpoint-params.control-model.d.ts +1 -1
- package/build/_models/control-models/endpoint-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/endpoint-params.control-model.js +3 -3
- package/build/_models/control-models/endpoint-params.control-model.js.map +1 -1
- package/build/_models/control-models/http-settings.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/http-settings.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/http-settings.control-model.spec.js +62 -0
- package/build/_models/control-models/http-settings.control-model.spec.js.map +1 -0
- package/build/_models/control-models/system-control.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/system-control.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/system-control.control-model.spec.js +24 -0
- package/build/_models/control-models/system-control.control-model.spec.js.map +1 -0
- package/build/_modules/custom-data/custom-data.controller.d.ts.map +1 -1
- package/build/_modules/custom-data/custom-data.controller.js +3 -3
- package/build/_modules/custom-data/custom-data.controller.js.map +1 -1
- package/build/_modules/custom-data/custom-data.data-service.d.ts +1 -1
- package/build/_modules/custom-data/custom-data.data-service.d.ts.map +1 -1
- package/build/_modules/custom-data/custom-data.data-service.js +3 -3
- package/build/_modules/custom-data/custom-data.data-service.js.map +1 -1
- package/build/_modules/mock/app-params.mock.spec.d.ts +2 -0
- package/build/_modules/mock/app-params.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/app-params.mock.spec.js +19 -0
- package/build/_modules/mock/app-params.mock.spec.js.map +1 -0
- package/build/_modules/mock/auth-service.mock.spec.d.ts +2 -0
- package/build/_modules/mock/auth-service.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/auth-service.mock.spec.js +40 -0
- package/build/_modules/mock/auth-service.mock.spec.js.map +1 -0
- package/build/_modules/mock/controller.mock.spec.d.ts +2 -0
- package/build/_modules/mock/controller.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/controller.mock.spec.js +23 -0
- package/build/_modules/mock/controller.mock.spec.js.map +1 -0
- package/build/_modules/mock/data-model.mock.spec.d.ts +2 -0
- package/build/_modules/mock/data-model.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/data-model.mock.spec.js +99 -0
- package/build/_modules/mock/data-model.mock.spec.js.map +1 -0
- package/build/_modules/mock/email-service-collection.mock.spec.d.ts +2 -0
- package/build/_modules/mock/email-service-collection.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/email-service-collection.mock.spec.js +21 -0
- package/build/_modules/mock/email-service-collection.mock.spec.js.map +1 -0
- package/build/_modules/mock/email-service.mock.spec.d.ts +2 -0
- package/build/_modules/mock/email-service.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/email-service.mock.spec.js +14 -0
- package/build/_modules/mock/email-service.mock.spec.js.map +1 -0
- package/build/_modules/mock/socket-client.mock.js +2 -2
- package/build/_modules/mock/socket-client.mock.spec.d.ts +2 -0
- package/build/_modules/mock/socket-client.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/socket-client.mock.spec.js +32 -0
- package/build/_modules/mock/socket-client.mock.spec.js.map +1 -0
- package/build/_modules/mock/socket-server.mock.spec.d.ts +2 -0
- package/build/_modules/mock/socket-server.mock.spec.d.ts.map +1 -0
- package/build/_modules/mock/socket-server.mock.spec.js +36 -0
- package/build/_modules/mock/socket-server.mock.spec.js.map +1 -0
- package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.d.ts +2 -0
- package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.d.ts.map +1 -0
- package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.js +22 -0
- package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.js.map +1 -0
- package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.d.ts +2 -0
- package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.d.ts.map +1 -0
- package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.js +29 -0
- package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.js.map +1 -0
- package/build/_modules/socket/_services/socket-server.service.js +1 -1
- package/build/_modules/socket/_services/socket-server.service.js.map +1 -1
- package/build/_modules/usage/usage.controller.d.ts.map +1 -1
- package/build/_modules/usage/usage.controller.js +6 -4
- package/build/_modules/usage/usage.controller.js.map +1 -1
- package/build/_modules/usage/usage.data-service.d.ts +4 -4
- package/build/_modules/usage/usage.data-service.d.ts.map +1 -1
- package/build/_modules/usage/usage.data-service.js +2 -2
- package/build/_modules/usage/usage.data-service.js.map +1 -1
- package/build/_services/base/data.service.d.ts +7 -5
- package/build/_services/base/data.service.d.ts.map +1 -1
- package/build/_services/base/data.service.js +153 -13
- package/build/_services/base/data.service.js.map +1 -1
- package/build/_services/base/db.service.d.ts +2 -1
- package/build/_services/base/db.service.d.ts.map +1 -1
- package/build/_services/base/db.service.js +49 -19
- package/build/_services/base/db.service.js.map +1 -1
- package/build/_services/base/singleton.service-base.d.ts.map +1 -1
- package/build/_services/base/singleton.service-base.js.map +1 -1
- package/build/_services/core/api.service.d.ts +1 -1
- package/build/_services/core/api.service.js +2 -2
- package/build/_services/core/api.service.spec.d.ts +2 -0
- package/build/_services/core/api.service.spec.d.ts.map +1 -0
- package/build/_services/core/api.service.spec.js +75 -0
- package/build/_services/core/api.service.spec.js.map +1 -0
- package/build/_services/core/email.service.d.ts +6 -6
- package/build/_services/core/email.service.d.ts.map +1 -1
- package/build/_services/core/email.service.js.map +1 -1
- package/build/_services/core/email.service.spec.d.ts +2 -0
- package/build/_services/core/email.service.spec.d.ts.map +1 -0
- package/build/_services/core/email.service.spec.js +77 -0
- package/build/_services/core/email.service.spec.js.map +1 -0
- package/build/_services/core/global.service.d.ts.map +1 -1
- package/build/_services/core/global.service.js +2 -1
- package/build/_services/core/global.service.js.map +1 -1
- package/build/_services/route/controller.service.d.ts +3 -3
- package/build/_services/route/controller.service.js +2 -2
- package/build/_services/route/controller.service.spec.d.ts +2 -0
- package/build/_services/route/controller.service.spec.d.ts.map +1 -0
- package/build/_services/route/controller.service.spec.js +48 -0
- package/build/_services/route/controller.service.spec.js.map +1 -0
- package/build/_services/route/routing-module.service.spec.d.ts +2 -0
- package/build/_services/route/routing-module.service.spec.d.ts.map +1 -0
- package/build/_services/route/routing-module.service.spec.js +65 -0
- package/build/_services/route/routing-module.service.spec.js.map +1 -0
- package/build/_services/server/app.server.d.ts +5 -5
- package/build/_services/server/app.server.d.ts.map +1 -1
- package/build/_services/server/app.server.js +9 -7
- package/build/_services/server/app.server.js.map +1 -1
- package/package.json +8 -8
- package/spec/support/jasmine.json +8 -0
- package/src/_collections/archive.util.spec.ts +22 -0
- package/src/_models/control-models/api-call-params.control-model.spec.ts +94 -0
- package/src/_models/control-models/app-params.control-model.spec.ts +69 -0
- package/src/_models/control-models/app-system-controls.control-model.spec.ts +31 -0
- package/src/_models/control-models/endpoint-params.control-model.ts +7 -6
- package/src/_models/control-models/http-settings.control-model.spec.ts +66 -0
- package/src/_models/control-models/system-control.control-model.spec.ts +27 -0
- package/src/_modules/custom-data/custom-data.controller.ts +6 -6
- package/src/_modules/custom-data/custom-data.data-service.ts +4 -3
- package/src/_modules/mock/app-params.mock.spec.ts +21 -0
- package/src/_modules/mock/auth-service.mock.spec.ts +47 -0
- package/src/_modules/mock/controller.mock.spec.ts +26 -0
- package/src/_modules/mock/data-model.mock.spec.ts +109 -0
- package/src/_modules/mock/email-service-collection.mock.spec.ts +24 -0
- package/src/_modules/mock/email-service.mock.spec.ts +17 -0
- package/src/_modules/mock/socket-client.mock.spec.ts +40 -0
- package/src/_modules/mock/socket-client.mock.ts +4 -4
- package/src/_modules/mock/socket-server.mock.spec.ts +44 -0
- package/src/_modules/socket/_models/socket-client-service-params.control-model.spec.ts +30 -0
- package/src/_modules/socket/_models/socket-server-service-params.control-model.spec.ts +33 -0
- package/src/_modules/socket/_services/socket-server.service.ts +1 -1
- package/src/_modules/test/get-test-routing-module.util.ts +2 -2
- package/src/_modules/usage/usage.controller.ts +10 -8
- package/src/_modules/usage/usage.data-service.ts +10 -7
- package/src/_services/base/data.service.ts +235 -17
- package/src/_services/base/db.service.ts +50 -12
- package/src/_services/base/singleton.service-base.ts +0 -2
- package/src/_services/core/api.service.spec.ts +96 -0
- package/src/_services/core/api.service.ts +2 -2
- package/src/_services/core/email.service.spec.ts +93 -0
- package/src/_services/core/email.service.ts +9 -11
- package/src/_services/core/global.service.ts +3 -2
- package/src/_services/route/controller.service.spec.ts +52 -0
- package/src/_services/route/controller.service.ts +3 -3
- package/src/_services/route/routing-module.service.spec.ts +81 -0
- package/src/_services/server/app.server.ts +26 -24
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyNTS_App_Params } from './app-params.control-model';
|
|
3
|
+
|
|
4
|
+
describe('DyNTS_App_Params', () => {
|
|
5
|
+
it('should initialize with provided values', () => {
|
|
6
|
+
const params: DyNTS_App_Params = {
|
|
7
|
+
name: 'TestApp',
|
|
8
|
+
title: 'Test Application',
|
|
9
|
+
version: '1.0.0',
|
|
10
|
+
dbName: 'testdb',
|
|
11
|
+
dbUri: 'mongodb://localhost:27017/testdb',
|
|
12
|
+
systemName: 'Test-App',
|
|
13
|
+
systemShortCodeName: 'TA'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const appParams = new DyNTS_App_Params(params);
|
|
17
|
+
|
|
18
|
+
expect(appParams.name).toBe('TestApp');
|
|
19
|
+
expect(appParams.title).toBe('Test Application');
|
|
20
|
+
expect(appParams.version).toBe('1.0.0');
|
|
21
|
+
expect(appParams.dbName).toBe('testdb');
|
|
22
|
+
expect(appParams.dbUri).toBe('mongodb://localhost:27017/testdb');
|
|
23
|
+
expect(appParams.systemName).toBe('Test-App');
|
|
24
|
+
expect(appParams.systemShortCodeName).toBe('TA');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should set default values when optional parameters are not provided', () => {
|
|
28
|
+
const params: DyNTS_App_Params = {
|
|
29
|
+
name: 'TestApp',
|
|
30
|
+
version: '1.0.0',
|
|
31
|
+
dbName: 'testdb'
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const appParams = new DyNTS_App_Params(params);
|
|
35
|
+
|
|
36
|
+
expect(appParams.name).toBe('TestApp');
|
|
37
|
+
expect(appParams.title).toBe('');
|
|
38
|
+
expect(appParams.version).toBe('1.0.0');
|
|
39
|
+
expect(appParams.dbName).toBe('testdb');
|
|
40
|
+
expect(appParams.dbUri).toBe('mongodb://localhost:27017/testdb');
|
|
41
|
+
expect(appParams.systemName).toBe('TestApp');
|
|
42
|
+
expect(appParams.systemShortCodeName).toBe('TA');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('should generate systemShortCodeName from systemName if not provided', () => {
|
|
46
|
+
const params: DyNTS_App_Params = {
|
|
47
|
+
name: 'Test Application',
|
|
48
|
+
version: '1.0.0',
|
|
49
|
+
dbName: 'testdb',
|
|
50
|
+
systemName: 'Test-App'
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const appParams = new DyNTS_App_Params(params);
|
|
54
|
+
|
|
55
|
+
expect(appParams.systemShortCodeName).toBe('TA');
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('should generate systemName from name if not provided', () => {
|
|
59
|
+
const params: DyNTS_App_Params = {
|
|
60
|
+
name: 'Test Application',
|
|
61
|
+
version: '1.0.0',
|
|
62
|
+
dbName: 'testdb'
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const appParams = new DyNTS_App_Params(params);
|
|
66
|
+
|
|
67
|
+
expect(appParams.systemName).toBe('Test-Application');
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyNTS_AppSystemControls } from './app-system-controls.control-model';
|
|
3
|
+
import { DyNTS_SystemControl } from './system-control.control-model';
|
|
4
|
+
|
|
5
|
+
describe('DyNTS_AppSystemControls', () => {
|
|
6
|
+
let appSystemControls: DyNTS_AppSystemControls;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
appSystemControls = new DyNTS_AppSystemControls();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should create an instance of DyNTS_AppSystemControls', () => {
|
|
13
|
+
expect(appSystemControls).toBeTruthy();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should initialize "app" as an instance of DyNTS_SystemControl', () => {
|
|
17
|
+
expect(appSystemControls.app).toBeInstanceOf(DyNTS_SystemControl);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should initialize "mongoose" as an instance of DyNTS_SystemControl', () => {
|
|
21
|
+
expect(appSystemControls.mongoose).toBeInstanceOf(DyNTS_SystemControl);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('should initialize "httpServer" as an instance of DyNTS_SystemControl', () => {
|
|
25
|
+
expect(appSystemControls.httpServer).toBeInstanceOf(DyNTS_SystemControl);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('should initialize "httpsServer" as an instance of DyNTS_SystemControl', () => {
|
|
29
|
+
expect(appSystemControls.httpsServer).toBeInstanceOf(DyNTS_SystemControl);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { Request, Response } from 'express';
|
|
4
4
|
|
|
5
|
-
import { DyFM_Array, DyFM_Error,
|
|
6
|
-
|
|
7
|
-
import { DyNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
|
|
5
|
+
import { DyFM_Array, DyFM_Error, DyFM_Log, DyFM_Shared } from '@futdevpro/fsm-dynamo';
|
|
6
|
+
|
|
8
7
|
import { DyNTS_global_settings } from '../../_collections/global-settings.const';
|
|
8
|
+
import { DyNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
|
|
9
|
+
import { DyNTS_RouteSecurity } from '../../_enums/route-security.enum';
|
|
9
10
|
import { DyNTS_GlobalService } from '../../_services/core/global.service';
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -114,7 +115,7 @@ export class DyNTS_Endpoint_Params {
|
|
|
114
115
|
status: 406,
|
|
115
116
|
errorCode: 'NTS-EP0-C00',
|
|
116
117
|
addECToUserMsg: true,
|
|
117
|
-
message: 'trying to create
|
|
118
|
+
message: 'trying to create DyNTS_Endpoint_Params without endpoint value',
|
|
118
119
|
userMessage:
|
|
119
120
|
'We encountered an unhandled Server Error, ' +
|
|
120
121
|
'please contact the responsible development team.',
|
|
@@ -361,7 +362,7 @@ export class DyNTS_Endpoint_Params {
|
|
|
361
362
|
): void {
|
|
362
363
|
if (DyNTS_global_settings.log_settings.highDetailedLogs) {
|
|
363
364
|
DyFM_Log.H_error(
|
|
364
|
-
`\n\nDYNAMO MULTILEVEL ERROR:
|
|
365
|
+
`\n\nDYNAMO MULTILEVEL ERROR:DyNTS_Endpoint_Params: error: ` +
|
|
365
366
|
`(${this.name}, ${this.endpoint})` +
|
|
366
367
|
`\n(DYNAMO MULTILEVEL ERROR means, that the ERROR HANDLING is ALSO FAILED, ` +
|
|
367
368
|
`and the error message was not sent.)` +
|
|
@@ -370,7 +371,7 @@ export class DyNTS_Endpoint_Params {
|
|
|
370
371
|
);
|
|
371
372
|
} else {
|
|
372
373
|
DyFM_Log.H_error(
|
|
373
|
-
`\n\nDYNAMO MULTILEVEL ERROR:
|
|
374
|
+
`\n\nDYNAMO MULTILEVEL ERROR:DyNTS_Endpoint_Params: error: ` +
|
|
374
375
|
`(${this.name}, ${this.endpoint})` +
|
|
375
376
|
`\n(DYNAMO MULTILEVEL ERROR means, that the ERROR HANDLING is ALSO FAILED, ` +
|
|
376
377
|
`and the error message was not sent.)`
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyNTS_Http_Settings } from './http-settings.control-model';
|
|
3
|
+
import * as BodyParser from 'body-parser';
|
|
4
|
+
|
|
5
|
+
describe('DyNTS_Http_Settings', () => {
|
|
6
|
+
it('should create an instance with default settings', () => {
|
|
7
|
+
const settings = new DyNTS_Http_Settings();
|
|
8
|
+
|
|
9
|
+
expect(settings.httpPort).toBeUndefined();
|
|
10
|
+
expect(settings.httpsPort).toBeUndefined();
|
|
11
|
+
expect(settings.httpUrlencoded).toEqual({
|
|
12
|
+
limit: '50mb',
|
|
13
|
+
extended: true,
|
|
14
|
+
} as BodyParser.OptionsUrlencoded);
|
|
15
|
+
expect(settings.httpJson).toEqual({
|
|
16
|
+
limit: '50mb',
|
|
17
|
+
} as BodyParser.OptionsJson);
|
|
18
|
+
expect(settings.httpsUrlencoded).toEqual({
|
|
19
|
+
limit: '50mb',
|
|
20
|
+
extended: true,
|
|
21
|
+
} as BodyParser.OptionsUrlencoded);
|
|
22
|
+
expect(settings.httpsJson).toEqual({
|
|
23
|
+
limit: '50mb',
|
|
24
|
+
} as BodyParser.OptionsJson);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should create an instance with provided settings', () => {
|
|
28
|
+
const customSettings: DyNTS_Http_Settings = {
|
|
29
|
+
httpPort: 8080,
|
|
30
|
+
httpsPort: 8443,
|
|
31
|
+
httpUrlencoded: {
|
|
32
|
+
limit: '100mb',
|
|
33
|
+
extended: false,
|
|
34
|
+
},
|
|
35
|
+
httpJson: {
|
|
36
|
+
limit: '100mb',
|
|
37
|
+
},
|
|
38
|
+
httpsUrlencoded: {
|
|
39
|
+
limit: '100mb',
|
|
40
|
+
extended: false,
|
|
41
|
+
},
|
|
42
|
+
httpsJson: {
|
|
43
|
+
limit: '100mb',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const settings = new DyNTS_Http_Settings(customSettings);
|
|
48
|
+
|
|
49
|
+
expect(settings.httpPort).toBe(8080);
|
|
50
|
+
expect(settings.httpsPort).toBe(8443);
|
|
51
|
+
expect(settings.httpUrlencoded).toEqual({
|
|
52
|
+
limit: '100mb',
|
|
53
|
+
extended: false,
|
|
54
|
+
} as BodyParser.OptionsUrlencoded);
|
|
55
|
+
expect(settings.httpJson).toEqual({
|
|
56
|
+
limit: '100mb',
|
|
57
|
+
} as BodyParser.OptionsJson);
|
|
58
|
+
expect(settings.httpsUrlencoded).toEqual({
|
|
59
|
+
limit: '100mb',
|
|
60
|
+
extended: false,
|
|
61
|
+
} as BodyParser.OptionsUrlencoded);
|
|
62
|
+
expect(settings.httpsJson).toEqual({
|
|
63
|
+
limit: '100mb',
|
|
64
|
+
} as BodyParser.OptionsJson);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyNTS_SystemControl } from './system-control.control-model';
|
|
3
|
+
|
|
4
|
+
describe('DyNTS_SystemControl', () => {
|
|
5
|
+
let systemControl: DyNTS_SystemControl;
|
|
6
|
+
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
systemControl = new DyNTS_SystemControl();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('should return true when init is false', () => {
|
|
12
|
+
systemControl.init = false;
|
|
13
|
+
expect(systemControl.getIsReady()).toBeTrue();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should return true when init is true and started is true', () => {
|
|
17
|
+
systemControl.init = true;
|
|
18
|
+
systemControl.started = true;
|
|
19
|
+
expect(systemControl.getIsReady()).toBeTrue();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should return false when init is true and started is false', () => {
|
|
23
|
+
systemControl.init = true;
|
|
24
|
+
systemControl.started = false;
|
|
25
|
+
expect(systemControl.getIsReady()).toBeFalse();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -4,11 +4,11 @@ import { Request, Response } from 'express';
|
|
|
4
4
|
import { DyFM_customDataModule_settings } from '@futdevpro/fsm-dynamo/custom-data';
|
|
5
5
|
|
|
6
6
|
import { DyNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
DyNTS_Endpoint_Params
|
|
7
|
+
import {
|
|
8
|
+
DyNTS_Endpoint_Params
|
|
11
9
|
} from '../../_models/control-models/endpoint-params.control-model';
|
|
10
|
+
import { DyNTS_Controller } from '../../_services/route/controller.service';
|
|
11
|
+
import { DyNTS_CustomData_DataService } from './custom-data.data-service';
|
|
12
12
|
|
|
13
13
|
export class DyNTS_CustomData_Controller extends DyNTS_Controller {
|
|
14
14
|
|
|
@@ -25,7 +25,7 @@ export class DyNTS_CustomData_Controller extends DyNTS_Controller {
|
|
|
25
25
|
endpoint: DyFM_customDataModule_settings.endPoints.getCustomData,
|
|
26
26
|
tasks: [
|
|
27
27
|
async (req: Request, res: Response): Promise<void> => {
|
|
28
|
-
const customDataService = new
|
|
28
|
+
const customDataService = new DyNTS_CustomData_DataService({
|
|
29
29
|
_id: req.params.customId,
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -47,7 +47,7 @@ export class DyNTS_CustomData_Controller extends DyNTS_Controller {
|
|
|
47
47
|
endpoint: DyFM_customDataModule_settings.endPoints.modifyCustomData,
|
|
48
48
|
tasks: [
|
|
49
49
|
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
50
|
-
const customDataService = new
|
|
50
|
+
const customDataService = new DyNTS_CustomData_DataService(req.body, issuer);
|
|
51
51
|
|
|
52
52
|
await customDataService.saveData();
|
|
53
53
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
DyFM_CustomData,
|
|
6
|
+
DyFM_customData_dataParams
|
|
6
7
|
} from '@futdevpro/fsm-dynamo/custom-data';
|
|
7
8
|
import { DyNTS_DataService } from '../../_services/base/data.service';
|
|
8
9
|
|
|
9
|
-
export class
|
|
10
|
+
export class DyNTS_CustomData_DataService extends DyNTS_DataService<DyFM_CustomData> {
|
|
10
11
|
|
|
11
12
|
constructor(
|
|
12
13
|
customData?: DyFM_CustomData,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyNTS_App_Params } from '../../_models/control-models/app-params.control-model';
|
|
3
|
+
import { DyNTS_appParams_mock } from './app-params.mock';
|
|
4
|
+
|
|
5
|
+
describe('DyNTS_appParams_mock', () => {
|
|
6
|
+
it('should create an instance of DyNTS_App_Params', () => {
|
|
7
|
+
expect(DyNTS_appParams_mock).toBeInstanceOf(DyNTS_App_Params);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('should have the correct name', () => {
|
|
11
|
+
expect(DyNTS_appParams_mock.name).toBe('test');
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should have the correct version', () => {
|
|
15
|
+
expect(DyNTS_appParams_mock.version).toBe('0.0.1');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should have the correct dbName', () => {
|
|
19
|
+
expect(DyNTS_appParams_mock.dbName).toBe('test');
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
import { Request, Response } from 'express';
|
|
3
|
+
import { AuthService_Mock } from './auth-service.mock';
|
|
4
|
+
|
|
5
|
+
describe('AuthService_Mock', () => {
|
|
6
|
+
let authServiceMock: AuthService_Mock;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
authServiceMock = AuthService_Mock.getInstance();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should return a singleton instance', () => {
|
|
13
|
+
const instance1 = AuthService_Mock.getInstance();
|
|
14
|
+
const instance2 = AuthService_Mock.getInstance();
|
|
15
|
+
expect(instance1).toBe(instance2);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should return "accountId_mock" from getIssuerFromRequest', () => {
|
|
19
|
+
const req = {} as Request;
|
|
20
|
+
const issuer = authServiceMock.getIssuerFromRequest(req);
|
|
21
|
+
expect(issuer).toBe('accountId_mock');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('should return "username_mock" from getUsernameFromRequest', () => {
|
|
25
|
+
const req = {} as Request;
|
|
26
|
+
const username = authServiceMock.getUsernameFromRequest(req);
|
|
27
|
+
expect(username).toBe('username_mock');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('should have an authenticate_token method', async () => {
|
|
31
|
+
const req = {} as Request;
|
|
32
|
+
const res = {} as Response;
|
|
33
|
+
await expectAsync(authServiceMock.authenticate_token(req, res)).toBeResolved();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('should have an authenticate_tokenSelf method', async () => {
|
|
37
|
+
const req = {} as Request;
|
|
38
|
+
const res = {} as Response;
|
|
39
|
+
await expectAsync(authServiceMock.authenticate_tokenSelf(req, res)).toBeResolved();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should have an authenticate_tokenPerm_accUsageData method', async () => {
|
|
43
|
+
const req = {} as Request;
|
|
44
|
+
const res = {} as Response;
|
|
45
|
+
await expectAsync(authServiceMock.authenticate_tokenPerm_accUsageData(req, res)).toBeResolved();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyNTS_Controller_Mock } from './controller.mock';
|
|
3
|
+
import { DyNTS_endpoints_mock } from './endpoint.mock';
|
|
4
|
+
|
|
5
|
+
describe('DyNTS_Controller_Mock', () => {
|
|
6
|
+
let controllerMock: DyNTS_Controller_Mock;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
controllerMock = DyNTS_Controller_Mock.getInstance();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should create an instance of DyNTS_Controller_Mock', () => {
|
|
13
|
+
expect(controllerMock).toBeTruthy();
|
|
14
|
+
expect(controllerMock instanceof DyNTS_Controller_Mock).toBeTrue();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('should setup endpoints correctly', () => {
|
|
18
|
+
controllerMock.setupEndpoints();
|
|
19
|
+
expect(controllerMock.endpoints).toEqual(DyNTS_endpoints_mock);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should return the same instance on multiple getInstance calls', () => {
|
|
23
|
+
const anotherInstance = DyNTS_Controller_Mock.getInstance();
|
|
24
|
+
expect(controllerMock).toBe(anotherInstance);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
Dependency_Mock, dependency_mock_DataParams, Dependent_Mock, dependent_mock_DataParams
|
|
4
|
+
} from './data-model.mock';
|
|
5
|
+
|
|
6
|
+
describe('Dependency_Mock', () => {
|
|
7
|
+
it('should create an instance with default values', () => {
|
|
8
|
+
const instance = new Dependency_Mock();
|
|
9
|
+
|
|
10
|
+
expect(instance).toBeTruthy();
|
|
11
|
+
expect(instance.string).toBeUndefined();
|
|
12
|
+
expect(instance.number).toBeUndefined();
|
|
13
|
+
expect(instance.date).toBeUndefined();
|
|
14
|
+
expect(instance.boolean).toBeUndefined();
|
|
15
|
+
expect(instance.array).toBeUndefined();
|
|
16
|
+
expect(instance.object).toBeUndefined();
|
|
17
|
+
expect(instance.objectArray).toBeUndefined();
|
|
18
|
+
expect(instance.objectArrayArray).toBeUndefined();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create an instance with provided values', () => {
|
|
22
|
+
const mockData: Dependency_Mock = {
|
|
23
|
+
string: 'test',
|
|
24
|
+
number: 42,
|
|
25
|
+
date: new Date(),
|
|
26
|
+
boolean: true,
|
|
27
|
+
array: [ 'a', 'b' ],
|
|
28
|
+
object: { key: 'value' },
|
|
29
|
+
objectArray: [{ key: 'value' }],
|
|
30
|
+
objectArrayArray: [[{ key: 'value' }]],
|
|
31
|
+
};
|
|
32
|
+
const instance = new Dependency_Mock(mockData);
|
|
33
|
+
|
|
34
|
+
expect(instance).toEqual(jasmine.objectContaining(mockData));
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
xdescribe('DyFM_DataModel_Params for Dependency_Mock', () => {
|
|
39
|
+
it('should have correct dataName and properties', () => {
|
|
40
|
+
expect(dependency_mock_DataParams.dataName).toBe('dependencyMock');
|
|
41
|
+
expect(dependency_mock_DataParams.properties).toEqual({
|
|
42
|
+
string: { type: 'string' },
|
|
43
|
+
number: { type: 'number' },
|
|
44
|
+
date: { type: 'Date' },
|
|
45
|
+
boolean: { type: 'boolean' },
|
|
46
|
+
array: { type: 'string[]' },
|
|
47
|
+
object: { type: 'any' },
|
|
48
|
+
objectArray: { type: 'any[]' },
|
|
49
|
+
objectArrayArray: { type: 'any[][]' },
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
describe('Dependent_Mock', () => {
|
|
55
|
+
it('should create an instance with default values', () => {
|
|
56
|
+
const instance = new Dependent_Mock();
|
|
57
|
+
|
|
58
|
+
expect(instance).toBeTruthy();
|
|
59
|
+
expect(instance.dependencyId).toBeUndefined();
|
|
60
|
+
expect(instance.string).toBeUndefined();
|
|
61
|
+
expect(instance.number).toBeUndefined();
|
|
62
|
+
expect(instance.date).toBeUndefined();
|
|
63
|
+
expect(instance.boolean).toBeUndefined();
|
|
64
|
+
expect(instance.array).toBeUndefined();
|
|
65
|
+
expect(instance.object).toBeUndefined();
|
|
66
|
+
expect(instance.objectArray).toBeUndefined();
|
|
67
|
+
expect(instance.objectArrayArray).toBeUndefined();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should create an instance with provided values', () => {
|
|
71
|
+
const mockData: Dependent_Mock = {
|
|
72
|
+
dependencyId: 'dep123',
|
|
73
|
+
string: 'test',
|
|
74
|
+
number: 42,
|
|
75
|
+
date: new Date(),
|
|
76
|
+
boolean: true,
|
|
77
|
+
array: [ 'a', 'b' ],
|
|
78
|
+
object: { key: 'value' },
|
|
79
|
+
objectArray: [{ key: 'value' }],
|
|
80
|
+
objectArrayArray: [[{ key: 'value' }]],
|
|
81
|
+
};
|
|
82
|
+
const instance = new Dependent_Mock(mockData);
|
|
83
|
+
|
|
84
|
+
expect(instance).toEqual(jasmine.objectContaining(mockData));
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
xdescribe('DyFM_DataModel_Params for Dependent_Mock', () => {
|
|
89
|
+
it('should have correct dataName and properties', () => {
|
|
90
|
+
expect(dependent_mock_DataParams.dataName).toBe('dependentMock');
|
|
91
|
+
expect(dependent_mock_DataParams.properties).toEqual({
|
|
92
|
+
dependencyId: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
unique: true,
|
|
95
|
+
required: true,
|
|
96
|
+
isDependencyHook: true,
|
|
97
|
+
dependencyDataName: dependency_mock_DataParams.dataName,
|
|
98
|
+
},
|
|
99
|
+
string: { type: 'string' },
|
|
100
|
+
number: { type: 'number' },
|
|
101
|
+
date: { type: 'Date' },
|
|
102
|
+
boolean: { type: 'boolean' },
|
|
103
|
+
array: { type: 'string[]' },
|
|
104
|
+
object: { type: 'any' },
|
|
105
|
+
objectArray: { type: 'any[]' },
|
|
106
|
+
objectArrayArray: { type: 'any[][]' },
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import { EmailServiceCollection_Mock } from './email-service-collection.mock';
|
|
3
|
+
import { EmailService_Mock } from './email-service.mock';
|
|
4
|
+
|
|
5
|
+
describe('EmailServiceCollection_Mock', () => {
|
|
6
|
+
let emailServiceCollectionMock: EmailServiceCollection_Mock;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
emailServiceCollectionMock = EmailServiceCollection_Mock.getInstance();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should create an instance of EmailServiceCollection_Mock', () => {
|
|
13
|
+
expect(emailServiceCollectionMock).toBeTruthy();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should return a singleton instance', () => {
|
|
17
|
+
const anotherInstance = EmailServiceCollection_Mock.getInstance();
|
|
18
|
+
expect(emailServiceCollectionMock).toBe(anotherInstance);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should have a test property of type EmailService_Mock', () => {
|
|
22
|
+
expect(emailServiceCollectionMock.test).toBeInstanceOf(EmailService_Mock);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
DyNTS_EmailService
|
|
4
|
+
} from '../../_services/core/email.service';
|
|
5
|
+
import { EmailService_Mock } from './email-service.mock';
|
|
6
|
+
|
|
7
|
+
describe('EmailService_Mock', () => {
|
|
8
|
+
let emailServiceMock: EmailService_Mock;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
emailServiceMock = new EmailService_Mock();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should be an instance of DyNTS_EmailService', () => {
|
|
15
|
+
expect(emailServiceMock instanceof DyNTS_EmailService).toBeTrue();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyFM_SocketEvent, DyFM_SocketEvent_Key } from '@futdevpro/fsm-dynamo/socket';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
DyNTS_SocketClientService_Params
|
|
6
|
+
} from '../socket/_models/socket-client-service-params.control-model';
|
|
7
|
+
import { SocketClient_Mock } from './socket-client.mock';
|
|
8
|
+
|
|
9
|
+
describe('SocketClient_Mock', () => {
|
|
10
|
+
let socketClientMock: SocketClient_Mock;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
socketClientMock = SocketClient_Mock.getInstance();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should create an instance of SocketClient_Mock', () => {
|
|
17
|
+
expect(socketClientMock).toBeTruthy();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should return the correct incoming events', () => {
|
|
21
|
+
const events = socketClientMock.getIncomingEvents();
|
|
22
|
+
|
|
23
|
+
expect(events.length).toBe(1);
|
|
24
|
+
expect(events[0]).toEqual(jasmine.any(DyFM_SocketEvent));
|
|
25
|
+
expect(events[0].name).toBe('connect');
|
|
26
|
+
expect(events[0].eventKey).toBe(DyFM_SocketEvent_Key.connect);
|
|
27
|
+
expect(events[0].tasks.length).toBe(1);
|
|
28
|
+
expect(events[0].tasks[0]).toEqual(jasmine.any(Function));
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should return the correct parameters', () => {
|
|
32
|
+
const params = socketClientMock.getParams();
|
|
33
|
+
|
|
34
|
+
expect(params).toEqual(jasmine.any(DyNTS_SocketClientService_Params));
|
|
35
|
+
expect(params.service).toBe('-test-socket-target-');
|
|
36
|
+
expect(params.name).toBe('socket-client-mock');
|
|
37
|
+
expect(params.port).toBe(30303);
|
|
38
|
+
expect(params.socketOptions.reconnection).toBeTrue();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { DyFM_SocketEvent, DyFM_SocketEvent_Key } from '@futdevpro/fsm-dynamo/socket';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
DyNTS_SocketClientService_Params
|
|
4
|
+
import {
|
|
5
|
+
DyNTS_SocketClientService_Params
|
|
6
6
|
} from '../socket/_models/socket-client-service-params.control-model';
|
|
7
7
|
import { DyNTS_SocketClient_ServiceBase } from '../socket/_services/socket-client.service';
|
|
8
8
|
|
|
@@ -24,8 +24,8 @@ export class SocketClient_Mock extends DyNTS_SocketClient_ServiceBase {
|
|
|
24
24
|
tasks: [
|
|
25
25
|
async (content: any, issuer: string) => {
|
|
26
26
|
console.log('SocketClient_Mock: connect event received');
|
|
27
|
-
}
|
|
28
|
-
]
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
29
|
}),
|
|
30
30
|
];
|
|
31
31
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
DyNTS_SocketServerService_Params
|
|
4
|
+
} from '../socket/_models/socket-server-service-params.control-model';
|
|
5
|
+
import { DyNTS_SocketServer_Mock } from './socket-server.mock';
|
|
6
|
+
|
|
7
|
+
describe('DyNTS_SocketServer_Mock', () => {
|
|
8
|
+
let socketServerMock: DyNTS_SocketServer_Mock;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
socketServerMock = DyNTS_SocketServer_Mock.getInstance();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should return an instance of DyNTS_SocketServer_Mock', () => {
|
|
15
|
+
expect(socketServerMock).toBeInstanceOf(DyNTS_SocketServer_Mock);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should return correct service parameters', () => {
|
|
19
|
+
const params = socketServerMock.getServiceParams();
|
|
20
|
+
|
|
21
|
+
expect(params).toBeInstanceOf(DyNTS_SocketServerService_Params);
|
|
22
|
+
expect(params.name).toBe('test');
|
|
23
|
+
expect(params.port).toBe(9393);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('should return an empty array for incoming events', () => {
|
|
27
|
+
const events = socketServerMock.getIncomingEvents();
|
|
28
|
+
|
|
29
|
+
expect(events).toEqual([]);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/* it('should return correct presence from subscription event content', async () => {
|
|
33
|
+
const mockSocketSubscription = { issuerId: 'testIssuerId' };
|
|
34
|
+
const mockSocket = {} as Socket;
|
|
35
|
+
|
|
36
|
+
const presence = await socketServerMock.getPresenceFromSubscriptionEventContent(
|
|
37
|
+
mockSocketSubscription, mockSocket);
|
|
38
|
+
|
|
39
|
+
expect(presence).toBeInstanceOf(DyNTS_SocketPresence);
|
|
40
|
+
expect(presence.issuerLocalId).toBe('testIssuerId');
|
|
41
|
+
expect(presence.sockets).toEqual([ mockSocket ]);
|
|
42
|
+
expect(presence.issuer).toBe('ISSUER socketServer_Mock');
|
|
43
|
+
}); */
|
|
44
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
import { DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
import { DyNTS_SocketClientService_Params } from './socket-client-service-params.control-model';
|
|
4
|
+
|
|
5
|
+
describe('DyNTS_SocketClientService_Params', () => {
|
|
6
|
+
it('should create an instance with default address', () => {
|
|
7
|
+
const params = new DyNTS_SocketClientService_Params({});
|
|
8
|
+
|
|
9
|
+
expect(params).toBeTruthy();
|
|
10
|
+
expect(params.address).toBe('ws://localhost');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should log information on creation', () => {
|
|
14
|
+
spyOn(DyFM_Log, 'H_info');
|
|
15
|
+
|
|
16
|
+
const params = new DyNTS_SocketClientService_Params({});
|
|
17
|
+
|
|
18
|
+
expect(DyFM_Log.H_info).toHaveBeenCalledWith(
|
|
19
|
+
'DyNTS_SocketClientService_Params (test this with custom address!)',
|
|
20
|
+
'ws://localhost'
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
xit('should allow overriding the address', () => {
|
|
25
|
+
const customAddress = 'ws://custom-address';
|
|
26
|
+
const params = new DyNTS_SocketClientService_Params({ address: customAddress });
|
|
27
|
+
|
|
28
|
+
expect(params.address).toBe(customAddress);
|
|
29
|
+
});
|
|
30
|
+
});
|