diff --git a/kumascript/macros/SpecName.ejs b/kumascript/macros/SpecName.ejs index 69374cf39fac..8716845f53fe 100644 --- a/kumascript/macros/SpecName.ejs +++ b/kumascript/macros/SpecName.ejs @@ -10,6 +10,7 @@ // $2 (Optional) Replacement link text; this lets you specify the name of // a specific method, property, or other entity to customize the // appearance of the link. +mdn.deprecated(); var spec = $0; if (spec.includes('\n')) { diff --git a/kumascript/macros/spec2.ejs b/kumascript/macros/spec2.ejs index a7342a054078..2dd3d5587a67 100644 --- a/kumascript/macros/spec2.ejs +++ b/kumascript/macros/spec2.ejs @@ -1,6 +1,7 @@ <% /* parameters: */ /* $0 = name of specification */ +mdn.deprecated(); var specList = web.getJSONData("SpecData"); diff --git a/kumascript/tests/macros/spec2.test.js b/kumascript/tests/macros/spec2.test.js deleted file mode 100644 index 6e3b6d4a076e..000000000000 --- a/kumascript/tests/macros/spec2.test.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @prettier - */ - -const { assert, itMacro, describeMacro } = require("./utils"); - -describeMacro("spec2", function () { - itMacro("CR (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("Upgrade Insecure Requests"), - 'Candidate Recommendation' - ); - }); - itMacro("ED (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("FileSystem"), - 'Editor's Draft' - ); - }); - itMacro("WD (ja)", function (macro) { - macro.ctx.env.locale = "ja"; - return assert.eventually.equal( - macro.call("CSS3 Box"), - '勧告候補' - ); - }); - itMacro("REC (de)", function (macro) { - macro.ctx.env.locale = "de"; - return assert.eventually.equal( - macro.call("User Timing"), - 'Empfehlung' - ); - }); - itMacro("Draft (ru)", function (macro) { - macro.ctx.env.locale = "ru"; - return assert.eventually.equal( - macro.call("Async Function"), - 'Черновик' - ); - }); - itMacro("Living (fr)", function (macro) { - macro.ctx.env.locale = "fr"; - return assert.eventually.equal( - macro.call("Background Sync"), - 'Standard évolutif' - ); - }); - itMacro("Standard (pt-BR)", function (macro) { - macro.ctx.env.locale = "pt-BR"; - return assert.eventually.equal( - macro.call("ES1"), - 'Padrão' - ); - }); - itMacro("Obsolete (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("Typed Array"), - 'Obsolete' - ); - }); - itMacro("Old-Transforms (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("CSS3 2D Transforms"), - 'Working Draft' - ); - }); - itMacro("Unknown (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("fleetwood mac"), - 'Unknown' - ); - }); - // Test that locale affects "unknown". - itMacro("Unknown (ja)", function (macro) { - macro.ctx.env.locale = "ja"; - return assert.eventually.equal( - macro.call("fleetwood mac"), - '不明' - ); - }); -}); diff --git a/kumascript/tests/macros/specname.test.js b/kumascript/tests/macros/specname.test.js deleted file mode 100644 index bc6a3af47e8c..000000000000 --- a/kumascript/tests/macros/specname.test.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @prettier - */ - -const { assert, itMacro, describeMacro } = require("./utils"); - -describeMacro("specname", function () { - itMacro("One argument (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("Alarm API"), - `Web Alarms API` - ); - }); - itMacro("One argument (fr)", function (macro) { - macro.ctx.env.locale = "fr"; - return assert.eventually.equal( - macro.call("Alarm API"), - `Web Alarms API` - ); - }); - itMacro("One argument (de)", function (macro) { - macro.ctx.env.locale = "de"; - return assert.eventually.equal( - macro.call("Alarm API"), - `Web Alarms API` - ); - }); - itMacro("One argument (ru)", function (macro) { - macro.ctx.env.locale = "ru"; - return assert.eventually.equal( - macro.call("Alarm API"), - `Web Alarms API` - ); - }); - itMacro("One argument (ja)", function (macro) { - macro.ctx.env.locale = "ja"; - return assert.eventually.equal( - macro.call("Alarm API"), - `Web Alarms API` - ); - }); - itMacro("One argument (zh-CN)", function (macro) { - macro.ctx.env.locale = "zh-CN"; - return assert.eventually.equal( - macro.call("Alarm API"), - `Web Alarms API` - ); - }); - itMacro("Two arguments (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("CSS3 Transitions", "#animatable-css"), - `CSS Transitions` - ); - }); - itMacro("Three arguments (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("CSS3 Transitions", "#animatable-css", "top"), - `CSS Transitions
The definition of 'top' in that specification.
` - ); - }); - itMacro("Three arguments (fr)", function (macro) { - macro.ctx.env.locale = "fr"; - return assert.eventually.equal( - macro.call("CSS3 Transitions", "#animatable-css", "top"), - `CSS Transitions
La définition de 'top' dans cette spécification.
` - ); - }); - itMacro("Three arguments (de)", function (macro) { - macro.ctx.env.locale = "de"; - return assert.eventually.equal( - macro.call("CSS3 Transitions", "#animatable-css", "top"), - `CSS Transitions
Die Definition von 'top' in dieser Spezifikation.
` - ); - }); - itMacro("Three arguments (ru)", function (macro) { - macro.ctx.env.locale = "ru"; - return assert.eventually.equal( - macro.call("CSS3 Transitions", "#animatable-css", "top"), - `CSS Transitions
Определение 'top' в этой спецификации.
` - ); - }); - itMacro("Three arguments (ja)", function (macro) { - macro.ctx.env.locale = "ja"; - return assert.eventually.equal( - macro.call("CSS3 Transitions", "#animatable-css", "top"), - `CSS Transitions
top の定義
` - ); - }); - itMacro("Three arguments (zh-CN)", function (macro) { - macro.ctx.env.locale = "zh-CN"; - return assert.eventually.equal( - macro.call("CSS3 Transitions", "#animatable-css", "top"), - `CSS Transitions
top
` - ); - }); - itMacro("Unknown (en-US)", function (macro) { - return assert.eventually.equal( - macro.call("fleetwood mac"), - `Unknown` - ); - }); -});