Skip to content

Commit b24f61b

Browse files
committed
upload test cases
1 parent 2be585d commit b24f61b

File tree

7 files changed

+321
-147
lines changed

7 files changed

+321
-147
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [10.x, 12.x]
12+
node-version: [12.x]
1313

1414
steps:
1515
- uses: actions/checkout@v1

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [10.x, 12.x]
15+
node-version: [12.x]
1616

1717
steps:
1818
- uses: actions/checkout@v1

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"chai": "^4.2.0",
2121
"formdata-node": "2.1.0",
2222
"mocha": "^7.0.1",
23-
"nock": "^13.0.4",
2423
"rollup": "^2.22.0",
2524
"rollup-plugin-babel": "^4.4.0",
2625
"rollup-plugin-terser": "^6.1.0",
@@ -29,7 +28,7 @@
2928
"scripts": {
3029
"dev": "rollup -c -w",
3130
"build": "rm -rf dist*;rollup -c",
32-
"test": "yarn install && yarn build && export NODE_ENV=test && ./node_modules/mocha/bin/mocha --exit -t 40000 test/*.js;ex=$? ; unset NODE_ENV ; exit $ex;",
31+
"test": "export NODE_ENV=test && ./node_modules/mocha/bin/mocha --exit -t 40000 test/*.js;ex=$? ; unset NODE_ENV ; exit $ex;",
3332
"startSampleApp": "yarn build && cd samples/sample-app/ && yarn install && node index.js"
3433
},
3534
"repository": {

src/utils/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const request = (formData, defaultOptions, callback) => {
1414
if (err) {
1515
console.log(err);
1616
if (typeof callback != "function") return;
17-
callback(err);
17+
callback(err, null);
1818
} else {
1919
callback(null, responseSucessText);
2020
}

test/data/test_image.png

-4.28 KB
Binary file not shown.

0 commit comments

Comments
 (0)