From 7592a3c985b60f21fbc2d8b0d189a509067aa3a1 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Sat, 2 Mar 2024 03:09:45 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#68864=20[wallabyjs?= =?UTF-8?q?]=20add=20new=20configuration=20options=20by=20@boneskull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/wallabyjs/index.d.ts | 38 +++++++++++++++++++++++++++--- types/wallabyjs/wallabyjs-tests.ts | 9 ++++++- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/types/wallabyjs/index.d.ts b/types/wallabyjs/index.d.ts index d3ad1a2b429049..eb89bda50f907f 100644 --- a/types/wallabyjs/index.d.ts +++ b/types/wallabyjs/index.d.ts @@ -307,6 +307,18 @@ declare module "wallabyjs" { * @defaultValue `false` */ preservePaths?: boolean | undefined; + + /** + * If `true`, makes node test runner symlink local node modules from + * Wallaby cache to correctly support ES modules resolution + */ + symlinkNodeModules?: boolean | undefined; + + /** + * If `true`, Willaby will not add new lines between test messages or + * test errors in Wallaby output. + */ + compactMessageOutput?: boolean | undefined; } /** @@ -537,6 +549,11 @@ declare module "wallabyjs" { * @defaultValue `true` */ load?: boolean | undefined; + + /** + * Treat this file as a binary file + */ + binary?: boolean | undefined } /** @@ -615,13 +632,28 @@ declare module "wallabyjs" { /** * Wallaby worker configuration. * - * recycle - Specifies the degree of parallelism used to run your tests and - * controls the way wallaby re-uses workers. - * * @see {@link https://wallabyjs.com/docs/config/workers.html} for details. */ export interface IWallabyWorkers { + /** + * May be an alias for {@link restart} + */ recycle?: boolean | undefined; + + /** + * If `true`, Wallaby will restart workers instead of reusing processes + */ + restart?: boolean | undefined; + + /** + * Initial number of parallel processes to run your tests on start + */ + initial?: number; + + /** + * Number of parallel processes to run your tests on code change + */ + regular?: number; } /** diff --git a/types/wallabyjs/wallabyjs-tests.ts b/types/wallabyjs/wallabyjs-tests.ts index d737ba94cae0f9..2072e6c90c5110 100644 --- a/types/wallabyjs/wallabyjs-tests.ts +++ b/types/wallabyjs/wallabyjs-tests.ts @@ -22,7 +22,7 @@ export class WallabyConfig implements wallabyjs.IWallabyConfig { public tests: Array = [ "src/**/*.spec.ts", - { pattern: "src/**/*.css", instrument: false, load: true }, + { pattern: "src/**/*.css", instrument: false, load: true, binary: true }, ]; public compilers: wallabyjs.IWallabyCompilers = { @@ -115,5 +115,12 @@ export class WallabyConfig implements wallabyjs.IWallabyConfig { }, }; + public workers = { + recycle: true, + restart: true, + initial: 6, + regular: 2 + } + constructor(private readonly wallaby: wallabyjs.IWallaby) {} }