storybook-chromatic
Version:
Visual Testing for Storybook
18 lines (14 loc) • 441 B
JavaScript
/* eslint-disable jest/no-try-expect */
import { execSync } from 'child_process';
import { errSerializer } from '../io/serializers';
it('strips off envPairs', () => {
try {
execSync('some hot garbage');
} catch (err) {
expect(errSerializer(err).envPairs).toBeUndefined();
}
});
it('does not add random things to the error', () => {
const err = new Error('error');
expect(errSerializer(err).options).toBeUndefined();
});