ufyfsq
Last Updated: February 25, 2016
·
2.198K
· jabclab
4f4bf0fbd4cc6de6159d78f9f9fb3aa6

npm test in Sublime Text 2

In order to test your npm module in ST2 add the following to your project's .sublime-project file:

{
    "build_systems": [
        {
            "name": "npm test",
            "cmd": ["npm", "test"],
            "working_dir": "$project_path"
        }
    ]
}

Then from Tools -> Build System select npm test. You can then run your tests via your defined shortcut for a build (cmd + B on mac by default).

Results will be shown in the ST console by default (although this can be sent to bash if required).

For more information see:
- http://addyosmani.com/blog/custom-sublime-text-build-systems-for-popular-tools-and-languages/
- http://www.sublimetext.com/docs/2/projects.html

Say Thanks
Respond