Skip to content

Commit

Permalink
Prove both detection methods are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wolfe committed Dec 3, 2014
1 parent a03e132 commit deea4c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/oauth-signature.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,12 @@ test('Produces the expected decoded signature when optional token not provided',
'The generated GET signature should match the expected RFC 3986 encoded signature by default');
assert.equal(unencodedSignature, expectedDecodedSignature,
'The generated unencoded GET signature should match the expected unencoded signature');
});

suite('Node or Browser Detection');
test('Node or Browser properly detected', function () {
var oldIsNode = (typeof window === 'undefined');
var newIsNode = (typeof module != 'undefined' && typeof module.exports != 'undefined');
assert.equal(oldIsNode, newIsNode,
'Both methods of detection should produce the same value');
});

0 comments on commit deea4c9

Please sign in to comment.