diff --git a/src/_chai.spec.ts b/src/_chai.spec.ts index eff6be95..ee6bab0a 100644 --- a/src/_chai.spec.ts +++ b/src/_chai.spec.ts @@ -113,6 +113,10 @@ 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 (!!) @@ -120,8 +124,12 @@ export const NonAlphaStrings = compact([ { str: `‘’“”«»`, desc: "curly quotes" }, { str: "ñöᵽȅ", desc: "latin extended" }, { str: "✋", desc: "dingbats block" }, - { str: "😤", desc: "emoticons block" }, - { str: "🚵🏿‍♀", desc: "transport 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" }, { str: "你好", desc: "Mandarin" }, { str: "ようこそ", desc: "Japanese" }, { str: "ברוך הבא", desc: "Hebrew" },