API Docs for: 1.0.0
Show:

Assert Class

Additional assertions for unit tests.

Item Index

Methods

areWithinEpsilon

(
  • expected
  • actual
  • epsilon
)
static

Asserts that the mantissas of two values are with epsilon of each other. (The test automatically fails if the exponents are different.)

Parameters:

  • expected Number

    the expected value

  • actual Number

    the actual value to test

  • epsilon Number

    the maximum allowed difference in the mantissas

complexWithinEpsilon

(
  • expected
  • actual
  • epsilon
)
static

Asserts that both real and imaginary parts of two complex values are with epsilon of each other. (The test automatically fails if the exponents are different.)

Parameters:

preserveScrollPosition

(
  • table
  • type
)
static

Provided by the gallery-table-utils module.

Defined in src/gallery-table-utils/js/utils.js:13

Saves the current vertical scroll position and listens for the appropriate event to trigger restoring the position.

Parameters:

  • table Widget

    DataTable or BulkEditor

  • type String

    "table" or "bulkeditor"