/ crypto-hash.test.js
crypto-hash.test.js
1 const cryptoHash = require('./crypto-hash'); 2 3 describe('cryptoHash()', () => { 4 5 it("generates a SHA-256 hashed output", () => { 6 expect(cryptoHash('foo')).toEqual("2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"); 7 }) 8 9 it('produces the same hash with the same input arguments in array order', () => { 10 expect(cryptoHash('one', 'two', 'three')).toEqual(cryptoHash('three', 'two', 'one')); 11 }); 12 13 });