testHelpers
Source: testHelpers.mjs:10
Export the setUp helper.
- Version: 3.0.0
- Author: Joshua Heagle <joshuaheagle@gmail.com>
Static Fields
createTempDir
static
setUp.mjs:67Ensure that the del has completed, recursively attempt to delete and recreate
Parameters
exists(boolean, optional, default: true)
Returns
Promise.<(*|void)>
beforeEach
static
setUp.mjs:73In the Jest.beforeEach function call this one to set up the temp directory.
Returns
Promise.<(*|void)>
afterEach
static
setUp.mjs:79In the Jest.afterEach function call this one to clean up and remove the temp directory.
Returns
Promise.<*>
countMatches
static
setUp.mjs:85Return number of occurrences of substring in another string.
Returns
int
fileExists
static
setUp.mjs:91Returns true if the given file or directory exists, otherwise false.
Returns
boolean
logObject
static
setUp.mjs:97Console log objects in a readable format, returns the given object.
Returns
*
removeDirectory
static
setUp.mjs:103Delete a directory and subcontents.
Returns
Promise.<*>
Other
setDefaults
static
setUp.mjs:13Update the gulp configurations with the test data. Set the test directory where temp files will be created for testing.
Parameters
testDir(string)