20 lines
567 B
TypeScript
20 lines
567 B
TypeScript
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
|
|
|
import * as smartfile from '../ts/index.js';
|
|
|
|
tap.test('should create a virtualdirectory', async () => {
|
|
const virtualDir = await smartfile.VirtualDirectory.fromFsDirPath(
|
|
'./test/testassets/testfolder',
|
|
);
|
|
expect(virtualDir.smartfileArray.length).toEqual(4);
|
|
});
|
|
|
|
tap.test('should write to a directory', async () => {
|
|
const virtualDir = await smartfile.VirtualDirectory.fromFsDirPath(
|
|
'./test/testassets/testfolder',
|
|
);
|
|
virtualDir.saveToDisk('./test/testassets/test');
|
|
});
|
|
|
|
tap.start();
|