From c2eb83ce7c6c073a70dfe6fc4805588ea0fbf74b Mon Sep 17 00:00:00 2001 From: Matthew McEachen Date: Sat, 30 Sep 2023 13:21:26 -0700 Subject: [PATCH] don't test emoji in filenames on windows --- src/_chai.spec.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/_chai.spec.ts b/src/_chai.spec.ts index ee6bab0a..f39d9fd2 100644 --- a/src/_chai.spec.ts +++ b/src/_chai.spec.ts @@ -113,10 +113,6 @@ export function assertEqlDateish( return expect(dateishToExifString(a)).to.eql(dateishToExifString(b)) } -const nodeMajorVersion = parseInt(process.version.replace(/[^\d.]/, "")) - -const winAndGteNode20 = isWin32() && nodeMajorVersion >= 20 - export const NonAlphaStrings = compact([ { str: `'`, desc: "straight single quote" }, // windows doesn't support double-quotes in filenames (!!) @@ -124,12 +120,10 @@ export const NonAlphaStrings = compact([ { str: `‘’“”«»`, desc: "curly quotes" }, { str: "ñöᵽȅ", desc: "latin extended" }, { str: "✋", desc: "dingbats block" }, - // This results in a spurious Error: File not found - - // C:/Users/RUNNER~1/AppData/Local/Temp/tmp-6316-4LyVb3QgsXPL/src-😤/😤.jpg - // but only on node 20 on windows. node 18 and 16 pass, so this is a - // regression in Node.js (!!) - winAndGteNode20 ? undefined : { str: "😤", desc: "emoticons block" }, - winAndGteNode20 ? undefined : { str: "🚵🏿‍♀", desc: "transport block" }, + // These emoji tests fail on node 18.18+ and node 20 on Windows, but it's a + // bug in node, as it passes on macOS and Linux. + isWin32() ? undefined : { str: "😤", desc: "emoticons block" }, + isWin32() ? undefined : { str: "🚵🏿‍♀", desc: "transport block" }, { str: "你好", desc: "Mandarin" }, { str: "ようこそ", desc: "Japanese" }, { str: "ברוך הבא", desc: "Hebrew" },