From 377fe1f34f196ca9faf5e5bfbada76de1bf38af1 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:32:28 -0700 Subject: [PATCH] Fix esDecorators evaluation test on Node 16+ (#53175) --- src/testRunner/unittests/evaluation/esDecorators.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/testRunner/unittests/evaluation/esDecorators.ts b/src/testRunner/unittests/evaluation/esDecorators.ts index dcfd6881344..0a73c43c5b5 100644 --- a/src/testRunner/unittests/evaluation/esDecorators.ts +++ b/src/testRunner/unittests/evaluation/esDecorators.ts @@ -1863,8 +1863,8 @@ describe("unittests:: evaluation:: esDecorators", () => { }); }); - const nodeVersion = ts.Version.tryParse(process.version); - const supportsClassStaticBlock = nodeVersion && nodeVersion.major >= 16; + const nodeVersion = new ts.Version(process.versions.node); + const supportsClassStaticBlock = nodeVersion.major >= 16; const targets = [ // NOTE: Class static blocks weren't supported in Node v14 @@ -2443,4 +2443,4 @@ describe("unittests:: evaluation:: esDecorators", () => { }); }); } -}); \ No newline at end of file +});