Content-Length: 851 | pFad | http://github.com/TheAlgorithms/JavaScript/pull/1560.diff

thub.com diff --git a/Recursive/test/BinaryEquivalent.test.js b/Recursive/test/BinaryEquivalent.test.js new file mode 100644 index 0000000000..b79a455eed --- /dev/null +++ b/Recursive/test/BinaryEquivalent.test.js @@ -0,0 +1,29 @@ +import { binaryEquivalent } from "../BinaryEquivalent"; + +const tests = [ + { + test: 2, + expectedValue: "10" + }, + { + test: 0, + expectedValue: "0" + }, + { + test: 543, + expectedValue: "1000011111" + }, + { + test: 4697621023, + expectedValue: "100011000000000000000001000011111" + } +] + +describe("Binary Equivalent", () => { + test.each(tests)( + "of $test should be $expectedValue", + ({test, expectedValue}) => { + expect(binaryEquivalent(test)).toBe(expectedValue); + } + ) +})








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/TheAlgorithms/JavaScript/pull/1560.diff

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy