From 8e23160ab24603f1fc8406aea3e4ce7146c3a26b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 2 Sep 2016 16:38:05 -0600 Subject: [PATCH] throw if not account when there should be --- tests/basic.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/basic.js b/tests/basic.js index 5dd9ffc..5167666 100644 --- a/tests/basic.js +++ b/tests/basic.js @@ -146,6 +146,14 @@ var tests = [ email: goodGuy.email }).then(function (account) { + if (!account) { + throw new Error("should have returned account for " + goodGuy.email); + } + + if (!account.keypair) { + throw new Error("should have returned account.keypair for " + goodGuy.email); + } + if (goodGuy.keypair.privateKeyPem !== account.keypair.privateKeyPem) { if (account.keypair.privateKeyJwk) { throw new Error("Error in test itself (not your fault). TODO: implement checking privateKeyJwk.");