Skip to content

Commit

Permalink
get default export
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamieh committed Apr 3, 2020
1 parent 19ab24a commit 2cd9562
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ beforeEach(() => {
mockAuditLogger = encryptedSavedObjectsAuditLoggerMock.create();

// Call actual `@elastic/node-crypto` by default, but allow to override implementation in tests.
jest
.requireMock('@elastic/node-crypto')
.mockImplementation((...args: any[]) => jest.requireActual('@elastic/node-crypto')(...args));
jest.requireMock('@elastic/node-crypto').mockImplementation((...args: any[]) => {
const { default: nodeCrypto } = jest.requireActual('@elastic/node-crypto');
return nodeCrypto(...args);
});

service = new EncryptedSavedObjectsService(
'encryption-key-abc',
Expand Down

0 comments on commit 2cd9562

Please sign in to comment.