Skip to content

Commit ff7ee89

Browse files
committed
fix: Set correct import in entry of adapter-utils
1 parent cfca01b commit ff7ee89

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

packages/adapter-utils/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const supportsAsyncAwait =
22
parseInt(process.version.slice(1).split('.').join('')) > 760;
33

4-
const path = supportsAsyncAwait
5-
? './src/adapter-utils'
6-
: './dist/adapter-utils';
4+
const path = supportsAsyncAwait ? './src/index' : './dist/index';
75

86
module.exports = require(path);
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
const { mockDb } = require('micro-analytics-cli/tests/utils');
2-
3-
jest.mock('flat-file-db', () => mockDb);
4-
1+
const adapter = require('micro-analytics-adapter-memory');
52
const test = require('../src/unit-tests');
63

74
test({
8-
name: 'flat-file-db',
9-
modulePath: 'micro-analytics-adapter-flat-file-db',
10-
beforeEach: async () => {
11-
mockDb._reset();
5+
name: 'memory',
6+
modulePath: 'micro-analytics-adapter-memory',
7+
beforeEach: () => {
8+
adapter.clear();
129
},
1310
});

0 commit comments

Comments
 (0)