Skip to content

Commit ceaf107

Browse files
committed
Better tests
1 parent 7309eaa commit ceaf107

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/util/path.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ dop.util.pathRecursive = function(
4545
(tof_value == 'object' || tof_value == 'array') &&
4646
skip !== true &&
4747
value !== source &&
48-
circular.indexOf(value) == -1 &&
49-
// ((has_destiny && destiny[prop] !== undefined) ||
50-
source[prop] !== undefined
48+
circular.indexOf(value) == -1
49+
// (has_destiny && destiny[prop] !== undefined) ||
5150
) {
5251
circular.push(value)
5352
dop.util.pathRecursive(

test/ES6/call.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const test = require('tape')
2-
const { connect } = require('../ES6/.connect.js')
2+
const { connect } = require('../protocol/.connect.js')
33

44
const localFunctions = {
55
okSync: function(req) {

test/ES6/subscribe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const test = require('tape')
22
const dop = require('../.proxy')
3-
const { connect } = require('../ES6/.connect.js')
3+
const { connect } = require('../protocol/.connect.js')
44

55
test('basic', async t => {
66
const { dopServer, nodeClient, close } = await connect(t)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const transportListen = require('dop-transports').listen[transportName]
44
const transportConnect = require('dop-transports').connect[transportName]
55

66
function connect(t, end = true) {
7-
return new Promise((response, reject) => {
7+
return new Promise(function(response, reject) {
88
const dopServer = dop.create()
99
const dopClient = dop.create()
1010
dopServer.env = 'SERVER'
@@ -13,8 +13,8 @@ function connect(t, end = true) {
1313
const transportClient = dopClient.connect({
1414
transport: transportConnect
1515
})
16-
transportClient.on('connect', async nodeClient => {
17-
const close = () => {
16+
transportClient.on('connect', function(nodeClient) {
17+
const close = function() {
1818
nodeClient.disconnect()
1919
transportServer.socket.close()
2020
if (end) t.end()

0 commit comments

Comments
 (0)