Skip to content

Commit

Permalink
🤖 Merge PR #68864 [wallabyjs] add new configuration options by @bones…
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Mar 2, 2024
1 parent 792195d commit 7592a3c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
38 changes: 35 additions & 3 deletions types/wallabyjs/index.d.ts
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -537,6 +549,11 @@ declare module "wallabyjs" {
* @defaultValue `true`
*/
load?: boolean | undefined;

/**
* Treat this file as a binary file
*/
binary?: boolean | undefined
}

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down
9 changes: 8 additions & 1 deletion types/wallabyjs/wallabyjs-tests.ts
Expand Up @@ -22,7 +22,7 @@ export class WallabyConfig implements wallabyjs.IWallabyConfig {

public tests: Array<string | wallabyjs.IWallabyFilePattern> = [
"src/**/*.spec.ts",
{ pattern: "src/**/*.css", instrument: false, load: true },
{ pattern: "src/**/*.css", instrument: false, load: true, binary: true },
];

public compilers: wallabyjs.IWallabyCompilers = {
Expand Down Expand Up @@ -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) {}
}

0 comments on commit 7592a3c

Please sign in to comment.