[UnitTests] Don't use backend type in shared

This commit is contained in:
Aaro Koivukangas
2026-08-21 17:54:57 +03:00
parent 66b1a40649
commit d41acb17d8
2 changed files with 6 additions and 3 deletions
@@ -1,8 +1,12 @@
import { describe, it, assert } from 'vitest'
import { CreditTypeCode } from '@oodikone/shared/types'
import { createCredit as credit, createStudyRightElementModel as studyRightElement } from '@oodikone/shared/test/utils'
import { createCredit as credit, createStudyRightElementModel } from '@oodikone/shared/test/utils'
import { parseCredit } from '@/services/courses'
import { SISStudyRightElementModel } from '@/models'
const studyRightElement = (...args: Parameters<typeof createStudyRightElementModel>) =>
createStudyRightElementModel(...args) as SISStudyRightElementModel
void describe('parseCredit', () => {
it('should parse a single passed credit', () => {
+1 -2
View File
@@ -1,4 +1,3 @@
import type { SISStudyRightElementModel } from '../../../backend/src/models'
import type { SISStudyRightElement } from '../../models'
export const createStudyRightElementModel = (overrides: Partial<SISStudyRightElement> = {}) =>
@@ -13,4 +12,4 @@ export const createStudyRightElementModel = (overrides: Partial<SISStudyRightEle
organization: { name: { en: 'Faculty', fi: 'Tiedekunta', sv: 'Fakultet' } },
} as Partial<SISStudyRightElement['studyRight']>,
...overrides,
}) as SISStudyRightElementModel
}) as SISStudyRightElement