Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sm/fix table stack error #436

Merged
merged 9 commits into from Jun 23, 2022
13 changes: 13 additions & 0 deletions test/cli-ux/styled/table.e2e.ts
Expand Up @@ -2,6 +2,19 @@ import {expect, fancy} from 'fancy-test'
import {CliUx} from '../../../src'

describe('styled/table', () => {
describe('null/undefined handling', () => {
fancy
.stdout()
.end('omits nulls and undefined by default', output => {
const data = [{a: 1, b: '2', c: null, d: undefined}]
CliUx.ux.table(data, {a: {}, b: {}, c: {}, d: {}})
expect(output.stdout).to.include('1')
expect(output.stdout).to.include('2')
expect(output.stdout).to.not.include('null')
expect(output.stdout).to.not.include('undefined')
})
})

describe('scale tests', () => {
const bigRows = 150_000
fancy
Expand Down