-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add podcast seasons to the top level feed object (#57)
* add podcast seasons to the top level feed object * appease the linter * type woes
- Loading branch information
1 parent
286fca3
commit 01070ef
Showing
6 changed files
with
2,709 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,648 changes: 2,648 additions & 0 deletions
2,648
src/parser/__test__/fixtures/real-world/themnshow.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { parseFeed } from ".."; | ||
|
||
import * as helpers from "./helpers"; | ||
|
||
describe("seasons handling", () => { | ||
it("parses sample publisher feed", async () => { | ||
const xml = await helpers.loadFixture(`real-world/themnshow.xml`); | ||
const result = parseFeed(xml); | ||
|
||
expect(result).toHaveProperty("podcastSeasons"); | ||
}); | ||
|
||
it("produces a sorted keyed seaons object", async () => { | ||
const xml = await helpers.loadFixture(`real-world/themnshow.xml`); | ||
const result = parseFeed(xml); | ||
|
||
expect(result).toHaveProperty("podcastSeasons", { | ||
1: { | ||
name: "Breakfasts with Dr. Tim", | ||
number: 1, | ||
}, | ||
2: { | ||
name: "Supper with Dr. Tim", | ||
number: 2, | ||
}, | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters