• Sinon matcher for stubs/spy comparison

    Parameters

    • value: number

    Returns SinonMatcher

    Example

    // partial match of spy function params called with

      let { given, when, get } = new CypressHelper();
    it("should partially match spy params", () => {
    const obj = {
    func: (param: Object) => {}
    };
    given.spyOnObject(obj, "func");
    obj.func({ shelly: "go", inner: { attr: "value" } });
    then(get.spyFromFunction(obj.func)).shouldHaveBeenCalledWithMatch(
    match({ inner: { attr: "value" } })
    );
    });

    For more information see Sinon.match documentation

  • Sinon matcher for stubs/spy comparison

    Parameters

    • value: string

    Returns SinonMatcher

    Example

    // partial match of spy function params called with

      let { given, when, get } = new CypressHelper();
    it("should partially match spy params", () => {
    const obj = {
    func: (param: Object) => {}
    };
    given.spyOnObject(obj, "func");
    obj.func({ shelly: "go", inner: { attr: "value" } });
    then(get.spyFromFunction(obj.func)).shouldHaveBeenCalledWithMatch(
    match({ inner: { attr: "value" } })
    );
    });

    For more information see Sinon.match documentation

  • Sinon matcher for stubs/spy comparison

    Parameters

    • expr: RegExp

    Returns SinonMatcher

    Example

    // partial match of spy function params called with

      let { given, when, get } = new CypressHelper();
    it("should partially match spy params", () => {
    const obj = {
    func: (param: Object) => {}
    };
    given.spyOnObject(obj, "func");
    obj.func({ shelly: "go", inner: { attr: "value" } });
    then(get.spyFromFunction(obj.func)).shouldHaveBeenCalledWithMatch(
    match({ inner: { attr: "value" } })
    );
    });

    For more information see Sinon.match documentation

  • Sinon matcher for stubs/spy comparison

    Parameters

    • callback: ((value) => boolean)
        • (value): boolean
        • Parameters

          • value: any

          Returns boolean

    • Optional message: string

    Returns SinonMatcher

    Example

    // partial match of spy function params called with

      let { given, when, get } = new CypressHelper();
    it("should partially match spy params", () => {
    const obj = {
    func: (param: Object) => {}
    };
    given.spyOnObject(obj, "func");
    obj.func({ shelly: "go", inner: { attr: "value" } });
    then(get.spyFromFunction(obj.func)).shouldHaveBeenCalledWithMatch(
    match({ inner: { attr: "value" } })
    );
    });

    For more information see Sinon.match documentation

  • Sinon matcher for stubs/spy comparison

    Parameters

    • obj: object

    Returns SinonMatcher

    Example

    // partial match of spy function params called with

      let { given, when, get } = new CypressHelper();
    it("should partially match spy params", () => {
    const obj = {
    func: (param: Object) => {}
    };
    given.spyOnObject(obj, "func");
    obj.func({ shelly: "go", inner: { attr: "value" } });
    then(get.spyFromFunction(obj.func)).shouldHaveBeenCalledWithMatch(
    match({ inner: { attr: "value" } })
    );
    });

    For more information see Sinon.match documentation

Generated using TypeDoc