test.js 482 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. var wellknown = require('./index');
  3. module.exports['Find by key'] = function(test) {
  4. test.ok(wellknown('Gmail'));
  5. test.done();
  6. };
  7. module.exports['Find by alias'] = function(test) {
  8. test.ok(wellknown('Google Mail'));
  9. test.done();
  10. };
  11. module.exports['Find by domain'] = function(test) {
  12. test.ok(wellknown('GoogleMail.com'));
  13. test.done();
  14. };
  15. module.exports['No match'] = function(test) {
  16. test.ok(!wellknown('zzzzzz'));
  17. test.done();
  18. };