You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feel free to add common problems with their solutions here, or just anything that wasn't clear at first.
5
4
6
-
#### Error: callback returned unsupported credentials type ####
5
+
#### Error: callback returned unsupported credentials type
7
6
8
7
As seen in nodegit/#959 -- some golang hackers have started to use the following stanza in .gitconfig to allow `go get` to work with private repos:
8
+
9
9
```
10
10
[url "git@github.com:"]
11
11
insteadOf = https://github.com/
12
12
```
13
+
13
14
But if you do this, code can call `NodeGit.Clone.clone(url: 'https://foo')` and have the `authentication` callback be asked for **SSH** credentials instead of HTTPS ones, which might not be what your application expected.
Copy file name to clipboardExpand all lines: TESTING.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,31 @@
1
-
Test Contribution Guidelines
2
-
----------------------------
1
+
## Test Contribution Guidelines
3
2
4
3
This is a guide on how to contribute test cases to help with coverage testing for NodeGit.
5
4
6
-
## Getting Started ##
5
+
## Getting Started
7
6
8
7
Currently there are a number of fields and functions in NodeGit that have no tests at all. A list of which files are missing and what fields and functions need tests can be generated by running
9
8
10
-
```bash
9
+
```bash
11
10
npm run generateMissingTests
12
11
```
13
12
14
-
>You should have run already `npm install .` or it will complain about
13
+
>You should have run already `npm install .` or it will complain about
15
14
> missing `nodegit-promise` or suchlike
16
15
17
16
This will make the file `generate/output/missing-tests.json` which will contain info for tests or files that are currently missing.
18
17
19
18
From this file you can find fields and functions that don't have any tests yet and pick one to work on.
20
19
21
-
## Adding a test ##
20
+
## Adding a test
22
21
23
22
After you find a test that's missing the next step is to find or add the file that you need to add it into. You can always use other tests in the directory as a guide for writing more. All new files will be automatically added during a test run.
24
23
25
24
In the `missing-tests.json` file you'll see it formatted like so:
26
25
27
26
```json
28
27
{
29
-
"{className}":{
28
+
"{className}":{
30
29
"fields": [],
31
30
"functions": []
32
31
}
@@ -48,19 +47,19 @@ You can mark something to be ignored inside of the `/generate/missing-tests-igno
48
47
49
48
After you write your test make sure to run `npm run generateMissingTests` again to confirm that the field/function that a test was written for no longer shows up.
50
49
51
-
## Test results ##
50
+
## Test results
52
51
53
-
### The test passes ###
52
+
### The test passes
54
53
55
54
Excellent!! Make sure that the test is working correctly and testing what you're expecting it to test and then move onto the [next section](#making-a-pull-request).
56
55
57
-
### The test fails ###
56
+
### The test fails
58
57
59
58
This is also great! You just found something that wasn't properly covered in our generate scripts for wrapping libgit2. We'll have to further analyze what's going on and figure out how to fix it.
60
59
61
60
For bonus points you could also include a fix in your pull request but that step is optional.
62
61
63
-
## Making a pull request ##
62
+
## Making a pull request
64
63
65
64
So you made your self a new test for NodeGit and now you want to add it to the main repo? That's great! We'll try and make the process as simple and easy as possible for you.
0 commit comments