@futdevpro/nts-dynamo 1.10.43 → 1.10.44
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/build/_collections/archive.util.spec.js +4 -4
- package/build/_collections/archive.util.spec.js.map +1 -1
- package/build/_models/control-models/api-call-params.control-model.spec.js +6 -6
- package/build/_models/control-models/api-call-params.control-model.spec.js.map +1 -1
- package/build/_models/control-models/app-params.control-model.spec.js +5 -5
- package/build/_models/control-models/app-params.control-model.spec.js.map +1 -1
- package/build/_models/control-models/app-system-controls.control-model.spec.js +6 -6
- package/build/_models/control-models/app-system-controls.control-model.spec.js.map +1 -1
- package/build/_models/control-models/http-settings.control-model.spec.js +3 -3
- package/build/_models/control-models/http-settings.control-model.spec.js.map +1 -1
- package/build/_models/control-models/system-control.control-model.spec.js +4 -4
- package/build/_models/control-models/system-control.control-model.spec.js.map +1 -1
- package/build/_modules/mock/app-params.mock.spec.js +5 -5
- package/build/_modules/mock/app-params.mock.spec.js.map +1 -1
- package/build/_modules/mock/auth-service.mock.spec.js +7 -7
- package/build/_modules/mock/auth-service.mock.spec.js.map +1 -1
- package/build/_modules/mock/controller.mock.spec.js +4 -4
- package/build/_modules/mock/controller.mock.spec.js.map +1 -1
- package/build/_modules/mock/data-model.mock.spec.js +10 -10
- package/build/_modules/mock/data-model.mock.spec.js.map +1 -1
- package/build/_modules/mock/email-service-collection.mock.spec.js +4 -4
- package/build/_modules/mock/email-service-collection.mock.spec.js.map +1 -1
- package/build/_modules/mock/email-service.mock.spec.js +2 -2
- package/build/_modules/mock/email-service.mock.spec.js.map +1 -1
- package/build/_modules/mock/socket-client.mock.spec.js +4 -4
- package/build/_modules/mock/socket-client.mock.spec.js.map +1 -1
- package/build/_modules/mock/socket-server.mock.spec.js +5 -5
- package/build/_modules/mock/socket-server.mock.spec.js.map +1 -1
- package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.js +3 -3
- package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.js.map +1 -1
- package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.js +3 -3
- package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.js.map +1 -1
- package/build/_modules/socket/_services/socket-server.service.spec.js +2 -2
- package/build/_modules/socket/_services/socket-server.service.spec.js.map +1 -1
- package/build/_modules/socket/app-extended.server.spec.js +10 -10
- package/build/_modules/socket/app-extended.server.spec.js.map +1 -1
- package/build/_services/base/db.service.spec.js +6 -6
- package/build/_services/core/api.service.spec.js +7 -7
- package/build/_services/core/api.service.spec.js.map +1 -1
- package/build/_services/core/email.service.spec.js +6 -6
- package/build/_services/core/email.service.spec.js.map +1 -1
- package/build/_services/route/controller.service.spec.js +3 -3
- package/build/_services/route/controller.service.spec.js.map +1 -1
- package/build/_services/route/routing-module.service.spec.js +5 -5
- package/build/_services/route/routing-module.service.spec.js.map +1 -1
- package/build/_services/server/app.server.spec.js +7 -7
- package/build/_services/server/app.server.spec.js.map +1 -1
- package/build/_services/shared.static-service.spec.js +5 -5
- package/build/_services/shared.static-service.spec.js.map +1 -1
- package/package.json +3 -3
- package/src/_collections/archive.util.spec.ts +4 -4
- package/src/_models/control-models/api-call-params.control-model.spec.ts +6 -6
- package/src/_models/control-models/app-params.control-model.spec.ts +5 -5
- package/src/_models/control-models/app-system-controls.control-model.spec.ts +6 -6
- package/src/_models/control-models/http-settings.control-model.spec.ts +3 -3
- package/src/_models/control-models/system-control.control-model.spec.ts +4 -4
- package/src/_modules/mock/app-params.mock.spec.ts +5 -5
- package/src/_modules/mock/auth-service.mock.spec.ts +7 -7
- package/src/_modules/mock/controller.mock.spec.ts +4 -4
- package/src/_modules/mock/data-model.mock.spec.ts +10 -10
- package/src/_modules/mock/email-service-collection.mock.spec.ts +4 -4
- package/src/_modules/mock/email-service.mock.spec.ts +2 -2
- package/src/_modules/mock/socket-client.mock.spec.ts +4 -4
- package/src/_modules/mock/socket-server.mock.spec.ts +5 -5
- package/src/_modules/socket/_models/socket-client-service-params.control-model.spec.ts +3 -3
- package/src/_modules/socket/_models/socket-server-service-params.control-model.spec.ts +3 -3
- package/src/_modules/socket/_services/socket-server.service.spec.ts +2 -2
- package/src/_modules/socket/app-extended.server.spec.ts +10 -10
- package/src/_services/base/db.service.spec.ts +6 -6
- package/src/_services/core/api.service.spec.ts +7 -7
- package/src/_services/core/email.service.spec.ts +6 -6
- package/src/_services/route/controller.service.spec.ts +3 -3
- package/src/_services/route/routing-module.service.spec.ts +5 -5
- package/src/_services/server/app.server.spec.ts +7 -7
- package/src/_services/shared.static-service.spec.ts +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { DyNTS_App_Params } from './app-params.control-model';
|
|
3
3
|
|
|
4
|
-
describe('DyNTS_App_Params', () => {
|
|
5
|
-
it('should initialize with provided values', () => {
|
|
4
|
+
describe('| DyNTS_App_Params', () => {
|
|
5
|
+
it('| should initialize with provided values', () => {
|
|
6
6
|
const params: DyNTS_App_Params = {
|
|
7
7
|
name: 'TestApp',
|
|
8
8
|
title: 'Test Application',
|
|
@@ -24,7 +24,7 @@ describe('DyNTS_App_Params', () => {
|
|
|
24
24
|
expect(appParams.systemShortCodeName).toBe('TA');
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
it('should set default values when optional parameters are not provided', () => {
|
|
27
|
+
it('| should set default values when optional parameters are not provided', () => {
|
|
28
28
|
const params: DyNTS_App_Params = {
|
|
29
29
|
name: 'TestApp',
|
|
30
30
|
version: '1.0.0',
|
|
@@ -42,7 +42,7 @@ describe('DyNTS_App_Params', () => {
|
|
|
42
42
|
expect(appParams.systemShortCodeName).toBe('TA');
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
it('should generate systemShortCodeName from systemName if not provided', () => {
|
|
45
|
+
it('| should generate systemShortCodeName from systemName if not provided', () => {
|
|
46
46
|
const params: DyNTS_App_Params = {
|
|
47
47
|
name: 'Test Application',
|
|
48
48
|
version: '1.0.0',
|
|
@@ -55,7 +55,7 @@ describe('DyNTS_App_Params', () => {
|
|
|
55
55
|
expect(appParams.systemShortCodeName).toBe('TA');
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
it('should generate systemName from name if not provided', () => {
|
|
58
|
+
it('| should generate systemName from name if not provided', () => {
|
|
59
59
|
const params: DyNTS_App_Params = {
|
|
60
60
|
name: 'Test Application',
|
|
61
61
|
version: '1.0.0',
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
import { DyNTS_AppSystemControls } from './app-system-controls.control-model';
|
|
3
3
|
import { DyNTS_SystemControl } from './system-control.control-model';
|
|
4
4
|
|
|
5
|
-
describe('DyNTS_AppSystemControls', () => {
|
|
5
|
+
describe('| DyNTS_AppSystemControls', () => {
|
|
6
6
|
let appSystemControls: DyNTS_AppSystemControls;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
9
|
appSystemControls = new DyNTS_AppSystemControls();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it('should create an instance of DyNTS_AppSystemControls', () => {
|
|
12
|
+
it('| should create an instance of DyNTS_AppSystemControls', () => {
|
|
13
13
|
expect(appSystemControls).toBeTruthy();
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
it('should initialize "app" as an instance of DyNTS_SystemControl', () => {
|
|
16
|
+
it('| should initialize "app" as an instance of DyNTS_SystemControl', () => {
|
|
17
17
|
expect(appSystemControls.app).toBeInstanceOf(DyNTS_SystemControl);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
it('should initialize "mongoose" as an instance of DyNTS_SystemControl', () => {
|
|
20
|
+
it('| should initialize "mongoose" as an instance of DyNTS_SystemControl', () => {
|
|
21
21
|
expect(appSystemControls.mongoose).toBeInstanceOf(DyNTS_SystemControl);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
it('should initialize "httpServer" as an instance of DyNTS_SystemControl', () => {
|
|
24
|
+
it('| should initialize "httpServer" as an instance of DyNTS_SystemControl', () => {
|
|
25
25
|
expect(appSystemControls.httpServer).toBeInstanceOf(DyNTS_SystemControl);
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
it('should initialize "httpsServer" as an instance of DyNTS_SystemControl', () => {
|
|
28
|
+
it('| should initialize "httpsServer" as an instance of DyNTS_SystemControl', () => {
|
|
29
29
|
expect(appSystemControls.httpsServer).toBeInstanceOf(DyNTS_SystemControl);
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { DyNTS_Http_Settings } from './http-settings.control-model';
|
|
3
3
|
import * as BodyParser from 'body-parser';
|
|
4
4
|
|
|
5
|
-
describe('DyNTS_Http_Settings', () => {
|
|
6
|
-
it('should create an instance with default settings', () => {
|
|
5
|
+
describe('| DyNTS_Http_Settings', () => {
|
|
6
|
+
it('| should create an instance with default settings', () => {
|
|
7
7
|
const settings = new DyNTS_Http_Settings();
|
|
8
8
|
|
|
9
9
|
expect(settings.httpPort).toBeUndefined();
|
|
@@ -24,7 +24,7 @@ describe('DyNTS_Http_Settings', () => {
|
|
|
24
24
|
} as BodyParser.OptionsJson);
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
it('should create an instance with provided settings', () => {
|
|
27
|
+
it('| should create an instance with provided settings', () => {
|
|
28
28
|
const customSettings: DyNTS_Http_Settings = {
|
|
29
29
|
httpPort: 8080,
|
|
30
30
|
httpsPort: 8443,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
import { DyNTS_SystemControl } from './system-control.control-model';
|
|
3
3
|
|
|
4
|
-
describe('DyNTS_SystemControl', () => {
|
|
4
|
+
describe('| DyNTS_SystemControl', () => {
|
|
5
5
|
let systemControl: DyNTS_SystemControl;
|
|
6
6
|
|
|
7
7
|
beforeEach(() => {
|
|
8
8
|
systemControl = new DyNTS_SystemControl();
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
it('should return true when init is false', () => {
|
|
11
|
+
it('| should return true when init is false', () => {
|
|
12
12
|
systemControl.init = false;
|
|
13
13
|
expect(systemControl.getIsReady()).toBeTrue();
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
it('should return true when init is true and started is true', () => {
|
|
16
|
+
it('| should return true when init is true and started is true', () => {
|
|
17
17
|
systemControl.init = true;
|
|
18
18
|
systemControl.started = true;
|
|
19
19
|
expect(systemControl.getIsReady()).toBeTrue();
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
it('should return false when init is true and started is false', () => {
|
|
22
|
+
it('| should return false when init is true and started is false', () => {
|
|
23
23
|
systemControl.init = true;
|
|
24
24
|
systemControl.started = false;
|
|
25
25
|
expect(systemControl.getIsReady()).toBeFalse();
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import { DyNTS_App_Params } from '../../_models/control-models/app-params.control-model';
|
|
3
3
|
import { DyNTS_appParams_mock } from './app-params.mock';
|
|
4
4
|
|
|
5
|
-
describe('DyNTS_appParams_mock', () => {
|
|
6
|
-
it('should create an instance of DyNTS_App_Params', () => {
|
|
5
|
+
describe('| DyNTS_appParams_mock', () => {
|
|
6
|
+
it('| should create an instance of DyNTS_App_Params', () => {
|
|
7
7
|
expect(DyNTS_appParams_mock).toBeInstanceOf(DyNTS_App_Params);
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
it('should have the correct name', () => {
|
|
10
|
+
it('| should have the correct name', () => {
|
|
11
11
|
expect(DyNTS_appParams_mock.name).toBe('test');
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
it('should have the correct version', () => {
|
|
14
|
+
it('| should have the correct version', () => {
|
|
15
15
|
expect(DyNTS_appParams_mock.version).toBe('0.0.1');
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
it('should have the correct dbName', () => {
|
|
18
|
+
it('| should have the correct dbName', () => {
|
|
19
19
|
expect(DyNTS_appParams_mock.dbName).toBe('test');
|
|
20
20
|
});
|
|
21
21
|
});
|
|
@@ -2,44 +2,44 @@
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
3
|
import { AuthService_Mock } from './auth-service.mock';
|
|
4
4
|
|
|
5
|
-
describe('AuthService_Mock', () => {
|
|
5
|
+
describe('| AuthService_Mock', () => {
|
|
6
6
|
let authServiceMock: AuthService_Mock;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
9
|
authServiceMock = AuthService_Mock.getInstance();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it('should return a singleton instance', () => {
|
|
12
|
+
it('| should return a singleton instance', () => {
|
|
13
13
|
const instance1 = AuthService_Mock.getInstance();
|
|
14
14
|
const instance2 = AuthService_Mock.getInstance();
|
|
15
15
|
expect(instance1).toBe(instance2);
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
it('should return "accountId_mock" from getIssuerFromRequest', () => {
|
|
18
|
+
it('| should return "accountId_mock" from getIssuerFromRequest', () => {
|
|
19
19
|
const req = {} as Request;
|
|
20
20
|
const issuer = authServiceMock.getIssuerFromRequest(req);
|
|
21
21
|
expect(issuer).toBe('accountId_mock');
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
it('should return "username_mock" from getUsernameFromRequest', () => {
|
|
24
|
+
it('| should return "username_mock" from getUsernameFromRequest', () => {
|
|
25
25
|
const req = {} as Request;
|
|
26
26
|
const username = authServiceMock.getUsernameFromRequest(req);
|
|
27
27
|
expect(username).toBe('username_mock');
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
it('should have an authenticate_token method', async () => {
|
|
30
|
+
it('| should have an authenticate_token method', async () => {
|
|
31
31
|
const req = {} as Request;
|
|
32
32
|
const res = {} as Response;
|
|
33
33
|
await expectAsync(authServiceMock.authenticate_token(req, res)).toBeResolved();
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
it('should have an authenticate_tokenSelf method', async () => {
|
|
36
|
+
it('| should have an authenticate_tokenSelf method', async () => {
|
|
37
37
|
const req = {} as Request;
|
|
38
38
|
const res = {} as Response;
|
|
39
39
|
await expectAsync(authServiceMock.authenticate_tokenSelf(req, res)).toBeResolved();
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
it('should have an authenticate_tokenPerm_accUsageData method', async () => {
|
|
42
|
+
it('| should have an authenticate_tokenPerm_accUsageData method', async () => {
|
|
43
43
|
const req = {} as Request;
|
|
44
44
|
const res = {} as Response;
|
|
45
45
|
await expectAsync(authServiceMock.authenticate_tokenPerm_accUsageData(req, res)).toBeResolved();
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
import { DyNTS_Controller_Mock } from './controller.mock';
|
|
3
3
|
import { DyNTS_endpoints_mock } from './endpoint.mock';
|
|
4
4
|
|
|
5
|
-
describe('DyNTS_Controller_Mock', () => {
|
|
5
|
+
describe('| DyNTS_Controller_Mock', () => {
|
|
6
6
|
let controllerMock: DyNTS_Controller_Mock;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
9
|
controllerMock = DyNTS_Controller_Mock.getInstance();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it('should create an instance of DyNTS_Controller_Mock', () => {
|
|
12
|
+
it('| should create an instance of DyNTS_Controller_Mock', () => {
|
|
13
13
|
expect(controllerMock).toBeTruthy();
|
|
14
14
|
expect(controllerMock instanceof DyNTS_Controller_Mock).toBeTrue();
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
it('should setup endpoints correctly', () => {
|
|
17
|
+
it('| should setup endpoints correctly', () => {
|
|
18
18
|
controllerMock.setupEndpoints();
|
|
19
19
|
expect(controllerMock.endpoints).toEqual(DyNTS_endpoints_mock);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
it('should return the same instance on multiple getInstance calls', () => {
|
|
22
|
+
it('| should return the same instance on multiple getInstance calls', () => {
|
|
23
23
|
const anotherInstance = DyNTS_Controller_Mock.getInstance();
|
|
24
24
|
expect(controllerMock).toBe(anotherInstance);
|
|
25
25
|
});
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
Dependency_Mock, dependency_mock_DataParams, Dependent_Mock, dependent_mock_DataParams
|
|
4
4
|
} from './data-model.mock';
|
|
5
5
|
|
|
6
|
-
describe('Dependency_Mock', () => {
|
|
7
|
-
it('should create an instance with default values', () => {
|
|
6
|
+
describe('| Dependency_Mock', () => {
|
|
7
|
+
it('| should create an instance with default values', () => {
|
|
8
8
|
const instance = new Dependency_Mock();
|
|
9
9
|
|
|
10
10
|
expect(instance).toBeTruthy();
|
|
@@ -18,7 +18,7 @@ describe('Dependency_Mock', () => {
|
|
|
18
18
|
expect(instance.objectArrayArray).toBeUndefined();
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it('should create an instance with provided values', () => {
|
|
21
|
+
it('| should create an instance with provided values', () => {
|
|
22
22
|
const mockData: Dependency_Mock = {
|
|
23
23
|
string: 'test',
|
|
24
24
|
number: 42,
|
|
@@ -35,8 +35,8 @@ describe('Dependency_Mock', () => {
|
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
xdescribe('DyFM_DataModel_Params for Dependency_Mock', () => {
|
|
39
|
-
it('should have correct dataName and properties', () => {
|
|
38
|
+
xdescribe('| DyFM_DataModel_Params for Dependency_Mock', () => {
|
|
39
|
+
it('| should have correct dataName and properties', () => {
|
|
40
40
|
expect(dependency_mock_DataParams.dataName).toBe('dependency_mock');
|
|
41
41
|
expect(dependency_mock_DataParams.properties).toEqual({
|
|
42
42
|
string: { type: 'string' },
|
|
@@ -51,8 +51,8 @@ xdescribe('DyFM_DataModel_Params for Dependency_Mock', () => {
|
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
describe('Dependent_Mock', () => {
|
|
55
|
-
it('should create an instance with default values', () => {
|
|
54
|
+
describe('| Dependent_Mock', () => {
|
|
55
|
+
it('| should create an instance with default values', () => {
|
|
56
56
|
const instance = new Dependent_Mock();
|
|
57
57
|
|
|
58
58
|
expect(instance).toBeTruthy();
|
|
@@ -67,7 +67,7 @@ describe('Dependent_Mock', () => {
|
|
|
67
67
|
expect(instance.objectArrayArray).toBeUndefined();
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
it('should create an instance with provided values', () => {
|
|
70
|
+
it('| should create an instance with provided values', () => {
|
|
71
71
|
const mockData: Dependent_Mock = {
|
|
72
72
|
dependencyId: 'dep123',
|
|
73
73
|
string: 'test',
|
|
@@ -85,8 +85,8 @@ describe('Dependent_Mock', () => {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
xdescribe('DyFM_DataModel_Params for Dependent_Mock', () => {
|
|
89
|
-
it('should have correct dataName and properties', () => {
|
|
88
|
+
xdescribe('| DyFM_DataModel_Params for Dependent_Mock', () => {
|
|
89
|
+
it('| should have correct dataName and properties', () => {
|
|
90
90
|
expect(dependent_mock_DataParams.dataName).toBe('dependent_mock');
|
|
91
91
|
expect(dependent_mock_DataParams.properties).toEqual({
|
|
92
92
|
dependencyId: {
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import { EmailServiceCollection_Mock } from './email-service-collection.mock';
|
|
3
3
|
import { EmailService_Mock } from './email-service.mock';
|
|
4
4
|
|
|
5
|
-
describe('EmailServiceCollection_Mock', () => {
|
|
5
|
+
describe('| EmailServiceCollection_Mock', () => {
|
|
6
6
|
let emailServiceCollectionMock: EmailServiceCollection_Mock;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
9
|
emailServiceCollectionMock = EmailServiceCollection_Mock.getInstance();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it('should create an instance of EmailServiceCollection_Mock', () => {
|
|
12
|
+
it('| should create an instance of EmailServiceCollection_Mock', () => {
|
|
13
13
|
expect(emailServiceCollectionMock).toBeTruthy();
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
it('should return a singleton instance', () => {
|
|
16
|
+
it('| should return a singleton instance', () => {
|
|
17
17
|
const anotherInstance = EmailServiceCollection_Mock.getInstance();
|
|
18
18
|
expect(emailServiceCollectionMock).toBe(anotherInstance);
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it('should have a test property of type EmailService_Mock', () => {
|
|
21
|
+
it('| should have a test property of type EmailService_Mock', () => {
|
|
22
22
|
expect(emailServiceCollectionMock.test).toBeInstanceOf(EmailService_Mock);
|
|
23
23
|
});
|
|
24
24
|
});
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from '../../_services/core/email.service';
|
|
5
5
|
import { EmailService_Mock } from './email-service.mock';
|
|
6
6
|
|
|
7
|
-
describe('EmailService_Mock', () => {
|
|
7
|
+
describe('| EmailService_Mock', () => {
|
|
8
8
|
let emailServiceMock: EmailService_Mock;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
11
|
emailServiceMock = new EmailService_Mock();
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
it('should be an instance of DyNTS_EmailService', () => {
|
|
14
|
+
it('| should be an instance of DyNTS_EmailService', () => {
|
|
15
15
|
expect(emailServiceMock instanceof DyNTS_EmailService).toBeTrue();
|
|
16
16
|
});
|
|
17
17
|
});
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
} from '../socket/_models/socket-client-service-params.control-model';
|
|
7
7
|
import { SocketClient_Mock } from './socket-client.mock';
|
|
8
8
|
|
|
9
|
-
describe('SocketClient_Mock', () => {
|
|
9
|
+
describe('| SocketClient_Mock', () => {
|
|
10
10
|
let socketClientMock: SocketClient_Mock;
|
|
11
11
|
|
|
12
12
|
beforeEach(() => {
|
|
13
13
|
socketClientMock = SocketClient_Mock.getInstance();
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
it('should create an instance of SocketClient_Mock', () => {
|
|
16
|
+
it('| should create an instance of SocketClient_Mock', () => {
|
|
17
17
|
expect(socketClientMock).toBeTruthy();
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
it('should return the correct incoming events', () => {
|
|
20
|
+
it('| should return the correct incoming events', () => {
|
|
21
21
|
const events = socketClientMock.getIncomingEvents();
|
|
22
22
|
|
|
23
23
|
expect(events.length).toBe(1);
|
|
@@ -28,7 +28,7 @@ describe('SocketClient_Mock', () => {
|
|
|
28
28
|
expect(events[0].tasks[0]).toEqual(jasmine.any(Function));
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
it('should return the correct parameters', () => {
|
|
31
|
+
it('| should return the correct parameters', () => {
|
|
32
32
|
const params = socketClientMock.getParams();
|
|
33
33
|
|
|
34
34
|
expect(params).toEqual(jasmine.any(DyNTS_SocketClientService_Params));
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
} from '../socket/_models/socket-server-service-params.control-model';
|
|
5
5
|
import { DyNTS_SocketServer_Mock } from './socket-server.mock';
|
|
6
6
|
|
|
7
|
-
describe('DyNTS_SocketServer_Mock', () => {
|
|
7
|
+
describe('| DyNTS_SocketServer_Mock', () => {
|
|
8
8
|
let socketServerMock: DyNTS_SocketServer_Mock;
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
11
|
socketServerMock = DyNTS_SocketServer_Mock.getInstance();
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
it('should return an instance of DyNTS_SocketServer_Mock', () => {
|
|
14
|
+
it('| should return an instance of DyNTS_SocketServer_Mock', () => {
|
|
15
15
|
expect(socketServerMock).toBeInstanceOf(DyNTS_SocketServer_Mock);
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
it('should return correct service parameters', () => {
|
|
18
|
+
it('| should return correct service parameters', () => {
|
|
19
19
|
const params = socketServerMock.getServiceParams();
|
|
20
20
|
|
|
21
21
|
expect(params).toBeInstanceOf(DyNTS_SocketServerService_Params);
|
|
@@ -23,13 +23,13 @@ describe('DyNTS_SocketServer_Mock', () => {
|
|
|
23
23
|
expect(params.port).toBe(9393);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
it('should return an empty array for incoming events', () => {
|
|
26
|
+
it('| should return an empty array for incoming events', () => {
|
|
27
27
|
const events = socketServerMock.getIncomingEvents();
|
|
28
28
|
|
|
29
29
|
expect(events).toEqual([]);
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
/* it('should return correct presence from subscription event content', async () => {
|
|
32
|
+
/* it('| should return correct presence from subscription event content', async () => {
|
|
33
33
|
const mockSocketSubscription = { issuerId: 'testIssuerId' };
|
|
34
34
|
const mockSocket = {} as Socket;
|
|
35
35
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
3
3
|
import { DyNTS_SocketClientService_Params } from './socket-client-service-params.control-model';
|
|
4
4
|
|
|
5
|
-
describe('DyNTS_SocketClientService_Params', () => {
|
|
6
|
-
it('should create an instance with default address', () => {
|
|
5
|
+
describe('| DyNTS_SocketClientService_Params', () => {
|
|
6
|
+
it('| should create an instance with default address', () => {
|
|
7
7
|
const params = new DyNTS_SocketClientService_Params({});
|
|
8
8
|
|
|
9
9
|
expect(params).toBeTruthy();
|
|
10
10
|
expect(params.address).toBe('ws://localhost');
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
it('should log information on creation', () => {
|
|
13
|
+
it('| should log information on creation', () => {
|
|
14
14
|
spyOn(DyFM_Log, 'H_info');
|
|
15
15
|
|
|
16
16
|
const params = new DyNTS_SocketClientService_Params({});
|
|
@@ -3,8 +3,8 @@ import { DyNTS_global_settings } from '../../../_collections/global-settings.con
|
|
|
3
3
|
import { DyNTS_SocketSecurity } from '../_enums/socket-security.enum';
|
|
4
4
|
import { DyNTS_SocketServerService_Params } from './socket-server-service-params.control-model';
|
|
5
5
|
|
|
6
|
-
describe('DyNTS_SocketServerService_Params', () => {
|
|
7
|
-
it('should create an instance with provided values', () => {
|
|
6
|
+
describe('| DyNTS_SocketServerService_Params', () => {
|
|
7
|
+
it('| should create an instance with provided values', () => {
|
|
8
8
|
const params = {
|
|
9
9
|
name: 'TestSocket',
|
|
10
10
|
port: 8080,
|
|
@@ -18,7 +18,7 @@ describe('DyNTS_SocketServerService_Params', () => {
|
|
|
18
18
|
expect(instance.security).toBe(DyNTS_SocketSecurity.secure);
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it('should use default security if not provided', () => {
|
|
21
|
+
it('| should use default security if not provided', () => {
|
|
22
22
|
const params = {
|
|
23
23
|
name: 'TestSocket',
|
|
24
24
|
port: 8080,
|
|
@@ -2,8 +2,8 @@ import { DyNTS_SocketServer_Mock } from '../../mock/socket-server.mock';
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
describe('DyNTS_SocketServerService', () => {
|
|
6
|
-
it('should create an instance', () => {
|
|
5
|
+
describe('| DyNTS_SocketServerService', () => {
|
|
6
|
+
it('| should create an instance', () => {
|
|
7
7
|
expect(DyNTS_SocketServer_Mock.getInstance()).toBeTruthy();
|
|
8
8
|
});
|
|
9
9
|
});
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
DyNTS_AppExtendedBase_Mock, DyNTS_AppExtendedFull_Mock, DyNTS_AppWbMock_Mock
|
|
4
4
|
} from '../mock/app-extended-server.mock';
|
|
5
5
|
|
|
6
|
-
describe('DyNTS_AppExtended;', (): void => {
|
|
7
|
-
describe('a extended-base instance;', (): void => {
|
|
6
|
+
describe('| DyNTS_AppExtended;', (): void => {
|
|
7
|
+
describe('| a extended-base instance;', (): void => {
|
|
8
8
|
let app: DyNTS_AppExtendedBase_Mock;
|
|
9
9
|
|
|
10
10
|
beforeEach(async (): Promise<void> => {
|
|
@@ -33,16 +33,16 @@ describe('DyNTS_AppExtended;', (): void => {
|
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
it('should be created', (): void => {
|
|
36
|
+
it('| should be created', (): void => {
|
|
37
37
|
expect(app).toBeDefined();
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
it('should be started', (): void => {
|
|
40
|
+
it('| should be started', (): void => {
|
|
41
41
|
expect(app.started).toBeTrue();
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
describe('a extended-full instance;', (): void => {
|
|
45
|
+
describe('| a extended-full instance;', (): void => {
|
|
46
46
|
let app: DyNTS_AppExtendedFull_Mock;
|
|
47
47
|
|
|
48
48
|
beforeEach(async (): Promise<void> => {
|
|
@@ -71,16 +71,16 @@ describe('DyNTS_AppExtended;', (): void => {
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
it('should be created', async (): Promise<void> => {
|
|
74
|
+
it('| should be created', async (): Promise<void> => {
|
|
75
75
|
expect(app).toBeDefined();
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
it('should be started', async (): Promise<void> => {
|
|
78
|
+
it('| should be started', async (): Promise<void> => {
|
|
79
79
|
expect(app.started).toBeTrue();
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
-
describe('a wb-mock instance;', (): void => {
|
|
83
|
+
describe('| a wb-mock instance;', (): void => {
|
|
84
84
|
let app: DyNTS_AppWbMock_Mock;
|
|
85
85
|
|
|
86
86
|
beforeEach(async (): Promise<void> => {
|
|
@@ -109,11 +109,11 @@ describe('DyNTS_AppExtended;', (): void => {
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
it('should be created', async (): Promise<void> => {
|
|
112
|
+
it('| should be created', async (): Promise<void> => {
|
|
113
113
|
expect(app).toBeDefined();
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
it('should be started', async (): Promise<void> => {
|
|
116
|
+
it('| should be started', async (): Promise<void> => {
|
|
117
117
|
expect(app.started).toBeTrue();
|
|
118
118
|
});
|
|
119
119
|
});
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
/* describe('DyNTS_DBService', () => {
|
|
6
|
+
/* describe('| DyNTS_DBService', () => {
|
|
7
7
|
|
|
8
|
-
it('should be created', () => {
|
|
8
|
+
it('| should be created', () => {
|
|
9
9
|
expect(true).toBeTrue();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it('should create data', () => {
|
|
12
|
+
it('| should create data', () => {
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
it('should get data', () => {
|
|
15
|
+
it('| should get data', () => {
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
it('should modify data', () => {
|
|
18
|
+
it('| should modify data', () => {
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
...getByDependencyId
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
...etc
|
|
28
28
|
|
|
29
|
-
it('should delete data', () => {
|
|
29
|
+
it('| should delete data', () => {
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
}); */
|
|
@@ -6,7 +6,7 @@ import { DyFM_Error, DyFM_HttpCallType, DyFM_HttpResponseType } from '@futdevpro
|
|
|
6
6
|
import { DyNTS_ApiCall_Params } from '../../_models/control-models/api-call-params.control-model';
|
|
7
7
|
import { DyNTS_ApiCallInput_Params, DyNTS_ApiService } from './api.service';
|
|
8
8
|
|
|
9
|
-
describe('DyNTS_ApiService', () => {
|
|
9
|
+
describe('| DyNTS_ApiService', () => {
|
|
10
10
|
let callParams: DyNTS_ApiCall_Params;
|
|
11
11
|
let inputParams: DyNTS_ApiCallInput_Params;
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ describe('DyNTS_ApiService', () => {
|
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
it('should make a GET request successfully', async () => {
|
|
32
|
+
it('| should make a GET request successfully', async () => {
|
|
33
33
|
callParams.type = DyFM_HttpCallType.get;
|
|
34
34
|
const response = { data: { success: true } };
|
|
35
35
|
|
|
@@ -42,7 +42,7 @@ describe('DyNTS_ApiService', () => {
|
|
|
42
42
|
expect(result).toEqual(response.data);
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
it('should handle a POST request successfully', async () => {
|
|
45
|
+
it('| should handle a POST request successfully', async () => {
|
|
46
46
|
callParams.type = DyFM_HttpCallType.post;
|
|
47
47
|
const response = { data: { success: true } };
|
|
48
48
|
|
|
@@ -55,7 +55,7 @@ describe('DyNTS_ApiService', () => {
|
|
|
55
55
|
expect(result).toEqual(response.data);
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
it('should throw an error for unsupported HTTP method', async () => {
|
|
58
|
+
it('| should throw an error for unsupported HTTP method', async () => {
|
|
59
59
|
callParams.type = 'unsupported' as DyFM_HttpCallType;
|
|
60
60
|
|
|
61
61
|
await expectAsync(DyNTS_ApiService.startApiCall(callParams, inputParams)).toBeRejectedWith(
|
|
@@ -63,7 +63,7 @@ describe('DyNTS_ApiService', () => {
|
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
it('should handle error response with DYNAMO flag', async () => {
|
|
66
|
+
it('| should handle error response with DYNAMO flag', async () => {
|
|
67
67
|
const errorResponse = {
|
|
68
68
|
response: { data: { flag: 'DYNAMO', message: 'Error' } },
|
|
69
69
|
};
|
|
@@ -77,7 +77,7 @@ describe('DyNTS_ApiService', () => {
|
|
|
77
77
|
);
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
it('should handle DNS error', async () => {
|
|
80
|
+
it('| should handle DNS error', async () => {
|
|
81
81
|
const error = { code: 'ENOTFOUND' };
|
|
82
82
|
|
|
83
83
|
spyOn(Axios, 'create').and.returnValue({
|
|
@@ -89,7 +89,7 @@ describe('DyNTS_ApiService', () => {
|
|
|
89
89
|
);
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
it('should handle connection refused error', async () => {
|
|
92
|
+
it('| should handle connection refused error', async () => {
|
|
93
93
|
const error = { code: 'ECONNREFUSED' };
|
|
94
94
|
|
|
95
95
|
spyOn(Axios, 'create').and.returnValue({
|