@libp2p/interface-compliance-tests 5.1.3 → 5.2.0-c9ed1c7d6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/matchers.d.ts +6 -0
- package/dist/src/matchers.d.ts.map +1 -0
- package/dist/src/matchers.js +8 -0
- package/dist/src/matchers.js.map +1 -0
- package/package.json +13 -9
- package/src/matchers.ts +11 -0
- package/dist/typedoc-urls.json +0 -38
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Sinon from 'sinon';
|
|
2
|
+
import type { PeerId } from '@libp2p/interface';
|
|
3
|
+
import type { Multiaddr } from '@multiformats/multiaddr';
|
|
4
|
+
export declare function matchPeerId(peerId: PeerId): Sinon.SinonMatcher;
|
|
5
|
+
export declare function matchMultiaddr(ma: Multiaddr): Sinon.SinonMatcher;
|
|
6
|
+
//# sourceMappingURL=matchers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,wBAAgB,WAAW,CAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAE/D;AAED,wBAAgB,cAAc,CAAE,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,YAAY,CAEjE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Sinon from 'sinon';
|
|
2
|
+
export function matchPeerId(peerId) {
|
|
3
|
+
return Sinon.match(p => p.toString() === peerId.toString());
|
|
4
|
+
}
|
|
5
|
+
export function matchMultiaddr(ma) {
|
|
6
|
+
return Sinon.match(m => m.toString() === ma.toString());
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=matchers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../src/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,UAAU,WAAW,CAAE,MAAc;IACzC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,cAAc,CAAE,EAAa;IAC3C,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/interface-compliance-tests",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0-c9ed1c7d6",
|
|
4
4
|
"description": "Compliance tests for JS libp2p interfaces",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface-compliance-tests#readme",
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
"types": "./dist/src/is-valid-tick.d.ts",
|
|
61
61
|
"import": "./dist/src/is-valid-tick.js"
|
|
62
62
|
},
|
|
63
|
+
"./matchers": {
|
|
64
|
+
"types": "./dist/src/matchers.d.ts",
|
|
65
|
+
"import": "./dist/src/matchers.js"
|
|
66
|
+
},
|
|
63
67
|
"./mocks": {
|
|
64
68
|
"types": "./dist/src/mocks/index.d.ts",
|
|
65
69
|
"import": "./dist/src/mocks/index.js"
|
|
@@ -107,14 +111,14 @@
|
|
|
107
111
|
"test:electron-main": "aegir test -t electron-main"
|
|
108
112
|
},
|
|
109
113
|
"dependencies": {
|
|
110
|
-
"@libp2p/interface": "
|
|
111
|
-
"@libp2p/interface-internal": "
|
|
112
|
-
"@libp2p/logger": "
|
|
113
|
-
"@libp2p/multistream-select": "
|
|
114
|
-
"@libp2p/peer-collections": "
|
|
115
|
-
"@libp2p/peer-id": "
|
|
116
|
-
"@libp2p/peer-id-factory": "
|
|
117
|
-
"@libp2p/utils": "
|
|
114
|
+
"@libp2p/interface": "1.1.2-c9ed1c7d6",
|
|
115
|
+
"@libp2p/interface-internal": "1.0.7-c9ed1c7d6",
|
|
116
|
+
"@libp2p/logger": "4.0.5-c9ed1c7d6",
|
|
117
|
+
"@libp2p/multistream-select": "5.1.2-c9ed1c7d6",
|
|
118
|
+
"@libp2p/peer-collections": "5.1.5-c9ed1c7d6",
|
|
119
|
+
"@libp2p/peer-id": "4.0.5-c9ed1c7d6",
|
|
120
|
+
"@libp2p/peer-id-factory": "4.0.5-c9ed1c7d6",
|
|
121
|
+
"@libp2p/utils": "5.2.3-c9ed1c7d6",
|
|
118
122
|
"@multiformats/multiaddr": "^12.1.10",
|
|
119
123
|
"abortable-iterator": "^5.0.1",
|
|
120
124
|
"aegir": "^42.0.0",
|
package/src/matchers.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Sinon from 'sinon'
|
|
2
|
+
import type { PeerId } from '@libp2p/interface'
|
|
3
|
+
import type { Multiaddr } from '@multiformats/multiaddr'
|
|
4
|
+
|
|
5
|
+
export function matchPeerId (peerId: PeerId): Sinon.SinonMatcher {
|
|
6
|
+
return Sinon.match(p => p.toString() === peerId.toString())
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function matchMultiaddr (ma: Multiaddr): Sinon.SinonMatcher {
|
|
10
|
+
return Sinon.match(m => m.toString() === ma.toString())
|
|
11
|
+
}
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.connection.default.html",
|
|
3
|
-
"./connection:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.connection.default.html",
|
|
4
|
-
"./connection-encryption:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.connection_encryption.default.html",
|
|
5
|
-
"TestSetup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html",
|
|
6
|
-
".:TestSetup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html",
|
|
7
|
-
"isValidTick": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html",
|
|
8
|
-
"./is-valid-tick:isValidTick": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html",
|
|
9
|
-
"MockNetworkComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.mocks.MockNetworkComponents.html",
|
|
10
|
-
"MockUpgraderInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.mocks.MockUpgraderInit.html",
|
|
11
|
-
"mockNetwork": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface_compliance_tests.mocks.mockNetwork.html",
|
|
12
|
-
"connectionPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.connectionPair.html",
|
|
13
|
-
"mockConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockConnection.html",
|
|
14
|
-
"mockConnectionGater": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionGater.html",
|
|
15
|
-
"mockConnectionManager": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionManager.html",
|
|
16
|
-
"mockDuplex": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockDuplex.html",
|
|
17
|
-
"mockMetrics": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMetrics.html",
|
|
18
|
-
"mockMultiaddrConnPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnPair.html",
|
|
19
|
-
"mockMultiaddrConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnection.html",
|
|
20
|
-
"mockMuxer": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMuxer.html",
|
|
21
|
-
"mockRegistrar": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockRegistrar.html",
|
|
22
|
-
"mockStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockStream.html",
|
|
23
|
-
"mockUpgrader": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockUpgrader.html",
|
|
24
|
-
"streamPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.streamPair.html",
|
|
25
|
-
"./peer-discovery:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.peer_discovery.default.html",
|
|
26
|
-
"./peers:default": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface_compliance_tests.peers.default.html",
|
|
27
|
-
"PubSubArgs": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html",
|
|
28
|
-
"./pubsub:PubSubArgs": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html",
|
|
29
|
-
"PubSubComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html",
|
|
30
|
-
"./pubsub:PubSubComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html",
|
|
31
|
-
"./pubsub:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.pubsub.default.html",
|
|
32
|
-
"./stream-muxer:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.stream_muxer.default.html",
|
|
33
|
-
"Connector": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html",
|
|
34
|
-
"./transport:Connector": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html",
|
|
35
|
-
"TransportTestFixtures": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html",
|
|
36
|
-
"./transport:TransportTestFixtures": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html",
|
|
37
|
-
"./transport:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.transport.default.html"
|
|
38
|
-
}
|