update some cosmetics
This commit is contained in:
		
							
								
								
									
										9
									
								
								dist/smartssh.classes.sshinstance.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								dist/smartssh.classes.sshinstance.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -4,7 +4,12 @@ import smartssh = require("../dist/index"); | ||||
| describe("smartssh",function(){ | ||||
|     let testSshInstance:smartssh.SshInstance; | ||||
|     let testSshKey:smartssh.SshKey; | ||||
|     describe("SshInstance",function(){ | ||||
|     describe(".SshKey",function(){ | ||||
|         it("should represent a valid SshKey",function(){ | ||||
|              | ||||
|         }); | ||||
|     }); | ||||
|     describe(".SshInstance",function(){ | ||||
|         it("'new' keyword should create a new SshInstance object from class",function(){ | ||||
|             testSshInstance = new smartssh.SshInstance(); | ||||
|             testSshInstance.should.be.instanceof(smartssh.SshInstance); | ||||
| @@ -40,5 +45,5 @@ describe("smartssh",function(){ | ||||
|             testSshInstance.removeKey(testSshInstance.getKey("bitbucket.org")); | ||||
|             testSshInstance.sshKeys[1].host.should.equal("github.com"); | ||||
|         }) | ||||
|     }) | ||||
|     }); | ||||
| }) | ||||
| @@ -35,10 +35,8 @@ export class SshInstance { | ||||
|     }; | ||||
|     replaceKey(sshKeyOldArg:SshKey,sshKeyNewArg:SshKey){ | ||||
|         this.sync("from"); | ||||
|         let filteredArray = this.sshKeyArray.filter((sshKeyArg:SshKey) => { | ||||
|             return (sshKeyArg.host == "some"); //TODO | ||||
|         }); | ||||
|         this.sshKeyArray = filteredArray; | ||||
|         this.removeKey(sshKeyOldArg); | ||||
|         this.addKey(sshKeyNewArg); | ||||
|         this.sync("to"); | ||||
|     }; | ||||
|      | ||||
| @@ -55,6 +53,7 @@ export class SshInstance { | ||||
|         } | ||||
|     }; | ||||
|     get sshKeys():SshKey[] { | ||||
|         this.sync("from"); | ||||
|         return this.sshKeyArray; | ||||
|     } | ||||
|     sync(directionArg:string){ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user