email-address-validation
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -107,2 +107,4 @@ 'use strict'; | ||
API.PARAM_CATCH_ALL = 'catch_all'; | ||
API.PARAM_CATCH_ALL_TRUE = 1; | ||
API.PARAM_CATCH_ALL_FALSE = 0; | ||
API.PARAM_ROLE = 'role'; | ||
@@ -109,0 +111,0 @@ API.PARAM_DISPOSABLE = 'disposable'; |
{ | ||
"name": "email-address-validation", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Email Validation & Verification JSON API for Developers. Simple REST API measuring email deliverability & quality", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,6 +6,2 @@ var path = require('path'); | ||
var api = new API({ | ||
access_key: process.env.ACCESS_KEY | ||
}); | ||
// TEST START | ||
@@ -20,7 +16,11 @@ var chai = require('chai'); | ||
var user = 'this.is.a'; | ||
var domain = 'test.io'; | ||
var email = ''+ user +'@'+ domain; | ||
it('basic', function (done) { | ||
var user = 'this.is.a'; | ||
var domain = 'test.io'; | ||
var email = ''+ user +'@'+ domain; | ||
var api = new API({ | ||
access_key: process.env.ACCESS_KEY | ||
}); | ||
@@ -36,4 +36,5 @@ // Check Query | ||
expect(result).is.not.null; | ||
expect(result).property('user').equals(user); | ||
expect(result).property('domain').equals(domain); | ||
expect(result).property(api.check.PARAM_USER).equals(user); | ||
expect(result).property(api.check.PARAM_DOMAIN).equals(domain); | ||
expect(result).property(api.check.PARAM_CATCH_ALL).to.be.null; | ||
@@ -46,2 +47,54 @@ done(null, result); | ||
}); | ||
it('basic - w. catch-all', function (done) { | ||
var api = new API({ | ||
access_key: process.env.ACCESS_KEY | ||
}); | ||
// Check Query | ||
var query = { | ||
email: email, | ||
catch_all: api.check.PARAM_CATCH_ALL_TRUE | ||
}; | ||
api.check(query) | ||
.then(function (result) { | ||
expect(result).is.not.null; | ||
expect(result).property(api.check.PARAM_USER).equals(user); | ||
expect(result).property(api.check.PARAM_DOMAIN).equals(domain); | ||
expect(result).property(api.check.PARAM_CATCH_ALL).to.be.a('boolean'); | ||
done(null, result); | ||
}) | ||
.catch(function (err) { | ||
done(err); | ||
}); | ||
}); | ||
it('basic - w. catch-all on free account', function (done) { | ||
var api = new API({ | ||
access_key: process.env.ACCESS_KEY_FREE | ||
}); | ||
// Check Query | ||
var query = { | ||
email: email, | ||
catch_all: api.check.PARAM_CATCH_ALL_TRUE | ||
}; | ||
api.check(query) | ||
.then(function (result) { | ||
expect(result).is.null; | ||
done(result); | ||
}) | ||
.catch(function (err) { | ||
expect(err).property('code').equals(310); | ||
done(null, err); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
19598
401
0
6