Skip to content

Commit

Permalink
Merge pull request #8 from thijssmudde/bugfix/circular-dependency
Browse files Browse the repository at this point in the history
Fixed circular dependency
  • Loading branch information
thijssmudde authored Feb 3, 2023
2 parents e21890e + 56d8bdf commit dfb0027
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 273 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
---
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install modules
run: yarn

- name: Run tests
run: yarn tsdx test --collectCoverage --coverageReporters 'cobertura'
- name: Code Coverage Summary
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/**/cobertura-coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: "70 90"
40 changes: 14 additions & 26 deletions coverage/Pagination.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>


<div class='fl pad1y space-right2'>
<span class="strong">91.67% </span>
<span class="strong">90.91% </span>
<span class="quiet">Branches</span>
<span class='fraction'>22/24</span>
<span class='fraction'>20/22</span>
</div>


Expand Down Expand Up @@ -221,11 +221,7 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a>
<a name='L164'></a><a href='#L164'>164</a>
<a name='L165'></a><a href='#L165'>165</a>
<a name='L166'></a><a href='#L166'>166</a>
<a name='L167'></a><a href='#L167'>167</a>
<a name='L168'></a><a href='#L168'>168</a>
<a name='L169'></a><a href='#L169'>169</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L165'></a><a href='#L165'>165</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -320,11 +316,6 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>
<span class="cline-any cline-yes">45x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -333,6 +324,7 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -401,7 +393,7 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>
IPaginationProps,
ButtonProps,
PageButtonProps,
} from "./Pagination.d";
} from "../types/types";
&nbsp;
export const PrevButton = ({
className,
Expand Down Expand Up @@ -486,18 +478,7 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>
const pagination: IPagination = React.useContext(PaginationContext);
&nbsp;
const renderPageButton = (page: number) =&gt; (
&lt;li
key={page}
onClick={() =&gt; pagination.setCurrentPage(page - 1)}
className={
classNames(
className,
pagination.currentPage + 1 === page
? activeClassName
: inactiveClassName,
) || undefined
}
&gt;
&lt;li key={page}&gt;
&lt;as.type
data-testid={
classNames({
Expand All @@ -507,6 +488,13 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>
dataTestIdActive &amp;&amp; pagination.currentPage + 1 !== page,
}) || undefined
}
onClick={() =&gt; pagination.setCurrentPage(page - 1)}
className={classNames(
className,
pagination.currentPage + 1 === page
? activeClassName
: inactiveClassName,
)}
{...as.props}
&gt;
{page}
Expand Down Expand Up @@ -568,7 +556,7 @@ <h1><a href="index.html">All files</a> Pagination.tsx</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Fri Feb 03 2023 13:23:56 GMT+0100 (Central European Standard Time)
at Fri Feb 03 2023 13:53:06 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
Expand Down
Loading

0 comments on commit dfb0027

Please sign in to comment.