diff --git a/src/index.tsx b/src/index.tsx index 8069225..dc0cfac 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -64,7 +64,7 @@ export const emailServer = new SMTPServer({ }); for (const path of paths) { const xml = await new xml2js.Parser().parseStringPromise( - fs.readFileSync(path).toString() + fs.readFileSync(path, "utf8") ); xml.feed.updated = now(); if (xml.feed.entry === undefined) xml.feed.entry = []; diff --git a/src/test.ts b/src/test.ts index 3960b8c..04cd386 100644 --- a/src/test.ts +++ b/src/test.ts @@ -72,5 +72,5 @@ async function createFeed(): Promise { } function readFeed(token: string): string { - return fs.readFileSync(feedPath(token)).toString(); + return fs.readFileSync(feedPath(token), "utf8"); }