Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

refactor: use fixture in tests #2566

Merged
merged 65 commits into from Aug 1, 2020
Merged

Conversation

goga-m
Copy link
Contributor

@goga-m goga-m commented Jul 30, 2020

Summary

Use fixture data in unit tests
https://trello.com/c/XC4piEyY/188-remove-bob-stub-data

Additional helper functions:

  • Add util function to mock default network data:
    import { useDefaultNetMocks } from 'testing-library
  • Use existing fixture profile id function instead of hardcoced. Returns the first profile id from fixture
    import { getDefaultProfileId } from 'testing-library

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@ghost ghost added Complexity: Undetermined Needs specialized, in-depth review. Type: Refactor The pull request improves or enhances an existing implementation. Status: In Progress The issue or pull request is being worked on. labels Jul 30, 2020
@faustbrian
Copy link
Contributor

@goga-m conflicts

@goga-m goga-m force-pushed the refactor/use-fixture-in-tests branch from 2303c47 to b132e00 Compare July 31, 2020 19:35
@ArkEcosystem ArkEcosystem deleted a comment from codecov bot Jul 31, 2020
@codecov
Copy link

codecov bot commented Jul 31, 2020

Codecov Report

Merging #2566 into 3.0-react will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           3.0-react     #2566     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
=============================================
  Files             24       254    +230     
  Lines            142      2882   +2740     
  Branches          18       511    +493     
=============================================
+ Hits             142      2882   +2740     
Flag Coverage Δ
#unit 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/components/Button/Button.tsx 100.00% <ø> (ø)
src/app/App.tsx 100.00% <100.00%> (ø)
src/app/components/Address/Address.tsx 100.00% <100.00%> (ø)
src/app/components/Alert/Alert.tsx 100.00% <100.00%> (ø)
src/app/components/Avatar/Avatar.tsx 100.00% <100.00%> (ø)
src/app/components/Badge/Badge.tsx 100.00% <100.00%> (ø)
src/app/components/Breadcrumbs/Breadcrumbs.tsx 100.00% <100.00%> (ø)
src/app/components/Card/Card.tsx 100.00% <100.00%> (ø)
src/app/components/Card/CardControl.tsx 100.00% <100.00%> (ø)
src/app/components/Checkbox/Checkbox.tsx 100.00% <100.00%> (ø)
... and 276 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4967c86...a96583c. Read the comment docs.

@dated dated mentioned this pull request Aug 1, 2020
3 tasks
@faustbrian faustbrian merged commit b69ddce into 3.0-react Aug 1, 2020
@ghost ghost deleted the refactor/use-fixture-in-tests branch August 1, 2020 02:21
@ghost ghost removed the Status: Needs Review The issue or pull request needs a review by a developer of the team. label Aug 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Complexity: Undetermined Needs specialized, in-depth review. Type: Refactor The pull request improves or enhances an existing implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants