diff --git a/wallabyjs/index.d.ts b/wallabyjs/index.d.ts index 7b791e44ff..6c4d332de0 100644 --- a/wallabyjs/index.d.ts +++ b/wallabyjs/index.d.ts @@ -11,7 +11,7 @@ declare module 'wallabyjs' { * * @property {IWallabyCompiler=} compilers - File patterns as keys and compiler functions as values. * @property {boolean=} debug - Flag if debug messages written to Wallaby console (default=false). - * @prooperty {IWallabyEnvironment=} env - Specify a different test runner or change the runner settings. + * @property {IWallabyEnvironment=} env - Specify a different test runner or change the runner settings. * @property {string[] | IWallabyFilePattern[]} files - Specifies an array of source files or file name patterns to copy * to the local cache. * @property {Function=} postprocessor - Function that runs for every batch of file changes after all compilers and preprocessors. @@ -155,6 +155,7 @@ declare module 'wallabyjs' { params?: IWallabyEnvironmentParameters; runner?: string; type?: string; + viewportSize?: IWallabyEnvironmentViewportSize } /** @@ -172,6 +173,19 @@ declare module 'wallabyjs' { runner?: string; } + /** + * Wallaby viewport settings for testing. + * + * @interface IWallabyEnvironmentViewportSize + * + * @property {number=} width - Width in pixels for the viewport size in PhantomJs/Electron. + * @property {number=} height - height in pixels for the viewport size in PhantomJs/Electron. + */ + export interface IWallabyEnvironmentViewportSize { + width?: number; + height?: number; + } + /** * Wallaby worker configuration. * diff --git a/wallabyjs/wallabyjs-tests.ts b/wallabyjs/wallabyjs-tests.ts index 5fd8344797..5e6c90e0a4 100644 --- a/wallabyjs/wallabyjs-tests.ts +++ b/wallabyjs/wallabyjs-tests.ts @@ -31,6 +31,9 @@ export class WallabyConfig implements wallabyjs.IWallabyConfig { params: { env: 'KEY1=value1;KEY2=value2', runner: '--arg1;--arg2;' + }, + viewportSize: { + width: 800 } };