File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 11export const modelToFeedbackConfig = model => {
2-
32 const correctFeedback = model . correctResponse . feedback || { } ;
43 const incorrectFeedback = model . incorrectFeedback || { } ;
54
Original file line number Diff line number Diff line change @@ -31,10 +31,6 @@ describe('model', () => {
3131 result = await model ( question , session , env ) ;
3232 } ) ;
3333
34- it ( 'returns color_contrast' , ( ) => {
35- expect ( result . colorContrast ) . toEqual ( 'black_on_white' ) ;
36- } ) ;
37-
3834 it ( 'returns disabled:false' , ( ) => {
3935 expect ( result . disabled ) . toEqual ( false ) ;
4036 } ) ;
@@ -113,4 +109,15 @@ describe('model', () => {
113109 expect ( result . feedback ) . toEqual ( 'foo' ) ;
114110 } ) ;
115111 } ) ;
112+
113+ describe ( 'evaluate - correct with mathjs' , ( ) => {
114+ it ( 'returns correct for mathematically correct answer too' , async ( ) => {
115+ question = mkQuestion ( ) ;
116+ session = { value : '3x+2+1-1+x-x' } ;
117+ env = { mode : 'evaluate' } ;
118+ result = await model ( question , session , env ) ;
119+
120+ expect ( result . correctness ) . toEqual ( 'correct' ) ;
121+ } ) ;
122+ } )
116123} ) ;
You can’t perform that action at this time.
0 commit comments