2020-08-01 03:43:15 +02:00
|
|
|
"use strict";
|
|
|
|
|
2024-10-09 00:25:41 +02:00
|
|
|
const assert = require("node:assert/strict");
|
2020-11-30 23:46:45 +01:00
|
|
|
|
2024-11-13 07:05:32 +01:00
|
|
|
const {set_global, zrequire} = require("./lib/namespace.cjs");
|
|
|
|
const {run_test} = require("./lib/test.cjs");
|
2020-12-01 00:02:16 +01:00
|
|
|
|
2020-07-15 01:29:15 +02:00
|
|
|
set_global("navigator", {
|
|
|
|
userAgent: "",
|
2018-09-20 10:17:51 +02:00
|
|
|
});
|
|
|
|
|
2021-06-15 16:17:28 +02:00
|
|
|
const deprecated_feature_notice = zrequire("deprecated_feature_notice");
|
2020-12-01 23:21:38 +01:00
|
|
|
|
2020-07-15 01:29:15 +02:00
|
|
|
run_test("get_hotkey_deprecation_notice", () => {
|
2020-07-15 00:34:28 +02:00
|
|
|
const expected =
|
2024-08-23 19:58:23 +02:00
|
|
|
'translated HTML: We\'ve replaced the "Shift + C" hotkey with "X" to make this common shortcut easier to trigger.';
|
|
|
|
const actual = deprecated_feature_notice.get_hotkey_deprecation_notice("Shift + C", "X");
|
2020-07-28 17:00:59 +02:00
|
|
|
assert.equal(actual, expected);
|
2018-07-21 02:19:14 +02:00
|
|
|
});
|