This repository was archived by the owner on Jul 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Allow ws transport #37
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ada868c
allow for ws transport
folex 3baa131
set --env=jsdom
folex 365a870
rename spec file
folex 6ba08da
fix multiaddr
folex 82d549b
move `Peer.create` to a separate `createPeer` method so it is testable
folex be5bea8
change code randomly
folex 40c4a37
transportKey
folex de52f58
@fluencelabs/aquamarine-interpreter": "0.8.0"
folex cc9ec78
revert to 0.7.9
folex c1d0d00
skip ws schema test for now
folex d7d2a30
Fix PR comments
folex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import {FluenceConnection} from "../../internal/FluenceConnection"; | ||
| import Peer from "libp2p"; | ||
| import Multiaddr = require("multiaddr"); | ||
| import {generatePeerId} from "../../internal/peerIdUtils"; | ||
|
|
||
| describe('Ws Transport', () => { | ||
| // TODO: fix this test | ||
| test.skip('Should work with ws schema', async () => { | ||
| // arrange | ||
| let multiaddr = new Multiaddr("/ip4/127.0.0.1/tcp/1234/ws/p2p/12D3KooWMJ78GJrtCxVUpjLEedbPtnLDxkFQJ2wuefEdrxq6zwSs"); | ||
| let peerId = await generatePeerId(); | ||
| const connection = new FluenceConnection( | ||
| multiaddr, | ||
| peerId, | ||
| peerId, | ||
| _ => {}, | ||
| ); | ||
| await (connection as any).createPeer(); | ||
| let node = (connection as any).node as Peer; | ||
|
|
||
| // act | ||
| let transport = node.transportManager.transportForMultiaddr(multiaddr); | ||
|
|
||
| // assert | ||
| expect(transport).not.toBeDefined(); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
that's strange. jsom should be the default option
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've added it just in case. Explicit here is better than implicit I think. I also think that we should run tests for both
env nodeandenv jsdom