Exemple #1
0
 'should fade deselected bars': function(chart) {
     chart.filter("Ontario").redraw();
     assert.isTrue(d3.select(chart.selectAll("rect.bar")[0][0]).classed("deselected"));
     assert.isFalse(d3.select(chart.selectAll("rect.bar")[0][5]).classed("deselected"));
 },
 'should respond with an error': function (err, res) {
     assert.instanceOf(err, Error);
     assert.isObject(res);
     assert.isFalse(res.found);
 }
Exemple #3
0
 'transition should not be activated with 0 duration': function (selections) {
     dc.transition(selections, 0);
     assert.isFalse(selections.transition.called);
     assert.isFalse(selections.duration.called);
 },
 'should ignore the error': function (err, res) {
     assert.isNull(err);
     assert.isObject(res);
     assert.isFalse(res.found);
 }
 'should get an error': function (err, doc, res) {
     assert.instanceOf(err, Error);
     assert.isNull(doc);
     assert.isObject(res);
     assert.isFalse(res.exists);
 }
Exemple #6
0
 .expect(function(res) {
   assert.ok(self.database.createOrgMember.called);
   assert.isFalse(self.membership.updateProfile.called);
 })
 tick.each(function(d, i) {
   var t = d3.select(this);
   assert.isFalse(t.select("line").empty());
   assert.isFalse(t.select("text").empty());
   assert.equal(t.select("text").text(), tickFormat(ticks[i]));
 });
 "it has no next and no prev": function(err, feed) {
     assert.ifError(err);
     assert.isFalse(feed.links.hasOwnProperty("prev"));
     assert.isFalse(feed.links.hasOwnProperty("next"));
 }
Exemple #9
0
 (function () {
     assert.isTrue(comb(argsA).deepEqual(arguments));
     assert.isFalse(comb(argsA).deepEqual('a'));
 })(["a"]);
Exemple #10
0
		'parses ""' : function(topic) {
			assert.isTrue(topic.open());
			assert.isFalse(topic.matched());
			assert.isFalse(topic.failed());
			assert.deepEqual(topic.completions(), ['hello world']);
		},
 "it has next but no prev": function(err, feed) {
     assert.ifError(err);
     assert.include(feed.links, "next");
     assert.include(feed.links.next, "href");
     assert.isFalse(feed.links.hasOwnProperty("prev"));
 }
Exemple #12
0
 "returns a new selection": function(div) {
   assert.isFalse(div.append("div") === div);
 }
Exemple #13
0
 "returns a new selection": function(body) {
   assert.isFalse(body.append("div") === body);
 },
Exemple #14
0
 it.should("remove all block comments", function () {
     assert.isFalse(flow.containsRule("Goodbye2"));
     assert.isTrue(flow.containsRule("Goodbye"));
     assert.isTrue(flow.containsRule("Hello"));
 });
Exemple #15
0
        'CSS comments are deleted,': function ( err, data ) {

            assert.isFalse( /\/\*@import "commented-url-must-be-deleted.css";*\//.test( data.compiled ) );

        },
Exemple #16
0
    it.should("determine if something is a hash", function () {
        assert.isTrue(comb.isHash({}));
        assert.isTrue(comb.isHash({1: 2, a: "b"}));
        assert.isFalse(comb.isHash(new Date()));
        assert.isFalse(comb.isHash(new String()));
        assert.isFalse(comb.isHash(new Number()));
        assert.isFalse(comb.isHash(new Boolean()));
        assert.isFalse(comb.isHash());
        assert.isFalse(comb.isHash(""));
        assert.isFalse(comb.isHash(1));
        assert.isFalse(comb.isHash(false));
        assert.isFalse(comb.isHash(true));

        assert.isTrue(comb({}).isHash());
        assert.isTrue(comb({1: 2, a: "b"}).isHash());
        assert.isFalse(comb(new Date()).isHash());
        assert.isFalse(comb(new String()).isHash());
        assert.isFalse(comb(new Number()).isHash());
        assert.isFalse(comb(new Boolean()).isHash());
        assert.isFalse(comb("").isHash());
        assert.isFalse(comb(1).isHash());
        assert.isFalse(comb(false).isHash());
        assert.isFalse(comb(true).isHash());
    });
Exemple #17
0
        'error.': function ( err, data ) {

            assert.isFalse ( data );

        },
Exemple #18
0
 }).chain(function () {
         assert.isTrue(DB.connected);
         patio.disconnect();
         assert.isFalse(DB.connected);
     });
Exemple #19
0
 .expect(function(res) {
   assert.ok(self.membership.findUser.calledWith({username: postData.username}, 'ldap'));
   assert.ok(self.membership.updateProfile.called);
   assert.ok(self.database.createOrgMember.called);
   assert.isFalse(self.membership.createUser.called);
 })
Exemple #20
0
 'should fade deselected bars': function (chart) {
     chart.filter("Ontario").redraw();
     assert.isTrue(d3.select(chart.selectAll("rect.bar")[0][0]).classed("deselected"));
     assert.isFalse(d3.select(chart.selectAll("rect.bar")[0][5]).classed("deselected"));
     assert.equal(stateDimension.top(Infinity).length, 2);
 },
Exemple #21
0
 "5 is not between 2 and 4": function(between) {
   assert.isFalse(between(2, 4, 5));
 }
Exemple #22
0
 'chart should be by default not focused': function (chart) {
     assert.isFalse(chart.refocused());
 },
 'should not respond with an error': function (err, doc, res) {
     assert.isNull(err);
     assert.isNull(doc);
     assert.isObject(res);
     assert.isFalse(res.exists);
 }
Exemple #24
0
 'chart should be able to reset its focus flag': function (chart) {
     chart.focus(null);
     assert.isFalse(chart.refocused());
 },
 'should respond with `false`': function (err, exists) {
     assert.isNull(err);
     assert.isFalse(exists);
 }
 'should have brush turned off': function (chart) {
     assert.isFalse(chart.brushOn());
 },
Exemple #27
0
 'should be gone after remove all': function (chart) {
     dc.deregisterAllCharts();
     assert.isFalse(dc.hasChart(chart));
 },
 'svg should be created': function (chart) {
     assert.isFalse(chart.select("svg").empty());
 },
Exemple #29
0
 'filterAll should not invoke filter on chart in groupA': function(chart) {
     dc.filterAll();
     assert.isFalse(chart.filterAll.calledOnce);
     chart.filterAll.reset();
 },
Exemple #30
0
 'a nested non-existing property': function(obj) {
   assert.isFalse(hasIn(obj, ['foo', 'blah']));
 },