storybook/examples/cra-kitchen-sink/src/addon-jest.runner.js

32 lines
706 B
JavaScript
Raw Normal View History

2017-11-16 22:59:31 +01:00
test('true should be true', () => {
expect(true).toBe(true);
});
describe('In a describe: ', () => {
test('true should still be true', () => {
expect(true).toBe(true);
});
test('a list should contain 3 items', () => {
expect(['a', 'b', '3']).toHaveLength(3);
});
test('everything is awesome', () => {
expect('everything is all right').toEqual('everything is awesome');
});
});
describe('A bunch of failing tests: ', () => {
test('true should still be true', () => {
expect(true).toBe(false);
});
test('a list should contain 3 items', () => {
expect(['a', 'b', '3']).toContain(301);
});
test('should work', () => {
expect(() => {}).toThrow();
});
});