clean task

This commit is contained in:
Julien Calixte
2023-04-06 23:04:42 +02:00
parent a6d3c68729
commit 9f444375cd
2 changed files with 1 additions and 14 deletions

View File

@@ -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)

View File

@@ -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', () => {