-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(gatsby-plugin-feed): don't snapshot test platform specific (#8836)
- Loading branch information
Showing
2 changed files
with
75 additions
and
142 deletions.
There are no files selected for viewing
83 changes: 2 additions & 81 deletions
83
packages/gatsby-plugin-feed/src/__tests__/__snapshots__/gatsby-node.js.snap
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 |
---|---|---|
@@ -1,84 +1,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Test plugin feed custom query runs 1`] = ` | ||
[MockFunction] { | ||
"calls": Array [ | ||
Array [ | ||
"public/rss_new.xml", | ||
"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?><rss xmlns:dc=\\"http://purl.org/dc/elements/1.1/\\" xmlns:content=\\"http://purl.org/rss/1.0/modules/content/\\" xmlns:atom=\\"http://www.w3.org/2005/Atom\\" version=\\"2.0\\"><channel><title><![CDATA[a sample title]]></title><description><![CDATA[a description]]></description><link>http://github.com/dylang/node-rss</link><generator>RSS for Node</generator><lastBuildDate>Mon, 01 Jan 2018 00:00:00 GMT</lastBuildDate><item><title><![CDATA[No title]]></title><description><![CDATA[post description]]></description><link>http://dummy.url/a-custom-path</link><guid isPermaLink=\\"true\\">http://dummy.url/a-custom-path</guid></item><item><title><![CDATA[No title]]></title><description><![CDATA[post description]]></description><link>http://dummy.url/another-custom-path</link><guid isPermaLink=\\"true\\">http://dummy.url/another-custom-path</guid></item></channel></rss>", | ||
], | ||
], | ||
"results": Array [ | ||
Object { | ||
"isThrow": false, | ||
"value": Promise {}, | ||
}, | ||
], | ||
} | ||
`; | ||
exports[`Test plugin feed custom query runs 1`] = `"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?><rss xmlns:dc=\\"http://purl.org/dc/elements/1.1/\\" xmlns:content=\\"http://purl.org/rss/1.0/modules/content/\\" xmlns:atom=\\"http://www.w3.org/2005/Atom\\" version=\\"2.0\\"><channel><title><![CDATA[a sample title]]></title><description><![CDATA[a description]]></description><link>http://github.com/dylang/node-rss</link><generator>RSS for Node</generator><lastBuildDate>Mon, 01 Jan 2018 00:00:00 GMT</lastBuildDate><item><title><![CDATA[No title]]></title><description><![CDATA[post description]]></description><link>http://dummy.url/a-custom-path</link><guid isPermaLink=\\"true\\">http://dummy.url/a-custom-path</guid></item><item><title><![CDATA[No title]]></title><description><![CDATA[post description]]></description><link>http://dummy.url/another-custom-path</link><guid isPermaLink=\\"true\\">http://dummy.url/another-custom-path</guid></item></channel></rss>"`; | ||
exports[`Test plugin feed custom query runs 2`] = ` | ||
[MockFunction] { | ||
"calls": Array [ | ||
Array [ | ||
" | ||
{ | ||
site { | ||
siteMetadata { | ||
title | ||
description | ||
siteUrl | ||
site_url: siteUrl | ||
} | ||
} | ||
} | ||
", | ||
], | ||
Array [ | ||
" | ||
{ | ||
allMarkdownRemark( | ||
limit: 1000, | ||
) { | ||
edges { | ||
node { | ||
frontmatter { | ||
path | ||
} | ||
excerpt | ||
} | ||
} | ||
} | ||
} | ||
", | ||
], | ||
], | ||
"results": Array [ | ||
Object { | ||
"isThrow": false, | ||
"value": Promise {}, | ||
}, | ||
Object { | ||
"isThrow": false, | ||
"value": Promise {}, | ||
}, | ||
], | ||
} | ||
`; | ||
|
||
exports[`Test plugin feed default settings work properly 1`] = ` | ||
[MockFunction] { | ||
"calls": Array [ | ||
Array [ | ||
"public/rss.xml", | ||
"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?><rss xmlns:dc=\\"http://purl.org/dc/elements/1.1/\\" xmlns:content=\\"http://purl.org/rss/1.0/modules/content/\\" xmlns:atom=\\"http://www.w3.org/2005/Atom\\" version=\\"2.0\\"><channel><title><![CDATA[a sample title]]></title><description><![CDATA[a description]]></description><link>http://github.com/dylang/node-rss</link><generator>RSS for Node</generator><lastBuildDate>Mon, 01 Jan 2018 00:00:00 GMT</lastBuildDate><item><title><![CDATA[No title]]></title><description><![CDATA[post description]]></description><link>http://dummy.url/a-slug</link><guid isPermaLink=\\"false\\">http://dummy.url/a-slug</guid><content:encoded></content:encoded></item></channel></rss>", | ||
], | ||
], | ||
"results": Array [ | ||
Object { | ||
"isThrow": false, | ||
"value": Promise {}, | ||
}, | ||
], | ||
} | ||
`; | ||
exports[`Test plugin feed default settings work properly 1`] = `"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?><rss xmlns:dc=\\"http://purl.org/dc/elements/1.1/\\" xmlns:content=\\"http://purl.org/rss/1.0/modules/content/\\" xmlns:atom=\\"http://www.w3.org/2005/Atom\\" version=\\"2.0\\"><channel><title><![CDATA[a sample title]]></title><description><![CDATA[a description]]></description><link>http://github.com/dylang/node-rss</link><generator>RSS for Node</generator><lastBuildDate>Mon, 01 Jan 2018 00:00:00 GMT</lastBuildDate><item><title><![CDATA[No title]]></title><description><![CDATA[post description]]></description><link>http://dummy.url/a-slug</link><guid isPermaLink=\\"false\\">http://dummy.url/a-slug</guid><content:encoded></content:encoded></item></channel></rss>"`; |
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