Example #1
0
 req.session.regenerate(function(err){
   should.notEqual(req.session.id, prev, 'SIDs matched after regenerate()');
   should.notEqual(req.sessionID, prev, 'SIDs matched after regenerate()');
   req.sessionID.should.equal(req.session.id);
   should.equal(null, err);
   res.end('count: ' + n);
 });
Example #2
0
 request('http://61.172.201.194', function(err, data) {
   should.ifError(err);
   should.exist(data);
   should.equal(data.time_appconnect, 0);
   should.equal(data.time_namelookup, 0);
   should.notEqual(data.time_starttransfer, 0);
   should.notEqual(data.time_total, 0);
   should.notEqual(data.time_connect, 0);
   return done();
 });
Example #3
0
 .then(result => {
     should.notEqual(result.apiVersion, "0.0.0", "api version not set");
     result.should.have.property('data');
     result.data.should.not.instanceOf(Array);
     var updatedData = result.data;
     should.equal(dataToBeUpdated.month, updatedData.month, "month not match.");
     should.equal(dataToBeUpdated.period, updatedData.period, "period not match.");
     should.notEqual(dataToBeUpdated._stamp, updatedData._stamp, "_stamp must not match.");
     done();
 })
Example #4
0
 request('https://www.baidu.com', function(err, data) {
   should.ifError(err);
   should.exist(data);
   should.notEqual(data.time_appconnect, 0);
   should.notEqual(data.time_namelookup, 0);
   should.notEqual(data.time_starttransfer, 0);
   should.notEqual(data.time_total, 0);
   should.notEqual(data.time_connect, 0);
   return done();
 });
Example #5
0
    it('58.1.16 queueTimeout', function() {
      var t = oracledb.queueTimeout;
      oracledb.queueTimeout = t + 1000;

      should.equal(t, defaultValues.queueTimeout);
      should.notEqual(oracledb.queueTimeout, defaultValues.queueTimeout);
    });
Example #6
0
        .end(function (err, response) {
            if (err)
                done(err);
            else {

                // getPeriod(createdData.month, createdData.period)
                //     .then(result => {
                //         should.notEqual(result.apiVersion, "0.0.0", "api version not set");
                //         result.should.have.property('data');
                //         result.data.should.not.instanceOf(Array);
                //         createdData = result.data;
                //         createdData.month.should.be.equal(newPeriod.month);
                //         createdData.period.should.be.equal(newPeriod.period);
                //         createdData._createdBy.should.be.equal(actor.username);
                //         createdData._updatedBy.should.be.equal(actor.username);
                //         done();
                //     })
                //     .catch(e => {
                //         done(e);
                //     });

                var result = response.body;
                should.notEqual(result.apiVersion, "0.0.0", "api version not set");
                result.should.have.property('data');
                result.data.should.not.instanceOf(Array);
                result.data.month.should.be.equal(createdData.month);
                result.data.period.should.be.equal(createdData.period);
                done();
            }
        });
Example #7
0
    it('58.1.18 poolPingInterval', function() {
      var t = oracledb.poolPingInterval;
      oracledb.poolPingInterval = t + 100;

      should.equal(t, defaultValues.poolPingInterval);
      should.notEqual(oracledb.poolPingInterval, defaultValues.poolPingInterval);
    });
Example #8
0
    it('58.1.17 stmtCacheSize', function() {
      var t = oracledb.stmtCacheSize;
      oracledb.stmtCacheSize = t + 5;

      should.equal(t, defaultValues.stmtCacheSize);
      should.notEqual(oracledb.stmtCacheSize, defaultValues.stmtCacheSize);
    });
 vastClient.get(urlfor('empty-no-ad.xml'), options).then(response => {
   vastResponse = response;
   should.notEqual(response, null);
   // Response doesn't have any ads
   response.ads.should.eql([]);
   done();
 });
Example #10
0
 db.use('error', function (sql, err, next) {
   should.equal(sql, badSql);
   should.notEqual(err, null);
   counter++;
   originErr = err;
   next();
 });
Example #11
0
    it.skip('58.1.15 queueRequests', function() {
      var t = oracledb.queueRequests;
      oracledb.queueRequests = false;

      should.equal(t, true);
      should.notEqual(t, oracledb.queueRequests);
    });
Example #12
0
    it("should clean all dead powerups", function() {
      powerupArray.cleanDead()

      should.equal(2, powerupArray.length)
      for (var i = 0; i < powerupArray.length; i++) {
        should.notEqual(Powerup.STATE.DEAD, powerupArray[i].state)
      }
    })
Example #13
0
 request(update_role, function(error, response, body) {
   should.not.exist(error);
   const json = JSON.parse(body);
   should(json).have.property('values_updated');
   const response_name = json.values_updated.name;
   should.notEqual(role_name, response_name);
   response.statusCode.should.equal(200);
   done();
 });
Example #14
0
            PostAPI.browse({context: {user: 1}, status: 'all', limit: 5}).then(function (results) {
                should.exist(results.posts);

                should.exist(results.posts[0].url);
                should.notEqual(results.posts[0].url, 'undefined');
                should.exist(results.posts[0].author);

                done();
            }).catch(done);
Example #15
0
				var callback = function(err, filename) {
					if (err) {
						var details = err.details.split("\n");
						var firstDetail = details.shift();
						should.notEqual(firstDetail.indexOf(testCase[1]), -1);
						details.should.not.containDeep([firstDetail]);
					}
					done();
				};
Example #16
0
  it('enumerable should copy', function() {
    var obj = { foo: 'foo' }
    obj.__noCopy = true

    var copy = copyLib.copyObject(obj)
    copy.foo = 'bar'

    should.notEqual(obj.foo, 'bar')
  })
Example #17
0
			db.driver.execQuery(sql, [Person.table], function (err, data) {
				should.not.exist(err);

				var names = _.pluck(data, protocol == 'sqlite' ? 'name' : 'column_name')

				should.equal(typeof Person.properties.name, 'object');
				should.notEqual(names.indexOf('fullname'), -1);

				done();
			});
Example #18
0
				john.save(function (err) {
					should.notEqual(err, null);
					should.equal(err.property, 'height');
					should.equal(err.value,     4);
					should.equal(err.msg,      'out-of-range-number');
					should.equal(err.type,     'validation');
					should.equal(john.id,      null);

					return done();
				});
Example #19
0
				john.save(function (err) {
					should.notEqual(err, null);
					should.equal(err.property, 'name');
					should.equal(err.value,    null);
					should.equal(err.msg,      'required');
					should.equal(err.type,     'validation');
					should.equal(john.id,      null);

					return done();
				});
Example #20
0
       http.get(options, function(res){
         should.notEqual(prev, sid(res), 'SID remained the same after regenerate() request');
         res.body.should.equal('count: 1');
 
         // 1
         options.path = '/two';
         http.get(options, function(res){
           res.body.should.equal('count: 0');
           app.close();
         });
       });
Example #21
0
 .end(function (err, response) {
     if (err)
         done(err);
     else {
         var result = response.body;
         should.notEqual(result.apiVersion, "0.0.0", "api version not set");
         result.should.have.property('data');
         result.data.should.instanceOf(Array);
         done();
     }
 });
Example #22
0
 .then(result => {
     should.notEqual(result.apiVersion, "0.0.0", "api version not set");
     result.should.have.property('data');
     result.data.should.not.instanceOf(Array);
     createdData = result.data;
     createdData.month.should.be.equal(newPeriod.month);
     createdData.period.should.be.equal(newPeriod.period);
     createdData._createdBy.should.be.equal(actor.username);
     createdData._updatedBy.should.be.equal(actor.username);
     done();
 })
Example #23
0
      it('game should not move on until previous player decide which card to drop', function() {
        const lastPlayer = PlayerControl.getCurrentPlayer()
        Dealer.playerReplaceCard(lastPlayer.id)
        clock.tick(10000)
        let currentPlayer = PlayerControl.getCurrentPlayer()
        lastPlayer.id.should.equal(currentPlayer.id)

        const cardToDrop = currentPlayer.cards[1]
        Dealer.playerReplaceCard(currentPlayer.id, cardToDrop.id)
        clock.tick(actionInterval)
        currentPlayer = PlayerControl.getCurrentPlayer()
        should.notEqual(lastPlayer.id, currentPlayer.id)
      })
    it('created files should have custom text', function(done) {
        var countCustomText = 0;
        fixtureFiles.forEach(function(name) {
            var createdContent = fs.readFileSync('./tmp/' + name, 'utf8');

            var createdLines = createdContent.split(/\n/);

            for (var lineNumber = 0; lineNumber < createdLines.length; lineNumber += 1) {
                if (createdLines[lineNumber].indexOf('Custom Markdown Parser: ') !== -1)
                    countCustomText++;
            }
        });

        should.notEqual(countCustomText, 0);

        done();
    });
Example #25
0
				john.save(function (err) {
					should.notEqual(err, null);
					should(Array.isArray(err));
					should.equal(err.length, 2);

					should.deepEqual(err[0], _.extend(new Error('out-of-range-length'), {
						property: 'name', value: 'n', msg: 'out-of-range-length', type: 'validation'
					}));

					should.deepEqual(err[1], _.extend(new Error(),{
						property: 'height', value: '4', msg: 'out-of-range-number', type: 'validation'
					}));

					should.equal(john.id, null);

					return done();
				});
Example #26
0
        john.save(function (err) {
          should.notEqual(err, null);
          should(Array.isArray(err));
          should.equal(err.length, 3);

          should.deepEqual(err[0], _.extend(new Error('required'), {
            property: 'name', value: null, msg: 'required', type: 'validation'
          }));

          should.deepEqual(err[1], _.extend(new Error('undefined'), {
            property: 'name', value: null, msg: 'undefined', type: 'validation'
          }));

          should.deepEqual(err[2], _.extend(new Error('out-of-range-number'), {
            property: 'height', value: 4, msg: 'out-of-range-number', type: 'validation'
          }));

          should.equal(john.id, null);

          return done();
        });
Example #27
0
				john.save(function (err) {
					should.notEqual(err, null);
					should(Array.isArray(err));
					should.equal(err.length, 3);

					// `type` is a non enumerable undocumented property of `Error` in V8.
					should.deepEqual(err[0], _.extend(new Error(),{
						property: 'name', value: undefined, msg: 'required', type: 'validation'
					}));

					should.deepEqual(err[1], _.extend(new Error(),{
						property: 'name', value: undefined, msg: 'undefined', type: 'validation'
					}));

					should.deepEqual(err[2], _.extend(new Error(),{
						property: 'height', value: '4', msg: 'out-of-range-number', type: 'validation'
					}));

					should.equal(john.id, null);

					return done();
				});
Example #28
0
 it('检查Reducers模块是否正常', function() {
   should.notEqual(undefined, reducers);
   should.notEqual(undefined, reducers.default);
 })
Example #29
0
 it('same namespace with different key should have various values', () => {
   should.notEqual(constants1.of('randomString1'), constants1.of('randomString2'));
 })
Example #30
0
 it('different namespace with same key should have various values', () => {
   should.notEqual(constants1.of('randomString'),constants2.of('randomString'))
 })