npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jstestadapter2

v2.0.1

Published

[![Build Status](https://dev.azure.com/karanjitsingh/jstestadapter/_apis/build/status/JSTestAdapter%20Build?branchName=master)](https://dev.azure.com/karanjitsingh/jstestadapter/_build/latest?definitionId=4&branchName=master) [![npm version](https://img.

Downloads

3

Readme

Build Status npm version npm version

jstestadapter

jstestadapter is a JavaScript test adapter extension for Visual Studio Test Platform. jstest with vstest can be used as a command line tool to run tests written in mocha, jasmine or jest.

This fork addresses a path related bug when using jstestadapter with jest V29. There is no planed maintenance beyond this one bug fix.

Install

npm install --save-dev jstestadapter

Usage

# Testing with default test framework, Jasmine
path/to/vstest.console.exe --TestAdapterPath:./node_modules/jstestadapter/ path/to/test.1.js path/to/test.2.js

# Testing with Mocha
path/to/vstest.console.exe --TestAdapterPath:./node_modules/jstestadapter/ path/to/test.1.js path/to/test.2.js -- JSTest.TestFramework=Mocha

# Running tests with jest
path/to/vstest.console.exe --TestAdapterPath:./node_modules/jstestadapter/ path/to/package.json -- JSTest.TestFramework=Jest

RunSettings Configuration

Option | Usage | Default ----------------------- | ------------------------------------------------------------------------------------- | -------- TestFramework | One of the following test frameworks for execution: Jasmine/Mocha/Jest | Jasmine RunInDomain | Run JavaScript tests in a node Domain. Note: If set to false the test must complete all execution before returning control. i.e. all callbacks such as setTimeout must be completed before the test completes execution. | true DebugLogs | Enable debug logs for JavaScript test runner | false DebugFilePath | Path for diagnostic logs | "" TestFrameworkConfigJson | Override test framework configurations (Specific to the testframework) in json format | {} NodeModulesPath | Custom path to node_modules | ""

RunSettings can be provided through the the vstest cli itself

vstest.console.exe --Isolation --TestAdapterPath:<path> <files> -- JSTest.DebugLogs=true JSTest.TestFramework=mocha

Using RunSettings xml defined for vstest

vstest.console.exe --Settings:RunSettings.xml --TestAdapterPath:<path> <files>

With RunSettings.xml:

<RunSettings>
    <JSTest>
        <TestFramework>mocha</TestFramework>
        <TestFrameworkConfigJson>{
            "timeout": 60000,
            "slow": 30000
        }</TestFrameworkConfigJson>
        <DebugLogs>true</DebugLogs>
    </JSTest>
</RunSettings>

Test result attachment support

For uploading test result attachments along with tests checkout karanjitsingh/jstestcontext

Building from source

# Build binaries and javascript to `./artifacts/Debug/net451/` along with the package tarball in `./artifacts/Debug`
.\scripts\build.ps1

Build Options

| Option | Value | Description | Default | | -------------- | ---------------------- | ---------------------------------- | ------- | | -clean | | Clean built output | false | | -nolint | | Build without tslint pass | false | | -configuration | Debug, Release | Build configuration | Debug | | -target | net451, netstandard1.4 | Platform for building managed code | net451 |

Running Tests

# Self dogfooding jstest javascript tests
.\test.ps1 -vstest \path\to\vstest.console.exe

Test run options

| Option | Value | Description | Default | | -------------- | ---------------------------------- | --------------------------------------- | ------- | | -runonly | | Run tests without building | false | | -parallel | | Enable run tests in parallel for vstest | false | | -discover | | Enable --listtests option in vstest | false | | -configuration | Debug, Release | Build configuration | Debug | | -log | \path\to\log | Will enable vstest diagnostic logs | - | | -test | "test filter" | Test filter | - | | -vstest | \path\to\custom\vstest.console.exe | Path to vstest.console.exe | D:\vstest\artifacts\Debug\net451\win7-x64\vstest.console.exe |


Tested with framework versions

npm (tag) npm (tag) npm (tag)

Used and loved by

Azure Pipelines