Skip to content

Commit 7782847

Browse files
committed
test: fix test runners
1 parent f56025b commit 7782847

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"scripts": {
1919
"lint": "aegir lint",
2020
"build": "aegir build",
21-
"test": "aegir test -t node -f test/**/*.js",
22-
"test:node": "aegir test -t node -f test/**/*.js",
21+
"test": "aegir test -t node -f test/*.js test/**/*.js",
22+
"test:node": "aegir test -t node -f test/*.js test/**/*.js",
2323
"release": "aegir release --no-build -t node",
2424
"release-minor": "aegir release --no-build --type minor -t node",
2525
"release-major": "aegir release --no-build --type major -t node"

test/daemon/config.spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const ma = require('multiaddr')
1111
const { createDaemon } = require('../../src/daemon')
1212
const { isWindows } = require('../../src/util')
1313

14-
const PATH = isWindows
15-
? path.join('\\\\?\\pipe', '/tmp/p2pd.sock')
16-
: path.resolve(os.tmpdir(), '/tmp/p2pd.sock')
14+
const daemonAddr = isWindows
15+
? ma('/ip4/0.0.0.0/tcp/8080')
16+
: ma(`/unix${path.resolve(os.tmpdir(), '/tmp/p2pd.sock')}`)
1717

1818
describe('configuration', () => {
1919
let daemon
@@ -32,7 +32,7 @@ describe('configuration', () => {
3232
dht: true,
3333
dhtClient: false,
3434
connMgr: false,
35-
listen: `/unix${PATH}`,
35+
listen: daemonAddr.toString(),
3636
id: '',
3737
bootstrapPeers: ''
3838
})

test/protocol.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('protocol', () => {
6161

6262
it('should be able to encode/decode a StreamHandlerRequest', () => {
6363
const streamHandlerRequest = {
64-
path: path.resolve('/tmp/p2p.sock'),
64+
addr: multiaddr('/unix/tmp/p2p.sock').buffer,
6565
proto: ['/p2pdaemon/1.0.0']
6666
}
6767
const request = {

0 commit comments

Comments
 (0)