FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/test/tests/cred.js at v0.2.4 · nodegit/nodegit · GitHub
nodegit
nodegit
Repository navigation
Code
Issues
344
(344)
Pull requests
23
(23)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
test
/
tests
/
cred.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (25 loc) · 779 Bytes
Breadcrumbs
nodegit
/
test
/
tests
/
cred.js
Copy path
File metadata and controls
29 lines (25 loc) · 779 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
var
assert
=
require
(
"assert"
)
;
describe
(
"Cred"
,
function
(
)
{
var
NodeGit
=
require
(
"../../"
)
;
it
(
"can create default credentials"
,
function
(
)
{
NodeGit
.
Cred
.
defaultNew
(
)
.
then
(
function
(
defaultCreds
)
{
assert
(
defaultCreds
instanceof
NodeGit
.
Cred
)
;
}
)
;
}
)
;
it
(
"can create ssh credentials using passed keys"
,
function
(
)
{
NodeGit
.
Cred
.
sshKeyNew
(
"username"
,
"public key"
,
"private key"
,
"passphrase"
)
.
then
(
function
(
sshCreds
)
{
assert
(
sshCreds
instanceof
NodeGit
.
Cred
)
;
}
)
;
}
)
;
it
(
"can create credentials using plaintext"
,
function
(
)
{
NodeGit
.
Cred
.
userpassPlaintextNew
(
"username"
,
"password"
)
.
then
(
function
(
plaintextCreds
)
{
assert
(
plaintextCreds
instanceof
NodeGit
.
Cred
)
;
}
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL