-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable api.js
test cases that were omitted
#264
base: master
Are you sure you want to change the base?
Conversation
As an extra enhancement, I had wrapped 13:31:09 W1 debug ✅ Passed: Sign into session (91.059375ms)
13:31:09 W1 debug ✅ Passed: Metacom over HTTP (110.810125ms)
...
13:31:09 W1 debug ✅ Passed: Sign into session (65.835917ms)
13:31:09 W1 debug ✅ Passed: Metacom over Websocket (71.862083ms)
13:31:09 W1 debug 🟢 Passed 20, Failed: 0 |
@tshemsedinov, beside fix and enhancement I'm looking to add another test case that calls API endpoint with logged access. Because Created test case await t.test(`Call logged endpoint`, async () => {
const res = await metacom.api.example.wait({ delay: 1 });
node.assert.strictEqual(res, 'done');
}); However I didn't place it into commit because it reveals that something not work with access to the logged endpoint through the HTTP transport at least during test run. WS transport at the same time passed this test case successfully. 13:42:05 W1 debug ✅ Passed: Sign into session (82.932666ms)
13:42:05 W2 debug 127.0.0.1 POST /api 200
13:42:05 W2 log 127.0.0.1 example/add
13:42:05 W1 debug ✅ Passed: Call example.add({ a, b }) (2.259083ms)
13:42:05 W2 error 127.0.0.1 POST /api 403 403 Forbidden
13:42:05 W2 error 127.0.0.1 POST /api 403
13:42:05 W1 error ❌ Failed: Call logged endpoint (2.017292ms)
Error: Forbidden
HttpTransport.message (/node_modules/metacom/lib/client.js:114:28)
/node_modules/metacom/lib/client.js:277:14
process.processTicksAndRejections (node:internal/process/task_queues:95:5)
...
13:42:05 W1 debug ✅ Passed: Sign into session (66.233208ms)
13:42:05 W2 log 127.0.0.1 example/add
13:42:05 W1 debug ✅ Passed: Call example.add({ a, b }) (0.3925ms)
13:42:05 W2 log 127.0.0.1 example/wait
13:42:05 W1 debug ✅ Passed: Call logged endpoint (1.755042ms)
13:42:05 W1 debug ✅ Passed: Metacom over |
GitHub Workflow testing shows @MarhiievHE already done great job of enhancing workflow environment in the branch
Please give an advice @tshemsedinov . If the PR #225 is considered too big to land it now as a whole... maybe it's worth to extract some useful part of it into separate PR that you may be confident for apply? @MarhiievHE thank's for your contribution! What is yours opinion? |
Closes: #263
The cause appears to be a tiny typo in a first guard line at
Example/application/domain/tests/api.js
Lines 2 to 3 in 2435b8e
Reverse of the check enables assertions and cases from the script. Console result of the
npm t
now shows its executionnpm t
)npm run fmt
)