Socket
Socket
Sign inDemoInstall

ava-ts

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ava-ts

Fork of the AVA test runner with native typescript support 🚀


Version published
Weekly downloads
900
increased by3.33%
Maintainers
0
Weekly downloads
 
Created
Source

AVA-TS

Build Status NPM Version

Native TypeScript support for sindresorhus' awesome AVA test runner out of the box, without a prior build step.

This is a fork of the official AVA repository with a couple of minimally invasive changes. Uses ts-node/register instead of Babel. Not the cleanest solution, but it works pretty well.

Installation

npm install --save-dev ava-ts ava ts-node

# Using yarn:
yarn add --dev ava-ts ava ts-node

Usage

Write your tests in TypeScript as you would usually do and import from ava, not from ava-ts, just as you would always do.

// test.ts

import test from 'ava'

test('one plus two equals three', t => {
	t.is(1 + 2, 3)
})

Instead of running ava, just run the ava-ts CLI tool instead. That's it!

It will use all the same options and defaults you know from AVA, but searches for *.ts files instead of *.js.

Documentation

See AVA's official docs for detailed information.

Features

It comes with most of the great features you love:

  • Zero-configuration setup
  • Parallel test execution
  • Snapshot testing
  • All your favorite reporters

Limitations

There are a few limitations, however.

  • No babel support
  • No power assert

License

MIT. The fork as well as the original. AVA is a project of always awesome Sindre Sorhus.

FAQs

Package last updated on 29 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc