Hugo JS

Hugo JS

1590040901

Top 9 Great JavaScript Extensions for Visual Studio Code

Do you know what makes a great code editor?

For me, those are the extensions it provides.

I have used many code editors. But when it comes to extensions, I have to say VSCode is a great editor with many amazing extensions.

And if you are using VSCode, here are the extensions that you should install.

#javascript-tips #code #javascript #programming #extension

What is GEEK

Buddha Community

Top 9 Great JavaScript Extensions for Visual Studio Code
Hugo JS

Hugo JS

1590040901

Top 9 Great JavaScript Extensions for Visual Studio Code

Do you know what makes a great code editor?

For me, those are the extensions it provides.

I have used many code editors. But when it comes to extensions, I have to say VSCode is a great editor with many amazing extensions.

And if you are using VSCode, here are the extensions that you should install.

#javascript-tips #code #javascript #programming #extension

Brain  Crist

Brain Crist

1596975120

Writing Visual Studio Extensions with Mads - Episode 1: Item Templates

Join Mads Kristensen from the Visual Studio team each week as he builds extensions for Visual Studio live!

#visual studio code #visual studio #code #microsoft #visual studio extensions

Vincent Lab

Vincent Lab

1605176310

My Visual Studio Code Extensions (2020 Edition)

In this video, I’ll be showing you all of my Visual Studio extensions

#vs code #visual studio code #visual studio extensions #rainbow csv #vscode extensions 2020

Python в Visual Studio Code

We are pleased to announce that the July release of the Python extension is now available for Visual Studio Code. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can read more about Python support in Visual Studio Code in the documentation .

We’ve made 51 improvements in this release, including:

  • Added support for a new language server: Pylance
  • Gather Extension
  • Exporting notebooks to HTML and PDF
  • Debugger connection back

If you are interested, you can explore the full list of improvements in this list changes.

Support for our new language server: Pylance

A couple of weeks ago, we announced the release of Pylance, our new language server based on Microsoft’s Pyright static type checking tool .

Pylance is a fast language server that provides many features to help you write better code, including automatic imports, dead code detection, parameter and return type information, support for a multi-root production environment, and more. You can read the Pylance blog post to learn more about this.

Pylance recently added a context highlighting feature that helps you quickly identify where symbols are being used in a particular file.

You can install the Pylance extension from the marketplace… If you have the Pyright extension installed, you should uninstall it in favor of the Pylance extension to avoid installation conflicts and duplicate errors and warnings, since all Pyright features are included in Pylance.

If you are a Microsoft Python Language Server user, we recommend that you try Pylance. The new language server significantly improves Python IntelliSense in VSCode. Because of this, the long term plan is to eventually ditch the Microsoft Python Language Server as a supported option in the Python extension.

Gather Extension

We are pleased to announce that this release adds support for our new experimental extension, Gather. Gather is a recurring iteration, and we look forward to community feedback to improve Gather’s accuracy! This tool analyzes and identifies required code dependencies in notepad and performs code cleanup, thereby automating this complex and time-consuming task.

You can install Gather on the marketplace today . We’d love to hear your feedback! If you have any problems, feel free to register them in the vscode-python GitHub repository.

#java #javascript #code #visual studio code #visual studio

Brain  Crist

Brain Crist

1597014000

JavaScript Unit Testing with Visual Studio

Mark Michaelis walks you through the Visual Studio tooling and project setup you’ll need to get the most out of your JavaScript unit testing.

As I detailed in my recent article “A TypeScript Primer,” I, like many developers, have a love/hate relationship with JavaScript. I love JavaScript because of its ubiquity; from iPhone to Android to Windows Phone, JavaScript just works. From iOS to UNIX to Windows, JavaScript continues to just work. (Admittedly, there are some idiosyncrasies, but for the most part – at least from a language perspective – it just works.)

Unfortunately, JavaScript is lacking in its ability to verify intent. It does what you tell it to do – not necessarily what you want it to do. (If you figure out the secret for getting a computer to consistently do what you want rather than what you tell it, please let me know! I would like to partner with you on a business idea or two.) Table 1has a summary of JavaScript’s good and bad:

Table 1. JavaScript, the Good and the Bad

Of all these characteristics, it’s JavaScript’s lack of type safety coupled with not having a compiler fail in the capacity to verify intent. That is, of course, if you don’t have unit tests. Unit tests can compensate for the lack of type safety. And unlike with .NET, where unit tests focus mainly on functional verification (since the compiler eliminated the majority of typos), unit tests in JavaScript do both. In summary, JavaScript unit testing is all the more critical because it’s responsible to not only verify functionality, but also to verify syntax and language semantics.

In this article, I’m going to focus on the Visual Studio tooling and project setup requirements needed to get the most out of your JavaScript unit testing.

Tooling

The two most popular Visual Studio integrated tools for JavaScript unit testing are ReSharper and Chutzpah (a Yiddish word about having the audacity to say things as they are – good or bad). Chutzpah is an open source Visual Studio extension and JavaScript test runner written by Matthew Manela. ReSharper is the well-known JetBrains tool, famous for its C## and JavaScript refactoring capabilities.

Both tools are Visual Studio extensions, so installing either into Visual Studio is nothing more than clicking the Tools->Extensions and Updates… menu and searching for “JavaScript Unit Testing” or simply “Chutzpah” or “ReSharper.”

At the core of most JavaScript unit testing lies a headless browser, PHATOMJS.EXE. When this browser launches, it hosts HTML that in turn references your JavaScript files. In addition to the JavaScript files that you supply from your Web project (and the frameworks like JQuery that you reference as part of your production code), JavaScript unit testing generally relies on a unit testing framework. The two primary unit testing frameworks, both of which are open source, are QUnit and Jasmine. Both are well suited for the task of unit testing but each brings a slightly different style to the unit test. QUnit follows the traditional unit-testing style test format, while Jasmine is a behavioral-driven design (BDD) testing framework.

QUnit

As stated on the QUnit Web site, “QUnit is a powerful, easy-to-use JavaScript unit testing framework. It’s used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code, including itself!” Code Listing 1provides a sample QUnit test file.

Code Listing 1: A Sample QUnit Series of Tests

/// <reference path="QUnit.js" />
/// <reference path="../../intellitect.sharepoint.web/scripts/SampleRestService.js" />

var restService = null;
module("SampleRestService.getToken()", {
  setup: function () {
    restService = new SampleRestService("http://IntelliTect.com/Blog");
  },
  teardown: function () {
    restService = null;
  }
});
  test("Provide valid credentials", function () {
    var token = restService.getToken("Inigo.Montoya", "Ykmfptd!");
    equal(token, "ecy8b081wh6owf8o", 
	"The token value returned was not as expected.");
  });
  test("Prevent empty string for the name", function () {
    raises(function() {
      var token = restService.getToken("", "Ykmfptd!");
    }, "Unexpectedly, no error was raised given a blank name.");
  });
  test("Prevent empty null for the password", function () {
    raises(function () {
      var token = restService.getToken("Inigo.Montoya", null);
    }, "Unexpectedly, no error was raised given a null password.");
  });

module("SampleRestService.downloadFile()")
  test("Throw an exception if file does not exist.", function () {
    raises(function () {
      var restService =
        new SampleRestService("http://IntelliTect.com/Blog", 
		"Inigo.Montoya", null);
      var file = restService.downloadFile("Bog.us");
    }, "Unexpectedly, no error was raised given an invalid file.");
  });

As one would expect, QUnit supports the standard unit testing constructs, including grouping tests into constructs (using module), pre- and post-test execution steps (setup/teardown members), and a variety of assertions: ok, equal, notEqual, strictEqual, notStrictEqual, deepEqual, notDeepEqual, raises. Essentially, the structure mimics that of a developer unit-testing library.

Jasmine

Although very similar, Jasmine’s BDD-based API involves defining a Spec – a grouping of tests or conditions to verify. The spec places each test into a context or scenario and comprises a suit of tests (see Code Listing 2).

#visual studio code #visual studio #code #java #javascript