@featurevisor/sdk 0.28.0 → 0.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.28.1](https://github.com/fahad19/featurevisor/compare/v0.28.0...v0.28.1) (2023-06-08)
7
+
8
+ **Note:** Version bump only for package @featurevisor/sdk
9
+
10
+
11
+
12
+
13
+
6
14
  # [0.28.0](https://github.com/fahad19/featurevisor/compare/v0.27.1...v0.28.0) (2023-06-08)
7
15
 
8
16
 
package/dist/index.js.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/sdk",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "Featurevisor SDK for Node.js and the browser",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -46,5 +46,5 @@
46
46
  "compare-versions": "^6.0.0-rc.1",
47
47
  "murmurhash": "^2.0.1"
48
48
  },
49
- "gitHead": "349f2c213ee65025a4ee4cd6697fa45b8b5fd9eb"
49
+ "gitHead": "06dbda3e26565df269e9ed9c4b6e8d2f4cab45a6"
50
50
  }
@@ -15,4 +15,23 @@ describe("sdk: Bucket", function () {
15
15
  expect(n <= MAX_BUCKETED_NUMBER).toEqual(true);
16
16
  });
17
17
  });
18
+
19
+ // these assertions will be copied to unit tests of SDKs ported to other languages,
20
+ // so we can keep consitent bucketing across all SDKs
21
+ it("should return expected number for known keys", function () {
22
+ const expectedResults = {
23
+ foo: 20602,
24
+ bar: 89144,
25
+ "123.foo": 3151,
26
+ "123.bar": 9710,
27
+ "123.456.foo": 14432,
28
+ "123.456.bar": 1982,
29
+ };
30
+
31
+ Object.keys(expectedResults).forEach((key) => {
32
+ const n = getBucketedNumber(key);
33
+
34
+ expect(n).toEqual(expectedResults[key]);
35
+ });
36
+ });
18
37
  });