use got instead of axios, some cleanup, problem with async context being lost for...
[websub-hub] / test-e2e / test-many.js
index 1ff40c969a204d926ed50f45f3647f69188c68f4..bc149624b1a817d7b88ffd6f6854f40c60b5af3d 100644 (file)
@@ -1,7 +1,6 @@
 'use strict';
 
-const assert = require('assert');
-const uuid = require('uuid');
+const crypto = require('crypto');
 const FakeServersClient = require('./fake-servers-client');
 
 const subscriberPort = process.env.FAKE_SUBSCRIBER_PORT || 9876;
@@ -14,14 +13,14 @@ const hubUrl = `http://${hubAddress}:${hubPort}/`;
 const client = new FakeServersClient(listenAddress, subscriberPort, topicPort);
 
 async function newTopic() {
-  const id = uuid.v4();
+  const id = crypto.randomUUID();
   await client.topicSet(id, { hubUrl });
   console.log('created fake topic', id);
   return id;
 }
 
 async function newSubscriber() {
-  const id = uuid.v4();
+  const id = crypto.randomUUID();
   await client.subscriberSetVerify(id);
   console.log('created fake subscriber', id);
   return id;