Home Download Buy Blog Forum Support

[BUG] Build doesn't show all output

[BUG] Build doesn't show all output

Postby joewhite on Sat Feb 18, 2012 5:48 am

I'm trying to make a simple build system that runs Mocha (http://visionmedia.github.com/mocha/) to run some tests. The problem is that Sublime Text 2 doesn't show all the build output; it'll cut off in the middle of a line (and then append "[Finished]" to the end of that line). I've never yet seen it show the build output in its entirety.

I've narrowed it down to a simple repro case. My mocha.sublime-build file is:

Code: Select all
   "cmd": ["cmd", "/c", "c:/path/to/mocha", "test.js"]

and "test.js" contains this (adapted from the first example from http://visionmedia.github.com/mocha/, but changed not to require any extra libraries):

Code: Select all
describe('Array', function(){
  describe('#indexOf()', function(){
    it('should return -1 when the value is not present', function(){
      console.assert([1,2,3].indexOf(5) === -1);
      console.assert([1,2,3].indexOf(0) === -1);

If I run "mocha test.js" from a command prompt, it shows all the expected output:

  • a line indented two spaces, followed by a single dot (showing the test being run)
  • a blank line
  • a line indented two spaces, followed by a Unicode character that's supposed to be a check mark (U+2714, not actually displayed properly in a Windows console window) and " 1 tests complete (3ms)"
  • two more blank lines.

However, if I run Mocha from Sublime Text, the output shown in the output window cuts off long before it gets to the "1 tests complete" line. Instead, it usually either shows just:

  • a blank line, a two-space indent, and "[Finished]"; or
  • a blank line, a two-space indent, a dot, a newline, and "[Finished]".

I've also occasionally see it show no output at all before "[Finished]".

Running the 64-bit install of Sublime Text 2 build 2165 on Windows Vista x64.
Posts: 1
Joined: Sat Feb 18, 2012 4:37 am

Re: [BUG] Build doesn't show all output

Postby uipoet on Wed Apr 18, 2012 1:10 am

I've got the same same issue with my JSHint plugin. The build file is executing correctly, but no output is displaying at all. Works perfectly in Mac OS X and Linux. I've spend all day a million ways to change my code, but I believe this is actually a bug in Windows Sublime Text 2 that I can't fix.

Posts: 4
Joined: Wed Apr 27, 2011 8:32 pm

Re: [BUG] Build doesn't show all output

Postby Ryan Gough on Thu Dec 06, 2012 2:09 pm

I've just started using sublime and encountered the same problem. I think it might be to do with the output of mocha using ansi-escape coloring, as when I use a reporter without coloring (such as TAP) then it seems to work ok.
Ryan Gough
Posts: 1
Joined: Thu Dec 06, 2012 2:07 pm

Return to Technical Support

Who is online

Users browsing this forum: giltig, Google [Bot], Yahoo [Bot] and 24 guests