Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
});
});
'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)
}
}
},
'should be true': function (topic) {
topic.modal = true;
assert.isTrue(topic.modal);
},
'should be false': function (topic) {
"is running on Node.js" : function(topic) {
assert.isTrue(JSRel.isNode);
},
'there should be no restart': function (error, monitor, fake, state) {
assert.ifError(error);
assert.isTrue(fake);
assert.isNull(state);
}
}
"the client is now authorized": function () {
assert.isTrue(client.authorized);
}
}
'The task times out': function(err, result){
assert.isTrue(err.taskTimedOut);
assert.lesser(err.taskRunTime, 125);
}
},
"successfully" : function(err, stat) {
assert.isNull(err);
assert.isTrue(stat);
},
"and can be shut down" : {
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);
};
};
'should return true': function (err, status) {
assert.isTrue(status);
},