it("should return true if hit_test_result is not empty", () => {
        const hit_test_result = create_hit_test_result_from_hits([[0, 0], [1, 0]])
        const policy = new NodesOnly()

        expect(policy.do_selection(hit_test_result, gr, true, false)).to.be.true
        expect(node_source.selected.is_empty()).to.be.false
      })
 it("should return the Selection that the GlyphView hit-testing returns", () => {
   node_stub.returns(new Selection({indices: [1, 2, 3]}))
   const policy = new NodesOnly()
   const result = policy.hit_test({type: "point", sx: 0, sy: 0}, gv)
   expect(result).to.be.not.null
   expect(result!.indices).to.be.deep.equal([1, 2, 3])
 })
      it("should return true if hit_test_result is not empty", () => {
        const hit_test_result = create_hit_test_result_from_hits([[0, 0], [1, 0]])
        const policy = new NodesOnly()

        const did_hit = policy.do_inspection(hit_test_result, {type: "point", sx: 0, sy: 0}, gv, true, false)
        expect(did_hit).to.be.true
        expect(node_source.inspected.is_empty()).to.be.false
      })
      it("should return false and clear selections if hit_test_result is empty", () => {
        const initial_selection = create_hit_test_result_from_hits([[1, 0], [2, 0]])
        node_source.selected = initial_selection

        const hit_test_result = create_empty_hit_test_result()
        const policy = new NodesOnly()
        const did_hit = policy.do_selection(hit_test_result, gr, true, false)

        expect(did_hit).to.be.false
        expect(node_source.selected.is_empty()).to.be.true
      })
      it("should return false and clear inspections if hit_test_result is empty", () => {
        // create initial inspection to clear
        const initial_inspection = create_hit_test_result_from_hits([[1, 0], [2, 0]])
        node_source.inspected = initial_inspection

        const hit_test_result = create_empty_hit_test_result()
        const policy = new NodesOnly()
        const did_hit = policy.do_inspection(hit_test_result, {type: "point", sx: 0, sy: 0}, gv, true, false)

        expect(did_hit).to.be.false
        expect(node_source.inspected.is_empty()).to.be.true
      })
 it("should return null if GlyphView doesn't have hit-testing and returns null", () => {
   node_stub.returns(null)
   const policy = new NodesOnly()
   expect(policy.hit_test({type: "point", sx: 0, sy: 0}, gv)).to.be.null
 })
 it("should return false if called with null hit_test_result", () => {
   const policy = new NodesOnly()
   expect(policy.do_selection(null, gr, true, false)).to.be.false
 })