fix(core): update

This commit is contained in:
2022-03-31 01:45:46 +02:00
parent 95065de1b5
commit 784e54f021
14 changed files with 6599 additions and 13901 deletions

View File

@@ -1,7 +1,7 @@
import { expect, tap } from '@pushrocks/tapbundle';
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import { Qenv } from '@pushrocks/qenv';
import * as smartbucket from '../ts/index';
import * as smartbucket from '../ts/index.js';
const testQenv = new Qenv('./', './.nogit/');
@@ -27,8 +27,8 @@ tap.skip.test('should remove testbucket', async () => {
tap.test('should get a bucket', async () => {
myBucket = await testSmartbucket.getBucketByName('testzone');
expect(myBucket).to.be.instanceOf(smartbucket.Bucket);
expect(myBucket.name).to.equal('testzone');
expect(myBucket).toBeInstanceOf(smartbucket.Bucket);
expect(myBucket.name).toEqual('testzone');
});
// Fast operations
@@ -62,16 +62,16 @@ tap.test('should get base directory', async () => {
const directories = await baseDirectory.listDirectories();
console.log('Found the following directories:');
console.log(directories);
expect(directories.length).to.equal(3);
expect(directories.length).toEqual(3);
const files = await baseDirectory.listFiles();
console.log('Found the following files:');
console.log(files);
expect(files.length).to.equal(1);
expect(files.length).toEqual(1);
});
tap.test('should correctly build paths for sub directories', async () => {
const dir4 = await baseDirectory.getSubDirectoryByName('dir3/dir4');
expect(dir4).to.be.instanceOf(smartbucket.Directory);
expect(dir4).toBeInstanceOf(smartbucket.Directory);
const dir4BasePath = dir4.getBasePath();
console.log(dir4BasePath);
});