Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2943043
process.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
process.js
View Options
import
{
test
,
summary
}
from
'./helpers.js'
;
console
.
log
(
'Process Tests\n'
);
test
(
'process exists'
,
typeof
process
,
'object'
);
test
(
'process toStringTag'
,
Object
.
prototype
.
toString
.
call
(
process
),
'[object process]'
);
test
(
'pid is number'
,
typeof
process
.
pid
,
'number'
);
test
(
'pid is positive'
,
process
.
pid
>
0
,
true
);
test
(
'platform is string'
,
typeof
process
.
platform
,
'string'
);
test
(
'platform valid'
,
[
'darwin'
,
'linux'
,
'win32'
,
'freebsd'
].
includes
(
process
.
platform
),
true
);
test
(
'arch is string'
,
typeof
process
.
arch
,
'string'
);
test
(
'arch valid'
,
[
'x64'
,
'ia32'
,
'arm64'
,
'arm'
].
includes
(
process
.
arch
),
true
);
test
(
'argv is array'
,
Array
.
isArray
(
process
.
argv
),
true
);
test
(
'argv has entries'
,
process
.
argv
.
length
>=
1
,
true
);
test
(
'cwd is function'
,
typeof
process
.
cwd
,
'function'
);
const
cwd
=
process
.
cwd
();
test
(
'cwd returns string'
,
typeof
cwd
,
'string'
);
test
(
'cwd not empty'
,
cwd
.
length
>
0
,
true
);
test
(
'env is object'
,
typeof
process
.
env
,
'object'
);
test
(
'env has PATH or Path'
,
process
.
env
.
PATH
!==
undefined
||
process
.
env
.
Path
!==
undefined
,
true
);
test
(
'exit is function'
,
typeof
process
.
exit
,
'function'
);
summary
();
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Mar 28, 6:36 AM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
513195
Default Alt Text
process.js (1 KB)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment