2020-02-12 21:31:22 +00:00
|
|
|
import { expect, tap } from '@pushrocks/tapbundle';
|
|
|
|
import * as smartssr from '../ts/index';
|
|
|
|
|
|
|
|
let testSSRInstance: smartssr.SmartSSR;
|
|
|
|
|
|
|
|
tap.test('should create a valid smartssr instance', async () => {
|
2020-08-06 15:13:38 +00:00
|
|
|
testSSRInstance = new smartssr.SmartSSR({
|
|
|
|
debug: true
|
|
|
|
});
|
2020-02-12 21:31:22 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
tap.test('should start the smartssr instance', async () => {
|
|
|
|
await testSSRInstance.start();
|
|
|
|
});
|
|
|
|
|
2020-02-12 21:32:25 +00:00
|
|
|
tap.test('should render central.eu', async tools => {
|
2020-08-06 15:13:38 +00:00
|
|
|
await testSSRInstance.renderPage('https://central.eu/article/5e76873b9cf69b7bf6bc78bc/Introducing%3A%20central.eu');
|
2020-02-12 21:31:22 +00:00
|
|
|
});
|
|
|
|
|
2020-08-06 15:13:38 +00:00
|
|
|
tap.skip.test('should render lossless.com', async () => {
|
2020-02-12 21:31:22 +00:00
|
|
|
await testSSRInstance.renderPage('https://lossless.com');
|
|
|
|
});
|
|
|
|
|
2020-02-25 07:48:54 +00:00
|
|
|
tap.skip.test('should render https://lossless.gmbh', async () => {
|
|
|
|
const renderedPage = await testSSRInstance.renderPage('https://lossless.gmbh');
|
2020-02-12 21:31:22 +00:00
|
|
|
});
|
|
|
|
|
2020-03-01 13:41:20 +00:00
|
|
|
tap.test('should stop the smartssr instance', async () => {
|
2020-02-12 21:31:22 +00:00
|
|
|
await testSSRInstance.stop();
|
|
|
|
});
|
|
|
|
|
|
|
|
tap.start();
|