Skip to content

should observe explicit array length changes #51

Description

@YousefED

The following scenario doesn't work (explicitly deleting items by modifying array.length)

  it("should observe explicit array length changes", () => {
    let dummy;
    const list = observable(["Hello", "World"]);
    observe(() => {
      dummy = list[0];
    });

    expect(dummy).to.equal("Hello");
    list.length = 0;
    expect(dummy).to.equal(undefined);
  });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions