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

Fix es6 build and add Steal compatibility. #13

Merged
merged 1 commit into from
Nov 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"watch": "babel --watch -d lib/ src/",
"jshint": "jshint src/. test/. --config",
"mocha": "mocha test/ --compilers js:babel-core/register --recursive --timeout 5000",
"test": "npm run jshint && npm run mocha"
"test": "npm run compile && npm run jshint && npm run mocha"
},
"directories": {
"lib": "lib"
Expand Down
5 changes: 4 additions & 1 deletion src/sockets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ function socketio(socket) {
return base(socket);
}

export { socketio, base as primus };
export default {
socketio,
primus: base
};
8 changes: 8 additions & 0 deletions test/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,13 @@ module.exports = function(service) {
done();
});
});

it('is built correctly', () => {
assert.equal(typeof require('../lib/client'), 'function');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs to be 'object' ;)

assert.equal(typeof require('../lib/client').jquery, 'function');
assert.equal(typeof require('../lib/client').request, 'function');
assert.equal(typeof require('../lib/client').socketio, 'function');
assert.equal(typeof require('../lib/client').primus, 'function');
});
});
};