1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add test for blacklister.

This commit is contained in:
Kevin Serrano 2017-07-26 15:24:57 -07:00
parent f23efec3e3
commit 6a9d40c558
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -0,0 +1,24 @@
const assert = require('assert')
const Blacklister = require('../../app/scripts/blacklister')
describe('blacklister', function () {
describe('#isPhish', function () {
it('should not flag whitelisted values', function () {
var result = Blacklister('www.metamask.io')
assert(!result)
})
it('should flag explicit values', function () {
var result = Blacklister('metamask.com')
assert(result)
})
it('should flag levenshtein values', function () {
var result = Blacklister('metmask.io')
assert(result)
})
it('should not flag not-even-close values', function () {
var result = Blacklister('example.com')
assert(!result)
})
})
})