Skip to content

should observe explicit array length changes #51

Open
@YousefED

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);
  });

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