Skip to content

Commit 8251860

Browse files
authored
Allow computeBaseline() with no keys, formally (#3960)
1 parent 50fe031 commit 8251860

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

packages/compute-baseline/src/baseline/index.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,15 @@ describe("computeBaseline", function () {
175175
});
176176
assert.equal(actual.baseline, false);
177177
});
178+
179+
it("returns no support for no keys", function () {
180+
const actual = computeBaseline({
181+
compatKeys: [],
182+
checkAncestors: false,
183+
});
184+
assert.equal(actual.baseline, false);
185+
assert.equal(actual.support.size, 0);
186+
});
178187
});
179188

180189
describe("keystoneDateToStatus()", function () {

packages/compute-baseline/src/baseline/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function getStatus(
9494
*/
9595
export function computeBaseline(
9696
featureSelector: {
97-
compatKeys: [string, ...string[]];
97+
compatKeys: string[];
9898
checkAncestors?: boolean;
9999
},
100100
compat: Compat = defaultCompat,

0 commit comments

Comments
 (0)