-
-
Save stenington/b02bb44116a87a071c3f to your computer and use it in GitHub Desktop.
Demonstrates decode failure on urls with subdomains
This file contains 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 characters
diff --git a/test/jws.test.js b/test/jws.test.js | |
index 28546d4..23941c4 100644 | |
--- a/test/jws.test.js | |
+++ b/test/jws.test.js | |
@@ -207,7 +207,7 @@ test('Streaming verify: ECDSA, with invalid key', function (t) { | |
}); | |
test('jws.decode: not a jws signature', function (t) { | |
- const result = jws.decode('some garbage string'); | |
- t.same(result, false, 'should return false if it cannot decode'); | |
+ t.same(jws.decode('some garbage string'), false, 'should return false if it cannot decode'); | |
+ t.same(jws.decode('http://sub.domain.org'), false, 'should return false if it cannot decode'); | |
t.end(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment