import 'mocha'; import * as chai from 'chai'; import * as sinonChai from 'sinon-chai'; import CollapsedPaymentDriver from './CollapsedPayment.driver'; import {eventually} from '../../../test/helpers'; chai.use(sinonChai); describe('CollapsedPayment component', () => { let driver: CollapsedPaymentDriver = null; beforeEach(() => { driver = new CollapsedPaymentDriver().when.render(); }); afterEach(() => driver.cleanup()); it(`should present the component with icon and title`, () => eventually(() => { driver.has.root().should.be.true; driver.has.title().should.be.true; driver.has.icon().should.be.true; }) ); });