Content-Length: 291558 | pFad | http://github.com/Trikcode/JavaScript-Algorithms/commit/60443c7effe51b6a677d8383a7e4896eff14aa3b
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0315c8a commit 60443c7Copy full SHA for 60443c7
Recursive/test/BinaryEquivalent.test.js
@@ -0,0 +1,29 @@
1
+import { binaryEquivalent } from "../BinaryEquivalent";
2
+
3
+const tests = [
4
+ {
5
+ test: 2,
6
+ expectedValue: "10"
7
+ },
8
9
+ test: 0,
10
+ expectedValue: "0"
11
12
13
+ test: 543,
14
+ expectedValue: "1000011111"
15
16
17
+ test: 4697621023,
18
+ expectedValue: "100011000000000000000001000011111"
19
+ }
20
+]
21
22
+describe("Binary Equivalent", () => {
23
+ test.each(tests)(
24
+ "of $test should be $expectedValue",
25
+ ({test, expectedValue}) => {
26
+ expect(binaryEquivalent(test)).toBe(expectedValue);
27
28
+ )
29
+})
Fetched URL: http://github.com/Trikcode/JavaScript-Algorithms/commit/60443c7effe51b6a677d8383a7e4896eff14aa3b
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy
0 commit comments