close
Skip to content
This repository was archived by the owner on Sep 4, 2019. It is now read-only.

Commit 9401add

Browse files
committed
Fix exports
1 parent 25c273d commit 9401add

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"watch": "babel --watch -d lib/ src/",
3737
"jshint": "jshint src/. test/. --config",
3838
"mocha": "mocha test/ --compilers js:babel-core/register --recursive --timeout 5000",
39-
"test": "npm run jshint && npm run mocha"
39+
"test": "npm run compile && npm run jshint && npm run mocha"
4040
},
4141
"directories": {
4242
"lib": "lib"

‎src/sockets/index.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ function socketio(socket) {
1919
return base(socket);
2020
}
2121

22-
export { socketio, base as primus };
22+
export default {
23+
socketio,
24+
primus: base
25+
};

‎test/base.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,10 @@ module.exports = function(service) {
7878
done();
7979
});
8080
});
81+
82+
it('is CommonJS compatible', () => {
83+
console.log(require('../lib/client'));
84+
assert.equal(typeof require('../lib/client'), 'function');
85+
});
8186
});
8287
};

0 commit comments

Comments
 (0)