Skip to content

Commit d2640e2

Browse files
committed
added await befor initialization
1 parent 3ea51d5 commit d2640e2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/memory/src/index.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ describe('LongTermMemory', () => {
99
beforeEach(async () => {
1010
await fs.remove(testRulesDir);
1111
memory = new LongTermMemory(testRulesDir);
12+
await memory.init();
1213
});
1314

1415
afterEach(async () => {

packages/memory/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'fs-extra';
22
import path from 'path';
3+
import crypto from 'crypto';
34

45
export interface Rule {
56
id: string;
@@ -16,7 +17,10 @@ export class LongTermMemory {
1617
constructor(rulesDir: string = path.join(process.cwd(), 'rules')) {
1718
this.rulesDir = rulesDir;
1819
this.rules = new Map();
19-
this.initialize();
20+
}
21+
22+
async init() {
23+
await this.initialize();
2024
}
2125

2226
private async initialize() {

0 commit comments

Comments
 (0)