Skip to content

Commit f45df8d

Browse files
committed
test(core): align LocalStorage tests with dev; add undefined-folder guard
Signed-off-by: fazeel332@gmail.com <fazeel332@gmail.com>
1 parent 233386e commit f45df8d

File tree

2 files changed

+5
-36
lines changed

2 files changed

+5
-36
lines changed

packages/core/tests/unit/001-Core/LocalStorage.test.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

packages/core/tests/unit/005-Storage/LocalStorage.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ const testOriginalMetadata = {
4747
};
4848

4949
describe('Local Storage Tests', () => {
50+
it('Initializes with undefined folder without crashing (guard)', () => {
51+
expect(() => new LocalStorage()).not.toThrow();
52+
expect(() => new LocalStorage({} as any)).not.toThrow();
53+
expect(() => new LocalStorage({ folder: undefined } as any)).not.toThrow();
54+
});
5055
it('Get Default Storage instance', async () => {
5156
const localStorage: StorageConnector = ConnectorService.getStorageConnector();
5257

0 commit comments

Comments
 (0)