Skip to content

Commit

Permalink
Setup coverage and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Billmike committed Jan 29, 2019
1 parent c28eb12 commit 539a528
Show file tree
Hide file tree
Showing 7 changed files with 437 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-ci
repo_token: 0taL56KQ8wzB3lA4S7izz64vG8RAfNVYj
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.nyc_output
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Introduction

> **Random Phone Number Generator** is an application built using React and Redux, that enables the generating of random, unique phone numbers.
> **Random Phone Number Generator** is an application built using React and Redux, that enables the generating of random, unique phone numbers. You can view the Live app [here](https://loving-bardeen-e16c11.netlify.com/)
## Table of Content
- [Features in the application](#features-in-the-application)
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"coveralls": "^3.0.2",
"file-saver": "^2.0.0",
"nyc": "^13.1.0",
"rc-pagination": "^1.17.3",
"react": "^16.6.3",
"react-dom": "^16.6.3",
Expand All @@ -20,7 +22,8 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"run-coverage": "react-scripts test --coverage --coverageReporters=text-lcov | coveralls"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import renderer from 'react-test-renderer'
import Paginate from './';
import Paginate from '.';

test('<Pagination />', () => {
const component = renderer.create(<Paginate />);
Expand Down
142 changes: 142 additions & 0 deletions src/components/Pagination/__snapshots__/Pagination.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Pagination /> 1`] = `
<ul
className="pagination-class justify-content-center"
>
<li
className="page-item disabled"
>
<a
aria-disabled="true"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
&lt;
</a>
</li>
<li
className="page-item page-numbers-style active"
>
<a
aria-current="page"
aria-label="Page 1 is your current page"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
1
</a>
</li>
<li
className="page-item page-numbers-style"
>
<a
aria-current={null}
aria-label="Page 2"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
2
</a>
</li>
<li
className="page-item page-numbers-style"
>
<a
aria-current={null}
aria-label="Page 3"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
3
</a>
</li>
<li
className="break"
>
<a
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
<a
href=""
>
...
</a>
</a>
</li>
<li
className="page-item page-numbers-style"
>
<a
aria-current={null}
aria-label="Page 8"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
8
</a>
</li>
<li
className="page-item page-numbers-style"
>
<a
aria-current={null}
aria-label="Page 9"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
9
</a>
</li>
<li
className="page-item page-numbers-style"
>
<a
aria-current={null}
aria-label="Page 10"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
10
</a>
</li>
<li
className="page-item next-button"
>
<a
aria-disabled="false"
className="page-link"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex="0"
>
&gt;
</a>
</li>
</ul>
`;
Loading

0 comments on commit 539a528

Please sign in to comment.