|
Jared K. Smith |
2e5a039 |
import test from 'ava';
|
|
Jared K. Smith |
2e5a039 |
import m from './';
|
|
Jared K. Smith |
2e5a039 |
|
|
Jared K. Smith |
2e5a039 |
test(t => {
|
|
Jared K. Smith |
2e5a039 |
t.is(m('unicorn'), '1abcb33beeb811dca15f0ac3e47b88d9');
|
|
Jared K. Smith |
2e5a039 |
t.is(m(new Buffer('unicorn')), '1abcb33beeb811dca15f0ac3e47b88d9');
|
|
Jared K. Smith |
2e5a039 |
t.is(m(['uni', 'corn']), '1abcb33beeb811dca15f0ac3e47b88d9');
|
|
Jared K. Smith |
2e5a039 |
t.is(m(['uni', new Buffer('corn')]), '1abcb33beeb811dca15f0ac3e47b88d9');
|
|
Jared K. Smith |
2e5a039 |
t.throws(() => m('uni', 'corn'), 'Too many arguments. Try specifying an array.');
|
|
Jared K. Smith |
2e5a039 |
});
|