smartfile/test/test.virtualdirectory.ts

16 lines
544 B
TypeScript
Raw Permalink Normal View History

2023-08-31 16:45:23 +00:00
import { tap, expect } from '@push.rocks/tapbundle';
2020-10-11 15:34:24 +00:00
2022-06-07 13:43:28 +00:00
import * as smartfile from '../ts/index.js';
2020-10-11 15:34:24 +00:00
tap.test('should create a virtualdirectory', async () => {
const virtualDir = await smartfile.VirtualDirectory.fromFsDirPath('./test/testassets/testfolder');
2022-06-07 13:43:28 +00:00
expect(virtualDir.smartfileArray.length).toEqual(4);
2020-10-11 15:34:24 +00:00
});
tap.test('should write to a directory', async () => {
const virtualDir = await smartfile.VirtualDirectory.fromFsDirPath('./test/testassets/testfolder');
virtualDir.saveToDisk('./test/testassets/test');
});
2022-03-11 08:46:54 +00:00
tap.start();