all files / tests/ hash.js

100% Statements 1/1
100% Branches 0/0
100% Functions 3/3
100% Lines 1/1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15                           
import generate from '../src/lib/generate';
import test from 'ava';
 
function hashFake() {
  return 'testhash0A__!@#$%^&*()-+';
}
 
test.cb('provide our own hash function', (t) => {
  t.plan(1);
  generate('test', 'test', { method: hashFake }, (password) => {
    t.is('testhash0A', password);
    t.end();
  });
});