0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-03-18 02:22:46 -05:00

Chore: typo and spacing fixes

test name fixes
This commit is contained in:
Ayush Sharma 2017-12-02 18:04:42 +05:30 committed by juanpicado
parent ea47691300
commit e03672b70b
5 changed files with 9 additions and 12 deletions

View file

@ -1,7 +1,6 @@
/**
* Help component
*/
import React from 'react';
import { shallow } from 'enzyme';
import SyntaxHighlighter from 'react-syntax-highlighter/dist/light';

View file

@ -19,8 +19,6 @@ describe('<NoItem /> component', () => {
text: 'This is a test string'
};
const wrapper = shallow(<NoItems {...props} />);
expect(wrapper.find('h2').text()).toEqual(
'This is a test string'
);
expect(wrapper.find('h2').text()).toEqual('This is a test string');
});
});

View file

@ -8,7 +8,7 @@ import NotFound from '../../../src/webui/src/components/NotFound';
console.error = jest.fn();
describe('<NoItem /> component', () => {
describe('<NotFound /> component', () => {
it('should give error for the required fields', () => {
shallow(<NotFound />);
expect(console.error).toBeCalled();

View file

@ -12,9 +12,9 @@ describe('<Search /> component', () => {
it('should give error for the required fields', () => {
const wrapper = shallow(<Search />);
expect(console.error).toBeCalled();
expect(wrapper
.find('input')
.prop('placeholder')).toEqual('Type to search...');
expect(wrapper.find('input').prop('placeholder')).toEqual(
'Type to search...'
);
});
it('should have <input /> element with correct properties', () => {
@ -27,9 +27,7 @@ describe('<Search /> component', () => {
expect(wrapper.find('input').prop('placeholder')).toEqual(
'Test placeholder'
);
expect(typeof wrapper
.find('input')
.prop('onChange')).toBe('function');
expect(typeof wrapper.find('input').prop('onChange')).toBe('function');
});
it('should call the handleSearchInput function', () => {
@ -41,4 +39,4 @@ describe('<Search /> component', () => {
wrapper.find('input').simulate('change');
expect(props.handleSearchInput).toBeCalled();
});
});
});

View file

@ -1,5 +1,7 @@
/**
* API mock for login endpoint
* @param {object} config configuration of api call
* @returns {promise}
*/
export default function(config) {
return new Promise(function(resolve, reject) {