Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nataniel López committed Jul 29, 2019
1 parent 06ecbf9 commit e902043
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/mongodb-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ describe('MongoDB', () => {

describe('parseSortingParams()', () => {

it('should convert \'asc\' into 1 and \'desc\' into -1', async () => {
it('should convert \'asc\' into 1 and \'desc\' into -1', () => {

const order = {
field1: 'asc',
Expand All @@ -790,9 +790,25 @@ describe('MongoDB', () => {
field2: -1,
field3: 1
});

});
});

describe('cleanFields()', () => {

it('should remove lastModified and dateCreated from the specified field', () => {

const fields = {
value: 'sarasa',
lastModified: 'something',
dateCreated: 'something'
};

mongodb.cleanFields(fields);

assert.deepStrictEqual(fields, {
value: 'sarasa'
});
});
});

});

0 comments on commit e902043

Please sign in to comment.