2020-10-11 15:34:24 +00:00
|
|
|
import { tap, expect } from '@pushrocks/tapbundle';
|
|
|
|
|
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();
|