UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

32 lines (23 loc) 1.06 kB
/* Siesta 5.6.1 Copyright(c) 2009-2022 Bryntum AB https://bryntum.com/contact https://bryntum.com/products/siesta/license */ Class('Siesta.Launcher.Options.NodeJS', { isa : Siesta.Launcher.Options.Base, methods : { initialize : function () { var options = this.options // !IMPORTANT - for NodeJS we only allow 1 test file per "chunk", as this is the most correct way to run the NodeJS // test // in the future, we might allow several test files per "test launcher", but user needs to opt-in, // as the `require` loader is hard to tweak to work with different context generically // what we currently do, is - we load project files (Joose + Siesta + etc) in separate context // then the "Scope.Provider.NodeEmbed" just returns/uses the original global context options[ 'chunk-size' ] = 1 this.SUPERARG() if (options[ 'inspect' ] || options[ 'inspect-brk' ]) options[ 'max-workers' ] = 1 } } })