3.2.2 • Published 5 years ago

assert-x v3.2.2

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

assert-x

A Javascript assertion library.

See: https://nodejs.org/dist/latest-v12.x/docs/api/assert.html

This is legacy mode by default.

See:https://nodejs.org/dist/latest-v12.x/docs/api/assert.html#assert_legacy_mode

Strict mode is available.

See: https://nodejs.org/dist/latest-v12.x/docs/api/assert.html#assert_strict_mode

assert-x~AssertionError ⇐ Error

Kind: inner class of assert-x
Extends: Error

new AssertionError([message])

Error constructor for test and validation frameworks that implement the standardized AssertionError specification.

ParamTypeDescription
messageObjectNeed to document the properties.

assert-x~deepEqual

Tests for deep equality, coercive equality with the equal comparison operator ( == ) and equivalent.

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~deepStrictEqual

Tests for deep equality, coercive equality with the equal comparison operator ( === ) and equivalent.

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~doesNotThrow

Expects block not to throw an error, see assert~throws for details.

Kind: inner property of assert-x

ParamTypeDescription
blockfunctionThe function block to be executed in testing.
errorconstructorThe comparator.
messagestringText description of test.

assert-x~equal

Tests shallow, coercive equality with the equal comparison operator ( == ).

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~fail

Throws an exception that displays the values for actual and expected separated by the provided operator.

Kind: inner property of assert-x
Throws:

  • Error Throws an AssertionError.
ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.
operatorstringThe compare operator.

assert-x~ifError

Tests if value is not a falsy value, throws if it is a truthy value. Useful when testing the first argument, error in callbacks.

Kind: inner property of assert-x
Throws:

  • * The value err if truthy.
ParamTypeDescription
err*The value to be tested for truthiness.

assert-x~notDeepEqual

Tests for any deep inequality. Opposite of deepEqual.

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~notDeepStrictEqual

Tests for deep inequality. Opposite of deepStrictEqual.

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~notEqual

Tests shallow, coercive non-equality with the not equal comparison operator ( != ).

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~notStrictEqual

Tests strict non-equality, as determined by the strict not equal operator ( !== ).

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~ok

Tests if value is truthy, it is equivalent to equal(!!value, true, message).

Kind: inner property of assert-x

ParamTypeDescription
value*The value to be tested.
messagestringText description of test.

assert-x~strictEqual

Tests strict equality, as determined by the strict equality operator ( === ).

Kind: inner property of assert-x

ParamTypeDescription
actual*The actual value to be tested.
expected*The expected value to compare against actual.
messagestringText description of test.

assert-x~throws

Expects block to throw an error. error can be constructor, regexp or validation function.

Kind: inner property of assert-x

ParamTypeDescription
blockfunctionThe function block to be executed in testing.
errorconstructor | RegExp | functionThe comparator.
messagestringText description of test.

assert-x~$assert(value, message)

Tests if value is truthy, it is equivalent to equal(!!value, true, message).

Kind: inner method of assert-x

ParamTypeDescription
value*The value to be tested.
messagestringText description of test.
3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.23

5 years ago

3.1.22

5 years ago

3.1.21

5 years ago

3.1.20

5 years ago

3.1.19

5 years ago

3.1.18

5 years ago

3.1.17

5 years ago

3.1.16

5 years ago

3.1.15

5 years ago

3.1.14

5 years ago

3.1.13

5 years ago

3.1.12

5 years ago

3.1.11

5 years ago

3.1.10

5 years ago

3.1.9

5 years ago

3.1.8

5 years ago

3.1.7

5 years ago

3.1.6

5 years ago

3.1.5

5 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.0

7 years ago

1.8.0

7 years ago

1.7.0

7 years ago

1.6.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.18

8 years ago

1.2.17

8 years ago

1.2.16

8 years ago

1.2.15

8 years ago

1.2.14

8 years ago

1.2.13

8 years ago

1.2.12

8 years ago

1.2.11

8 years ago

1.2.10

8 years ago

1.2.9

8 years ago

1.2.8

8 years ago

1.2.7

8 years ago

1.2.6

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.4

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

0.0.28

9 years ago

0.0.27

9 years ago

0.0.26

10 years ago

0.0.25

10 years ago

0.0.24

10 years ago

0.0.23

10 years ago

0.0.21

10 years ago

0.0.20

10 years ago

0.0.19

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago