Sha256: c2dcad2ec06f9d5de48119a64c82326ee6f770405ed64be28a01f7704061afd4

Contents?: true

Size: 821 Bytes

Versions: 31

Compression:

Stored size: 821 Bytes

Contents

require("../env");
require("../../d3");

var assert = require("assert");

module.exports = {
  topic: function() {
    return d3.select("body").append("div").text("foo").transition().text("bar");
  },
  "sets the text tween": function(div) {
    assert.typeOf(div.tween("text"), "function");
  },
  "start": {
    topic: function(div) {
      var cb = this.callback,
          tween = div.tween("text");
      div.tween("text", function() {
        var result = tween.apply(this, arguments);
        cb(null, {transition: div, tween: result});
        return result;
      });
    },
    "sets the text content as a string": function(result) {
      assert.equal(result.transition[0][0].node.textContent, "bar");
    },
    "does not interpolate text": function(result) {
      assert.isTrue(!result.tween);
    }
  }
};

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
picky-statistics-4.5.0 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.4.2 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.4.1 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.4.0 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.3.2 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.3.1 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.3.0 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.2.4 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.2.3 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.2.2 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.2.1 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.2.0 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.1.0 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.0.9 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.0.8 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.0.7 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.0.6 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.0.5 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.0.4 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js
picky-statistics-4.0.3 lib/picky-statistics/application/javascripts/d3/test/core/transition-test-text.js