@instructure/quiz-grading
Version:
The Quiz React SDK by Instructure Inc.
20 lines (18 loc) • 536 B
JavaScript
import {fromJS} from 'immutable'
import {expect, describe, it} from 'vitest'
import {mapStateToProps} from '../index'
describe('GradingBar index', () => {
it('should map attributes correctly', () => {
const state = {
grading: fromJS({
activeItemId: '3',
gradeByQuestionEnabled: true,
}),
quizzes: fromJS({}),
quizSessions: fromJS({}),
}
const props = mapStateToProps(state)
expect(props.gradeByQuestionEnabled).toEqual(true)
expect(props.activeItemId).toEqual('3')
})
})