suite-slimmer
TypeScript icon, indicating that this package has built-in type declarations

3.2.15 • Public • Published

suite-slimmer   GitHub Workflow Status   Node version

Streamlines JavaScript testing.

Packages

This is mostly intended for either Angular or NestJS projects, using the following packages:

Installation

npm install suite-slimmer --save-dev

Usage

Tests can also be written for non-Angular and non-NestJS projects with this package directly.

Creating a test

Instantiate a test suite, providing the class type being tested.

import { SlimTestSuite } from 'suite-slimmer'

new SlimTestSuite(MyClass)
  .addProviders(new MyDependencyA(), new MyDependencyB())
  .addTest('should create class', (cls) => {
    expect(cls).to.be.truthy
  })
  .run()

On SlimTestSuite, the following methods are available and chainable:

  • addImports
  • addDeclarations
  • addProviders
  • addMocks
  • addTest
  • beforeEach
  • afterEach
  • beforeAll
  • afterAll
  • run

Frameworks

The following test frameworks are supported:

  • Jasmine
  • Jest
  • Mocha

Examples

See examples here.

Readme

Keywords

none

Package Sidebar

Install

npm i suite-slimmer

Weekly Downloads

0

Version

3.2.15

License

MIT license

Unpacked Size

36.9 kB

Total Files

39

Last publish

Collaborators

  • ahefley