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.
24 lines
747 B
24 lines
747 B
const assert = require('assert')
|
|
const isPhish = require('../../app/scripts/lib/is-phish')
|
|
|
|
describe('blacklister', function () {
|
|
describe('#isPhish', function () {
|
|
it('should not flag whitelisted values', function () {
|
|
var result = isPhish({ hostname: 'www.metamask.io' })
|
|
assert(!result)
|
|
})
|
|
it('should flag explicit values', function () {
|
|
var result = isPhish({ hostname: 'metamask.com' })
|
|
assert(result)
|
|
})
|
|
it('should flag levenshtein values', function () {
|
|
var result = isPhish({ hostname: 'metmask.com' })
|
|
assert(result)
|
|
})
|
|
it('should not flag not-even-close values', function () {
|
|
var result = isPhish({ hostname: 'example.com' })
|
|
assert(!result)
|
|
})
|
|
})
|
|
})
|
|
|
|
|