remove unecessary hasSteps

This commit is contained in:
Julien Calixte
2023-05-20 12:51:05 +02:00
parent ddf2809d57
commit 5d936476d0
2 changed files with 0 additions and 22 deletions

View File

@@ -21,22 +21,4 @@ describe('Task Record', () => {
expect(TaskRecord.fromRecordable(recordable)).toEqual(recordable) expect(TaskRecord.fromRecordable(recordable)).toEqual(recordable)
}) })
it('tells if there are steps in the record', () => {
const record = fixtureRecordable({
stepRecords: {
[faker.datatype.uuid()]: fixtureTimeRange()
}
})
expect(TaskRecord.fromRecordable(record).hasStepRecords).toBe(true)
})
it('tells if there are no steps in the record', () => {
const record = fixtureRecordable({
stepRecords: {}
})
expect(TaskRecord.fromRecordable(record).hasStepRecords).toBe(false)
})
}) })

View File

@@ -12,10 +12,6 @@ export class TaskRecord implements Recordable {
public constructor(public readonly taskId: string) {} public constructor(public readonly taskId: string) {}
public get hasStepRecords() {
return Object.values(this.stepRecords).length > 0
}
public static fromRecordable(recordable: Recordable) { public static fromRecordable(recordable: Recordable) {
const taskRecord = new TaskRecord(recordable.taskId) const taskRecord = new TaskRecord(recordable.taskId)