Created
April 3, 2017 08:55
-
-
Save probil/82cca5300c59e141a74aa3e12c4ff173 to your computer and use it in GitHub Desktop.
Revisions
-
probil created this gist
Apr 3, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ it('Should return true for correct ipv4', () => { let correctIps = [ '0.0.0.0/0', '255.255.255.255/32', '159.12.101.0/24' ]; let expected = {} correctIps.map(ip => { actual[ip] = true; }) let actual = {}; correctIps.map(ip => { actual[ip] = ipv4.isValid(ip); }) expect(actual).toMatchObject(expected); })