You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isPlainHostName.js 468B

1234567891011121314151617181920212223
  1. /**
  2. * Module dependencies.
  3. */
  4. var assert = require('assert');
  5. var isPlainHostName = require('../isPlainHostName');
  6. describe('isPlainHostName(host)', function () {
  7. var tests = [
  8. ["www", true],
  9. ["www.netscape.com", false]
  10. ];
  11. tests.forEach(function (test) {
  12. var expected = test.pop();
  13. it('should return `' + expected +'` for "' + test.join('", "') + '"', function () {
  14. assert.equal(expected, isPlainHostName(test[0]));
  15. });
  16. });
  17. });