Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F8930175
field-type.email.test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
field-type.email.test.js
View Options
var
Sealious
=
require
(
"sealious"
);
module
.
exports
=
{
test_init
:
function
()
{},
test_start
:
function
()
{
var
field_type_email
=
Sealious
.
ChipManager
.
get_chip
(
"field_type"
,
"email"
);
describe
(
"FieldType.Email"
,
function
()
{
it
(
"should return the description of the field type"
,
function
(
done
)
{
if
(
typeof
field_type_email
.
declaration
.
get_description
()
===
"string"
)
done
();
else
done
(
new
Error
(
"But it didn't"
));
});
it
(
"should check if is_proper_value works correctly(given correct date format)"
,
function
(
done
)
{
field_type_email
.
is_proper_value
(
new
Sealious
.
Context
(),
{},
"test@mail.com"
)
.
then
(
function
()
{
done
();
})
.
catch
(
function
(
error
)
{
done
(
new
Error
(
error
));
})
});
it
(
"should check if is_proper_value works correctly(given incorrect date format)"
,
function
(
done
)
{
field_type_email
.
is_proper_value
(
new
Sealious
.
Context
(),
{},
"test"
)
.
then
(
function
()
{
done
(
new
Error
(
"It worked correctly"
));
})
.
catch
(
function
(
error
)
{
if
(
error
.
type
===
"validation"
)
done
();
else
done
(
new
Error
(
error
));
})
});
});
}
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 21, 01:37 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
948932
Default Alt Text
field-type.email.test.js (1 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment