{"action":"created","issue":{"url":"https://api.github.com/repos/mochajs/mocha/issues/2241","repository_url":"https://api.github.com/repos/mochajs/mocha","labels_url":"https://api.github.com/repos/mochajs/mocha/issues/2241/labels{/name}","comments_url":"https://api.github.com/repos/mochajs/mocha/issues/2241/comments","events_url":"https://api.github.com/repos/mochajs/mocha/issues/2241/events","html_url":"https://github.com/mochajs/mocha/issues/2241","id":153561858,"number":2241,"title":"Shared Specs - Incorrect Logging","user":{"login":"jamescmartinez","id":1286597,"avatar_url":"https://avatars.githubusercontent.com/u/1286597?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescmartinez","html_url":"https://github.com/jamescmartinez","followers_url":"https://api.github.com/users/jamescmartinez/followers","following_url":"https://api.github.com/users/jamescmartinez/following{/other_user}","gists_url":"https://api.github.com/users/jamescmartinez/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescmartinez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescmartinez/subscriptions","organizations_url":"https://api.github.com/users/jamescmartinez/orgs","repos_url":"https://api.github.com/users/jamescmartinez/repos","events_url":"https://api.github.com/users/jamescmartinez/events{/privacy}","received_events_url":"https://api.github.com/users/jamescmartinez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-07T00:23:08Z","updated_at":"2016-05-17T14:14:34Z","closed_at":null,"body":"Let's assume I have two files:\r\n\r\n`user.js`\r\n```js\r\nimport { User } from '../../app/models'\r\nimport { validatesPresence } from './shared-specs'\r\n\r\ndescribe('User', () => {\r\n  describe('.jsonSchema', () => {\r\n    validatesPresence(User, 'username')\r\n  })\r\n})\r\n```\r\n\r\n`shared-specs.js`\r\n```js\r\nimport { expect } from 'chai'\r\n\r\nexport function validatesPresence(model, attribute) {\r\n  it(`validates presence of ${attribute}`, () => {\r\n    expect(() => {\r\n      const json = {}\r\n      json[attribute] = null\r\n      model.fromJson(json)\r\n    }).to.throw(model.ValidationError)\r\n  })\r\n}\r\n```\r\n\r\nWhen running my tests, I expect the following output:\r\n```\r\nUser\r\n  .jsonSchema\r\n    ✓ validates presence of username\r\n```\r\n...but instead I'm getting this:\r\n```\r\n✓ validates presence of username\r\nUser\r\n  .jsonSchema\r\n[OTHER SPECS]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mochajs/mocha/issues/comments/219730646","html_url":"https://github.com/mochajs/mocha/issues/2241#issuecomment-219730646","issue_url":"https://api.github.com/repos/mochajs/mocha/issues/2241","id":219730646,"user":{"login":"ScottFreeCode","id":16506071,"avatar_url":"https://avatars.githubusercontent.com/u/16506071?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottFreeCode","html_url":"https://github.com/ScottFreeCode","followers_url":"https://api.github.com/users/ScottFreeCode/followers","following_url":"https://api.github.com/users/ScottFreeCode/following{/other_user}","gists_url":"https://api.github.com/users/ScottFreeCode/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottFreeCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottFreeCode/subscriptions","organizations_url":"https://api.github.com/users/ScottFreeCode/orgs","repos_url":"https://api.github.com/users/ScottFreeCode/repos","events_url":"https://api.github.com/users/ScottFreeCode/events{/privacy}","received_events_url":"https://api.github.com/users/ScottFreeCode/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T14:14:34Z","updated_at":"2016-05-17T14:14:34Z","body":"Which ES6 module system implementation is this running on? Are the files bundled? Is Mocha being run on the Node commandline, or in a browser?"}}