Skip to content

Commit fd5ccea

Browse files
committed
tests updated
1 parent f1f6ae9 commit fd5ccea

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

src/builds/builds.service.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ describe('BuildsService', () => {
9090
baselineName: null,
9191
ignoreAreas: '[]',
9292
comment: 'some comment',
93+
branchName: 'develop',
94+
baselineBranchName: 'master'
9395
},
9496
],
9597
};
@@ -134,6 +136,7 @@ describe('BuildsService', () => {
134136
const project: Project = {
135137
id: 'project id',
136138
name: 'name',
139+
mainBranchName: 'master',
137140
updatedAt: new Date(),
138141
createdAt: new Date(),
139142
};

src/builds/dto/build.dto.spec.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ describe('BuildDto', () => {
8585
baselineName: null,
8686
ignoreAreas: '[]',
8787
comment: 'some comment1',
88+
branchName: 'develop',
89+
baselineBranchName: 'master',
8890
},
8991
{
9092
id: '10fb5e02-64e0-4cf5-9f17-c00ab3c96658',
@@ -106,6 +108,8 @@ describe('BuildDto', () => {
106108
baselineName: null,
107109
ignoreAreas: '[]',
108110
comment: 'some comment2',
111+
branchName: 'develop',
112+
baselineBranchName: 'master',
109113
},
110114
],
111115
};
@@ -129,7 +133,7 @@ describe('BuildDto', () => {
129133
});
130134

131135
it('failed', () => {
132-
const build = {
136+
const build: Build & { testRuns: TestRun[] } = {
133137
id: 'a9385fc1-884d-4f9f-915e-40da0e7773d5',
134138
number: null,
135139
branchName: 'develop',
@@ -159,6 +163,8 @@ describe('BuildDto', () => {
159163
baselineName: null,
160164
ignoreAreas: '[]',
161165
comment: 'some comment',
166+
branchName: 'develop',
167+
baselineBranchName: 'master',
162168
},
163169
{
164170
id: '10fb5e02-64e0-4cf5-9f17-c00ab3c96658',
@@ -180,6 +186,8 @@ describe('BuildDto', () => {
180186
baselineName: null,
181187
ignoreAreas: '[]',
182188
comment: 'some comment1',
189+
branchName: 'develop',
190+
baselineBranchName: 'master',
183191
},
184192
{
185193
id: '10fb5e02-64e0-4cf5-9f17-c00ab3c96658',
@@ -201,6 +209,8 @@ describe('BuildDto', () => {
201209
baselineName: null,
202210
ignoreAreas: '[]',
203211
comment: 'some comment2',
212+
branchName: 'develop',
213+
baselineBranchName: 'master',
204214
},
205215
],
206216
};
@@ -224,7 +234,7 @@ describe('BuildDto', () => {
224234
});
225235

226236
it('unresolved', () => {
227-
const build = {
237+
const build: Build & { testRuns: TestRun[] } = {
228238
id: 'a9385fc1-884d-4f9f-915e-40da0e7773d5',
229239
number: null,
230240
branchName: 'develop',
@@ -254,6 +264,8 @@ describe('BuildDto', () => {
254264
baselineName: null,
255265
ignoreAreas: '[]',
256266
comment: 'some comment1',
267+
branchName: 'develop',
268+
baselineBranchName: 'master',
257269
},
258270
{
259271
id: '10fb5e02-64e0-4cf5-9f17-c00ab3c96658',
@@ -275,6 +287,8 @@ describe('BuildDto', () => {
275287
baselineName: null,
276288
ignoreAreas: '[]',
277289
comment: 'some comment2',
290+
branchName: 'develop',
291+
baselineBranchName: 'master',
278292
},
279293
{
280294
id: '10fb5e02-64e0-4cf5-9f17-c00ab3c96658',
@@ -296,6 +310,8 @@ describe('BuildDto', () => {
296310
baselineName: null,
297311
ignoreAreas: '[]',
298312
comment: null,
313+
branchName: 'develop',
314+
baselineBranchName: 'master',
299315
},
300316
{
301317
id: '10fb5e02-64e0-4cf5-9f17-c00ab3c96658',
@@ -317,6 +333,8 @@ describe('BuildDto', () => {
317333
baselineName: null,
318334
ignoreAreas: '[]',
319335
comment: 'some comment',
336+
branchName: 'develop',
337+
baselineBranchName: 'master',
320338
},
321339
{
322340
id: '10fb5e02-64e0-4cf5-9f17-c00ab3c96658',
@@ -338,6 +356,8 @@ describe('BuildDto', () => {
338356
baselineName: null,
339357
ignoreAreas: '[]',
340358
comment: 'some comment',
359+
branchName: 'develop',
360+
baselineBranchName: 'master',
341361
},
342362
],
343363
};

0 commit comments

Comments
 (0)