Skip to content

Commit 505c542

Browse files
correct null tag test
1 parent 4bfc623 commit 505c542

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

test/load.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const mockedKVs = [{
9090
}, {
9191
key: "keyWithNullTag",
9292
value: "valueWithNullTag",
93-
tags: {"nullTag": "\0"}
93+
tags: {"nullTag": null}
9494
}, {
9595
key: "keyWithEscapedComma",
9696
value: "valueWithEscapedComma",

test/utils/testHelper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ function _filterKVs(unfilteredKvs: ConfigurationSetting[], listOptions: any) {
4848
if (tagsFilter.length > 0) {
4949
tagsMatched = tagsFilter.every(tag => {
5050
const [tagName, tagValue] = tag.split("=");
51+
if (tagValue === "\0") {
52+
return kv.tags && kv.tags[tagName] === null;
53+
}
5154
return kv.tags && kv.tags[tagName] === tagValue;
5255
});
5356
}

0 commit comments

Comments
 (0)