Deno 1.10 overhauls test runner

Deno 1.ten, the most current edition of the security-targeted runtime for JavaScript and TypeScript, improves the developed-in take a look at runner and adds a Website Storage API. The update was posted May 11.

In Deno 1.ten, the deno take a look at take a look at runner operates uncovered take a look at modules in isolation employing a new instance of the runtime for every module. Formerly, Deno ran tests serially within a single runtime instance. Even more, deno take a look at now supports the --jobs flag to specify how several threads must be employed when operating tests. Checks however operate serially by default.

Deno 1.ten also introduces configurable permissions for tests, employing a permissions choice the skill to style examine code examples in documentation remarks, employing the --doc flag the skill to enjoy for file modifications to re-operate appropriate take a look at situations, employing the --enjoy flag and superior take a look at runner output. In foreseeable future releases, help will be extra for operating code examples as normal tests.

Deno 1.ten follows final month’s launch of Deno 1.9. To upgrade to Deno 1.ten, consumers can operate deno upgrade. Other advancements in Deno 1.ten:

  • For Website Personnel, the structured clone algorithm is leveraged to improve serialization. Website Personnel let developers to operate various bits of JavaScript, TypeScript, and WebAssembly concurrently in individual execution environments, with communication in between personnel and the key thread performed by passing messages.
  • Assist has been extra for a Website Storage API, which is made up of localStorage and sessionStorage. This can be employed to shop a modest sum of information persistently, with no immediate file access.
  • Atomics and shared memory in WebAssembly are enabled by default.
  • Assist is offered for the deno-fmt.overlook file directive for Markdown information to skip file formatting deno-fmt is a formatter primarily based on dprint, which is ready to format JavaScript, TypeScript, JSON, and Markdown information.
  • Users no longer have to shop import maps on the nearby file system import maps can be saved remotely and loaded around HTTP.
  • The --unstable flag is no longer essential for CLI options the flag now controls only the availability of unstable runtime APIs.

Copyright © 2021 IDG Communications, Inc.