From f97cd4945670e016041ac41ff410dfeb7bf7989b Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 1 Mar 2024 13:24:51 -0800 Subject: [PATCH 1/3] [wallabyjs] add new configuration options This adds two new configuration options, as mentioned in https://github.com/wallabyjs/public/blob/518fb8df1b7f9076bfe5257a433aac0a94c3e48e/CHANGELOG.md\?plain\=1\#L394: - `symlinkNodeModules` - `compactMessageOutput` --- types/wallabyjs/index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/wallabyjs/index.d.ts b/types/wallabyjs/index.d.ts index d3ad1a2b429049..4261551790f328 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; } /** From e05820ba86bf98ab38be206995159354a4319794 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 1 Mar 2024 15:42:51 -0800 Subject: [PATCH 2/3] [wallabyjs] add missing "workers" configuration properties --- types/wallabyjs/index.d.ts | 21 ++++++++++++++++++--- types/wallabyjs/wallabyjs-tests.ts | 7 +++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/types/wallabyjs/index.d.ts b/types/wallabyjs/index.d.ts index 4261551790f328..2f0abea4a024bc 100644 --- a/types/wallabyjs/index.d.ts +++ b/types/wallabyjs/index.d.ts @@ -627,13 +627,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..d1f051310d19f5 100644 --- a/types/wallabyjs/wallabyjs-tests.ts +++ b/types/wallabyjs/wallabyjs-tests.ts @@ -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) {} } From c4e488695e6de0eecd515173632914c0f98cc43a Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 1 Mar 2024 15:57:18 -0800 Subject: [PATCH 3/3] [wallabyjs] add missing "binary" flag to IWallabyFilePattern also reformat --- types/wallabyjs/index.d.ts | 5 +++++ types/wallabyjs/wallabyjs-tests.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/types/wallabyjs/index.d.ts b/types/wallabyjs/index.d.ts index 2f0abea4a024bc..eb89bda50f907f 100644 --- a/types/wallabyjs/index.d.ts +++ b/types/wallabyjs/index.d.ts @@ -549,6 +549,11 @@ declare module "wallabyjs" { * @defaultValue `true` */ load?: boolean | undefined; + + /** + * Treat this file as a binary file + */ + binary?: boolean | undefined } /** diff --git a/types/wallabyjs/wallabyjs-tests.ts b/types/wallabyjs/wallabyjs-tests.ts index d1f051310d19f5..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 = {