@mojaloop/ml-testing-toolkit-client-lib 1.10.0 → 1.10.1
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/.circleci/config.yml +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +7 -7
- package/sbom-v1.10.0.csv +1326 -0
- package/test/unit/client.test.js +1 -1
- package/test/unit/listener.test.js +2 -2
- package/test/unit/logger.test.js +4 -4
- package/test/unit/monitoring-mode.test.js +1 -1
- package/test/unit/outbound-mode.test.js +7 -7
- package/test/unit/router.test.js +9 -9
package/test/unit/client.test.js
CHANGED
|
@@ -45,7 +45,7 @@ describe('Cli client', () => {
|
|
|
45
45
|
})
|
|
46
46
|
expect(() => {
|
|
47
47
|
listeners.outbound()
|
|
48
|
-
}).not.
|
|
48
|
+
}).not.toThrow();
|
|
49
49
|
})
|
|
50
50
|
it('running the monitoring listener should not throw an error', async () => {
|
|
51
51
|
const monitoring = require('../../src/modes/monitoring')
|
|
@@ -57,7 +57,7 @@ describe('Cli client', () => {
|
|
|
57
57
|
})
|
|
58
58
|
expect(() => {
|
|
59
59
|
listeners.monitoring()
|
|
60
|
-
}).not.
|
|
60
|
+
}).not.toThrow();
|
|
61
61
|
})
|
|
62
62
|
})
|
|
63
63
|
})
|
package/test/unit/logger.test.js
CHANGED
|
@@ -229,14 +229,14 @@ describe('Cli client', () => {
|
|
|
229
229
|
objectStore.get.mockReturnValueOnce({})
|
|
230
230
|
expect(() => {
|
|
231
231
|
logger.outbound(sampleOutboundProgress)
|
|
232
|
-
}).not.
|
|
232
|
+
}).not.toThrow()
|
|
233
233
|
})
|
|
234
234
|
it('when extraSummaryInformation is supplied, it should be logged', async () => {
|
|
235
235
|
objectStore.get.mockReturnValueOnce({
|
|
236
236
|
extraSummaryInformation: 'Title:Mocktitle,Summary:MockSummary'
|
|
237
237
|
})
|
|
238
238
|
logger.outbound(sampleOutboundProgress)
|
|
239
|
-
expect(spyConsole).
|
|
239
|
+
expect(spyConsole).toHaveBeenCalled()
|
|
240
240
|
})
|
|
241
241
|
it('when the cli mode is monitoring should not throw an error 1', async () => {
|
|
242
242
|
const sampleMonitoringProgress = {
|
|
@@ -247,7 +247,7 @@ describe('Cli client', () => {
|
|
|
247
247
|
}
|
|
248
248
|
expect(() => {
|
|
249
249
|
logger.monitoring(sampleMonitoringProgress)
|
|
250
|
-
}).not.
|
|
250
|
+
}).not.toThrow()
|
|
251
251
|
})
|
|
252
252
|
it('when the cli mode is monitoring should not throw an error 2', async () => {
|
|
253
253
|
const sampleMonitoringProgress = {
|
|
@@ -258,7 +258,7 @@ describe('Cli client', () => {
|
|
|
258
258
|
}
|
|
259
259
|
expect(() => {
|
|
260
260
|
logger.monitoring(sampleMonitoringProgress)
|
|
261
|
-
}).not.
|
|
261
|
+
}).not.toThrow()
|
|
262
262
|
})
|
|
263
263
|
})
|
|
264
264
|
})
|
|
@@ -50,7 +50,7 @@ describe('Cli client', () => {
|
|
|
50
50
|
spyExit.mockReturnValueOnce({})
|
|
51
51
|
expect(() => {
|
|
52
52
|
outbound.handleIncomingProgress(progress)
|
|
53
|
-
}).not.
|
|
53
|
+
}).not.toThrow()
|
|
54
54
|
})
|
|
55
55
|
it('when status is FINISHED, assertions passed and there is an error should not throw an error', async () => {
|
|
56
56
|
const progress = {
|
|
@@ -61,7 +61,7 @@ describe('Cli client', () => {
|
|
|
61
61
|
spyExit.mockReturnValueOnce({})
|
|
62
62
|
expect(() => {
|
|
63
63
|
outbound.handleIncomingProgress(progress)
|
|
64
|
-
}).not.
|
|
64
|
+
}).not.toThrow()
|
|
65
65
|
})
|
|
66
66
|
it('when status is FINISHED and assertions failed should not throw an error', async () => {
|
|
67
67
|
const progress = {
|
|
@@ -72,7 +72,7 @@ describe('Cli client', () => {
|
|
|
72
72
|
spyExit.mockReturnValueOnce({})
|
|
73
73
|
expect(() => {
|
|
74
74
|
outbound.handleIncomingProgress(progress)
|
|
75
|
-
}).not.
|
|
75
|
+
}).not.toThrow()
|
|
76
76
|
})
|
|
77
77
|
it('when status is not FINISHED should not throw an error', async () => {
|
|
78
78
|
const progress = {
|
|
@@ -81,7 +81,7 @@ describe('Cli client', () => {
|
|
|
81
81
|
spyExit.mockReturnValueOnce({})
|
|
82
82
|
expect(() => {
|
|
83
83
|
outbound.handleIncomingProgress(progress)
|
|
84
|
-
}).not.
|
|
84
|
+
}).not.toThrow()
|
|
85
85
|
})
|
|
86
86
|
})
|
|
87
87
|
describe('when status is not FINISHED should not throw an error where there are assertions', () => {
|
|
@@ -125,7 +125,7 @@ describe('Cli client', () => {
|
|
|
125
125
|
spyExit.mockReturnValueOnce({})
|
|
126
126
|
expect(() => {
|
|
127
127
|
outbound.handleIncomingProgress(progress)
|
|
128
|
-
}).not.
|
|
128
|
+
}).not.toThrow()
|
|
129
129
|
})
|
|
130
130
|
it('With loglevel 1', async () => {
|
|
131
131
|
const config = {
|
|
@@ -138,7 +138,7 @@ describe('Cli client', () => {
|
|
|
138
138
|
spyExit.mockReturnValueOnce({})
|
|
139
139
|
expect(() => {
|
|
140
140
|
outbound.handleIncomingProgress(progress)
|
|
141
|
-
}).not.
|
|
141
|
+
}).not.toThrow()
|
|
142
142
|
})
|
|
143
143
|
it('With loglevel 2', async () => {
|
|
144
144
|
const config = {
|
|
@@ -151,7 +151,7 @@ describe('Cli client', () => {
|
|
|
151
151
|
spyExit.mockReturnValueOnce({})
|
|
152
152
|
expect(() => {
|
|
153
153
|
outbound.handleIncomingProgress(progress)
|
|
154
|
-
}).not.
|
|
154
|
+
}).not.toThrow()
|
|
155
155
|
})
|
|
156
156
|
})
|
|
157
157
|
describe('run sendTemplate', () => {
|
package/test/unit/router.test.js
CHANGED
|
@@ -59,7 +59,7 @@ describe('Cli client', () => {
|
|
|
59
59
|
spyExit.mockImplementationOnce(jest.fn())
|
|
60
60
|
expect(() => {
|
|
61
61
|
cli(config)
|
|
62
|
-
}).not.
|
|
62
|
+
}).not.toThrow()
|
|
63
63
|
})
|
|
64
64
|
it('when mode is outbound and inputFiles is provided should not throw an error', async () => {
|
|
65
65
|
const config = {
|
|
@@ -69,7 +69,7 @@ describe('Cli client', () => {
|
|
|
69
69
|
spyExit.mockImplementationOnce(jest.fn())
|
|
70
70
|
expect(() => {
|
|
71
71
|
cli(config)
|
|
72
|
-
}).not.
|
|
72
|
+
}).not.toThrow()
|
|
73
73
|
expect(spyExit).toHaveBeenCalledWith(1)
|
|
74
74
|
})
|
|
75
75
|
it('when mode is outbound, inputFiles and environmentFile is provided should not throw an error', async () => {
|
|
@@ -81,7 +81,7 @@ describe('Cli client', () => {
|
|
|
81
81
|
spyExit.mockImplementationOnce(jest.fn())
|
|
82
82
|
expect(() => {
|
|
83
83
|
cli(config)
|
|
84
|
-
}).not.
|
|
84
|
+
}).not.toThrow()
|
|
85
85
|
jest.advanceTimersByTime(1000 * 60 * 15)
|
|
86
86
|
expect(spyExit).toHaveBeenCalledWith(1)
|
|
87
87
|
})
|
|
@@ -92,7 +92,7 @@ describe('Cli client', () => {
|
|
|
92
92
|
spyExit.mockImplementationOnce(jest.fn())
|
|
93
93
|
expect(() => {
|
|
94
94
|
cli(config)
|
|
95
|
-
}).not.
|
|
95
|
+
}).not.toThrow()
|
|
96
96
|
expect(spyExit).toHaveBeenCalledWith(1)
|
|
97
97
|
})
|
|
98
98
|
it('when mode is testcaseDefinitionReport and inputFile was provided should not throw an error', async () => {
|
|
@@ -103,7 +103,7 @@ describe('Cli client', () => {
|
|
|
103
103
|
spyExit.mockImplementationOnce(jest.fn())
|
|
104
104
|
expect(() => {
|
|
105
105
|
cli(config)
|
|
106
|
-
}).not.
|
|
106
|
+
}).not.toThrow()
|
|
107
107
|
})
|
|
108
108
|
it('when mode is testcaseDefinitionReport and inputFile was not provided should not throw an error', async () => {
|
|
109
109
|
const config = {
|
|
@@ -112,7 +112,7 @@ describe('Cli client', () => {
|
|
|
112
112
|
spyExit.mockImplementationOnce(jest.fn())
|
|
113
113
|
expect(() => {
|
|
114
114
|
cli(config)
|
|
115
|
-
}).not.
|
|
115
|
+
}).not.toThrow()
|
|
116
116
|
expect(spyExit).toHaveBeenCalledWith(1)
|
|
117
117
|
})
|
|
118
118
|
it('when mode is not supported should not throw an error', async () => {
|
|
@@ -122,7 +122,7 @@ describe('Cli client', () => {
|
|
|
122
122
|
spyExit.mockImplementationOnce(jest.fn())
|
|
123
123
|
expect(() => {
|
|
124
124
|
cli(config)
|
|
125
|
-
}).not.
|
|
125
|
+
}).not.toThrow()
|
|
126
126
|
expect(spyExit).toHaveBeenCalledWith(1)
|
|
127
127
|
})
|
|
128
128
|
it('when mode is not provided should not throw an error', async () => {
|
|
@@ -130,8 +130,8 @@ describe('Cli client', () => {
|
|
|
130
130
|
spyExit.mockImplementationOnce(jest.fn())
|
|
131
131
|
expect(() => {
|
|
132
132
|
cli(config)
|
|
133
|
-
}).not.
|
|
133
|
+
}).not.toThrow()
|
|
134
134
|
expect(spyExit).toHaveBeenCalledWith(1)
|
|
135
135
|
})
|
|
136
136
|
})
|
|
137
|
-
})
|
|
137
|
+
})
|