Skip to content

Commit

Permalink
Create fsStore.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Oct 16, 2023
1 parent bc08b65 commit f388f05
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/FileSystemAdapter/fsStore.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { describe, expect, test } from 'vitest';

import { createStore } from './fsStore.mjs';

describe('utils', () => {
test('createStore', async () => {
const store = createStore<string>();

store.set('.', 'hello');
expect(store.get('.')).toBe('hello');

store.set('.', 'world');
expect(store.get('.')).toBe('world');

store.set('./file.txt', 'content');
expect(store.get('.')).toBe('world');
expect(store.get('./file.txt')).toBe('content');

store.set('.', undefined);
expect(store.get('.')).toBe(undefined);
});
});

0 comments on commit f388f05

Please sign in to comment.