Skip to content

Commit f71da69

Browse files
authored
test: fix throws test on node 10 (#110)
closes #109
1 parent 87ed8d6 commit f71da69

30 files changed

Lines changed: 52 additions & 359 deletions

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
sudo: false
22
language: node_js
33
node_js:
4+
- '10'
5+
- '8'
46
- '6'
57
- '4'
68
- '0.12'
79
script:
8-
- "npm run ci"
10+
- 'npm run ci'
911
after_script:
10-
- "npm i codecov && codecov"
12+
- 'npm i codecov && codecov'

benchmark/decode.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
/**!
2-
* hessian.js - benchmark/decode.js
3-
*
4-
* Copyright(c) fengmk2 and other contributors.
5-
* MIT Licensed
6-
*
7-
* Authors:
8-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
9-
*/
10-
111
'use strict';
122

13-
/**
14-
* Module dependencies.
15-
*/
16-
173
var ByteBuffer = require('byte');
184
var Benchmark = require('benchmark');
195
var benchmarks = require('beautify-benchmark');

benchmark/encode.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
/**!
2-
* hessian.js - benchmark/encode.js
3-
*
4-
* Copyright(c) fengmk2 and other contributors.
5-
* MIT Licensed
6-
*
7-
* Authors:
8-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
9-
*/
10-
111
'use strict';
122

13-
/**
14-
* Module dependencies.
15-
*/
16-
173
var ByteBuffer = require('byte');
184
var Benchmark = require('benchmark');
195
var benchmarks = require('beautify-benchmark');

index.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/**
2-
* Copyright(c) node-modules and other contributors.
3-
* MIT Licensed
4-
*
5-
* Authors:
6-
* dead_horse <dead_horse@qq.com> (http://deadhorse.me)
7-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.com)
8-
*/
9-
101
'use strict';
112

123
var EncoderV1 = exports.EncoderV1 = exports.Encoder = require('./lib/v1/encoder');

lib/object.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/**
2-
* hessian.js - lib/object.js
3-
* Copyright(c)
4-
* MIT Licensed
5-
*
6-
* Authors:
7-
* dead_horse <dead_horse@qq.com> (http://deadhorse.me)
8-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
9-
*/
10-
111
'use strict';
122

133
var util = require('util');

lib/utils.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/**
2-
* hessian.js - lib/utils.js
3-
* Copyright(c)
4-
* MIT Licensed
5-
*
6-
* Authors:
7-
* dead_horse <dead_horse@qq.com> (http://deadhorse.me)
8-
*/
9-
101
'use strict';
112

123
var debug = require('debug')('hessian.js:utils');

lib/v1/decoder.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/**
2-
* hessian.js - lib/v1/decoder.js
3-
* Copyright(c)
4-
* MIT Licensed
5-
*
6-
* Authors:
7-
* dead_horse <dead_horse@qq.com> (http://deadhorse.me)
8-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
9-
*/
10-
111
'use strict';
122

133
var debug = require('debug')('hessian:v1:decoder');

lib/v1/encoder.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/**
2-
* hessian.js - lib/encoder.js
3-
* Copyright(c)
4-
* MIT Licensed
5-
*
6-
* Authors:
7-
* dead_horse <dead_horse@qq.com> (http://deadhorse.me)
8-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
9-
*/
10-
111
'use strict';
122

133
var ByteBuffer = require('byte');
@@ -308,7 +298,7 @@ proto._writeObject = function (obj) {
308298
* : {$class: 'java.lang.Map', $: {a: 1}}
309299
*/
310300
proto.writeObject = function (obj) {
311-
if (is.nullOrUndefined(obj) ||
301+
if (is.nullOrUndefined(obj) ||
312302
// : { a: { '$class': 'xxx', '$': null } }
313303
(is.string(obj.$class) && is.nullOrUndefined(obj.$))) {
314304
debug('writeObject with a null');

lib/v2/decoder.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
/**
2-
* hessian.js - lib/v2/decoder.js
3-
*
4-
* Copyright(c)
5-
* MIT Licensed
6-
*
7-
* Authors:
8-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
9-
*/
10-
11-
"use strict";
12-
13-
/**
14-
* Module dependencies.
15-
*/
1+
'use strict';
162

173
var util = require('util');
184
var is = require('is-type-of');

lib/v2/encoder.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
/**
2-
* hessian.js - lib/v2/encoder.js
3-
*
4-
* Copyright(c)
5-
* MIT Licensed
6-
*
7-
* Authors:
8-
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
9-
*/
10-
11-
"use strict";
12-
13-
/**
14-
* Module dependencies.
15-
*/
1+
'use strict';
162

173
var debug = require('debug')('hessian:v2:encoder');
184
var is = require('is-type-of');

0 commit comments

Comments
 (0)