Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F8922453
test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
949 B
Referenced Files
None
Subscribers
None
test.js
View Options
var
path
=
require
(
"path"
);
var
Sealious
=
require
(
"sealious"
);
Sealious
.
init
(
"local"
);
var
Promise
=
require
(
"bluebird"
);
var
always_fails
=
new
Sealious
.
ChipTypes
.
FieldType
(
"always_fails"
);
always_fails
.
prototype
.
isProperValue
=
function
(
value_in_code
){
return
new
Promise
(
function
(
resolve
,
reject
){
resolve
();
})
}
var
always_fails_resource
=
new
Sealious
.
ChipTypes
.
ResourceType
(
"always_fails_resource"
);
always_fails_resource
.
add_fields
([
{
name
:
"#fail"
,
type
:
"always_fails"
},
])
Sealious
.
start
().
then
(
function
(){
describe
(
'Create resource'
,
function
()
{
context
(
'that should only return false'
,
function
(){
it
(
'should throw an error'
,
function
(
done
){
Sealious
.
Dispatcher
.
resources
.
create
(
"always_fails_resource"
,
{
"#fail"
:
"tak"
})
.
then
(
function
(){
done
(
new
Error
(
"It didn't throw an error!"
));
}).
catch
(
function
(
error
){
done
();
});
});
});
});
});
// always_fails should always fail
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 20, 14:37 (23 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
949283
Default Alt Text
test.js (949 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment