Skip to content

Commit e2462fa

Browse files
committed
chore(travis): update test matrix
Update the test matrix to test newer versions of the Node.js runtime.
1 parent 14f1d71 commit e2462fa

File tree

5 files changed

+84
-92
lines changed

5 files changed

+84
-92
lines changed

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- 0.10
5-
- 0.12
6-
- 6
7-
- 7
4+
- '0.10'
5+
- '0.12'
6+
- '4'
7+
- '6'
8+
- '8'
9+
- '10'
810
matrix:
911
include:
10-
- node_js: 4
11-
env: LINT_TEST=true
12+
- node_js: 10
13+
script: npm run lint
1214
script:
13-
- "if [[ -n $LINT_TEST ]]; then npm run lint; fi"
1415
- npm run test
1516
after_success:
1617
- npm run coverage

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ var GulpUglifyError = require('./lib/gulp-uglify-error');
55
var logger = require('./lib/log');
66

77
module.exports = function(opts) {
8-
return compose(uglify, logger)(opts);
8+
return compose(
9+
uglify,
10+
logger
11+
)(opts);
912
};
1013

1114
module.exports.GulpUglifyError = GulpUglifyError;

test/err.js

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,16 @@ describe('errors', function() {
2525
var err = new Error();
2626
err.line = 28889;
2727

28-
td
29-
.when(
30-
uglify.minify(
31-
{
32-
'test1.js': 'function errorFunction(error)\n{'
33-
},
34-
expOptions
35-
)
28+
td.when(
29+
uglify.minify(
30+
{
31+
'test1.js': 'function errorFunction(error)\n{'
32+
},
33+
expOptions
3634
)
37-
.thenReturn({
38-
error: err
39-
});
35+
).thenReturn({
36+
error: err
37+
});
4038

4139
var subject = minify(uglify, logger)({});
4240

@@ -87,18 +85,16 @@ describe('errors', function() {
8785
};
8886
var err = new Error('`exportAll` is not a supported option');
8987

90-
td
91-
.when(
92-
uglify.minify(
93-
{
94-
'test1.js': '{}'
95-
},
96-
expOptions
97-
)
88+
td.when(
89+
uglify.minify(
90+
{
91+
'test1.js': '{}'
92+
},
93+
expOptions
9894
)
99-
.thenReturn({
100-
error: err
101-
});
95+
).thenReturn({
96+
error: err
97+
});
10298

10399
var subject = minify(uglify, logger)({
104100
output: {

test/minify.js

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,18 @@ describe('minify', function() {
2828
var uglify = td.object(['minify']);
2929
var logger = td.object(['warn']);
3030

31-
td
32-
.when(
33-
uglify.minify(
34-
{
35-
'test1.js': testContentsInput
36-
},
37-
{
38-
output: {}
39-
}
40-
)
31+
td.when(
32+
uglify.minify(
33+
{
34+
'test1.js': testContentsInput
35+
},
36+
{
37+
output: {}
38+
}
4139
)
42-
.thenReturn({
43-
code: 'foobar'
44-
});
40+
).thenReturn({
41+
code: 'foobar'
42+
});
4543

4644
var subject = minify(uglify, logger)({});
4745
var file = subject(this.testFile);
@@ -60,20 +58,18 @@ describe('minify', function() {
6058
var uglify = td.object(['minify']);
6159
var logger = td.object(['warn']);
6260

63-
td
64-
.when(
65-
uglify.minify(
66-
{
67-
'test1.js': testContentsInput
68-
},
69-
{
70-
output: {}
71-
}
72-
)
61+
td.when(
62+
uglify.minify(
63+
{
64+
'test1.js': testContentsInput
65+
},
66+
{
67+
output: {}
68+
}
7369
)
74-
.thenReturn({
75-
code: 'foobar'
76-
});
70+
).thenReturn({
71+
code: 'foobar'
72+
});
7773

7874
var subject = minify(uglify, logger)('build.min.js');
7975
var file = subject(this.testFile);

test/sourcemap.js

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,24 @@ describe('init-ed source maps', function() {
3636
var uglify = td.object(['minify']);
3737
var logger = td.object(['logger']);
3838

39-
td
40-
.when(
41-
uglify.minify(
42-
{
43-
'test1.js': testContents1Input
44-
},
45-
{
46-
output: {},
47-
sourceMap: {
48-
filename: 'test1.js',
49-
includeSources: true,
50-
content: testFile.sourceMap
51-
}
39+
td.when(
40+
uglify.minify(
41+
{
42+
'test1.js': testContents1Input
43+
},
44+
{
45+
output: {},
46+
sourceMap: {
47+
filename: 'test1.js',
48+
includeSources: true,
49+
content: testFile.sourceMap
5250
}
53-
)
51+
}
5452
)
55-
.thenReturn({
56-
code: 'foobar',
57-
map: JSON.stringify(outMap.map)
58-
});
53+
).thenReturn({
54+
code: 'foobar',
55+
map: JSON.stringify(outMap.map)
56+
});
5957

6058
var subject = minify(uglify, logger)({});
6159
var file = subject(testFile);
@@ -99,26 +97,24 @@ describe('init-ed source maps', function() {
9997
var uglify = td.object(['minify']);
10098
var logger = td.object(['warn']);
10199

102-
td
103-
.when(
104-
uglify.minify(
105-
{
106-
'test1.js': String(inMap)
107-
},
108-
{
109-
output: {},
110-
sourceMap: {
111-
filename: 'test1.js',
112-
includeSources: true,
113-
content: testFile.sourceMap
114-
}
100+
td.when(
101+
uglify.minify(
102+
{
103+
'test1.js': String(inMap)
104+
},
105+
{
106+
output: {},
107+
sourceMap: {
108+
filename: 'test1.js',
109+
includeSources: true,
110+
content: testFile.sourceMap
115111
}
116-
)
112+
}
117113
)
118-
.thenReturn({
119-
code: 'send a PR changing this to the best La Croix flavor',
120-
map: JSON.stringify(outMap.map)
121-
});
114+
).thenReturn({
115+
code: 'send a PR changing this to the best La Croix flavor',
116+
map: JSON.stringify(outMap.map)
117+
});
122118

123119
var subject = minify(uglify, logger)({});
124120
var file = subject(testFile);

0 commit comments

Comments
 (0)