FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit.nodegit/test/tests/cred.js at master · javascript-forks/nodegit.nodegit · GitHub
javascript-forks
nodegit.nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit.nodegit
/
test
/
tests
/
cred.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (25 loc) · 868 Bytes
Breadcrumbs
nodegit.nodegit
/
test
/
tests
/
cred.js
Copy path
File metadata and controls
31 lines (25 loc) · 868 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var
assert
=
require
(
"assert"
)
;
var
path
=
require
(
"path"
)
;
var
local
=
path
.
join
.
bind
(
path
,
__dirname
)
;
describe
(
"Cred"
,
function
(
)
{
var
NodeGit
=
require
(
"../../"
)
;
var
sshPublicKey
=
local
(
"../id_rsa.pub"
)
;
var
sshPrivateKey
=
local
(
"../id_rsa"
)
;
it
(
"can create default credentials"
,
function
(
)
{
var
defaultCreds
=
NodeGit
.
Cred
.
defaultNew
(
)
;
assert
.
ok
(
defaultCreds
instanceof
NodeGit
.
Cred
)
;
}
)
;
it
(
"can create ssh credentials using passed keys"
,
function
(
)
{
var
cred
=
NodeGit
.
Cred
.
sshKeyNew
(
"username"
,
sshPublicKey
,
sshPrivateKey
,
""
)
;
assert
.
ok
(
cred
instanceof
NodeGit
.
Cred
)
;
}
)
;
it
(
"can create credentials using plaintext"
,
function
(
)
{
var
plaintextCreds
=
NodeGit
.
Cred
.
userpassPlaintextNew
(
"username"
,
"password"
)
;
assert
.
ok
(
plaintextCreds
instanceof
NodeGit
.
Cred
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL