condividi-link-fediverso-fi.../src/test/app.spec.ts

26 lines
521 B
TypeScript
Raw Normal View History

2021-08-19 03:16:30 +02:00
import sinon from 'sinon';
import { App } from '../lib/app';
import * as Dom from '../lib/dom';
2021-08-18 06:57:59 +02:00
2021-08-19 03:16:30 +02:00
describe('testing App', () => {
let sandboxes;
let renderItems;
2021-08-18 06:57:59 +02:00
2021-08-19 03:16:30 +02:00
beforeEach(() => {
sandboxes = sinon.createSandbox();
renderItems = sandboxes.stub(Dom, 'renderItems');
});
2021-08-18 06:57:59 +02:00
2021-08-19 03:16:30 +02:00
afterEach(() => {
sandboxes.restore();
});
2021-08-18 06:57:59 +02:00
2021-08-19 03:16:30 +02:00
describe('testing App', () => {
it('app is rendered', () => {
const app = new App();
app.render();
expect(renderItems.called).toBeTruthy();
});
});
});