Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010786
sealious-list.test.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
918 B
Referenced Files
None
Subscribers
None
sealious-list.test.ts
View Options
import
assert
from
"assert"
;
import
{
RealAppTest
}
from
"../test_utils/test-on-real-app.js"
;
describe
(
"sealious-list test"
,
()
=>
{
it
(
"creates minimal sealious app and adds a simple route that works"
,
async
function
()
{
const
test_app
=
await
RealAppTest
.
init
();
const
url
=
"/list"
;
await
test_app
.
runSealgenCommand
(
`add-collection --collection_name=samples`
);
await
test_app
.
runSealgenCommand
(
`add-route --url=
${
url
}
--action=List --mode=list --collection=samples`
);
await
test_app
.
start
();
const
res_post
=
await
test_app
.
httpPOST
(
"/api/v1/collections/samples"
,
{
content
:
"some-content"
,
});
assert
(
res_post
.
status
==
201
);
const
res
=
await
test_app
.
httpGET
(
url
);
if
(
res
.
status
!=
200
)
{
throw
new
Error
(
"url generated by add-route exists but doesn't return 200"
);
}
assert
(
res
.
response
.
includes
(
"some-content"
));
await
test_app
.
close
();
}).
timeout
(
100
*
1000
);
});
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:47 (1 d, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
624773
Default Alt Text
sealious-list.test.ts (918 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment