17.1.1 • Published 2 months ago

@wixc3/mostly-equal v17.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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 chai, { 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
17.1.1

2 months ago

17.0.0

2 months ago

16.3.0

2 months ago

16.2.1

2 months ago

16.2.0

3 months ago

16.1.3

4 months ago

16.1.0

4 months ago

16.0.0

4 months ago

15.1.1

5 months ago

15.1.0

5 months ago

15.0.0

5 months ago

14.0.0

5 months ago

14.1.0

5 months ago

13.4.0

6 months ago

13.3.2

8 months ago

13.2.0

10 months ago

13.3.0

9 months ago

13.0.0

10 months ago

13.1.0

10 months ago

13.0.1

10 months ago

12.0.3

11 months ago

12.1.0

10 months ago

12.0.1

11 months ago

11.1.1

11 months ago

11.1.0

11 months ago

11.0.0

11 months ago

10.0.0

11 months ago

8.2.1

12 months ago

9.0.0

11 months ago

8.0.0

1 year ago

5.2.4

1 year ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.7

1 year ago

5.0.0

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

6.0.0

1 year ago

3.0.0

2 years ago

2.2.0

2 years ago

2.0.2

2 years ago

4.0.0

1 year ago

7.0.0

1 year ago

7.0.3

1 year ago

2.0.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago