|
8 | 8 | * @format
|
9 | 9 | */
|
10 | 10 |
|
11 |
| -import type {FailureDetail, TestSuiteResult} from '../runtime/setup'; |
| 11 | +import type { |
| 12 | + FailureDetail, |
| 13 | + TestCaseResult, |
| 14 | + TestSuiteResult, |
| 15 | +} from '../runtime/setup'; |
12 | 16 | import type {TestSnapshotResults} from '../runtime/snapshotContext';
|
13 | 17 | import type {
|
14 | 18 | AsyncCommandResult,
|
@@ -218,48 +222,66 @@ module.exports = async function runTest(
|
218 | 222 |
|
219 | 223 | const testResultsByConfig = [];
|
220 | 224 |
|
| 225 | + const skippedTestResults = ({ |
| 226 | + ancestorTitles, |
| 227 | + title, |
| 228 | + }: { |
| 229 | + ancestorTitles: string[], |
| 230 | + title: string, |
| 231 | + }) => [ |
| 232 | + { |
| 233 | + ancestorTitles, |
| 234 | + duration: 0, |
| 235 | + failureDetails: [] as Array<Error>, |
| 236 | + failureMessages: [] as Array<string>, |
| 237 | + fullName: title, |
| 238 | + numPassingAsserts: 0, |
| 239 | + snapshotResults: {} as TestSnapshotResults, |
| 240 | + status: 'pending' as TestCaseResult['status'], |
| 241 | + testFilePath: testPath, |
| 242 | + title, |
| 243 | + }, |
| 244 | + ]; |
| 245 | + |
221 | 246 | for (const testConfig of testConfigs) {
|
222 | 247 | if (
|
223 | 248 | EnvironmentOptions.isOSS &&
|
224 | 249 | testConfig.mode === FantomTestConfigMode.Optimized
|
225 | 250 | ) {
|
226 |
| - testResultsByConfig.push([ |
227 |
| - { |
| 251 | + testResultsByConfig.push( |
| 252 | + skippedTestResults({ |
228 | 253 | ancestorTitles: ['"@fantom_mode opt" in docblock'],
|
229 |
| - duration: 0, |
230 |
| - failureDetails: [] as Array<Error>, |
231 |
| - failureMessages: [] as Array<string>, |
232 |
| - fullName: 'Optimized mode is not yet supoprted in OSS', |
233 |
| - numPassingAsserts: 0, |
234 |
| - snapshotResults: {} as TestSnapshotResults, |
235 |
| - status: 'pending' as 'passed' | 'failed' | 'pending', |
236 |
| - testFilePath: testPath, |
237 |
| - title: 'Optimized mode is not yet supoprted in OSS', |
238 |
| - }, |
239 |
| - ]); |
| 254 | + title: 'Optimized mode is not yet supported in OSS', |
| 255 | + }), |
| 256 | + ); |
240 | 257 | continue;
|
241 | 258 | }
|
242 | 259 |
|
243 | 260 | if (
|
244 | 261 | EnvironmentOptions.isOSS &&
|
245 | 262 | testConfig.hermesVariant !== HermesVariantEnum.Hermes
|
246 | 263 | ) {
|
247 |
| - testResultsByConfig.push([ |
248 |
| - { |
| 264 | + testResultsByConfig.push( |
| 265 | + skippedTestResults({ |
249 | 266 | ancestorTitles: [
|
250 | 267 | '"@fantom_hermes_variant static_hermes" in docblock (shermes 🧪)',
|
251 | 268 | ],
|
252 |
| - duration: 0, |
253 |
| - failureDetails: [] as Array<Error>, |
254 |
| - failureMessages: [] as Array<string>, |
255 |
| - fullName: 'Static Hermes is not yet supoprted in OSS', |
256 |
| - numPassingAsserts: 0, |
257 |
| - snapshotResults: {} as TestSnapshotResults, |
258 |
| - status: 'pending' as 'passed' | 'failed' | 'pending', |
259 |
| - testFilePath: testPath, |
260 |
| - title: 'Static Hermes is not yet supoprted in OSS', |
261 |
| - }, |
262 |
| - ]); |
| 269 | + title: 'Static Hermes is not yet supported in OSS', |
| 270 | + }), |
| 271 | + ); |
| 272 | + continue; |
| 273 | + } |
| 274 | + |
| 275 | + if ( |
| 276 | + EnvironmentOptions.isOSS && |
| 277 | + testConfig.mode !== FantomTestConfigMode.DevelopmentWithSource |
| 278 | + ) { |
| 279 | + testResultsByConfig.push( |
| 280 | + skippedTestResults({ |
| 281 | + ancestorTitles: ['"@fantom_mode dev-bytecode" in docblock'], |
| 282 | + title: 'Hermes bytecode is not yet supported in OSS', |
| 283 | + }), |
| 284 | + ); |
263 | 285 | continue;
|
264 | 286 | }
|
265 | 287 |
|
|
0 commit comments