im running unit test using mocha/supertest/chai and I want to test the following code so my question how should I simulate the upgrade event?
const http = require('http');
const app = require('./app');
const server = http.createServer(app);
var webSocket = function (server) {
server.on('upgrade', function (req, socket, head) {
//I want to enter here...
Aucun commentaire:
Enregistrer un commentaire