Socket
Socket
Sign inDemoInstall

@endo/ses-ava

Package Overview
Dependencies
3
Maintainers
5
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @endo/ses-ava

Virtualize Ava's test to work better under SES.


Version published
Maintainers
5
Created

Readme

Source

@endo/ses-ava

SES-Ava wraps Ava test functions and initializes the SES-shim with options suitable for debugging tests. This includes logging errors to the console with

  • deep stacks of prior turns
  • unredacted stack traces
  • unredacted error messages

To use this module, in your Ava test files, replace

import 'ses'; // or however you initialize the SES-shim
import test from 'ava';

with

import test from '@endo/ses-ava/prepare-endo.js';

and add

  "devDependencies": {
    // ...
    "@endo/ses-ava": "...", // for the current version of @endo/ses-ava
    // ...
  },

specifically to "devDependencies". @endo/ses-ava itself depends on Ava as a regular dependency, so it you include @endo/ses-ava as a regular dependency, bundlers might bundle your code with all of Ava.

SES-Ava rhymes with Nineveh.

Compat note

If you were already using @endo/ses-ava by doing

import 'ses'; // or however you initialize the SES-shim
import rawTest from 'ava';
import { wrapTest } from '@endo/ses-ava';

const test = wrapTest(rawTest);

that code will continue to work. But it should be upgraded to the above pattern if possible.

Keywords

FAQs

Last updated on 07 May 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc