diff --git a/__tests__/index.test.js b/__tests__/index.test.js index a5af6cc..6c342dd 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -83,8 +83,8 @@ describe('run-tests assignment', () => { describe('run-post-actions', () => { const checkCreatePath = 'http://localhost:3000/api_internal/courses/hexlet-course-source-ci/lessons/basics/assignment/check'; const checkData = { - testData: { passed: true, output: 'some testing output' }, - lintData: { passed: false, output: 'some linting output' }, + testData: { passed: true, output: 'some testing output', exception: null }, + lintData: { passed: false, output: 'some linting output', exception: new Error('linting failed') }, }; it('success test state', async () => { diff --git a/server.js b/server.js index de280f4..ad962de 100644 --- a/server.js +++ b/server.js @@ -30,18 +30,20 @@ const checkSchema = { properties: { passed: { type: 'boolean' }, output: { type: 'string', minLength: 1 }, + exception: { type: 'object', nullable: true }, }, - required: ['passed', 'output'], - additionalProperties: true, + required: ['passed', 'output', 'exception'], + additionalProperties: false, }, lintData: { type: 'object', properties: { passed: { type: 'boolean' }, output: { type: 'string', minLength: 1 }, + exception: { type: 'object', nullable: true }, }, - required: ['passed', 'output'], - additionalProperties: true, + required: ['passed', 'output', 'exception'], + additionalProperties: false, }, }, required: ['state', 'testData', 'lintData'],