Browse Source

Test reverseShell returns usage if host and port aren't set

pull/4/head
Luke Childs 7 years ago
parent
commit
e44905545e
  1. 8
      test/test.js

8
test/test.js

@ -12,3 +12,11 @@ test('reverseShell returns shell code with /host:port variables', t => {
const returnValue = reverseShell(req);
t.true(returnValue.indexOf('("foo",bar)') > -1);
});
test('reverseShell returns usage if host and port aren\'t set', t => {
const req = {
url: ''
};
const returnValue = reverseShell(req);
t.true(returnValue.indexOf('# Reverse Shell as a Service') === 0);
});

Loading…
Cancel
Save