Skip to content

Commit cb97329

Browse files
committed
fix: Java output fixtures
add: husky pre-commit hooks
1 parent 135874c commit cb97329

File tree

11 files changed

+3
-21
lines changed

11 files changed

+3
-21
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
},
2626
"scripts": {
2727
"test": "standard && mocha --reporter spec",
28-
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha"
28+
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha",
29+
"prepush": "npm test"
2930
},
3031
"standard": {
3132
"ignore": [
@@ -35,6 +36,7 @@
3536
"devDependencies": {
3637
"codeclimate-test-reporter": "0.0.4",
3738
"glob": "^5.0.3",
39+
"husky": "^0.7.0",
3840
"istanbul": "^0.3.8",
3941
"mocha": "^2.2.1",
4042
"should": "^5.2.0"

test/fixtures/output/java/unirest/application-form-encoded.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.post("http://mockbin.com/har")
42
.header("content-type", "application/x-www-form-urlencoded")
53
.body("foo=bar&hello=world")

test/fixtures/output/java/unirest/application-json.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.post("http://mockbin.com/har")
42
.header("content-type", "application/json")
53
.body("{\"number\": 1, \"string\": \"f\\\"oo\", \"arr\": [1, 2, 3], \"nested\": {\"a\": \"b\"}, \"arr_mix\": [1, \"a\", {\"arr_mix_nested\": {}}] }")
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.post("http://mockbin.com/har")
42
.header("cookie", "foo=bar; bar=baz")
53
.asString();

test/fixtures/output/java/unirest/full.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.post("http://mockbin.com/har?foo=bar&foo=baz&baz=abc&key=value")
42
.header("cookie", "foo=bar; bar=baz")
53
.header("accept", "application/json")

test/fixtures/output/java/unirest/headers.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.get("http://mockbin.com/har")
42
.header("accept", "application/json")
53
.header("x-foo", "Bar")

test/fixtures/output/java/unirest/multipart-data.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.post("http://mockbin.com/har")
42
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
53
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"foo\"; filename=\"hello.txt\"\r\nContent-Type: text/plain\r\n\r\nHello World\r\n-----011000010111000001101001--")

test/fixtures/output/java/unirest/multipart-file.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.post("http://mockbin.com/har")
42
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
53
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"foo\"; filename=\"hello.txt\"\r\nContent-Type: text/plain\r\n\r\n\r\n-----011000010111000001101001--")

test/fixtures/output/java/unirest/multipart-form-data.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.post("http://mockbin.com/har")
42
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
53
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"foo\"\r\n\r\nbar\r\n-----011000010111000001101001--")
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
//Import unirest library (http://unirest.io/java.html)
2-
31
HttpResponse<String> response = Unirest.get("http://mockbin.com/har?foo=bar&foo=baz&baz=abc&key=value")
42
.asString();

0 commit comments

Comments
 (0)