(content)
| 567 | }; |
| 568 | |
| 569 | const getTest262Meta = (content) => { |
| 570 | const metaMatch = content.match(/\/\*---([\s\S]*?)---\*\//); |
| 571 | if (!metaMatch) { |
| 572 | return { flags: [], features: [], includes: [], negative: null }; |
| 573 | } |
| 574 | |
| 575 | const meta = metaMatch[1]; |
| 576 | |
| 577 | const features = extractYamlArray(meta, "features"); |
| 578 | const flags = extractYamlArray(meta, "flags"); |
| 579 | |
| 580 | const includes = extractYamlArray(meta, "includes"); |
| 581 | |
| 582 | const negativeMatch = meta.match( |
| 583 | /negative:[\s\S]*?phase:\s*(\w+)[\s\S]*?type:\s*(\w+)/ |
| 584 | ); |
| 585 | const negative = negativeMatch |
| 586 | ? { phase: negativeMatch[1], type: negativeMatch[2] } |
| 587 | : null; |
| 588 | |
| 589 | return { features, flags, includes, negative }; |
| 590 | }; |
| 591 | |
| 592 | const createRequire = (currentDir, context) => |
| 593 | function require(modulePath) { |
no test coverage detected