UNPKG

@rawcmd/core

Version:
18 lines (13 loc) 399 B
import { Spec } from '@hayspec/spec'; import { ConsoleStreamlet } from '../../../src'; const spec = new Spec<{ streamlet: ConsoleStreamlet; }>(); spec.beforeEach((ctx) => { ctx.set('streamlet', new ConsoleStreamlet()); }); spec.test('returns screen height', async (ctx) => { const streamlet = ctx.get('streamlet'); ctx.is(streamlet.height, process.stdout.rows); }); export default spec;