suddjian opened a new pull request #10459: URL: https://github.com/apache/incubator-superset/pull/10459
### SUMMARY <!--- Describe the change below, including rationale and design decisions --> The [jest-enzyme](https://www.npmjs.com/package/jest-enzyme) library adds lots of useful assertions onto jest. This PR improves frontend test readability and adds useful context to failure messages. An example of a test failure using an enzyme assertion: ``` FAIL spec/javascripts/addSlice/AddSliceContainer_spec.tsx (60.221 s) ● AddSliceContainer › renders a select and a VizTypeControl Expected "Memo(StyledSelect)" not to exist. Instead found 1 nodes. Found Nodes: <Memo(StyledSelect) clearable={false} ignoreAccents={false} name="select-datasource" onChange={[Function: bound changeDatasource]} options={{...}} placeholder="Choose a datasource" style={{...}} value={[undefined]} width={600} /> 50 | 51 | it('renders a select and a VizTypeControl', () => { > 52 | expect(wrapper.find(Select)).not.toExist(); | ^ 53 | expect(wrapper.find(VizTypeControl)).toExist(); 54 | }); 55 | at Object.<anonymous> (spec/javascripts/addSlice/AddSliceContainer_spec.tsx:52:38) ``` ---------------------------------------------------------------- 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]
