diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-07-27 06:24:57 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-07-27 06:24:57 +0800 |
commit | 6a9d40c558564763ee06deb4861238b1b06e1f00 (patch) | |
tree | db549c3b82ba4df325bc6fb34b849eabbad47337 /test/unit | |
parent | f23efec3e3d9f42484f633ba0444db350875f898 (diff) | |
download | tangerine-wallet-browser-6a9d40c558564763ee06deb4861238b1b06e1f00.tar tangerine-wallet-browser-6a9d40c558564763ee06deb4861238b1b06e1f00.tar.gz tangerine-wallet-browser-6a9d40c558564763ee06deb4861238b1b06e1f00.tar.bz2 tangerine-wallet-browser-6a9d40c558564763ee06deb4861238b1b06e1f00.tar.lz tangerine-wallet-browser-6a9d40c558564763ee06deb4861238b1b06e1f00.tar.xz tangerine-wallet-browser-6a9d40c558564763ee06deb4861238b1b06e1f00.tar.zst tangerine-wallet-browser-6a9d40c558564763ee06deb4861238b1b06e1f00.zip |
Add test for blacklister.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/blacklister-test.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/blacklister-test.js b/test/unit/blacklister-test.js new file mode 100644 index 000000000..d9290795c --- /dev/null +++ b/test/unit/blacklister-test.js @@ -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) + }) + }) +}) |