smartsitemap/test/test.ts
2020-10-26 12:18:33 +00:00

17 lines
574 B
TypeScript

import { expect, tap } from '@pushrocks/tapbundle';
import * as smartsitemap from '../ts/index';
let testSmartsitemap: smartsitemap.SmartSitemap;
tap.test('should create an instance of Smartsitemap', async () => {
testSmartsitemap = new smartsitemap.SmartSitemap();
expect(testSmartsitemap).to.be.instanceOf(smartsitemap.SmartSitemap);
});
tap.test('should create a sitemap from feed', async () => {
const sitemapString = await testSmartsitemap.createSitemapNewsFromFeedUrl('https://www.theverge.com/rss/index.xml');
console.log(sitemapString);
});
tap.start();