The CanaryTestCallback class is used to represent callbacks added to a test using methods such as onBegin and onEnd. It has a constructor and no methods. It can be accessed via CanaryTest.Callback or imported directly.

This class is primarily for internal usage by Canary. It should rarely if ever be necessary for user code to reference or interact with this class.

const CanaryTestCallback = require("canary-test").CanaryTest.Callback;
import {CanaryTestCallback} from "canary-test";


Get the test object to which this callback belongs.

Returns: The CanaryTest instance to which this callback was added.


Get a string naming this callback.

Returns: A string representing the name of this callback.


Get a string containing an identifying title for this callback.

Returns: A string representing the title of this callback.