18.1.1 • Published 5 months ago

@wixc3/mostly-equal v18.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

npm version @wixc3/mostly-equal on Github

Home > @wixc3/mostly-equal

mostly-equal package

Adds chai matches for partial equality of JSONs

Example

import * as chai from 'chai';
import { expect } from 'chai';
import { mostlyEqlChaiPlugin, notImportant } from '@wixc3/mostly-equal';
chai.use(mostlyEqlChaiPlugin);
expect({ a: 1 }).to.mostlyEqual({
  a: 1,
  b: notImportant,
});

Functions

FunctionDescription
allowMarkersInFactory(f)
checkExpectValues(input, formatters)
clearMatchedValues(subMatcher)
defineSame(name, skipUndefined)Creates a symbol for usage in mostlyEqual, Comparing the resulting value in any place it is used as the value
defineUnique(name, skipUndefined)Creates a symbol for usage in expect.mostlyEqual, Comparing the resulting value in any place it is used as the value
equal(value, thumbsUpOnSuccess)Strict equality of a field
errorString(expected, actual, maxDepth, formatters, depth, path, passedMap, passedSet)
expectValue(expectMethod)Used for adding field matchers to mostlyEqual Creates a symbol used for field matching
expectValues(expectMethod, allowUndefined)Similar to expectValue(), but called for all the matches at once. This way a matcher can compare different values defineUnique()
getMatchedValues(expectValues)
HTMLFormatter(Element)
isExpectVal(val)
isExpectValues(val)
isGetter(target, key)
isPlainObj(value)
printPath(p)
registerChildSet(target, path, passedMap, passedSet)
safePrint(target, maxDepth, formatters, depth, passedMap, passedSet, path)
setGlobalOptions(maxDepth, formatters)
setSuiteOptions(before, after, options)
spaces(indent)

Interfaces

InterfaceDescription
ExpectValue
ExpectValues
ExpectValuesInfo
Formatter
MostlyEqualOptions
PseudoElement

Variables

VariableDescription
definedField must be defined (null is considered define)
expectValuesSymb
expectValueSymb
mostlyEqlChaiPlugin
notImportant
thumbsUp

Type Aliases

Type AliasDescription
AllowMarkers
AllowMarkersObj
ErrorOrText
ErrorOrTextOrExpect
ExpandedValues
ExpectMultiMatcher
ExpectSingleMatcher
LookupPath
MarkerSymbol
PseudoElementConstructor
UnknownObjectRecord
18.1.1

5 months ago

18.0.0

6 months ago

17.1.1

1 year ago

17.0.0

1 year ago

16.3.0

1 year ago

16.2.1

1 year ago

16.2.0

1 year ago

16.1.3

1 year ago

16.1.0

1 year ago

16.0.0

1 year ago

15.1.1

1 year ago

15.1.0

2 years ago

15.0.0

2 years ago

14.0.0

2 years ago

14.1.0

2 years ago

13.4.0

2 years ago

13.3.2

2 years ago

13.2.0

2 years ago

13.3.0

2 years ago

13.0.0

2 years ago

13.1.0

2 years ago

13.0.1

2 years ago

12.0.3

2 years ago

12.1.0

2 years ago

12.0.1

2 years ago

11.1.1

2 years ago

11.1.0

2 years ago

11.0.0

2 years ago

10.0.0

2 years ago

8.2.1

2 years ago

9.0.0

2 years ago

8.0.0

2 years ago

5.2.4

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.7

3 years ago

5.0.0

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

6.0.0

2 years ago

3.0.0

3 years ago

2.2.0

3 years ago

2.0.2

3 years ago

4.0.0

3 years ago

7.0.0

2 years ago

7.0.3

2 years ago

2.0.1

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago