Permalink
Browse files

added tests for #129 fix. removed gmx.de from the spec since it is no…

…t one of the defaultDomains in the Mailcheck plugin and hence will cause test discrepancies during test runs
  • Loading branch information...
caphun committed Oct 16, 2016
1 parent b918ef9 commit 1e6ec383fa72a02bee254e7560482fec574e8a8e
Showing with 7 additions and 1 deletion.
  1. +7 −1 spec/mailcheckSpec.js
View
@@ -1,5 +1,5 @@
describe("mailcheck", function() {
var domains = ['google.com', 'gmail.com', 'emaildomain.com', 'comcast.net', 'facebook.com', 'msn.com', 'gmx.de'];
var domains = ['google.com', 'gmail.com', 'emaildomain.com', 'comcast.net', 'facebook.com', 'msn.com'];
var secondLevelDomains = ["yahoo", "hotmail", "mail", "live", "outlook", "gmx"];
var topLevelDomains = ['co.uk', 'com', 'org', 'info', 'fr'];
@@ -153,6 +153,12 @@ describe("mailcheck", function() {
mailcheck.suggest('test@gmx.fr', domains, secondLevelDomains, topLevelDomains)
).toBeFalsy();
});
it("will not offer suggestions for unrecognised 2ld's without a tld", function() {
expect(mailcheck.suggest('test@gm', domains, secondLevelDomains, topLevelDomains)).toBeFalsy();
expect(mailcheck.suggest('test@gma', domains, secondLevelDomains, topLevelDomains)).toBeFalsy();
expect(mailcheck.suggest('test@gmai', domains, secondLevelDomains, topLevelDomains)).toBeFalsy();
});
});
describe("mailcheck.splitEmail", function () {

0 comments on commit 1e6ec38

Please sign in to comment.