|
|
@ -5,19 +5,19 @@ describe('blacklister', function () { |
|
|
|
describe('#isPhish', function () { |
|
|
|
describe('#isPhish', function () { |
|
|
|
it('should not flag whitelisted values', function () { |
|
|
|
it('should not flag whitelisted values', function () { |
|
|
|
var result = isPhish({ hostname: 'www.metamask.io' }) |
|
|
|
var result = isPhish({ hostname: 'www.metamask.io' }) |
|
|
|
assert(!result) |
|
|
|
assert.equal(result, false) |
|
|
|
}) |
|
|
|
}) |
|
|
|
it('should flag explicit values', function () { |
|
|
|
it('should flag explicit values', function () { |
|
|
|
var result = isPhish({ hostname: 'metamask.com' }) |
|
|
|
var result = isPhish({ hostname: 'metamask.com' }) |
|
|
|
assert(result) |
|
|
|
assert.equal(result, true) |
|
|
|
}) |
|
|
|
}) |
|
|
|
it('should flag levenshtein values', function () { |
|
|
|
it('should flag levenshtein values', function () { |
|
|
|
var result = isPhish({ hostname: 'metmask.com' }) |
|
|
|
var result = isPhish({ hostname: 'metmask.io' }) |
|
|
|
assert(result) |
|
|
|
assert.equal(result, true) |
|
|
|
}) |
|
|
|
}) |
|
|
|
it('should not flag not-even-close values', function () { |
|
|
|
it('should not flag not-even-close values', function () { |
|
|
|
var result = isPhish({ hostname: 'example.com' }) |
|
|
|
var result = isPhish({ hostname: 'example.com' }) |
|
|
|
assert(!result) |
|
|
|
assert.equal(result, false) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|