Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010270
route-test.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
972 B
Referenced Files
None
Subscribers
None
route-test.ts
View Options
import
{
curryImportPath
}
from
"../utils/import-path"
;
export
function
testTemplate
(
action_name
:
string
,
new_file_fullpath
:
string
)
{
const
rel
=
curryImportPath
(
new_file_fullpath
);
return
`import { withProdApp } from "
${
rel
(
"src/back/test_utils/with-prod-app"
)
}
";
import { LONG_TEST_TIMEOUT, webhintURL } from "
${
rel
(
"src/back/test_utils/webhint"
)
}
";
import {
${
action_name
}
URL } from "
${
rel
(
"src/back/routes/urls"
)
}
";
describe("
${
action_name
}
", () => {
it("doesn't crash", async function () {
this.timeout(LONG_TEST_TIMEOUT);
return withProdApp(async ({ base_url, rest_api }) => {
await rest_api.get(
${
action_name
}
URL);
await webhintURL(base_url +
${
action_name
}
URL);
// alternatively you can use webhintHTML for faster but less precise scans
// or for scanning responses of requests that use some form of authorization:
// const response = await rest_api.get(
${
action_name
}
URL);
// await webhintHTML(response);
});
});
});
`
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:39 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625930
Default Alt Text
route-test.ts (972 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment