Skip to content

Commit

Permalink
feat(server): removed BaseServer inheritance requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
knagaitsev committed May 30, 2019
1 parent aa6f615 commit 680d73f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
8 changes: 0 additions & 8 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const createDomain = require('./utils/createDomain');
const runBonjour = require('./utils/runBonjour');
const routes = require('./utils/routes');
const schema = require('./options.json');
const BaseServer = require('./servers/BaseServer');

// Workaround for node ^8.6.0, ^9.0.0
// DEFAULT_ECDH_CURVE is default to prime256v1 in these version
Expand Down Expand Up @@ -97,13 +96,6 @@ class Server {
serverImplFound = false;
}

if (
serverImplFound &&
!(ServerImplementation.prototype instanceof BaseServer)
) {
serverImplFound = false;
}

if (!serverImplFound) {
throw new Error(
"serverMode must be a string denoting a default implementation (eg. 'sockjs'), a full path to " +
Expand Down
14 changes: 0 additions & 14 deletions test/ServerMode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,6 @@ describe('serverMode', () => {
});
});

describe('supplying unimplemented BaseServer', () => {
it('should throw an error', () => {
expect(() => {
server = testServer.start(
config,
{
serverMode: BaseServer,
},
() => {}
);
}).toThrow(/serverMode must be a string/);
});
});

describe('supplying nonexistent path', () => {
it('should throw an error', () => {
expect(() => {
Expand Down

0 comments on commit 680d73f

Please sign in to comment.