From 69f1a00f8da24b805fbf06ecfc482fa7304c1200 Mon Sep 17 00:00:00 2001 From: duncanhealy Date: Fri, 30 Apr 2021 08:55:12 +0100 Subject: [PATCH] chore fix tests (#149) * chore: fix import of astro/parser -> relative import * chore: fix snapshot for rss --- prettier-plugin-astro/index.js | 2 +- test/astro-rss.test.js | 4 ++-- 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[]} */ 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 = `<![CDATA[MF Doomcast]]>https://mysite.dev/feed/episodes.xmlen-usMF Doom<![CDATA[Rap Snitch Knishes (feat. Mr. Fantastik)]]>https://mysite.dev/episode/rap-snitch-knishes/Tue, 16 Nov 2004 05:00:00 GMTmusic172true<![CDATA[Fazers]]>https://mysite.dev/episode/fazers/Thu, 03 Jul 2003 04:00:00 GMTmusic197true<![CDATA[Rhymes Like Dimes (feat. Cucumber Slice)]]>https://mysite.dev/episode/rhymes-like-dimes/Tue, 19 Oct 1999 04:00:00 GMTmusic259true`; +const snapshot = `<![CDATA[MF Doomcast]]>https://mysite.dev/feed/episodes.xmlen-usMF Doom<![CDATA[Rap Snitch Knishes (feat. Mr. Fantastik)]]>https://mysite.dev/episode/rap-snitch-knishes/Tue, 16 Nov 2004 00:00:00 GMTmusic172true<![CDATA[Fazers]]>https://mysite.dev/episode/fazers/Wed, 02 Jul 2003 23:00:00 GMTmusic197true<![CDATA[Rhymes Like Dimes (feat. Cucumber Slice)]]>https://mysite.dev/episode/rhymes-like-dimes/Mon, 18 Oct 1999 23:00:00 GMTmusic259true' const cwd = new URL('./fixtures/astro-rss', import.meta.url);