From 7b0236dfd74d5db4922c9d7ec749be96b81039e3 Mon Sep 17 00:00:00 2001 From: Timur Shemsedinov Date: Wed, 25 Oct 2023 22:55:13 +0300 Subject: [PATCH] Support node.js 21.x PR-URL: https://github.com/metarhia/metavm/pull/118 --- .github/workflows/test.yml | 1 + package.json | 2 +- test/unit.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0db771a..98d07e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,7 @@ jobs: node: - 18 - 20 + - 21 os: - ubuntu-latest - windows-latest diff --git a/package.json b/package.json index ee4f546..14afdd4 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "files": ["dist/", "metavm.d.ts"], "engines": { - "node": "18 || 20" + "node": "18 || 20 || 21" }, "repository": { "type": "git", diff --git a/test/unit.js b/test/unit.js index 22055e5..fb1377f 100644 --- a/test/unit.js +++ b/test/unit.js @@ -453,7 +453,7 @@ test('Check native fetch', async () => { const ms = metavm.createScript('Example', src, { context }); const proto = Object.getPrototypeOf(ms.exports); assert.ok(proto); - assert.strictEqual(proto.constructor.name, 'AsyncFunction'); + assert.ok(proto.constructor.name.endsWith('Function')); }); test('ECMAScript modules', async () => {