summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar duncanhealy <duncanhealy@users.noreply.github.com> 2021-04-30 08:55:12 +0100
committerGravatar GitHub <noreply@github.com> 2021-04-30 08:55:12 +0100
commit69f1a00f8da24b805fbf06ecfc482fa7304c1200 (patch)
treeb0bfa8e11c03836f87f1b43b15d216170654f86e
parent1e849689e48e7a2e67e9bc4bf47294e09e606e1d (diff)
downloadastro-69f1a00f8da24b805fbf06ecfc482fa7304c1200.tar.gz
astro-69f1a00f8da24b805fbf06ecfc482fa7304c1200.tar.zst
astro-69f1a00f8da24b805fbf06ecfc482fa7304c1200.zip
chore fix tests (#149)
* chore: fix import of astro/parser -> relative import * chore: fix snapshot for rss
-rw-r--r--prettier-plugin-astro/index.js2
-rw-r--r--test/astro-rss.test.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/prettier-plugin-astro/index.js b/prettier-plugin-astro/index.js
index ef7977351..ea4d4b836 100644
--- a/prettier-plugin-astro/index.js
+++ b/prettier-plugin-astro/index.js
@@ -3,7 +3,7 @@ const {
builders: { concat, hardline },
},
} = require('prettier');
-const { parse } = require('astro/parser');
+const { parse } = require('../parser');
/** @type {Partial<import('prettier').SupportLanguage>[]} */
module.exports.languages = [
diff --git a/test/astro-rss.test.js b/test/astro-rss.test.js
index 61234d36d..7bf514875 100644
--- a/test/astro-rss.test.js
+++ b/test/astro-rss.test.js
@@ -8,8 +8,8 @@ import { fileURLToPath } from 'url';
const RSS = suite('RSS Generation');
-const snapshot = `<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title><![CDATA[MF Doomcast]]></title><description><![CDATA[The podcast about the things you find on a picnic, or at a picnic table]]></description><link>https://mysite.dev/feed/episodes.xml</link><language>en-us</language><itunes:author>MF Doom</itunes:author><item><title><![CDATA[Rap Snitch Knishes (feat. Mr. Fantastik)]]></title><link>https://mysite.dev/episode/rap-snitch-knishes/</link><description><![CDATA[Complex named this song the “22nd funniest rap song of all time.”]]></description><pubDate>Tue, 16 Nov 2004 05:00:00 GMT</pubDate><itunes:episodeType>music</itunes:episodeType><itunes:duration>172</itunes:duration><itunes:explicit>true</itunes:explicit></item><item><title><![CDATA[Fazers]]></title><link>https://mysite.dev/episode/fazers/</link><description><![CDATA[Rhapsody ranked Take Me to Your Leader 17th on its list “Hip-Hop’s Best Albums of the Decade”]]></description><pubDate>Thu, 03 Jul 2003 04:00:00 GMT</pubDate><itunes:episodeType>music</itunes:episodeType><itunes:duration>197</itunes:duration><itunes:explicit>true</itunes:explicit></item><item><title><![CDATA[Rhymes Like Dimes (feat. Cucumber Slice)]]></title><link>https://mysite.dev/episode/rhymes-like-dimes/</link><description><![CDATA[Operation: Doomsday has been heralded as an underground classic that established MF Doom's rank within the underground hip-hop scene during the early to mid-2000s.
-]]></description><pubDate>Tue, 19 Oct 1999 04:00:00 GMT</pubDate><itunes:episodeType>music</itunes:episodeType><itunes:duration>259</itunes:duration><itunes:explicit>true</itunes:explicit></item></channel></rss>`;
+const snapshot = `<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title><![CDATA[MF Doomcast]]></title><description><![CDATA[The podcast about the things you find on a picnic, or at a picnic table]]></description><link>https://mysite.dev/feed/episodes.xml</link><language>en-us</language><itunes:author>MF Doom</itunes:author><item><title><![CDATA[Rap Snitch Knishes (feat. Mr. Fantastik)]]></title><link>https://mysite.dev/episode/rap-snitch-knishes/</link><description><![CDATA[Complex named this song the “22nd funniest rap song of all time.”]]></description><pubDate>Tue, 16 Nov 2004 00:00:00 GMT</pubDate><itunes:episodeType>music</itunes:episodeType><itunes:duration>172</itunes:duration><itunes:explicit>true</itunes:explicit></item><item><title><![CDATA[Fazers]]></title><link>https://mysite.dev/episode/fazers/</link><description><![CDATA[Rhapsody ranked Take Me to Your Leader 17th on its list “Hip-Hop’s Best Albums of the Decade”]]></description><pubDate>Wed, 02 Jul 2003 23:00:00 GMT</pubDate><itunes:episodeType>music</itunes:episodeType><itunes:duration>197</itunes:duration><itunes:explicit>true</itunes:explicit></item><item><title><![CDATA[Rhymes Like Dimes (feat. Cucumber Slice)]]></title><link>https://mysite.dev/episode/rhymes-like-dimes/</link><description><![CDATA[Operation: Doomsday has been heralded as an underground classic that established MF Doom's rank within the underground hip-hop scene during the early to mid-2000s.\n` +
+']]></description><pubDate>Mon, 18 Oct 1999 23:00:00 GMT</pubDate><itunes:episodeType>music</itunes:episodeType><itunes:duration>259</itunes:duration><itunes:explicit>true</itunes:explicit></item></channel></rss>'
const cwd = new URL('./fixtures/astro-rss', import.meta.url);