Skip to content

Commit

Permalink
Merge pull request #25 from rivertam/fix-require
Browse files Browse the repository at this point in the history
Fix uuid to uuid/v4
  • Loading branch information
nunorafaelrocha authored Aug 17, 2018
2 parents 8d58af8 + 6c783b3 commit e4fde22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Module dependencies.
*/

const uuid = require('uuid');
const uuid = require('uuid/v4');

/**
* Export `guid`.
Expand All @@ -14,7 +14,7 @@ module.exports = options => {
options = Object.assign(
{
field: 'id',
generateGuid: () => uuid.v4()
generateGuid: () => uuid()
},
options
);
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Jest mocks.
*/

jest.mock('uuid', () => ({ v4: jest.fn(() => 'foobar') }));
jest.mock('uuid/v4', () => jest.fn(() => 'foobar'));

/**
* Module dependencies.
Expand Down

0 comments on commit e4fde22

Please sign in to comment.