1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1× | 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(); }); }); |