2025-05-21 13:24:41 +00:00
|
|
|
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
2020-10-11 15:34:24 +00:00
|
|
|
|
2022-06-07 15:43:28 +02:00
|
|
|
import * as smartfile from '../ts/index.js';
|
2020-10-11 15:34:24 +00:00
|
|
|
|
|
|
|
tap.test('should create a virtualdirectory', async () => {
|
2025-08-18 00:13:03 +00:00
|
|
|
const virtualDir = await smartfile.VirtualDirectory.fromFsDirPath(
|
|
|
|
'./test/testassets/testfolder',
|
|
|
|
);
|
2022-06-07 15:43:28 +02:00
|
|
|
expect(virtualDir.smartfileArray.length).toEqual(4);
|
2020-10-11 15:34:24 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
tap.test('should write to a directory', async () => {
|
2025-08-18 00:13:03 +00:00
|
|
|
const virtualDir = await smartfile.VirtualDirectory.fromFsDirPath(
|
|
|
|
'./test/testassets/testfolder',
|
|
|
|
);
|
2020-10-11 15:34:24 +00:00
|
|
|
virtualDir.saveToDisk('./test/testassets/test');
|
|
|
|
});
|
|
|
|
|
2022-03-11 09:46:54 +01:00
|
|
|
tap.start();
|