@smartthings/cli-testlib
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0-beta.0 • Public • Published

    @smartthings/cli-testlib

    A library to support testing the SmartThings CLI and plugins written for it with Jest.

    Usage

    Default Bootstrap

    We provide a setup file which stubs out various init hook behavior (config loading, authentication, etc.) in the main CLI. This enables your test suite to start running commands quickly without worrying about these details.

    1. Copy (and rename) jest.setup.ts.example to a desired location in your project root.
    2. Edit your jest config to include setupFiles and specify the path to the previously copied setup file. See example jest config below.
    module.exports = {
    	setupFilesAfterEnv: [
    		'<rootDir>/jest.setup.ts'
    	],
    }

    Keywords

    none

    Install

    npm i @smartthings/cli-testlib

    DownloadsWeekly Downloads

    2

    Version

    1.0.0-beta.0

    License

    Apache-2.0

    Unpacked Size

    15.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • john-u
    • workmonk
    • xres
    • bflorian
    • erode
    • smartthingspi
    • rossiam
    • jodyalbritton