Socket
Socket
Sign inDemoInstall

isolated-runtime-test-commons

Package Overview
Dependencies
6
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    isolated-runtime-test-commons

Isolated Runtime Test Commons


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
3.45 MB
Created
Weekly downloads
 

Readme

Source

Isolated Runtime Test Commons

Used to create fixture files for testing isolated runtime.

Api

  • Context({basePath?: string, root?: string}) - Create a new context, which will operate under basePath/root

  • Context.DEFAULT_FILE_NAME: string - default file name used in case no file name was passed to withFile.

  • Context#withFile(file?: string, content: string): this - Used to add a file to the folder.

  • Context#withFunction(name: string, args: Array<string>, content: string): this - Shortcut for withFile. creates a single exported function with the default file name.

  • Context#get basePath(): string - Getter for basePath (full path for code folder).

  • Context#build(): Promise<> - Creates the folders structure.

  • Context#destroy(): Promise<> - Cleans up the folders structure.

  • randoms$#ecret(): string - Generates a random secret.

  • randoms#folder(): string - Generates a random folder name.

Keywords

FAQs

Last updated on 05 May 2019

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