@sprucelabs/spruce-cli
Version:
Command line interface for building Spruce skills.
20 lines (16 loc) • 738 B
text/typescript
import { test, assert } from '@sprucelabs/test-utils'
import ServiceFactory, { Service } from '../../services/ServiceFactory'
import AbstractCliTest from '../../tests/AbstractCliTest'
export default class ServiceFactoryTest extends AbstractCliTest {
private static factory: ServiceFactory
protected static async beforeEach() {
this.factory = new ServiceFactory()
await super.beforeEach()
}
('can build pin service', 'pkg', 'readPackage')
('can build pin service', 'vsCode', 'installExtensions')
protected static canBuild(type: Service, functionName: string) {
const service = this.factory.Service(this.cwd, type)
assert.hasAllFunctions(service, [functionName])
}
}