describe("sapphire.widgets.lastvalue", function() {
  var el;

  beforeEach(function() {
    el = d3.select('body')
      .append('div')
      .attr('class', 'tmp');
  });

  afterEach(function() {
    el.remove();
  });

  it("should show the last value", function() {
    var lastvalue = sapphire.widgets.lastvalue();
    expect(el.html()).to.be.empty;

    el.datum({
      values: [{
        x: 123,
        y: 345
      }, {
        x: 678,
        y: 910
      }]
    });

    lastvalue(el);
    expect(el.selectAll('.last').size()).to.equal(1);
    expect(el.select('.last').text()).to.equal('910');

    el.datum({
      values: [{
        x: 1123,
        y: 1345
      }, {
        x: 1678,
        y: 1910
      }]
    });

    lastvalue(el);
    expect(el.selectAll('.last').size()).to.equal(1);
    expect(el.select('.last').text()).to.equal('1910');
  });

  it("should show the 'none' value if values are available", function() {
    var lastvalue = sapphire.widgets.lastvalue()
      .none(23);

    el.datum({
      values: [{
        x: 123,
        y: 345
      }, {
        x: 678,
        y: 910
      }]
    });

    lastvalue(el);
    expect(el.select('.last').text()).to.equal('910');
  });
});

@@ -913,16 +913,20 @@
 ues are 
+not 
 availabl
@@ -1015,39 +1015,32 @@
 %0A%0A    el.datum(%7B
-%0A      
 values: %5B%7B%0A     
@@ -1036,101 +1036,13 @@
 s: %5B
-%7B%0A        x: 123,%0A        y: 345%0A      %7D, %7B%0A        x: 678,%0A        y: 910%0A      %7D%5D%0A    
+%5D
 %7D);%0A
-%0A
     
@@ -1100,27 +1100,26 @@
 ).to.equal('
-910
+23
 ');%0A  %7D);%0A%7D)

Fix bad lastvalue test to test the right thing