Skip to content

Commit c4b220c

Browse files
committed
Update travis.yml
1 parent 8752a68 commit c4b220c

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

.travis.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
language: node_js
22
node_js:
3-
- "node"
4-
- "lts/*"
5-
before_script:
3+
- 14
4+
cache:
5+
directories:
6+
- node_modules
7+
- before_install:
8+
- npm i -g jest
9+
script:
610
- npm run build
7-
jobs:
8-
- name: "src"
9-
env: TEST_SUBJECT=src
10-
- name: "lib"
11-
env: TEST_SUBJECT=lib
12-
- name: "dist"
13-
env: TEST_SUBJECT=dist
14-
- name: "e2e"
15-
script: yarn run test:e2e
11+
- npm test

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"description": "Present Cloudinary images and videos using React components",
55
"main": "lib/index.js",
66
"scripts": {
7-
"test": "jest",
8-
"test:build": "npm run build && TEST_ENV=PRODUCTION npm run test",
9-
"test:all": "run-s build test test:build test:e2e",
7+
"test": "run-s test:unit test:build test:e2e",
8+
"test:unit": "jest",
9+
"test:build": "TEST_ENV=PRODUCTION npm run test",
1010
"test:e2e": "cd ./e2e-test && npm run test",
1111
"test:coverage": "jest --coverage",
12-
"pretest:e2e": "npm run build && npm pack && cpy cloudinary-react-*.tgz e2e-test --rename=cloudinary-react.tgz",
12+
"pretest:e2e": "npm pack && cpy cloudinary-react-*.tgz e2e-test --rename=cloudinary-react.tgz",
1313
"prebuild": "node_modules/.bin/babel src --out-dir lib --copy-files ",
1414
"build": "node_modules/.bin/webpack && npm run bundlewatch",
1515
"bundlewatch": "bundlewatch --config ./bundlewatch.config.js",
@@ -35,6 +35,7 @@
3535
"@babel/preset-env": "^7.2.0",
3636
"@babel/preset-react": "^7.0.0",
3737
"@babel/register": "^7.0.0",
38+
"@jest/reporters": "^26.6.2",
3839
"@storybook/addon-actions": "^4.1.2",
3940
"@storybook/addon-info": "^4.1.2",
4041
"@storybook/addon-links": "^4.1.2",

src/components/Placeholder/Placeholder.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import CloudinaryComponent from "../CloudinaryComponent";
43

54
/**
65
* Placeholder used by parent Image component, renders nothing on it's own.
76
* @param type - type of placeholder 'blur'|'pixelate'|'predominant-color'|'vectorize',
87
* @return {null}
98
* @constructor
109
*/
11-
class Placeholder extends CloudinaryComponent {}
10+
const Placeholder = ({type}) => {
11+
return null;
12+
};
1213

1314
Placeholder.propTypes = {
1415
type: PropTypes.string

src/components/Transformation/Transformation.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ import CloudinaryComponent from '../CloudinaryComponent';
44
/**
55
* Define a transformation that is applied to the parent tag.
66
*/
7-
class Transformation extends CloudinaryComponent {}
7+
class Transformation extends CloudinaryComponent {
8+
constructor(props, context) {
9+
super(props, context);
10+
}
11+
12+
render() {
13+
return null;
14+
}
15+
}
816

917
Transformation.propTypes = CloudinaryComponent.propTypes;
1018
Transformation.defaultProps = {};

0 commit comments

Comments
 (0)