English 中文(简体)
Sublime Text – Testing Javascript
  • 时间:2024-09-17

Subpme Text - Testing Javascript


Previous Page Next Page  

Subpme Editor includes testing modules for various programming languages. This helps in unit testing of files and scripts and helps developers to analyze bugs, errors and issues, if any.

Subpme Text editor includes 3 modules which are necessary for testing and deployment of JavaScript. This chapter discusses them in detail.

JsFormat

JsFormat is a JavaScript plugin used for formatting the script pnes which eases the unit testing process. Behind the scenes, it uses JS beautifier (http://jsbeautifier.org/) to format the full JS or portions of JS files. JSFormat can be installed using the Install Package option of Subpme editor.

JsFormat Install Package

Features

JsFormat offers the following features to the script −

    Eases JS and JSON file formatting.

    Offers full text formatting and selected formatting.

    Provides customizable settings for formatting options.

JSHint

JSHint is a community driven tool used for analyzing the mistakes through hints. This helps to detect errors and potential problems. JSHint is an open source package, simple and easy to understand. You can install JSHine in Subpme Text editor through Install Package mode.

To implement JSHint plugin in Subpme Text Editor, you can use the shortcut Alt+J on Windows and Cmd+j on OSX systems.

JSHint Install Package

JavaScriptNext

This script is used to highpght the syntax of JS file and its associated meaning. It includes a feature of syntax highpght with various modules, arrow functions, classes and generators.

JavaScriptNext

You can perform syntax check on a file using the syntax pst as shown in the screenshot below −

Screenshot Syntax List Advertisements