Commit fc2db50
test,repl: add coverage for repl .clear+useGlobal
Add a test to cover situation where REPL is initialized with `useGlobal`
set to `true` and `.clear` is called. This adds coverage for code in
repl.js that is not currently covered.
Includes minor refactor of rocket functions in repl.js for concision.
PR-URL: #10777
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 9f6d1f6 commit fc2db50Copy full SHA for fc2db50
File tree
Expand file treeCollapse file tree
2 files changed
+30
-8
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+30
-8
lines changedOpen diff view settings
Collapse file
+5-6Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
721 | 721 | |
722 | 722 | |
723 | 723 | |
724 | | - |
725 | | - |
726 | | - |
| 724 | + |
727 | 725 | |
728 | 726 | |
729 | 727 | |
| ||
1265 | 1263 | |
1266 | 1264 | |
1267 | 1265 | |
1268 | | - |
1269 | | - |
1270 | | - |
| 1266 | + |
| 1267 | + |
| 1268 | + |
| 1269 | + |
1271 | 1270 | |
1272 | 1271 | |
1273 | 1272 | |
|
Collapse file
test/parallel/test-repl-underscore.js
Copy file name to clipboardExpand all lines: test/parallel/test-repl-underscore.js+25-2Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
8 | 8 | |
9 | 9 | |
10 | 10 | |
| 11 | + |
11 | 12 | |
12 | 13 | |
13 | 14 | |
| ||
131 | 132 | |
132 | 133 | |
133 | 134 | |
134 | | - |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
135 | 157 | |
136 | 158 | |
137 | 159 | |
| ||
146 | 168 | |
147 | 169 | |
148 | 170 | |
149 | | - |
| 171 | + |
| 172 | + |
150 | 173 | |
151 | 174 | |
152 | 175 | |
|
0 commit comments