Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
a8a91b4db2 | |||
67c4b06c4d |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartuniverse",
|
"name": "@pushrocks/smartuniverse",
|
||||||
"version": "1.0.41",
|
"version": "1.0.42",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartuniverse",
|
"name": "@pushrocks/smartuniverse",
|
||||||
"version": "1.0.41",
|
"version": "1.0.42",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "messaging service for your micro services",
|
"description": "messaging service for your micro services",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
14
test/test.ts
14
test/test.ts
@ -32,7 +32,17 @@ tap.test('create smartuniverse client', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should add a channel to the universe', async () => {
|
tap.test('should add a channel to the universe', async () => {
|
||||||
await testUniverse.addChannel('testChannel', 'testPassword');
|
await testUniverse.addChannel(
|
||||||
|
testChannelData.channelName,
|
||||||
|
testChannelData.channelPass
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should add the same channel to the client universe in the same way', async () => {
|
||||||
|
await testClientUniverse.addChannel(
|
||||||
|
testChannelData.channelName,
|
||||||
|
testChannelData.channelPass
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should get a observable correctly', async () => {
|
tap.test('should get a observable correctly', async () => {
|
||||||
@ -43,7 +53,7 @@ tap.test('should get a observable correctly', async () => {
|
|||||||
tap.test('should send a message correctly', async () => {
|
tap.test('should send a message correctly', async () => {
|
||||||
await testClientUniverse.sendMessage({
|
await testClientUniverse.sendMessage({
|
||||||
messageText: 'hello',
|
messageText: 'hello',
|
||||||
targetChannelName: 'channel1'
|
targetChannelName: testChannelData.channelName
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user