Skip to content

Commit

Permalink
updated tests to match
Browse files Browse the repository at this point in the history
  • Loading branch information
strootje committed Jan 7, 2021
1 parent 0edf40f commit b2dccbb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

version: 2
jobs:
test-node8:
test-node10:
docker:
- image: circleci/node:8
- image: circleci/node:10
steps:
- checkout
- run: node --version > _node_version && npm --version > _npm_version && cat _node_version && cat _npm_version
Expand All @@ -24,9 +24,9 @@ jobs:
- ~/.npm
key: v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }}
- run: npm run test.ci
test-node10:
test-node12:
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
- run: node --version > _node_version && npm --version > _npm_version && cat _node_version && cat _npm_version
Expand All @@ -40,9 +40,9 @@ jobs:
- ~/.npm
key: v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }}
- run: npm run test.ci
test-node12:
test-node14:
docker:
- image: circleci/node:12
- image: circleci/node:14
steps:
- checkout
- run: node --version > _node_version && npm --version > _npm_version && cat _node_version && cat _npm_version
Expand All @@ -61,6 +61,6 @@ workflows:
version: 2
build_and_test:
jobs:
- test-node8
- test-node10
- test-node12
- test-node14
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
environment:
matrix:
- nodejs_version: '8'
- nodejs_version: '10'
- nodejs_version: '12'
- nodejs_version: '14'
platform:
- x86
- x64
Expand Down
2 changes: 1 addition & 1 deletion dev-utils/node-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function getNodeVersion() {
const packageJson =
readPkgUp.sync({ cwd: process.cwd(), normalize: false }).package || {};
const engines = packageJson.engines || {};
const node = engines.node || '8.9.0';
const node = engines.node || '10.0.0';

const nodeVersion = semver.coerce(node).raw;

Expand Down
8 changes: 4 additions & 4 deletions dev-utils/node-version.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ test('handles undefined pkg', () => {

const nodeVersion = require('./node-version');

expect(nodeVersion).toEqual('8.9.0');
expect(nodeVersion).toEqual('10.0.0');
});

test('handles undefined engines', () => {
jest.doMock('read-pkg-up', () => ({ sync: () => ({ package: {} }) }));

const nodeVersion = require('./node-version');

expect(nodeVersion).toEqual('8.9.0');
expect(nodeVersion).toEqual('10.0.0');
});

test('handles undefined node', () => {
Expand All @@ -25,7 +25,7 @@ test('handles undefined node', () => {

const nodeVersion = require('./node-version');

expect(nodeVersion).toEqual('8.9.0');
expect(nodeVersion).toEqual('10.0.0');
});

test('handles non-digit characters', () => {
Expand All @@ -45,5 +45,5 @@ test('handles empty node', () => {

const nodeVersion = require('./node-version');

expect(nodeVersion).toEqual('8.9.0');
expect(nodeVersion).toEqual('10.0.0');
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dist/"
],
"engines": {
"node": ">=8.9.0"
"node": ">=10.0.0"
},
"keywords": [
"webpack",
Expand Down

0 comments on commit b2dccbb

Please sign in to comment.