clean task
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
import { isValid, v } from 'suretype'
|
|
||||||
|
|
||||||
export interface Stepable {
|
export interface Stepable {
|
||||||
id: string
|
id: string
|
||||||
title: string
|
title: string
|
||||||
@@ -10,12 +8,3 @@ export interface Stepable {
|
|||||||
*/
|
*/
|
||||||
totalEstimation: number
|
totalEstimation: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const stepableSchema = v.object({
|
|
||||||
id: v.string().minLength(1).required(),
|
|
||||||
title: v.string().minLength(1).required(),
|
|
||||||
estimation: v.number(),
|
|
||||||
totalEstimation: v.number().required()
|
|
||||||
})
|
|
||||||
|
|
||||||
const isValidStepable = (data: unknown) => isValid(stepableSchema, data)
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import type { Stepable } from '@/use-cases/task/interfaces/stepable'
|
|
||||||
import type { Taskable } from '@/use-cases/task/interfaces/taskable'
|
import type { Taskable } from '@/use-cases/task/interfaces/taskable'
|
||||||
import { createStepFixture } from '@/use-cases/task/models/step.fixture'
|
|
||||||
import { Task } from '@/use-cases/task/models/task'
|
import { Task } from '@/use-cases/task/models/task'
|
||||||
|
import { createStepFixture } from '@/use-cases/task/models/step.fixture'
|
||||||
import { faker } from '@faker-js/faker'
|
import { faker } from '@faker-js/faker'
|
||||||
import exp from 'constants'
|
|
||||||
import { describe, expect, it } from 'vitest'
|
import { describe, expect, it } from 'vitest'
|
||||||
|
|
||||||
describe('Task', () => {
|
describe('Task', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user