From 49f56dd799122595ea1b3fd823b9ec3804329fc6 Mon Sep 17 00:00:00 2001 From: Asheem Mamoowala Date: Thu, 12 Dec 2019 11:44:53 -0800 Subject: [PATCH] Fix *-sort-key sdk support table --- src/style-spec/reference/v8.json | 15 +++++++++++++++ test/unit/style-spec/spec.test.js | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/style-spec/reference/v8.json b/src/style-spec/reference/v8.json index 282ab51ebe5..853b635d1ef 100644 --- a/src/style-spec/reference/v8.json +++ b/src/style-spec/reference/v8.json @@ -644,7 +644,12 @@ "type": "number", "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.", "sdk-support": { + "basic functionality": { + "js": "1.2.0" + }, + "data-driven styling": { "js": "1.2.0" + } }, "expression": { "interpolated": false, @@ -683,7 +688,12 @@ "type": "number", "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.", "sdk-support": { + "basic functionality": { + "js": "1.2.0" + }, + "data-driven styling": { "js": "1.2.0" + } }, "expression": { "interpolated": false, @@ -892,7 +902,12 @@ "type": "number", "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.", "sdk-support": { + "basic functionality": { "js": "1.2.0" + }, + "data-driven styling": { + "js": "1.2.0" + } }, "expression": { "interpolated": false, diff --git a/test/unit/style-spec/spec.test.js b/test/unit/style-spec/spec.test.js index 7ac5695119a..b1baa143e6b 100644 --- a/test/unit/style-spec/spec.test.js +++ b/test/unit/style-spec/spec.test.js @@ -28,6 +28,14 @@ test(`v8 Spec SDK Support section`, (t) => { const propKeys = Object.keys(props); propKeys.forEach((key) => { t.ok(props[key]["sdk-support"], `${objKey}_${key} is missing sdk support section`); + if (props[key]["sdk-support"]) { + t.ok(props[key]["sdk-support"]["basic functionality"], `${objKey}_${key} is missing sdk support section for 'basic functionality'`); + if (props[key]["property-type"].includes("constant")) { + t.notOk(props[key]["sdk-support"]["data-driven styling"], `${objKey}_${key} should not have sdk support section for 'data-driven styling'`); + } else { + t.ok(props[key]["sdk-support"]["data-driven styling"], `${objKey}_${key} is missing sdk support section for 'data-driven styling'`); + } + } }); }); @@ -35,6 +43,9 @@ test(`v8 Spec SDK Support section`, (t) => { const expressionNames = Object.keys(expressions); expressionNames.forEach((expr) => { t.ok(expressions[expr]["sdk-support"], `expression_${expr} is missing sdk support section`); + if (expressions[expr]["sdk-support"]) { + t.ok(expressions[expr]["sdk-support"]["basic functionality"], `expression_${expr} is missing sdk support section for 'basic functionality'`); + } }); t.end(); });