# ExpectHelper
This helper allows performing assertions based on Chai.
# Examples
Zero-configuration when paired with other helpers like REST, Playwright:
// inside codecept.conf.js
{
helpers: {
Playwright: {...},
Expect: {},
}
}
# Methods
# expectAbove
# Parameters
targetDataanyaboveThananycustomErrorMsgany?
# expectBelow
# Parameters
targetDataanybelowThananycustomErrorMsgany?
# expectContain
# Parameters
actualValueanyexpectedValueToContainanycustomErrorMsgany?
# expectDeepEqual
# Parameters
actualValueanyexpectedValueanycustomErrorMsgany?
# expectDeepEqualExcluding
expects members of two JSON objects are deeply equal excluding some properties
# Parameters
actualValueanyexpectedValueanyfieldsToExcludeanycustomErrorMsgany?
# expectDeepIncludeMembers
expects an array to be a superset of another array
# Parameters
supersetanysetanycustomErrorMsgany?
# expectDeepMembers
expects members of two arrays are deeply equal
# Parameters
actualValueanyexpectedValueanycustomErrorMsgany?
# expectEmpty
# Parameters
targetDataanycustomErrorMsgany?
# expectEndsWith
# Parameters
actualValueanyexpectedValueToEndWithanycustomErrorMsgany?
# expectEqual
# Parameters
actualValueanyexpectedValueanycustomErrorMsgany?
# expectEqualIgnoreCase
# Parameters
actualValueanyexpectedValueanycustomErrorMsgany?
# expectFalse
# Parameters
targetDataanycustomErrorMsgany?
# expectHasAProperty
# Parameters
targetDataanypropertyNameanycustomErrorMsgany?
# expectHasProperty
# Parameters
targetDataanypropertyNameanycustomErrorMsgany?
# expectJsonSchema
# Parameters
targetDataanyjsonSchemaanycustomErrorMsgany?
# expectJsonSchemaUsingAJV
# Parameters
targetDataanyjsonSchemaanycustomErrorMsgany?ajvOptionsany? Pass AJV options
# expectLengthAboveThan
# Parameters
targetDataanylengthAboveThananycustomErrorMsgany?
# expectLengthBelowThan
# Parameters
targetDataanylengthBelowThananycustomErrorMsgany?
# expectLengthOf
# Parameters
targetDataanylengthanycustomErrorMsgany?
# expectMatchesPattern
expects a JSON object matches a provided pattern
# Parameters
actualValueanyexpectedPatternanycustomErrorMsgany?
# expectMatchRegex
# Parameters
targetDataanyregexanycustomErrorMsgany?
# expectNotContain
# Parameters
actualValueanyexpectedValueToNotContainanycustomErrorMsgany?
# expectNotDeepEqual
# Parameters
actualValueanyexpectedValueanycustomErrorMsgany?
# expectNotEndsWith
# Parameters
actualValueanyexpectedValueToNotEndWithanycustomErrorMsgany?
# expectNotEqual
# Parameters
actualValueanyexpectedValueanycustomErrorMsgany?
# expectNotStartsWith
# Parameters
actualValueanyexpectedValueToNotStartWithanycustomErrorMsgany?
# expectStartsWith
# Parameters
actualValueanyexpectedValueToStartWithanycustomErrorMsgany?
# expectToBeA
# Parameters
targetDataanytypeanycustomErrorMsgany?
# expectToBeAn
# Parameters
targetDataanytypeanycustomErrorMsgany?
# expectTrue
# Parameters
targetDataanycustomErrorMsgany?