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