FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit.nodegit/test/tests/oid.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
/
oid.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (21 loc) · 689 Bytes
Breadcrumbs
nodegit.nodegit
/
test
/
tests
/
oid.js
Copy path
File metadata and controls
29 lines (21 loc) · 689 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
(
"Oid"
,
function
(
)
{
var
NodeGit
=
require
(
"../../"
)
;
var
Oid
=
NodeGit
.
Oid
;
var
oid
=
"fce88902e66c72b5b93e75bdb5ae717038b221f6"
;
before
(
function
(
)
{
this
.
oid
=
Oid
.
fromString
(
oid
)
;
}
)
;
it
(
"can convert a string to an oid"
,
function
(
)
{
assert
.
ok
(
this
.
oid
instanceof
Oid
)
;
}
)
;
it
(
"can convert an oid to a string"
,
function
(
)
{
var
string
=
this
.
oid
.
allocfmt
(
)
;
assert
.
equal
(
string
,
oid
)
;
assert
.
equal
(
this
.
oid
.
toString
(
)
,
oid
)
;
}
)
;
it
(
"provides a custom inspect method to improve debugging"
,
function
(
)
{
var
inspect
=
this
.
oid
.
inspect
(
)
;
assert
.
equal
(
inspect
,
"[Oid "
+
oid
+
"]"
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL