Skip to content

Commit

Permalink
Deleted unneccesary tests and added others
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandraOM committed Feb 25, 2020
1 parent d02be40 commit 4654112
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 31 deletions.
17 changes: 17 additions & 0 deletions src/pages/Report/Confirm/confirm.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import { render } from '@testing-library/react';
import { Router } from 'react-router-dom';
import { createMemoryHistory } from 'history';
import Confirm from './Confirm';

test('The Confirm renders', () => {
const history = createMemoryHistory();
history.push('/report/confirm');
const { getByText } = render(
<Router history={history}>
<Confirm></Confirm>
</Router>
);
const linkElement = getByText(/Home/i);
expect(linkElement).toBeInTheDocument();
});
28 changes: 0 additions & 28 deletions src/pages/Report/Form/Form.test.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/Report/Form/FormQuestion/FormQuestion.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const FormQuestion = ({
name={question.question}
type={question.type}
placeholder={answer}
id={`${page}.${i}`}
id={`${question.question}.${page}.${i}`}
onChange={funcOnChange}
/>
</FlexInputs>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ describe('stringify makes arrays in an object into comma separated strings', ()
no: [0, 1, 2],
};
let stringifiedObj = stringify(obj);
console.log({ stringifiedObj });
console.log(stringifiedObj.yes);
// console.log({ stringifiedObj });
// console.log(stringifiedObj.yes);
expect(stringifiedObj.yes).toBe('H, E, L, L, O');
expect(stringifiedObj.no).toBe('0, 1, 2');
});
Expand Down

0 comments on commit 4654112

Please sign in to comment.