fix(core): update

This commit is contained in:
2020-10-25 20:07:35 +00:00
parent b3c4481340
commit c1958bc7fd
2 changed files with 59 additions and 5 deletions

View File

@ -8,4 +8,25 @@ tap.test('should create a feedVersion', async () => {
expect(testSmartFeed).to.be.instanceOf(smartfeed.Smartfeed);
});
tap.test('should create a feed', async () => {
const feed = testSmartFeed.createFeed({
domain: 'central.eu',
title: 'central.eu - ideas for Europe',
category: 'Politics',
company: 'Lossless GmbH',
companyDomain: 'https://lossless.com',
companyEmail: 'hello@lossless.com',
description: 'ideas for Europe',
});
feed.addItem({
title: 'A better European Union',
authorName: 'Phil',
imageUrl: 'https://central.eu/someimage.png',
timestamp: Date.now(),
url: 'https://central.eu/article/somearticle'
});
const rssFeed = feed.exportRssFeedString();
console.log(rssFeed);
});
tap.start();