cbt-tunnel-nodejs
cbt-tunnel-nodejs copied to clipboard
cbt.stop() does not close the tunnel
I'm using protractor.
In beforeLaunch
I call cbt.start()
and I see the tunnel active in the UI
In afterLaunch
I call cbt.stop()
the UI reports the tunnel is still open and also using the API tells me the tunnel is still active. What am I doing wrong ?
Here a snippet
config.beforeLaunch = function () {
console.log('Before Launch');
return new Promise((resolve, reject) => {
cbt.stop((msg) => {});
cbt.start({'username': CBT_USERNAME, 'authkey': CBT_AUTHKEY}, (err) => {
if (!err) {
return resolve();
}
console.error('Error:', err);
return reject(err);
});
});
};
config.afterLaunch = function () {
console.log('After Launch');
cbt.stop((msg) => {
console.log('Stop:', msg);
});
};
The callback of the stop in never called