mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
5723f3d727
Supporting conformance testing is requiring adding extra code paths to `RuleTester` and main JS plugins code. Previously, these paths were guarded by `if (DEBUG)` branches, so the extra code is not in release build. But ideally we don't want this code in debug build either, so the tests are testing a build that's identical to release build, except for enabling debug assertions. Introduce a new build specifically for conformance testing, and gate code specific to conformance testing with `if (CONFORMANCE)` instead of `if (DEBUG)`.
8 lines
194 B
TypeScript
8 lines
194 B
TypeScript
// Global constants defined at build time by TSDown
|
|
|
|
// `true` if is debug build
|
|
declare const DEBUG: boolean;
|
|
|
|
// `true` if is build for conformance testing
|
|
declare const CONFORMANCE: boolean;
|