Skip to content

Commit

Permalink
Remove redundant spread syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
NereusWB922 committed Feb 7, 2024
1 parent 6fec991 commit 0aefb61
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/app/core/models/session-model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ describe('Session Model', () => {
});

it('should throw error on session data with invalid session', () => {
of({ ...VALID_SESSION_DATA, sessionRepo: null })
of({ sessionRepo: null })
.pipe(assertSessionDataIntegrity())
.subscribe({
next: () => fail(),
error: (err) => expect(err).toEqual(new Error(SESSION_DATA_MISSING_FIELDS))
});
of({ ...VALID_SESSION_DATA, sessionRepo: [] })
of({ sessionRepo: [] })
.pipe(assertSessionDataIntegrity())
.subscribe({
next: () => fail(),
error: (err) => expect(err).toEqual(new Error(SESSION_DATA_MISSING_FIELDS))
});
of({ ...VALID_SESSION_DATA, sessionRepo: 'repo' })
of({ sessionRepo: 'repo' })
.pipe(assertSessionDataIntegrity())
.subscribe({
next: () => fail(),
Expand All @@ -42,7 +42,7 @@ describe('Session Model', () => {
});

it('should throw error on session with invalid phases', () => {
of({ ...VALID_SESSION_DATA, sessionRepo: [{ phase: 'invalidPhase' as Phase, repos: [WATCHER_REPO] }] })
of({ sessionRepo: [{ phase: 'invalidPhase' as Phase, repos: [WATCHER_REPO] }] })
.pipe(assertSessionDataIntegrity())
.subscribe({
next: () => fail(),
Expand All @@ -51,7 +51,7 @@ describe('Session Model', () => {
});

it('should throw error on session data with invalid repo', () => {
of({ ...VALID_SESSION_DATA, sessionRepo: [{ phase: Phase.issuesViewer, repo: undefined }] })
of({ sessionRepo: [{ phase: Phase.issuesViewer, repo: undefined }] })
.pipe(assertSessionDataIntegrity())
.subscribe({
next: () => fail(),
Expand Down

0 comments on commit 0aefb61

Please sign in to comment.