zjsunit: Set browserslist target to current Node for Node tests.

Otherwise we run into this error:
https://github.com/zloirock/core-js/issues/1067

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-05-03 22:52:06 -07:00 committed by Tim Abbott
parent 3cb7d3d1dc
commit f8d6290db5
2 changed files with 5 additions and 0 deletions

View File

@ -3,3 +3,6 @@
last 2 versions last 2 versions
Firefox ESR Firefox ESR
not dead and supports async-functions not dead and supports async-functions
[test]
current Node

View File

@ -16,6 +16,8 @@ const blueslip = require("./zblueslip");
const zjquery = require("./zjquery"); const zjquery = require("./zjquery");
const zpage_params = require("./zpage_params"); const zpage_params = require("./zpage_params");
process.env.NODE_ENV = "test";
const dom = new JSDOM("", {url: "http://zulip.zulipdev.com/"}); const dom = new JSDOM("", {url: "http://zulip.zulipdev.com/"});
global.DOMParser = dom.window.DOMParser; global.DOMParser = dom.window.DOMParser;