Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit

Permalink
module toString is "Module"
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Aug 2, 2015
1 parent e36fa26 commit 23e92dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
*/

function Module() {}
// http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag
defineProperty(Module.prototype, 'toString', {
value: function() {
return 'Module';
}
});
function Loader(options) {
this._loader = {
loaderObj: this,
Expand Down
7 changes: 7 additions & 0 deletions test/system.normalize.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
//

describe('System', function () {

describe('#toString', function() {
it('Module toString is "Module"', function() {
expect(System.newModule({}).toString()).to.equal('Module');
});
});

describe('#normalize', function () {

describe('when having no argument', function () {
Expand Down

0 comments on commit 23e92dc

Please sign in to comment.