UNPKG

@sprucelabs/spruce-cli

Version:

Command line interface for building Spruce skills.

45 lines (38 loc) 1.13 kB
import { assertOptions } from '@sprucelabs/schema' import { fake } from '@sprucelabs/spruce-test-fixtures' import AbstractSpruceTest, { test, assert, errorAssert, } from '@sprucelabs/test-utils' @fake.login() export default class StaticTestFinderTest extends AbstractSpruceTest { private static responseBody = generateId() private static readonly test = generateId() @test() protected static async throwsWithMissing() { const finder = StaticTestFinder.Finder() const err = await assert.doesThrowAsync(() => finder.find()) console.log(this.responseBody) console.log(this.test) errorAssert.assertError(err, 'MISSING_PARAMETERS', { parameters: ['lookupDir'], }) } @test() protected static async yourNextTest() { assert.isTrue(false) } @test('this has a description') protected static async anotherTest() { assert.isFalse(true) } } class StaticTestFinder { public static Finder() { return new this() } public async find() { assertOptions({}, ['lookupDir']) } }