Skip to content

Commit

Permalink
Merge pull request #151 from hckrnews/feature/build-objects
Browse files Browse the repository at this point in the history
Reduce duplicate code in the tests
  • Loading branch information
w3nl committed Sep 9, 2021
2 parents 778e973 + e618826 commit ee91198
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hckrnews/objects",
"description": "Create valid JavaScript objects",
"version": "3.3.3",
"version": "3.3.4",
"author": {
"name": "Pieter Wigboldus",
"url": "https://hckr.news/"
Expand Down
16 changes: 8 additions & 8 deletions src/__tests__/parse-object.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,24 +114,24 @@ describe('Test objects.js parse', () => {

it('It should validate the object', () => {
const input = {
a: '1',
a: '101',
b: 'true',
c: 42,
c: 102,
subSchema: {
a: '1',
a: '103',
b: 'true',
c: 'test',
c: 'test with validation',
},
};

expect(Test.parse(input, { validate: true })).toEqual({
a: 1,
a: 101,
b: true,
c: '42',
c: '102',
subSchema: {
a: 1,
a: 103,
b: true,
c: 'test',
c: 'test with validation',
},
});
});
Expand Down

0 comments on commit ee91198

Please sign in to comment.