-
Notifications
You must be signed in to change notification settings - Fork 39
Chat proof #544
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
Chat proof #544
Conversation
TallTed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(editorial) minor fix to a comment
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
| const res = serializeMsg(msg) | ||
| expect(res).toEqual(JSON.stringify(msg)) | ||
| }) | ||
| it.skip('sign and verifySignature', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angelo-v I'm having trouble with this test. I've tried several different things. I was wondering if you can tell just by looking what I'm doing wrong. Here is the error. I've tried to add a test using try/catch but that also didn't seem to work.
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] { code: 'ERR_UNHANDLED_REJECTION'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not have your issue but TypeError: Expected input type is Uint8Array (got object)
This seems a jest/jsdom issue with a solution proposed in paralleldrive/cuid2#44 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bourgeoa I will check that out.
TallTed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor grammar, punctuation, etc.
| ##### Any | ||
|
|
||
| ##### Each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ##### Any | |
| ##### Each | |
| ##### `Any` | |
| ##### `Each` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TallTed thank you for all the corrections.
| contentType: 'text/turtle' | ||
| }) | ||
| } catch (err) { | ||
| if (err?.response?.status !== 404) { throw new Error(err) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bourgeoa I'm wondering, if it errors with a 404, should we create the resource in that case?
And otherwise if it errors would it be because the user is not logged in? If so I will mock that data for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PUT should never error with 404 so we should remove the if
The reason for failing could be 401 or 403 (not authenticated or not authorized)
| import * as ns from '../../ns' | ||
| import { NamedNode } from 'rdflib' | ||
|
|
||
| export const getPodRoot = async (webId: NamedNode) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bourgeoa what are your thoughts on using this https://github.com/SolidOS/solid-logic/blob/24c693ce69749c851559942ba2811e0d642cad8a/src/profile/profileLogic.ts#L94?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find. I did not knew this function.
I think :
- keep for know the one we have which is dealing with more cases : multiple storages or no storage in WebID
- make the one we have compatible by returning a NamedNode
- create an issue/PR in solid-logic to improve the getPodRoot()
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@SharonStrats
I think I have something to work with if we can begin to add tests
first test in test/chat/keys.test.ts is failing with