Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
feat(test): add test for server side
Browse files Browse the repository at this point in the history
  • Loading branch information
Shen Lang committed Mar 31, 2021
1 parent 5f5e146 commit 0628067
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions create-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class FakeServerSystem{
constructor(){
// no-op
}
createEventData(){
// no-op
}
broadcastEvent(){
// no-op
}
listenForEvent(){
// no-op
}
}

class FakeServer{
constructor(){
// no-op
}
log(){
// no-op
}
registerSystem(){
return new FakeServerSystem();
}
}

global.server = new FakeServer();
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
require('./create-client.js');
require('./out/bundled/behaviors/scripts/client/client.js');
require('./create-server.js');
require('./out/bundled/behaviors/scripts/server/server.js');

0 comments on commit 0628067

Please sign in to comment.