wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
758 stars 45 forks source link

Sublime Text 3 x64 - Test Markers missing? #435

Closed IPWright83 closed 8 years ago

IPWright83 commented 8 years ago

Both me and a colleague have tried Sublime Text x64 (I believe he's on V2 and I'm on V3). We've both struggled to get the status indicators working in the gutter though when running tests for our project.

I've tested using the demo calculator application that you've produced - and that did indeed work. But when I run our own solution it just fails. I do have some failing tests - but I wouldn't expect that to influence the gutter marker system?

Here's the console output when I run my tests:

​​​​​[Info]: wallaby.js started​​​​​
​​​​​[Info]: Execution progress: 50 tests​​​​​
​​​​​[Info]: Execution progress: 100 tests​​​​​
​​​​​[Info]: Execution progress: 150 tests​​​​​
​​​​​[Info]: Execution progress: 200 tests​​​​​
​​[Error]: One of your tests is taking too long to execute, check for possibly recently introduced infinite loops.​​
​​​​​[Info]: Execution progress: 250 tests​​​​​
​​​​​[Info]: Execution progress: 300 tests​​​​​
​​[Error]: One of your tests is taking too long to execute, check for possibly recently introduced infinite loops.​​
​​[Error]: One of your tests is taking too long to execute, check for possibly recently introduced infinite loops.​​
​​[Error]: One of your tests is taking too long to execute, check for possibly recently introduced infinite loops.​​
​​​​​[Info]: Execution progress: 350 tests​​​​​
​​​​​[Info]: Finished executing 399 affected test(s)​​​​​

Here's an example image of a failing test with no markers in the test file.

image

ArtemGovorov commented 8 years ago

We don't support Sublime v2, only v3.

From your screenshot it doesn't look like you have some other gutter icons, but still maybe it's related to this issue - https://github.com/wallabyjs/public/issues/436? Do you have any other packages that may be rendering/clearing gutter icons?

Either way, could you please record wallaby package debug output in Sublime console like described here and share it?

IPWright83 commented 8 years ago

I don't seem to be getting anything interesting in the output:

Could not import subprocess32 module, falling back to subprocess module
[Debug]: 'Project opened'
[Debug]: 'Plugin path: C:\\temp\\Sublime3 x64\\Data\\Packages\\Wallaby'
[Debug]: 'Config path: C:\\Source\\MooDEdge\\Code-materialize\\MooD16\\MooD.LandscapeExplorer\\wallaby.json'
[Debug]: 'Cache path: C:\\temp\\Sublime3 x64\\Data\\Packages\\Wallaby\\projects\\2eecadad45695afc'
[Debug]: 'Core folder path: C:\\temp\\Sublime3 x64\\Data\\Packages\\Wallaby\\wallaby'
[Debug]: 'Phantom folder path: C:\\temp\\Sublime3 x64\\Data'
[Debug]: 'Platform: windows x64'
[Debug]: 'Version file: C:\\temp\\Sublime3 x64\\Data\\Packages\\Wallaby\\wallaby\\package.json'
[Debug]: 'Reading version file'
[Debug]: 'started at port:41124'
[Debug]: 'Start with cmd:'
[Debug]: ['node',
 'C:\\temp\\Sublime3 x64\\Data\\Packages\\Wallaby\\wallaby\\server.js',
 'extended-core-ws',
 '--projectCachePath=C:\\temp\\Sublime3 x64\\Data\\Packages\\Wallaby\\projects\\2eecadad45695afc',
 '--configPath=C:\\Source\\MooDEdge\\Code-materialize\\MooD16\\MooD.LandscapeExplorer\\wallaby.json',
 '--lkp=C:\\temp\\Sublime3 x64\\Data\\Packages\\.wlck',
 '--client=Sublime',
 '--phantomjs=C:\\temp\\Sublime3 x64\\Data\\phantomjs_v1.9.8\\phantomjs.exe',
 '--port=41124']
[WS Server]: WS Client connected
IPWright83 commented 8 years ago

I should also note that I don't believe I've got any packages that will remove gutter icons. The resultant list of all my packages:

ArtemGovorov commented 8 years ago

Are markers missing in all files/tests or just in some of them?

IPWright83 commented 8 years ago

So I've tried sampling some of my files - I not found markers in any of my test files, however they do seem to be appearing in some (possibly all) of my JavaScript source files that are being used by the tests.

ArtemGovorov commented 8 years ago

Could you please share your wallaby config?

IPWright83 commented 8 years ago

Sure - it's the same config that I'm using for the Visual Studio version:

{
    "files": [
        {
            "pattern": "Content/bootstrap.min.css",
            "instrument": false
        },
        {
            "pattern": "fonts/font-awesome/css/font-awesome.min.css",
            "instrument": false
        },
        {
            "pattern": "fonts/material-design-iconic-font/css/material-design-iconic-font.min.css",
            "instrument": false
        },
        {
            "pattern": "Scripts/moment-with-locales.min.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/jquery.min.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/jquery-ui.min.js",
            "instrument": false
        },
        {
          "pattern": "Scripts/bootstrap.min.js",
          "instrument": false
        },
        {
            "pattern": "Scripts/bootstrap-datetimepicker.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/knockout-debug.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/knockout.mapping.js",
            "instrument": false
        },
        {
            "pattern": "scripts/underscore-min.js",
            "instrument": false
        },
        {
            "pattern": "scripts/jquery.datatables.js",
            "instrument": false
        },
        {
            "pattern": "scripts/datatables.scroller.js",
            "instrument": false
        },
        {
            "pattern": "scripts/respond.min.js",
            "instrument": false
        },
        {
            "pattern": "scripts/live.js",
            "instrument": false
        },
        {
            "pattern": "scripts/jquery.validate.min.js",
            "instrument": false
        },
        {
            "pattern": "scripts/jquery.validate.unobtrusive.min.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/store.min.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/q.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/devextreme/globalize.min.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/devextreme/dx.chartjs.debug.js",
            "instrument": false
        },
        {
          "pattern": "Scripts/d3.min.js",
          "instrument": false
        },
        {
            "pattern": "Scripts/d3.tip.js",
            "instrument": false
        },
        {
            "pattern": "Scripts/mood/d3/landscape/cards/bindingHandlers/*.js",
            "instrument": true
        },
        {
            "pattern": "Scripts/mood/d3/landscape/cards/components/**/*",
            "instrument": true,
            "load": false
        },
        {
            "pattern": "Scripts/mood/d3/landscape/cards/detail/**/*",
            "instrument": true,
            "load": false
        },
        {
            "pattern": "Scripts/mood/d3/landscape/cards/summary/**/*",
            "instrument": true,
            "load": false
        },
        "scripts/tests/spec/unit/unittesthelper.js",
        "Scripts/Tests/SetupForTesting.js",
        "Scripts/mood/Utils.js",
        "Scripts/mood/Math.js",
        "Scripts/TabWindowVisibilityManager.js",
        "Scripts/knockout.blend.js",
        "Scripts/mood/d3/Utils.js",
        "Scripts/mood/d3/Animation.js",
        "Scripts/mood/d3/Colours.js",
        "Scripts/mood/d3/Event.js",
        "Scripts/mood/d3/landscape/context.js",
        "Scripts/mood/d3/landscape/data/requests.js",
        "Scripts/mood/d3/landscape/data/requests-testing.js",
        "Scripts/mood/d3/landscape/moon.js",
        "Scripts/mood/d3/landscape/galaxy.js",
        "Scripts/mood/d3/landscape/link.js",
        "Scripts/mood/d3/landscape/planet.js",
        "Scripts/mood/componentLoader.js",
        "Scripts/mood/bindingLoader.js",
        "Scripts/mood/d3/landscape/cards/contextCard.js",
        "Scripts/mood/d3/landscape/cards/filter.js",
        "Scripts/mood/d3/landscape/deck.js",
        "Scripts/mood/d3/landscape/explorer.js",
        "Scripts/mood/d3/landscape/explorer.html",
        "Scripts/mood/d3/textWrap.js",
        "Content/less/style.css",
        "Scripts/Tests/spec/SpecRunner.css"
    ],
    "tests": [
      "Scripts/Tests/Spec/unit/**/*.js"      
    ],
    "evn": {
        "report404AsError": true
    }
}
ArtemGovorov commented 8 years ago

And I'm assuming it works fine in VS for you (you can see the coverage for your tests)?

IPWright83 commented 8 years ago

Yeah, here's a side by side by side comparison:

image

ArtemGovorov commented 8 years ago

There's one thing that may happen, VS integration (Windows only) is case insensitive with paths, but Sublime (cross platform) integration is case sensitive with paths. Could you please check that Scripts/Tests/Spec/unit this is exactly the same case as in your file system?

ArtemGovorov commented 8 years ago

Actually I can see here:

"scripts/tests/spec/unit/unittesthelper.js",
"Scripts/Tests/SetupForTesting.js",

that the case is mixed.

ArtemGovorov commented 8 years ago

Try fixing the case everywhere in your config to be exactly like on your file system and let me know if it helps. I think it should.

IPWright83 commented 8 years ago

Yep - I've just confirmed that casing is indeed the issue. I'll try and standardize on a lower case to resolve for now. Good things to be aware of!

Just on that - I've now got indicators on my tests, are inline output messages yet to be implemented? For example on line 33?

image

ArtemGovorov commented 8 years ago

Unfortunately Sublime Text doesn't support inline messages. The message is displayed in the status bar (for the active line).

IPWright83 commented 8 years ago

Ah OK, cheers! So glad Sublime support is here :+1:

ArtemGovorov commented 8 years ago

Cool, let us know if you hit more issues with it. It's still beta so I'm sure there can be some more, so your feedback is very welcome and appreciated!