| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 89987b3 commit 83e9a3e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -125,9 +125,31 @@ tmpdir.refresh(); | |||
| 125 | 125 | w.close(); | |
| 126 | 126 | }, | |
| 127 | 127 | { | |
| 128 | + name: 'Error', | ||
| 129 | + code: 'ERR_INTERNAL_ASSERTION', | ||
| 128 | 130 | message: /^handle must be a FSEvent/, | |
| 131 | + } | ||
| 132 | + ); | ||
| 133 | + oldhandle.close(); // clean up | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + { | ||
| 137 | + let oldhandle; | ||
| 138 | + assert.throws( | ||
| 139 | + () => { | ||
| 140 | + const w = fs.watch(__filename, common.mustNotCall()); | ||
| 141 | + oldhandle = w._handle; | ||
| 142 | + const protoSymbols = | ||
| 143 | + Object.getOwnPropertySymbols(Object.getPrototypeOf(w)); | ||
| 144 | + const kFSWatchStart = | ||
| 145 | + protoSymbols.find((val) => val.toString() === 'Symbol(kFSWatchStart)'); | ||
| 146 | + w._handle = {}; | ||
| 147 | + w[kFSWatchStart](); | ||
| 148 | + }, | ||
| 149 | + { | ||
| 129 | 150 | name: 'Error', | |
| 130 | 151 | code: 'ERR_INTERNAL_ASSERTION', | |
| 152 | + message: /^handle must be a FSEvent/, | ||
| 131 | 153 | } | |
| 132 | 154 | ); | |
| 133 | 155 | oldhandle.close(); // clean up | |
| Back | FazBrowse Home | New Git URL |
0 commit comments