Commit 8e81ac04 authored by Anthony Morris's avatar Anthony Morris
Browse files

Add test for safe-compare

parent 9267d45b
import safeCompare from '../safe-compare'
const hmac = '7c66606415117ff9744a2a9b2be1712a15928b5ef474ab1a9ff5dc36b7dcaed8';
describe('safeCompare', () => {
it('returns true when values are the same', () => {
expect(safeCompare(hmac, hmac)).toBe(true);
it('returns false when values are different', () => {
expect(safeCompare(hmac, 'not hmac')).toBe(false);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment