import * as api from '../API'; describe('Api', () => { describe('getPreviewStatus', () => { it('should return preview status on matching context', () => { expect(api.getPreviewStatus([{ context: 'deploy' }])).toEqual({ context: 'deploy' }); }); it('should return undefined on matching context', () => { expect(api.getPreviewStatus([{ context: 'other' }])).toBeUndefined(); }); }); });