@sprucelabs/spruce-cli
Version:
Command line interface for building Spruce skills.
32 lines (24 loc) • 1.03 kB
text/typescript
import { test, assert } from '@sprucelabs/test-utils'
import AbstractCliTest from '../../../tests/AbstractCliTest'
export default class SeeWhoIsLoggedInTest extends AbstractCliTest {
()
protected static async hasWhoAmIAction() {
await this.Cli()
assert.isFunction(this.Action('person', 'whoami').execute)
}
()
protected static async noOneIsLoggedInToStart() {
await this.FeatureFixture().installCachedFeatures('skills')
const results = await this.Action('person', 'whoami').execute({})
assert.isFalsy(results.errors)
assert.doesInclude(results.summaryLines, 'not logged in')
}
()
protected static async canSeeWhoIsLoggedIn() {
await this.FeatureFixture().installCachedFeatures('skills')
await this.people.loginAsDemoPerson()
const results = await this.Action('person', 'whoami').execute({})
assert.isFalsy(results.errors)
assert.doesInclude(results.summaryLines, 'logged in as')
}
}