Skip to content

Commit 6911a86

Browse files
committed
feat(function-entry): finalized function-entry component
1 parent f62ec87 commit 6911a86

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

packages/function-entry/configure/src/feedback-mapper.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const modelToFeedbackConfig = model => {
2-
32
const correctFeedback = model.correctResponse.feedback || {};
43
const incorrectFeedback = model.incorrectFeedback || {};
54

packages/function-entry/controller/__test__/index.test.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)