From c09bca34b8e133f6f22c6cebfdd1c2e25402224b Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 1 Mar 2022 21:52:04 -0800 Subject: [PATCH] frontend_tests: Fix unicorn/text-encoding-identifier-case. Signed-off-by: Anders Kaseorg --- frontend_tests/node_tests/billing.js | 2 +- frontend_tests/node_tests/billing_helpers.js | 2 +- frontend_tests/node_tests/support.js | 2 +- frontend_tests/node_tests/upgrade.js | 2 +- frontend_tests/zjsunit/handlebars.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend_tests/node_tests/billing.js b/frontend_tests/node_tests/billing.js index 3a9e463fde..565cc6a10d 100644 --- a/frontend_tests/node_tests/billing.js +++ b/frontend_tests/node_tests/billing.js @@ -9,7 +9,7 @@ const {mock_esm, set_global, with_field, zrequire} = require("../zjsunit/namespa const {run_test} = require("../zjsunit/test"); const $ = require("../zjsunit/zjquery"); -const template = fs.readFileSync("templates/corporate/billing.html", "utf-8"); +const template = fs.readFileSync("templates/corporate/billing.html", "utf8"); const dom = new JSDOM(template, {pretendToBeVisual: true}); const document = dom.window.document; const location = set_global("location", {}); diff --git a/frontend_tests/node_tests/billing_helpers.js b/frontend_tests/node_tests/billing_helpers.js index a08a8e6877..38a61c3d60 100644 --- a/frontend_tests/node_tests/billing_helpers.js +++ b/frontend_tests/node_tests/billing_helpers.js @@ -11,7 +11,7 @@ const {run_test} = require("../zjsunit/test"); const $ = require("../zjsunit/zjquery"); const {page_params} = require("../zjsunit/zpage_params"); -const template = fs.readFileSync("templates/corporate/upgrade.html", "utf-8"); +const template = fs.readFileSync("templates/corporate/upgrade.html", "utf8"); const dom = new JSDOM(template, { pretendToBeVisual: true, url: "http://zulip.zulipdev.com/upgrade/#billing", diff --git a/frontend_tests/node_tests/support.js b/frontend_tests/node_tests/support.js index 6a3e4ac399..02f00519b0 100644 --- a/frontend_tests/node_tests/support.js +++ b/frontend_tests/node_tests/support.js @@ -9,7 +9,7 @@ const {zrequire} = require("../zjsunit/namespace"); const {run_test} = require("../zjsunit/test"); const $ = require("../zjsunit/zjquery"); -const template = fs.readFileSync("templates/analytics/realm_details.html", "utf-8"); +const template = fs.readFileSync("templates/analytics/realm_details.html", "utf8"); const dom = new JSDOM(template, {pretendToBeVisual: true}); const document = dom.window.document; diff --git a/frontend_tests/node_tests/upgrade.js b/frontend_tests/node_tests/upgrade.js index 75032fca2e..eebb9e207d 100644 --- a/frontend_tests/node_tests/upgrade.js +++ b/frontend_tests/node_tests/upgrade.js @@ -11,7 +11,7 @@ const $ = require("../zjsunit/zjquery"); const {page_params} = require("../zjsunit/zpage_params"); const noop = () => {}; -const template = fs.readFileSync("templates/corporate/upgrade.html", "utf-8"); +const template = fs.readFileSync("templates/corporate/upgrade.html", "utf8"); const dom = new JSDOM(template, {pretendToBeVisual: true}); const document = dom.window.document; const location = set_global("location", {}); diff --git a/frontend_tests/zjsunit/handlebars.js b/frontend_tests/zjsunit/handlebars.js index 24af22f2a4..6f9e7c384d 100644 --- a/frontend_tests/zjsunit/handlebars.js +++ b/frontend_tests/zjsunit/handlebars.js @@ -23,7 +23,7 @@ ZJavaScriptCompiler.prototype.compiler = ZJavaScriptCompiler; hb.JavaScriptCompiler = ZJavaScriptCompiler; function compile_hbs(module, filename) { - const code = fs.readFileSync(filename, "utf-8"); + const code = fs.readFileSync(filename, "utf8"); const pc = hb.precompile(code, {preventIndent: true, srcName: filename}); const node = new SourceNode(); node.add([