Skip to content

Commit 267a5e5

Browse files
committed
Removed unnecessary console.logs
1 parent 2c2549e commit 267a5e5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

test/client.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
'use strict';
22

3-
const http = require('node:http');
3+
const { Metacom } = require('metacom/lib/client');
44
const metatests = require('metatests');
5+
6+
const http = require('node:http');
7+
const { Blob } = require('node:buffer');
58
const fs = require('node:fs');
69
const fsp = fs.promises;
7-
const { Blob } = require('node:buffer');
810

911
const HOST = '127.0.0.1';
1012
const PORT = 8000;
@@ -119,7 +121,6 @@ const runTests = async (
119121
try {
120122
const resources = await wsApi.example.resources();
121123
test.strictEqual(resources?.total, null);
122-
// console.log({resources});
123124
} catch (err) {
124125
console.log(err);
125126
} finally {
@@ -147,7 +148,6 @@ const runTests = async (
147148
'example/subscribe': async (test) => {
148149
try {
149150
const wait = await wsApi.example.wait({ delay: 1000 });
150-
// console.log(client.api.chat)
151151
test.strictEqual(wait, 'done');
152152
} catch (err) {
153153
console.log(err);
@@ -203,7 +203,6 @@ const runTests = async (
203203
const results = [];
204204
console.log(`Run ${Object.entries(tests).length} tests`);
205205
for (const [caption, func] of Object.entries(tests)) {
206-
// console.log({ caption, func });
207206
results.push(metatests.testAsync(caption, func));
208207
}
209208

@@ -221,7 +220,6 @@ const runTests = async (
221220
function testHook({ url, path, argsString }) {
222221
return new Promise((resolve, reject) => {
223222
http.get(url + path + '?' + argsString, (res) => {
224-
// console.log({ res });
225223
const { statusCode } = res;
226224
const contentType = res.headers['content-type'];
227225
let error;
@@ -250,7 +248,6 @@ function testHook({ url, path, argsString }) {
250248
res.on('end', () => {
251249
try {
252250
const parsedData = JSON.parse(rawData);
253-
// console.log(parsedData);
254251
resolve(parsedData);
255252
} catch (e) {
256253
console.error(e.message);
@@ -283,11 +280,8 @@ const getHttpUrl = async () => {
283280
};
284281

285282
const connect = async () => {
286-
const { Metacom } = require('metacom/lib/client');
287-
288283
const httpUrl = (await getHttpUrl()) + 'api';
289284
const wsUrl = `ws${httpUrl.substring(4)}`;
290-
// const wsUrl = 'ws://127.0.0.1:8000/api';
291285

292286
const wsClient = Metacom.create(wsUrl);
293287
const wsApi = wsClient.api;

0 commit comments

Comments
 (0)