mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
[ApiTests][CourseYearlyStats] Move student tests to new directory
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ import { Express } from 'express'
|
||||
import request from 'supertest'
|
||||
import { describe, it, beforeAll, assert } from 'vitest'
|
||||
|
||||
import { initTests } from '../../../utils'
|
||||
import { initTests } from '../../../../utils'
|
||||
|
||||
void describe('Course yearly statistics - validation', () => {
|
||||
let app: Express
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import { Express } from 'express'
|
||||
import { describe, it, beforeAll, assert } from 'vitest'
|
||||
|
||||
import { initTests } from '../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from './helpers'
|
||||
import { initTests } from '../../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from '../helpers'
|
||||
|
||||
void describe('Course yearly statistics - MAT11001 (no substitutions)', () => {
|
||||
let app: Express
|
||||
+4
-3
@@ -1,8 +1,8 @@
|
||||
import { Express } from 'express'
|
||||
import { describe, it, beforeAll, assert } from 'vitest'
|
||||
|
||||
import { initTests } from '../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from './helpers'
|
||||
import { initTests } from '../../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from '../helpers'
|
||||
|
||||
void describe('Course yearly statistics - MAT11002 (no substitutions)', () => {
|
||||
let app: Express
|
||||
@@ -28,7 +28,8 @@ void describe('Course yearly statistics - MAT11002 (no substitutions)', () => {
|
||||
assert(year.students.grades['1'].includes('501716'), 'Grades should include the student in the correct grade')
|
||||
})
|
||||
|
||||
it('should include student with failed grade and passed AY grade', () => {
|
||||
// FIXME: Doesn't test anything acually. Student doesn't have a passed AY grade
|
||||
it.skip('should include student with failed grade and passed AY grade', () => {
|
||||
const year = body.unifyStats?.statistics.find(year => year.name === '2020-2021')
|
||||
assert(year && 'enrollments' in year, 'Stats missing completely')
|
||||
const studentCategories = calculatePassedAndFailed(year.students.grades)
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { Express } from 'express'
|
||||
import { describe, it, beforeAll, assert } from 'vitest'
|
||||
|
||||
import { yearToYearCode } from '@oodikone/shared/util'
|
||||
import { initTests } from '../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from './helpers'
|
||||
import { initTests } from '../../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from '../helpers'
|
||||
|
||||
void describe('Course yearly statistics - MAT21003 (no substitutions)', () => {
|
||||
let app: Express
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { Express } from 'express'
|
||||
import { describe, it, beforeAll, assert } from 'vitest'
|
||||
|
||||
import { yearToYearCode } from '@oodikone/shared/util'
|
||||
import { initTests } from '../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from './helpers'
|
||||
import { initTests } from '../../../../utils'
|
||||
import { calculatePassedAndFailed, getCourseYearlyStats, CourseYearlyStats } from '../helpers'
|
||||
|
||||
void describe('Course yearly statistics - TKT10002 (no substitutions)', () => {
|
||||
let app: Express
|
||||
Reference in New Issue
Block a user