FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/test/parallel/test-bootstrap-modules.js at main · fetchapi/node · GitHub
fetchapi
/
node
Public
forked from
nodejs/node
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
test
/
parallel
/
test-bootstrap-modules.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
162 lines (153 loc) · 5.7 KB
Breadcrumbs
node
/
test
/
parallel
/
test-bootstrap-modules.js
Copy path
File metadata and controls
162 lines (153 loc) · 5.7 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// Flags: --expose-internals
'use strict'
;
// This list must be computed before we require any modules to
// to eliminate the noise.
const
actualModules
=
new
Set
(
process
.
moduleLoadList
.
slice
(
)
)
;
const
common
=
require
(
'../common'
)
;
const
assert
=
require
(
'assert'
)
;
const
expectedModules
=
new
Set
(
[
'Internal Binding builtins'
,
'Internal Binding encoding_binding'
,
'Internal Binding modules'
,
'Internal Binding errors'
,
'Internal Binding util'
,
'NativeModule internal/errors'
,
'Internal Binding config'
,
'Internal Binding timers'
,
'Internal Binding async_wrap'
,
'Internal Binding task_queue'
,
'Internal Binding symbols'
,
'NativeModule internal/async_hooks'
,
'Internal Binding constants'
,
'Internal Binding types'
,
'NativeModule internal/util'
,
'NativeModule internal/util/types'
,
'NativeModule internal/validators'
,
'NativeModule internal/linkedlist'
,
'NativeModule internal/priority_queue'
,
'NativeModule internal/assert'
,
'NativeModule internal/util/inspect'
,
'NativeModule internal/util/debuglog'
,
'NativeModule internal/timers'
,
'NativeModule events'
,
'Internal Binding buffer'
,
'Internal Binding string_decoder'
,
'NativeModule internal/buffer'
,
'NativeModule buffer'
,
'Internal Binding messaging'
,
'NativeModule internal/worker/js_transferable'
,
'Internal Binding process_methods'
,
'NativeModule internal/process/per_thread'
,
'Internal Binding credentials'
,
'NativeModule internal/process/promises'
,
'NativeModule internal/fixed_queue'
,
'NativeModule async_hooks'
,
'NativeModule internal/process/task_queues'
,
'NativeModule timers'
,
'Internal Binding trace_events'
,
'NativeModule internal/constants'
,
'NativeModule path'
,
'NativeModule internal/process/execution'
,
'NativeModule internal/process/permission'
,
'NativeModule internal/process/warning'
,
'NativeModule internal/console/constructor'
,
'NativeModule internal/console/global'
,
'NativeModule internal/querystring'
,
'NativeModule querystring'
,
'Internal Binding url'
,
'Internal Binding blob'
,
'NativeModule internal/url'
,
'NativeModule util'
,
'NativeModule internal/webidl'
,
'Internal Binding performance'
,
'Internal Binding permission'
,
'NativeModule internal/perf/utils'
,
'NativeModule internal/event_target'
,
'Internal Binding mksnapshot'
,
'NativeModule internal/v8/startup_snapshot'
,
'NativeModule internal/process/signal'
,
'Internal Binding fs'
,
'NativeModule internal/encoding'
,
'NativeModule internal/webstreams/util'
,
'NativeModule internal/webstreams/queuingstrategies'
,
'NativeModule internal/blob'
,
'NativeModule internal/fs/utils'
,
'NativeModule fs'
,
'Internal Binding options'
,
'NativeModule internal/options'
,
'NativeModule internal/source_map/source_map_cache'
,
'Internal Binding contextify'
,
'NativeModule internal/vm'
,
'NativeModule internal/modules/helpers'
,
'NativeModule internal/modules/package_json_reader'
,
'Internal Binding module_wrap'
,
'NativeModule internal/modules/cjs/loader'
,
'NativeModule internal/vm/module'
,
'NativeModule internal/modules/esm/utils'
,
'Internal Binding wasm_web_api'
,
'Internal Binding worker'
,
'NativeModule internal/modules/run_main'
,
'NativeModule internal/net'
,
'NativeModule internal/dns/utils'
,
'NativeModule internal/process/pre_execution'
,
]
)
;
if
(
common
.
isMainThread
)
{
[
'NativeModule internal/idna'
,
'NativeModule url'
,
]
.
forEach
(
expectedModules
.
add
.
bind
(
expectedModules
)
)
;
}
else
{
[
'NativeModule diagnostics_channel'
,
'NativeModule internal/abort_controller'
,
'NativeModule internal/error_serdes'
,
'NativeModule internal/perf/event_loop_utilization'
,
'NativeModule internal/process/worker_thread_only'
,
'NativeModule internal/streams/add-abort-signal'
,
'NativeModule internal/streams/compose'
,
'NativeModule internal/streams/destroy'
,
'NativeModule internal/streams/duplex'
,
'NativeModule internal/streams/end-of-stream'
,
'NativeModule internal/streams/from'
,
'NativeModule internal/streams/legacy'
,
'NativeModule internal/streams/operators'
,
'NativeModule internal/streams/passthrough'
,
'NativeModule internal/streams/pipeline'
,
'NativeModule internal/streams/readable'
,
'NativeModule internal/streams/state'
,
'NativeModule internal/streams/transform'
,
'NativeModule internal/streams/utils'
,
'NativeModule internal/streams/writable'
,
'NativeModule internal/worker'
,
'NativeModule internal/worker/io'
,
'NativeModule stream'
,
'NativeModule stream/promises'
,
'NativeModule string_decoder'
,
'NativeModule worker_threads'
,
]
.
forEach
(
expectedModules
.
add
.
bind
(
expectedModules
)
)
;
}
if
(
common
.
isWindows
)
{
// On Windows fs needs SideEffectFreeRegExpPrototypeExec which uses vm.
expectedModules
.
add
(
'NativeModule vm'
)
;
}
if
(
common
.
hasIntl
)
{
expectedModules
.
add
(
'Internal Binding icu'
)
;
}
if
(
process
.
features
.
inspector
)
{
expectedModules
.
add
(
'Internal Binding inspector'
)
;
expectedModules
.
add
(
'NativeModule internal/inspector_async_hook'
)
;
expectedModules
.
add
(
'NativeModule internal/util/inspector'
)
;
}
const
difference
=
(
setA
,
setB
)
=>
{
return
new
Set
(
[
...
setA
]
.
filter
(
(
x
)
=>
!
setB
.
has
(
x
)
)
)
;
}
;
const
missingModules
=
difference
(
expectedModules
,
actualModules
)
;
const
extraModules
=
difference
(
actualModules
,
expectedModules
)
;
const
printSet
=
(
s
)
=>
{
return
`
${
[
...
s
]
.
sort
(
)
.
join
(
',\n '
)
}
\n`
;
}
;
assert
.
deepStrictEqual
(
actualModules
,
expectedModules
,
(
missingModules
.
size
>
0
?
'These modules were not loaded:\n '
+
printSet
(
missingModules
)
:
''
)
+
(
extraModules
.
size
>
0
?
'These modules were unexpectedly loaded:\n '
+
printSet
(
extraModules
)
:
''
)
)
;
Back
|
FazBrowse Home
|
New Git URL