33 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			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();
 | |
|         });
 | |
|     })
 | |
| }) |