Skip to content

Commit

Permalink
cleanup of tests. #300
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jan 25, 2020
1 parent d63f409 commit c62d951
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bracco",
"version": "3.3.13",
"version": "3.3.14",
"private": true,
"description": "Fabrica",
"repository": {
Expand Down
14 changes: 4 additions & 10 deletions tests/unit/validators/email-format-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ module('Unit | Validator | email-format', function(hooks) {

options = {
allowBlank: true,
type: 'email',
};
options = validator.buildOptions(options, {}).toObject();

Expand Down Expand Up @@ -81,15 +80,11 @@ module('Unit | Validator | email-format', function(hooks) {

assert.expect(validAddresses.length + invalidAddresses.length);

options = {
type: 'email',
};

options = validator.buildOptions(options, {}).toObject();
builtOptions = validator.buildOptions({}).toObject();

validAddresses.forEach(email =>
assert.equal(
validator.validate(email, options),
validator.validate(email, builtOptions),
true,
`validation of ${email} must succeed`,
),
Expand Down Expand Up @@ -145,7 +140,6 @@ module('Unit | Validator | email-format', function(hooks) {
assert.expect(validAddresses.length + invalidAddresses.length);

options = {
type: 'email',
require_tld: false,
};

Expand All @@ -155,8 +149,8 @@ module('Unit | Validator | email-format', function(hooks) {
assert.equal(
validator.validate(email, options),
true,
`validation of ${email} must succeed`
)
`validation of ${email} must succeed`,
),
);
invalidAddresses.forEach(email =>
assert.equal(
Expand Down

0 comments on commit c62d951

Please sign in to comment.