test.js 517 B

12345678910111213
  1. /** Tests for Unix Crypt **/
  2. let assert = require('assert');
  3. let unixCryptTD = require('../src/unix-crypt-td.js');
  4. describe('unixCryptTD', function() {
  5. it('should equal output of crypt(3)', function() {
  6. assert.equal(unixCryptTD('foo', 'ba'), 'ba4TuD1iozTxw');
  7. assert.equal(unixCryptTD('random long string', 'hi'), 'hib8W/d4WOlU.');
  8. assert.equal(unixCryptTD('foob', 'ar'), 'arlEKn0OzVJn.');
  9. assert.equal(unixCryptTD('Hello World! This is Unix crypt(3)!', 'ux'),
  10. 'uxNS5oJDUz4Sc');
  11. });
  12. });