Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add education[].summary #399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@
"type": "string",
"description": "grade point average, e.g. 3.67/4.0"
},
"summary": {
"type": "string",
"description": "a short summary of your studies, e.g. Thesis"
},
"courses": {
"type": "array",
"description": "List notable courses/subjects",
Expand Down
14 changes: 14 additions & 0 deletions test/__test__/education.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@
}
]
},
"summaryValid": {
"education": [
{
"summary": "I wrote an awesome Master's Thesis."
}
]
},
"summaryInvalid": {
"education": [
{
"summary": null
}
]
},
"coursesValid": {
"education": [
{
Expand Down
16 changes: 16 additions & 0 deletions test/education.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,22 @@ test('education[].score - invalid', (t) => {
t.end();
});

test('education[].summary - valid', (t) => {
validate(fixtures.summaryValid, (err, valid) => {
t.equal(err, null, 'err should be null');
t.true(valid, 'valid is true');
});
t.end();
});

test('education[].summary - invalid', (t) => {
validate(fixtures.summaryInvalid, (err, valid) => {
t.notEqual(err, null, 'err should contain an error');
t.false(valid, 'valid is false');
});
t.end();
});

test('education[].courses - valid', (t) => {
validate(fixtures.coursesValid, (err, valid) => {
t.equal(err, null, 'err should be null');
Expand Down