Skip to content

Commit

Permalink
feat(node): add support for node v10
Browse files Browse the repository at this point in the history
  • Loading branch information
acburdine committed Oct 30, 2018
1 parent 463d706 commit cccddae
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: node_js
node_js:
- "6"
- "8"
- "10"

sudo: false

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
]
},
"engines": {
"node": "^6.9.0 || ^8.9.0"
"node": "^6.9.0 || ^8.9.0 || ^10.12.0"
},
"preferGlobal": true,
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/ui/pretty-stream-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Unit: UI > PrettyStream', function () {
it('passes through buffer objects without stringifying', function () {
// Stub the prototype of the Transform class
const writeStub = sinon.stub(streams.Transform.prototype, 'write');
const testBuffer = new Buffer('some test string', 'utf8');
const testBuffer = Buffer.from('some test string', 'utf8');

const stream = new PrettyStream();
stream.write(testBuffer, 'utf8', {callback: true});
Expand Down
20 changes: 20 additions & 0 deletions test/unit/utils/version-from-zip-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,30 @@ const errors = require('../../../lib/errors');
const modulePath = '../../../lib/utils/version-from-zip';

describe('Unit: Utils > versionFromZip', function () {
const currentNodeVersion = process.versions.node;

before(function () {
Object.defineProperty(process.versions, 'node', {
value: '8.11.0', // CHANGE THIS WHENEVER RECOMMENDED NODE VERSION CHANGES
writable: true,
enumerable: true,
configurable: true
});
});

beforeEach(function () {
delete process.env.GHOST_NODE_VERSION_CHECK;
});

after(function () {
Object.defineProperty(process.versions, 'node', {
value: currentNodeVersion,
writeable: false,
enumerable: true,
configurable: true
});
});

it('rejects if zip file doesn\'t exist', function () {
const existsStub = sinon.stub().returns(false);
const versionFromZip = proxyquire(modulePath, {
Expand Down

0 comments on commit cccddae

Please sign in to comment.