|
2 | 2 |
|
3 | 3 | const { READ } = require("@eslint-community/eslint-utils")
|
4 | 4 |
|
| 5 | +// /** |
| 6 | +// * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 7 | +// */ |
| 8 | +// const MockFunctionContext = { |
| 9 | +// [CONSTRUCT]: { supported: ["19.1.0", "18.13.0"] }, |
| 10 | +// calls: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 11 | +// callCount: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 12 | +// mockImplementation: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 13 | +// mockImplementationOnce: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 14 | +// resetCalls: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 15 | +// restore: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 16 | +// } |
| 17 | + |
| 18 | +// /** |
| 19 | +// * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 20 | +// */ |
| 21 | +// const MockTimers = { |
| 22 | +// [CONSTRUCT]: { |
| 23 | +// experimental: ["20.4.0", "18.19.0"], |
| 24 | +// supported: ["23.1.0"], |
| 25 | +// }, |
| 26 | +// ...MockTimers_common, |
| 27 | +// } |
| 28 | + |
5 | 29 | /**
|
6 | 30 | * @satisfies {import('../types.js').SupportVersionTraceMap}
|
7 | 31 | */
|
8 |
| -const test = { |
9 |
| - run: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, |
| 32 | +const MockTimers_common = { |
| 33 | + enable: { |
| 34 | + [READ]: { experimental: ["20.4.0", "18.19.0"], supported: ["23.1.0"] }, |
| 35 | + }, |
| 36 | + reset: { |
| 37 | + [READ]: { experimental: ["20.4.0", "18.19.0"], supported: ["23.1.0"] }, |
| 38 | + }, |
| 39 | + [Symbol.dispose]: { |
| 40 | + [READ]: { experimental: ["20.4.0", "18.19.0"], supported: ["23.1.0"] }, |
| 41 | + }, |
| 42 | + tick: { |
| 43 | + [READ]: { experimental: ["20.4.0", "18.19.0"], supported: ["23.1.0"] }, |
| 44 | + }, |
| 45 | +} |
| 46 | + |
| 47 | +// /** |
| 48 | +// * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 49 | +// */ |
| 50 | +// const MockModuleContext = { |
| 51 | +// [CONSTRUCT]: { experimental: ["22.3.0", "20.18.0"] }, |
| 52 | +// restore: { [READ]: { experimental: ["22.3.0", "20.18.0"] } }, |
| 53 | +// } |
| 54 | + |
| 55 | +// /** |
| 56 | +// * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 57 | +// */ |
| 58 | +// const MockTracker = { |
| 59 | +// [CONSTRUCT]: { supported: ["19.1.0", "18.13.0"] }, |
| 60 | +// ...MockTracker_common, |
| 61 | +// } |
| 62 | + |
| 63 | +/** |
| 64 | + * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 65 | + */ |
| 66 | +const MockTracker_common = { |
| 67 | + fn: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 68 | + getter: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 69 | + method: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 70 | + module: { [READ]: { experimental: ["22.3.0", "20.18.0"] } }, |
| 71 | + reset: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 72 | + restoreAll: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 73 | + setter: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
| 74 | +} |
| 75 | + |
| 76 | +/** |
| 77 | + * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 78 | + */ |
| 79 | +const test_common = { |
| 80 | + only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
10 | 81 | skip: { [READ]: { supported: ["20.2.0", "18.17.0"] } },
|
11 | 82 | todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } },
|
12 |
| - only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
13 |
| - describe: { |
14 |
| - [READ]: { supported: ["18.7.0", "16.17.0"] }, |
15 |
| - skip: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
16 |
| - todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
17 |
| - only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
18 |
| - }, |
| 83 | +} |
| 84 | + |
| 85 | +/** |
| 86 | + * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 87 | + */ |
| 88 | +const suite = { |
| 89 | + [READ]: { supported: ["22.0.0", "20.13.0"] }, |
| 90 | + only: { [READ]: { supported: ["22.0.0", "20.13.0"] } }, |
| 91 | + skip: { [READ]: { supported: ["22.0.0", "20.13.0"] } }, |
| 92 | + todo: { [READ]: { supported: ["22.0.0", "20.13.0"] } }, |
| 93 | +} |
| 94 | + |
| 95 | +// /** |
| 96 | +// * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 97 | +// */ |
| 98 | +// const SuiteContext = { |
| 99 | +// [CONSTRUCT]: { supported: ["18.7.0", "16.17.0"] }, |
| 100 | +// filePath: { [READ]: { supported: ["22.6.0"] } }, |
| 101 | +// name: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 102 | +// signal: { [READ]: { supported: ["18.7.0", "16.17.0"] } }, |
| 103 | +// } |
| 104 | + |
| 105 | +// /** |
| 106 | +// * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 107 | +// */ |
| 108 | +// const TestContext = { |
| 109 | +// [CONSTRUCT]: { supported: ["18.0.0", "16.17.0"] }, |
| 110 | +// after: { [READ]: { supported: ["19.3.0", "18.13.0"] } }, |
| 111 | +// afterEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 112 | +// assert: { |
| 113 | +// [READ]: { supported: ["22.2.0", "20.15.0"] }, |
| 114 | +// snapshot: { [READ]: { experimental: ["22.3.0"] } }, |
| 115 | +// |
| 116 | +// // extends all top-level functions from `node:assert` |
| 117 | +// assert: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.5.9"] } |
| 118 | +// deepEqual: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 119 | +// deepStrictEqual: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["1.2.0"] } |
| 120 | +// doesNotMatch: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: {supported: ["16.0.0"], }, |
| 121 | +// doesNotReject: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["10.0.0"] } |
| 122 | +// doesNotThrow: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 123 | +// equal: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 124 | +// fail: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 125 | +// ifError: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.97"] } |
| 126 | +// match: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["16.0.0"], }, |
| 127 | +// notDeepEqual: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 128 | +// notDeepStrictEqual: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["1.2.0"] } |
| 129 | +// notEqual: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 130 | +// notStrictEqual: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 131 | +// ok: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 132 | +// rejects: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["10.0.0"] } |
| 133 | +// strictEqual: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 134 | +// throws: { [READ]: { supported: ["22.2.0", "20.15.0"] } }, // original: { supported: ["0.1.21"] } |
| 135 | +// }, |
| 136 | +// before: { [READ]: { supported: ["20.1.0", "18.17.0"] } }, |
| 137 | +// beforeEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 138 | +// diagnostic: { [READ]: { supported: ["18.0.0", "16.17.0"] } }, |
| 139 | +// filePath: { [READ]: { supported: ["22.6.0", "20.16.0"] } }, |
| 140 | +// fullName: { [READ]: { supported: ["22.3.0"] } }, |
| 141 | +// name: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 142 | +// plan: { [READ]: { experimental: ["22.2.0", "20.15.0"] } }, |
| 143 | +// runOnly: { [READ]: { supported: ["18.0.0", "16.17.0"] } }, |
| 144 | +// signal: { [READ]: { supported: ["18.7.0", "16.17.0"] } }, |
| 145 | +// skip: { [READ]: { supported: ["18.0.0", "16.17.0"] } }, |
| 146 | +// todo: { [READ]: { supported: ["18.0.0", "16.17.0"] } }, |
| 147 | +// test: { [READ]: { supported: ["18.0.0", "16.17.0"] } }, |
| 148 | +// } |
| 149 | + |
| 150 | +// /** |
| 151 | +// * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 152 | +// */ |
| 153 | +// const TestsStream = { |
| 154 | +// [READ]: { supported: ["18.9.0", "16.19.0"] }, |
| 155 | +// |
| 156 | +// // // extends `node:stream`'s `Readable` class |
| 157 | +// // compose: { |
| 158 | +// // [READ]: { |
| 159 | +// // experimental: ["19.1.0", "18.13.0" /* , "18.9.0", "16.19.0"*/], |
| 160 | +// // }, |
| 161 | +// // }, // original: { experimental: ["19.1.0", "18.13.0"] } |
| 162 | +// // closed: { [READ]: { supported: ["18.9.0" /* , "16.19.0"*/] } }, // original: { supported: ["18.0.0"] } |
| 163 | +// // destroy: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["8.0.0"] } |
| 164 | +// // destroyed: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["8.0.0"] } |
| 165 | +// // errored: { [READ]: { supported: ["18.9.0" /*, "16.19.0"*/] } }, // original: { supported: ["18.0.0"] } |
| 166 | +// // isPaused: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.11.14"] } |
| 167 | +// // pause: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 168 | +// // pipe: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 169 | +// // read: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 170 | +// // readable: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["11.4.0"] } |
| 171 | +// // readableAborted: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["16.8.0"] } |
| 172 | +// // readableDidRead: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["16.7.0", "14.18.0"] } |
| 173 | +// // readableEncoding: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["12.7.0"] } |
| 174 | +// // readableEnded: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["12.9.0"] } |
| 175 | +// // readableFlowing: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["9.4.0"] } |
| 176 | +// // readableHighWaterMark: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["9.3.0"] } |
| 177 | +// // readableLength: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["9.4.0"] } |
| 178 | +// // readableObjectMode: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["12.3.0"] } |
| 179 | +// // resume: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 180 | +// // setEncoding: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 181 | +// // unpipe: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 182 | +// // unshift: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.11"] } |
| 183 | +// // wrap: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 184 | +// // [Symbol.asyncIterator]: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["10.0.0"], supported: ["11.14.0"] } |
| 185 | +// // [Symbol.asyncDispose]: { |
| 186 | +// // [READ]: { |
| 187 | +// // experimental: ["20.4.0", "18.18.0" /*, "18.9.0", "16.19.0"*/], |
| 188 | +// // }, |
| 189 | +// // }, // original: { experimental: ["20.4.0", "18.18.0"] } |
| 190 | +// // asIndexedPairs: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 191 | +// // drop: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 192 | +// // every: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 193 | +// // filter: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.4.0", "16.14.0"] } |
| 194 | +// // find: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 195 | +// // flatMap: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 196 | +// // forEach: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 197 | +// // iterator: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["16.3.0"] } |
| 198 | +// // map: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.4.0", "16.14.0"] } |
| 199 | +// // reduce: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 200 | +// // some: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 201 | +// // toArray: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 202 | +// // take: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["17.5.0", "16.15.0"] } |
| 203 | +// // |
| 204 | +// // from: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["12.3.0", "10.17.0"] } |
| 205 | +// // fromWeb: { [READ]: { experimental: ["18.9.0" /*, "16.19.0"*/] } }, // original: { experimental: ["17.0.0"] } |
| 206 | +// // isDistributed: { [READ]: { experimental: ["18.9.0", "16.19.0"] } }, // original: { experimental: ["16.8.0"] } |
| 207 | +// // toWeb: { [READ]: { experimental: ["18.9.0" /*, "16.19.0"*/] } }, // original: { experimental: ["17.0.0"] } |
| 208 | +// // |
| 209 | +// // [CONSTRUCT]: { supported: ["18.9.0", "16.19.0"] }, // original: { supported: ["11.2.0", "10.16.0"] } |
| 210 | +// // _construct: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["15.0.0"] } |
| 211 | +// // _destroy: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["8.0.0"] } |
| 212 | +// // _read: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["0.9.4"] } |
| 213 | +// // push: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, // original: { supported: ["8.0.0"] } |
| 214 | +// } |
| 215 | + |
| 216 | +/** |
| 217 | + * @satisfies {import('../types.js').SupportVersionTraceMap} |
| 218 | + */ |
| 219 | +const test = { |
| 220 | + after: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 221 | + afterEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 222 | + before: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 223 | + beforeEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 224 | + describe: suite, |
19 | 225 | it: {
|
20 | 226 | [READ]: { supported: ["18.6.0", "16.17.0"] },
|
21 |
| - skip: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
22 |
| - todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
23 |
| - only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
| 227 | + ...test_common, |
24 | 228 | },
|
25 |
| - suite: { |
26 |
| - [READ]: { supported: ["22.0.0", "20.13.0"] }, |
27 |
| - skip: { [READ]: { supported: ["22.0.0", "20.13.0"] } }, |
28 |
| - todo: { [READ]: { supported: ["22.0.0", "20.13.0"] } }, |
29 |
| - only: { [READ]: { supported: ["22.0.0", "20.13.0"] } }, |
| 229 | + mock: { |
| 230 | + [READ]: { supported: ["19.1.0", "18.13.0"] }, |
| 231 | + ...MockTracker_common, |
| 232 | + timers: { |
| 233 | + [READ]: { |
| 234 | + experimental: ["20.4.0", "18.19.0"], |
| 235 | + supported: ["23.1.0"], |
| 236 | + }, |
| 237 | + ...MockTimers_common, |
| 238 | + }, |
30 | 239 | },
|
31 |
| - before: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
32 |
| - after: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
33 |
| - beforeEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
34 |
| - afterEach: { [READ]: { supported: ["18.8.0", "16.18.0"] } }, |
| 240 | + only: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
| 241 | + run: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, |
35 | 242 | snapshot: {
|
36 | 243 | [READ]: { experimental: ["22.3.0"] },
|
37 | 244 | setDefaultSnapshotSerializers: { [READ]: { experimental: ["22.3.0"] } },
|
38 | 245 | setResolveSnapshotPath: { [READ]: { experimental: ["22.3.0"] } },
|
39 | 246 | },
|
40 |
| - MockFunctionContext: { [READ]: { supported: ["19.1.0", "18.13.0"] } }, |
41 |
| - MockModuleContext: { [READ]: { experimental: ["22.3.0", "20.18.0"] } }, |
42 |
| - MockTracker: { |
43 |
| - [READ]: { supported: ["19.1.0", "18.13.0"] }, |
44 |
| - module: { [READ]: { experimental: ["20.18.0"] } }, |
| 247 | + skip: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
| 248 | + suite, |
| 249 | + test: { |
| 250 | + [READ]: { supported: ["18.0.0", "16.17.0"] }, |
| 251 | + ...test_common, |
45 | 252 | },
|
46 |
| - MockTimers: { [READ]: { experimental: ["20.4.0"], supported: ["23.1.0"] } }, |
47 |
| - TestsStream: { [READ]: { supported: ["18.9.0", "16.19.0"] } }, |
48 |
| - TestContext: { [READ]: { supported: ["18.0.0", "16.17.0"] } }, |
49 |
| - SuiteContext: { [READ]: { supported: ["18.7.0", "16.17.0"] } }, |
50 |
| - test: {}, |
| 253 | + todo: { [READ]: { supported: ["20.2.0", "18.17.0"] } }, |
51 | 254 | }
|
52 | 255 |
|
53 |
| -test.test = test |
54 |
| - |
55 | 256 | /**
|
56 | 257 | * @satisfies {import('../types.js').SupportVersionTraceMap}
|
57 | 258 | */
|
|
0 commit comments