mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
[UnitTests] Don't use backend type in shared
This commit is contained in:
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user