fix(core): update

This commit is contained in:
2022-05-27 17:53:02 +02:00
parent b1bd8132de
commit 69ab47ed41
23 changed files with 2120 additions and 19600 deletions

View File

@ -1,6 +1,6 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as lik from '../ts';
import * as lik from '../ts/index.js';
tap.test('should create a valid fastmap', async () => {
const fastmap = new lik.FastMap();

View File

@ -1,5 +1,5 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as lik from '../ts/index';
import * as lik from '../ts/index.js';
let testInterestmap: lik.InterestMap<number, number>;

View File

@ -1,6 +1,6 @@
import { tap, expect } from '@pushrocks/tapbundle';
import { LimitedArray } from '../ts/index';
import { LimitedArray } from '../ts/index.js';
let testLimitedArray: LimitedArray<string>;

View File

@ -1,10 +1,8 @@
// import test framework
import { expect, tap } from '@pushrocks/tapbundle';
import * as events from 'events';
import * as smartpromise from '@pushrocks/smartpromise';
// import the module
import * as lik from '../ts/index';
import * as lik from '../ts/index.js';
let object1 = {};
let object2 = {};

View File

@ -1,10 +1,8 @@
// import test framework
import { expect, tap } from '@pushrocks/tapbundle';
import * as events from 'events';
import * as smartpromise from '@pushrocks/smartpromise';
// import the module
import * as lik from '../ts/index';
import * as lik from '../ts/index.js';
// Objectmap
interface ITestObject {
@ -45,7 +43,7 @@ tap.test('lik.Objectmap.remove() -> should correctly remove an object to Objectm
tap.test('Objectmap.forEach -> should correctly run a function forEach map object', async () => {
testObjectmap.forEach((itemArg) => {
// TODO expect(itemArg).to.have.property('propOne');
expect(itemArg).toHaveProperty('propOne');
});
});
@ -70,9 +68,9 @@ tap.test('should get one object and then remove it', async () => {
let originalLength = testObjectmap.getArray().length;
let oneObject = testObjectmap.getOneAndRemove();
// tslint:disable-next-line:no-unused-expression
// TODO expect(oneObject).not.toBeNull();
expect(oneObject).not.toBeNull();
expect(testObjectmap.getArray().length).toEqual(originalLength - 1);
// TODO expect(testObjectmap.getArray()).to.not.contain(oneObject);
expect(testObjectmap.getArray()).not.toContain(oneObject);
});
tap.start();

View File

@ -1,10 +1,8 @@
// import test framework
import { expect, tap } from '@pushrocks/tapbundle';
import * as events from 'events';
import * as smartpromise from '@pushrocks/smartpromise';
// import the module
import * as lik from '../ts/index';
import * as lik from '../ts/index.js';
// testData
let testStringmap: lik.Stringmap;

View File

@ -1,10 +1,8 @@
// import test framework
import { expect, tap } from '@pushrocks/tapbundle';
import * as events from 'events';
import * as smartpromise from '@pushrocks/smartpromise';
// import the module
import * as lik from '../ts/index';
import * as lik from '../ts/index.js';
let testTimedAggregator: lik.TimedAggregtor<string>;

View File

@ -1,5 +1,5 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as lik from '../ts/index';
import * as lik from '../ts/index.js';
class TestClass {
constructor(public hey: string) {
@ -24,7 +24,7 @@ tap.test('create a valid tree instance', async () => {
tap.test('should insert an object', async () => {
testTree.initialize(testInstance);
let resultArray = testTree.treeToArray(testInstance, {});
// TODO expect(resultArray).toContain(testInstance);
expect(resultArray).toContain(testInstance);
});
tap.test('should add other objects in a hierachy', async () => {