Base fixture for testing the exposed interface is correct (without actually using WebGPU).

Hierarchy

Accessors

  • get params(): unknown
  • Returns the (case+subcase) parameters for this test function invocation.

    Returns unknown

  • get sharedState(): S
  • Gets the test fixture's shared state. This object is shared between subcases within the same testcase.

    Returns S

Methods

  • Asserts that a member of an IDL interface has the expected value.

    Parameters

    • act: UnknownObject
    • exp: UnknownObject
    • key: string

    Returns void

  • Asserts that an IDL interface has the same number of keys as the

    MAINTENANCE_TODO: add a way to check for the types of keys with unknown values, like methods and attributes MAINTENANCE_TODO: handle extensions

    Parameters

    • act: UnknownObject
    • exp: UnknownObject

    Returns void

  • Parameters

    • error: Promise<undefined | Error | (undefined | Error)[]>
    • __namedParameters: {
          mode?: "fail" | "warn";
      } = {}
      • Optional mode?: "fail" | "warn"

    Returns void

  • If the argument is an Error, fail (or warn). If it's undefined, no-op. If the argument is an array, apply the above behavior on each of elements.

    Parameters

    • error: undefined | Error | (undefined | Error)[]
    • __namedParameters: {
          mode?: "fail" | "warn";
          niceStack?: Error;
      } = {}
      • Optional mode?: "fail" | "warn"
      • Optional niceStack?: Error

    Returns void

  • Expect that the provided function throws (if true or string) or not (if false). If a string is provided, expect that the throw exception has that name.

    MAINTENANCE_TODO: Change to string | false so the exception name is always checked.

    Parameters

    • expectedError: string | boolean
    • fn: (() => void)
        • (): void
        • Returns void

    • __namedParameters: ExceptionCheckOptions = {}

    Returns void

  • Tracks an object to be cleaned up after the test finishes.

    MAINTENANCE_TODO: Use this in more places. (Will be easier once .destroy() is allowed on invalid objects.)

    Type Parameters

    • T extends DestroyableObject

    Parameters

    • o: T

    Returns T

Generated using TypeDoc