|
1 | | -import { sampleFeed } from "./setup"; |
| 1 | +import { Feed } from "../feed"; |
| 2 | +import { sampleFeed, updated } from "./setup"; |
2 | 3 |
|
3 | 4 | describe("atom 1.0", () => { |
4 | 5 | it("should generate a valid feed", () => { |
5 | 6 | const actual = sampleFeed.atom1(); |
6 | 7 | expect(actual).toMatchSnapshot(); |
7 | 8 | }); |
| 9 | + |
| 10 | + it("should generate a valid feed with stylesheet", () => { |
| 11 | + const sampleFeed = new Feed({ |
| 12 | + title: "Feed Title", |
| 13 | + description: "This is my personnal feed!", |
| 14 | + link: "http://example.com/", |
| 15 | + stylesheet: "https://exmaple.com/rss.xsl", |
| 16 | + id: "http://example.com/", |
| 17 | + language: "en", |
| 18 | + ttl: 60, |
| 19 | + image: "http://example.com/image.png", |
| 20 | + copyright: "All rights reserved 2013, John Doe", |
| 21 | + hub: "wss://example.com/", |
| 22 | + updated, // optional, default = today |
| 23 | + |
| 24 | + author: { |
| 25 | + name: "John Doe", |
| 26 | + email: "johndoe@example.com", |
| 27 | + link: "https://example.com/johndoe", |
| 28 | + }, |
| 29 | + }); |
| 30 | + const actual = sampleFeed.atom1(); |
| 31 | + expect(actual).toMatchSnapshot(); |
| 32 | + }); |
8 | 33 | }); |
0 commit comments