Skip to content

Commit ec49ca3

Browse files
committed
Depracate node 8.10. Add support for node 14.x 
1 parent 7096092 commit ec49ca3

File tree

13 files changed

+17
-13
lines changed

13 files changed

+17
-13
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: node_js
22
node_js:
3-
- '8.10.0'
43
- '10'
54
- '12'
5+
- '14'
66
script:
77
- npm run lint
88
- npm test

__tests__/config.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ xdescribe('jest configuration', () => {
9494
service: my-service
9595
provider:
9696
name: aws
97-
runtime: nodejs8.10
97+
runtime: nodejs14.x
9898
stage: dev
9999
region: us-west-1
100100
plugins:
@@ -147,7 +147,7 @@ xdescribe('jest configuration', () => {
147147
service: my-service
148148
provider:
149149
name: aws
150-
runtime: nodejs8.10
150+
runtime: nodejs14.x
151151
stage: dev
152152
region: us-west-1
153153
plugins:

__tests__/integration10.x.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const Serverless = require('serverless');
44
const execSync = require('child_process').execSync;
55
const path = require('path');
66
const fs = require('fs-extra');
7+
const stripAnsi = require('strip-ansi');
78
const { getTmpDirPath, replaceTextInFile, spawnPromise } = require('./test-utils');
89

910
const serverless = new Serverless();
@@ -71,8 +72,9 @@ describe('integration', () => {
7172
"require('../.serverless_plugins/serverless-jest-plugin/index.js')",
7273
);
7374
return spawnPromise(serverlessExec, 'invoke test --stage prod').then(({ stderr }) => {
74-
expect(stderr).toContain('PASS');
75-
return expect(stderr).toContain('Test Suites: 2 passed, 2 total');
75+
const rawStderr = stripAnsi(stderr);
76+
expect(rawStderr).toContain('PASS');
77+
return expect(rawStderr).toContain('Test Suites: 2 passed, 2 total');
7678
});
7779
},
7880
35000,

__tests__/integration12.x.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const Serverless = require('serverless');
44
const execSync = require('child_process').execSync;
55
const path = require('path');
66
const fs = require('fs-extra');
7+
const stripAnsi = require('strip-ansi');
78
const { getTmpDirPath, replaceTextInFile, spawnPromise } = require('./test-utils');
89

910
const serverless = new Serverless();
@@ -71,8 +72,9 @@ describe('integration', () => {
7172
"require('../.serverless_plugins/serverless-jest-plugin/index.js')",
7273
);
7374
return spawnPromise(serverlessExec, 'invoke test --stage prod').then(({ stderr }) => {
74-
expect(stderr).toContain('PASS');
75-
return expect(stderr).toContain('Test Suites: 2 passed, 2 total');
75+
const rawStderr = stripAnsi(stderr);
76+
expect(rawStderr).toContain('PASS');
77+
return expect(rawStderr).toContain('Test Suites: 2 passed, 2 total');
7678
});
7779
},
7880
35000,

__tests__/integration8.10.test.js renamed to __tests__/integration14.x.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('integration', () => {
1616
process.env.PLUGIN_TEST_DIR = path.join(__dirname);
1717
const tmpDir = getTmpDirPath();
1818
fs.mkdirsSync(tmpDir);
19-
fs.copySync(path.join(process.env.PLUGIN_TEST_DIR, 'test-service8.10'), tmpDir);
19+
fs.copySync(path.join(process.env.PLUGIN_TEST_DIR, 'test-service14.x'), tmpDir);
2020
const packageJsonPath = path.join(tmpDir, 'package.json');
2121
const packageJson = fs.readJsonSync(packageJsonPath);
2222
packageJson.name = `application-${Date.now()}`;

__tests__/test-service-options/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ service: jest-test-suite
1919

2020
provider:
2121
name: aws
22-
runtime: nodejs8.10
22+
runtime: nodejs14.x
2323
environment:
2424
STAGE: ${opt:stage}-stage-test
2525
stage: dev

__tests__/test-service8.10/package.json renamed to __tests__/test-service14.x/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "application-name-8",
2+
"name": "application-name-12",
33
"version": "0.0.1",
44
"dependencies": {
55
"serverless-jest-plugin": ""

0 commit comments

Comments
 (0)