Socket
Book a DemoInstallSign in
Socket

@hume/utils-test

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hume/utils-test

Some helpers shared among the tests.

0.8.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

hume utils test

Some helpers shared among the tests.

Install

:coffee: Install Node.js v8 and then:

npm i @hume/utils-test

Use

:pencil: You can visit the complete example in this tests.

const utilsTest = require('@hume/utils-test');

console.log('Version');
console.log(utilsTst.version);

API

:eyes: Full specification.

version

The actual version of the library.

  • version (string) - Version number.

shoot

A wrapper for snap-shot-it'.

async throwsAsync(block, errRegex) -> null

Am async version of assert.throws.

  • block (function) - Piece of code (returning a promise) to be checked.
  • errRegex (object) - Regular expresion to confirm the expected error.

request

A wrapper for supertest with some additions (see next points).

async request.login(creds, opts) -> res

To login in Loopback using supertest in an easy way.

  • creds (object) - User credentials:

    • email (string) - Email of the user to create.
    • password (string) - Password of the user to create.
  • opts (object) - Optional params:

    • path (string) - Endpoint path. (default: '/api/users/login')
  • res (object) - The response with.

    • id (string) - The new token.

Keywords

micro

FAQs

Package last updated on 19 Jul 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.