How to use the assert.isTrue function in assert

To help you get started, we’ve selected a few assert examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aerobatic / aerobatic-cli / test / commands / deploy.js View on Github external
assert.isTrue(fs.existsSync(sampleAppDir + '/aero-deploy.tar.gz'));
        // unpack the tarball and verify the contents
        assert.isTrue(
          mockUploader.calledWith({
            creds: deployCreds,
            tarballFile: sampleAppDir + '/aero-deploy.tar.gz',
            key: program.website.appId + '/' + program.versionId + '.tar.gz',
            bucket: config.deployBucket,
            metadata: {
              stage: program.stage,
              fileCount: '2'
            }
          })
        );

        assert.isTrue(
          apiHandlers.postVersionHandler.calledWith(
            sinon.match({
              body: {
                versionId: program.versionId,
                message: program.message,
                manifest: _.omit(program.appManifest, 'id')
              }
            })
          )
        );

        assert.equal(apiHandlers.getVersionHandler.callCount, 3);
      });
  });
github przemyslawpluta / node-youtube-dl / test / download.js View on Github external
'file was downloaded': function (err, progress, data) {
        'use strict'
        if (err) {
          throw err
        }

        // Check existance.
        var filepath = path.join(__dirname, data._filename)
        var exists = fs.existsSync(filepath)
        if (exists) {
          // Delete file after each test.
          fs.unlinkSync(filepath)
        } else {
          assert.isTrue(exists)
        }
      }
    },
github creationix / node-gir / tests / test_object_property.js View on Github external
'should be true': function (topic) {
				topic.modal = true;
				assert.isTrue(topic.modal);
			},
			'should be false': function (topic) {
github shinout / jsrel / test / statics.js View on Github external
"is running on Node.js" : function(topic) {
      assert.isTrue(JSRel.isNode);
    },
github AndreasMadsen / immortal / test / simple / restart-unattached.js View on Github external
'there should be no restart': function (error, monitor, fake, state) {
          assert.ifError(error);
          assert.isTrue(fake);
          assert.isNull(state);
        }
      }
github nodejitsu / node-cloudfiles / test / helpers.js View on Github external
"the client is now authorized": function () {
        assert.isTrue(client.authorized);
      }
    }
github scriby / asyncblock / tests_generator / timeout_generator.js View on Github external
'The task times out': function(err, result){
            assert.isTrue(err.taskTimedOut);
            assert.lesser(err.taskRunTime, 125);
        }
    },
github LockerProject / Locker / tests / lservicemanager-test-local.js View on Github external
"successfully" : function(err, stat) {
                    assert.isNull(err);
                    assert.isTrue(stat);
                },
                "and can be shut down" : {
github mauritslamers / Thoth / tests / testbase.js View on Github external
return function(t){
    assert.isFunction(t.prototype[prop]);
    assert.isTrue(t.prototype[prop].isProperty);
    if(cacheable) assert.isTrue(t.prototype[prop].isCacheable);
    else assert.isUndefined(t.prototype[prop].isCacheable);
  };
};
github bnoguchi / redis-node / test / list_commands.vows.js View on Github external
'should return true': function (err, status) {
                assert.isTrue(status);
            },