File: test.js

package info (click to toggle)
node-md5-hex 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 104 kB
  • sloc: makefile: 2; sh: 2
file content (10 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import test from 'ava';
import m from './';

test(t => {
	t.is(m('unicorn'), '1abcb33beeb811dca15f0ac3e47b88d9');
	t.is(m(new Buffer('unicorn')), '1abcb33beeb811dca15f0ac3e47b88d9');
	t.is(m(['uni', 'corn']), '1abcb33beeb811dca15f0ac3e47b88d9');
	t.is(m(['uni', new Buffer('corn')]), '1abcb33beeb811dca15f0ac3e47b88d9');
	t.throws(() => m('uni', 'corn'), 'Too many arguments. Try specifying an array.');
});