Skip to content

Commit 4295c61

Browse files
authored
fix: test plaintext properly (#89)
The noise test was being run twice..
1 parent 1092fed commit 4295c61

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

examples/js-libp2p-example-connection-encryption/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"dependencies": {
1919
"@chainsafe/libp2p-noise": "^14.0.0",
2020
"@chainsafe/libp2p-yamux": "^6.0.1",
21+
"@libp2p/plaintext": "^1.0.4",
2122
"@libp2p/tcp": "^9.0.4",
2223
"it-pipe": "^3.0.1",
2324
"libp2p": "^1.0.5",

examples/js-libp2p-example-connection-encryption/plaintext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* eslint-disable no-console */
22

33
import { yamux } from '@chainsafe/libp2p-yamux'
4+
import { plaintext } from '@libp2p/plaintext'
45
import { tcp } from '@libp2p/tcp'
56
import { pipe } from 'it-pipe'
67
import { createLibp2p } from 'libp2p'
7-
import { plaintext } from 'libp2p/insecure'
88
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
99
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
1010

examples/js-libp2p-example-connection-encryption/test/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ await waitForOutput('This information is sent out encrypted to the other peer',
1212

1313
process.stdout.write('plaintext.js\n')
1414

15-
await waitForOutput('This information is sent out encrypted to the other peer', 'node', [path.join(__dirname, '../noise.js')], {
15+
await waitForOutput('This information is sent out encrypted to the other peer', 'node', [path.join(__dirname, '../plaintext.js')], {
1616
cwd: __dirname
1717
})

0 commit comments

Comments
 (0)