FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/test/common.js at master · objcode/node · GitHub
objcode
/
node
Public
forked from
nodejs/node-v0.x-archive
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
test
/
common.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (21 loc) · 791 Bytes
Breadcrumbs
node
/
test
/
common.js
Copy path
File metadata and controls
26 lines (21 loc) · 791 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var
path
=
require
(
"path"
)
;
exports
.
testDir
=
path
.
dirname
(
__filename
)
;
exports
.
fixturesDir
=
path
.
join
(
exports
.
testDir
,
"fixtures"
)
;
exports
.
libDir
=
path
.
join
(
exports
.
testDir
,
"../lib"
)
;
exports
.
tmpDir
=
path
.
join
(
exports
.
testDir
,
"tmp"
)
;
exports
.
PORT
=
12346
;
exports
.
assert
=
require
(
'assert'
)
;
var
sys
=
require
(
"sys"
)
;
for
(
var
i
in
sys
)
exports
[
i
]
=
sys
[
i
]
;
//for (var i in exports) global[i] = exports[i];
function
protoCtrChain
(
o
)
{
var
result
=
[
]
;
for
(
;
o
;
o
=
o
.
__proto__
)
{
result
.
push
(
o
.
constructor
)
;
}
return
result
.
join
(
)
;
}
exports
.
indirectInstanceOf
=
function
(
obj
,
cls
)
{
if
(
obj
instanceof
cls
)
{
return
true
;
}
var
clsChain
=
protoCtrChain
(
cls
.
prototype
)
;
var
objChain
=
protoCtrChain
(
obj
)
;
return
objChain
.
slice
(
-
clsChain
.
length
)
===
clsChain
;
}
;
Back
|
FazBrowse Home
|
New Git URL