fix(core): update
This commit is contained in:
12
test/test.ts
12
test/test.ts
@ -1,8 +1,6 @@
|
||||
// tslint:disable-next-line:no-implicit-dependencies
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartuniverse from '../ts/index';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import * as smartuniverse from '../ts/index.js';
|
||||
|
||||
let testUniverse: smartuniverse.Universe;
|
||||
let testClientUniverse: smartuniverse.ClientUniverse;
|
||||
@ -34,7 +32,7 @@ tap.test('create smartuniverse client', async () => {
|
||||
serverAddress: testServerData.serverAddress,
|
||||
autoReconnect: true,
|
||||
});
|
||||
expect(testClientUniverse).to.be.instanceof(smartuniverse.ClientUniverse);
|
||||
expect(testClientUniverse).toBeInstanceOf(smartuniverse.ClientUniverse);
|
||||
});
|
||||
|
||||
tap.test('should add a channel to the universe', async () => {
|
||||
@ -51,7 +49,7 @@ tap.test('should start the ClientUniverse', async () => {
|
||||
|
||||
tap.test('should get a observable correctly', async () => {
|
||||
testClientChannel = testClientUniverse.getChannel(testChannelData.channelName);
|
||||
expect(testClientChannel).to.be.instanceof(smartuniverse.ClientUniverseChannel);
|
||||
expect(testClientChannel).toBeInstanceOf(smartuniverse.ClientUniverseChannel);
|
||||
});
|
||||
|
||||
tap.test('should send a message correctly', async () => {
|
||||
@ -61,7 +59,7 @@ tap.test('should send a message correctly', async () => {
|
||||
});
|
||||
|
||||
tap.test('universe should contain the sent message', async () => {
|
||||
expect(testUniverse.universeCache.messageMap.getArray()[0].messageText).to.equal('hello');
|
||||
expect(testUniverse.universeCache.messageMap.getArray()[0].messageText).toEqual('hello');
|
||||
});
|
||||
|
||||
tap.test('a second client should be able to subscibe', async () => {
|
||||
|
Reference in New Issue
Block a user