smartssh/test/test.ts
2016-06-01 02:48:38 +02:00

33 lines
1.2 KiB
TypeScript

import "typings-test"
import "should";
import smartssh = require("../dist/index");
describe("smartssh",function(){
let testSshInstance:smartssh.SshInstance;
let testSshKey:smartssh.SshKey;
describe("SshInstance",function(){
it("should create a new SshInstance object from class",function(){
testSshInstance = new smartssh.SshInstance();
testSshInstance.should.be.instanceof(smartssh.SshInstance);
});
it("should accept a new SshKey object",function(){
testSshInstance.addKey(new smartssh.SshKey({
public:"somePublicKey",
private:"somePrivateKey",
host:"gitlab.com"
}));
testSshInstance.addKey(new smartssh.SshKey({
public:"somePublicKey",
private:"somePrivateKey",
host:"bitbucket.org"
}));
testSshInstance.addKey(new smartssh.SshKey({
public:"somePublicKey",
private:"somePrivateKey",
host:"github.com"
}));
});
it("should return an array of sshKeys",function(){
testSshInstance.getKeys();
});
})
})