Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): Fix docs and test about email validation - following API R… #357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1393,14 +1393,15 @@ Method naming conventions:

```JS
{
address: '[email protected]',
did_you_mean: null,
is_valid: false,
parts: {
display_name: null,
domain: null,
local_part: null
}
"address": "[email protected]",
"is_disposable_address": false,
"is_role_address": false,
"reason": [
"catch_all",
"unknown_provider"
],
"result": "catch_all",
"risk": "medium"
}
```

Expand Down Expand Up @@ -2097,4 +2098,3 @@ git pull
Next, run ```npm run release```.

After that, `cd ./dist` and then run ```npm login``` and ```npm publish``` to publish changes on npm.

13 changes: 9 additions & 4 deletions test/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ describe('ValidateClient', function () {
describe('get', function () {
it('validates a single email address', function () {
const data: any = {
address: 'Alice <[email protected]>',
did_you_mean: null,
is_valid: false,
parts: { display_name: null, domain: null, local_part: null }
address: '[email protected]',
is_disposable_address: false,
is_role_address: false,
reason: [
'catch_all',
'unknown_provider'
],
result: 'catch_all',
risk: 'medium'
};

api.get('/v4/address/validate')
Expand Down