syafiqdante opened a new issue #9870:
URL: https://github.com/apache/incubator-superset/issues/9870
- superset version 0.34.0
- python version: Python 3.6.8
- Nodejs version: v14.2.0
- npm version: 6.14.5
- OS: Centos 7
I quite new to this superset. I followed the installation instructions from
CONTRIBUTING.md
Error occurs when command `'npm run lint'`
```
/root/incubator-superset-0.34.0/superset/assets/spec/javascripts/components/TableSelector_spec.jsx
181:5 warning Disabled test jest/no-disabled-tests
217:5 warning Disabled test jest/no-disabled-tests
/root/incubator-superset-0.34.0/superset/assets/spec/javascripts/dashboard/components/resizable/ResizableHandle_spec.jsx
26:29 error Imported JSX component right must be in PascalCase or
SCREAMING_SNAKE_CASE react/jsx-pascal-case
31:29 error Imported JSX component bottom must be in PascalCase or
SCREAMING_SNAKE_CASE react/jsx-pascal-case
38:29 error Imported JSX component bottomRight must be in PascalCase or
SCREAMING_SNAKE_CASE react/jsx-pascal-case
/root/incubator-superset-0.34.0/superset/assets/spec/javascripts/sqllab/actions/sqlLab_spec.js
88:5 warning Disabled test jest/no-disabled-tests
141:5 warning Disabled test jest/no-disabled-tests
/root/incubator-superset-0.34.0/superset/assets/src/dashboard/components/dnd/AddSliceDragPreview.jsx
65:14 error 'dragItem.parentType' is missing in props validation
react/prop-types
66:14 error 'dragItem.type' is missing in props validation
react/prop-types
/root/incubator-superset-0.34.0/superset/assets/src/dashboard/components/gridComponents/ChartHolder.jsx
112:7 error 'isComponentVisible' is missing in props validation
react/prop-types
/root/incubator-superset-0.34.0/superset/assets/src/dashboard/components/gridComponents/Column.jsx
115:7 error 'isComponentVisible' is missing in props validation
react/prop-types
/root/incubator-superset-0.34.0/superset/assets/src/dashboard/components/gridComponents/Row.jsx
116:7 error 'isComponentVisible' is missing in props validation
react/prop-types
/root/incubator-superset-0.34.0/superset/assets/src/dashboard/components/gridComponents/Tab.jsx
136:7 error 'isComponentVisible' is missing in props validation
react/prop-types
/root/incubator-superset-0.34.0/superset/assets/src/dashboard/components/gridComponents/Tabs.jsx
178:7 error 'isComponentVisible' is missing in props validation
react/prop-types
/root/incubator-superset-0.34.0/superset/assets/src/explore/components/controls/withVerification.jsx
61:27 warning Unexpected console statement no-console
✖ 15 problems (10 errors, 5 warnings)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `eslint --ignore-path=.eslintignore --ext
.js,.jsx . && tslint -c tslint.json ./{src,spec}/**/*.ts{,x}`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-21T02_53_17_245Z-debug.log
```
when I tried to run the `npm run test`
It fails at
```
FAIL spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx (5.574s)
● TabbedSqlEditors › componentWillReceiveProps › should update
queriesArray and dataPreviewQueries
TypeError: Attempted to wrap undefined property
componentWillReceiveProps as function
126 | beforeEach(() => {
127 | wrapper = getWrapper();
> 128 | spy = sinon.spy(TabbedSqlEditors.prototype,
'componentWillReceiveProps');
| ^
129 | wrapper.setProps({ queryEditors, queries, tabHistory,
tables });
130 | });
131 | afterEach(() => {
at wrapMethod
(node_modules/sinon/lib/sinon/util/core/wrap-method.js:70:21)
at Object.spy (node_modules/sinon/lib/sinon/spy.js:42:16)
at Object.<anonymous>
(spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx:128:19)
● TabbedSqlEditors › componentWillReceiveProps › should update
queriesArray and dataPreviewQueries
expect(received).toBe(expected) // Object.is equality
Expected: {"id": "B1-VQU1zW", "sqlEditorId": "newEditorId"}
Received: undefined
133 | });
134 | it('should update queriesArray and dataPreviewQueries', ()
=> {
> 135 |
expect(wrapper.state().queriesArray.slice(-1)[0]).toBe(queries['B1-VQU1zW']);
| ^
136 |
expect(wrapper.state().dataPreviewQueries.slice(-1)[0]).toBe(queries['B1-VQU1zW']);
137 | });
138 | });
at Object.<anonymous>
(spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx:135:57)
● TabbedSqlEditors › componentWillReceiveProps › should update
queriesArray and dataPreviewQueries
TypeError: Cannot read property 'restore' of undefined
130 | });
131 | afterEach(() => {
> 132 | spy.restore();
| ^
133 | });
134 | it('should update queriesArray and dataPreviewQueries', ()
=> {
135 |
expect(wrapper.state().queriesArray.slice(-1)[0]).toBe(queries['B1-VQU1zW']);
at Object.<anonymous>
(spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx:132:11)
Test Suites: 1 failed, 171 passed, 172 total
Tests: 1 failed, 4 skipped, 986 passed, 991 total
Snapshots: 0 total
Time: 95.275s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `jest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-21T02_58_34_928Z-debug.log
```
Any help is highly appreciated, thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]