improved tests and reached 80% coverage milestone.

This commit is contained in:
Philipp Kunz 2016-06-01 05:09:20 +02:00
parent 48ccf317d6
commit fa301eea71
3 changed files with 44 additions and 6 deletions

View File

@ -1,4 +1,3 @@
{ {
"mode":"default", "mode":"default"
"coverageTreshold":50
} }

File diff suppressed because one or more lines are too long

View File

@ -5,9 +5,26 @@ describe("smartssh",function(){
let testSshInstance:smartssh.SshInstance; let testSshInstance:smartssh.SshInstance;
let testSshKey:smartssh.SshKey; let testSshKey:smartssh.SshKey;
describe(".SshKey",function(){ describe(".SshKey",function(){
it("should represent a valid SshKey",function(){ it("'new' keyword should create a valid SshKey object",function(){
testSshKey = new smartssh.SshKey({
host:"example.com",
private:"someExamplePrivateKey",
public:"someExamplePublicKey"
});
testSshKey.should.be.instanceof(smartssh.SshKey);
}); });
it(".type should be a valid type",function(){
testSshKey.type.should.equal("duplex");
});
it(".publicKey should be public key",function(){
testSshKey.publicKey.should.equal("someExamplePublicKey");
});
it(".privateKey should be private key",function(){
testSshKey.privateKey.should.equal("someExamplePrivateKey");
});
it(".publicKeyBase64 should be public key base 64 encoded",function(){
testSshKey.publicKeyBase64;
})
}); });
describe(".SshInstance",function(){ describe(".SshInstance",function(){
it("'new' keyword should create a new SshInstance object from class",function(){ it("'new' keyword should create a new SshInstance object from class",function(){