vbv/client/src/services/__tests__/learningPath.spec.ts

16 lines
513 B
TypeScript

import { describe, it } from 'vitest'
import data from './learning_path_json.json'
import { LearningPath } from '../learningPath'
describe('LearningPath.parseJson', () => {
it('can parse learning sequences from api response', () => {
const learningPath = LearningPath.fromJson(data, [])
expect(learningPath.circles.length).toBe(2)
expect(learningPath.circles[0].title).toBe('Basis')
expect(learningPath.circles[1].title).toBe('Analyse')
expect(learningPath.topics.length).toBe(2)
})
})