Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

refactor: unit tests #99

Merged
merged 2 commits into from
Jan 18, 2022
Merged

refactor: unit tests #99

merged 2 commits into from
Jan 18, 2022

Conversation

rot1024
Copy link
Member

@rot1024 rot1024 commented Jan 18, 2022

  • Fix and rename
    • property.Field.UpdateRepresentativeField -> property.Field.RepresentativeField
    • scene/PluginSystem -> scene/Plugins
    • scene/WidgetSystem -> scene/Widgets
  • Fix unit tests
    • Fix tests for errors: assert.True(t, errors.As(tt.err, &err)) -> assert.Equal(t, tt.err, err)
    • Fix tests for panics: use assert.Panics
  • Refactor unit tests
    • Add line breaks
    • Rename variables, structs and field names of test cases
    • Adopt args pattern to represent args of tested functions
    • Enable parallel for most tests

@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

Merging #99 (5f54e71) into main (bbe13d8) will increase coverage by 0.58%.
The diff coverage is 67.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
+ Coverage   33.03%   33.61%   +0.58%     
==========================================
  Files         299      296       -3     
  Lines       27068    26608     -460     
==========================================
+ Hits         8941     8945       +4     
+ Misses      17313    16854     -459     
+ Partials      814      809       -5     
Impacted Files Coverage Δ
internal/adapter/gql/gqlmodel/convert_scene.go 0.00% <0.00%> (ø)
internal/adapter/gql/resolver_mutation_scene.go 0.00% <0.00%> (ø)
internal/infrastructure/mongo/mongodoc/scene.go 0.00% <0.00%> (ø)
internal/usecase/interactor/plugin_delete.go 0.00% <0.00%> (ø)
internal/usecase/interactor/plugin_upload.go 0.00% <0.00%> (ø)
internal/usecase/interactor/property.go 0.00% <0.00%> (ø)
internal/usecase/interactor/scene.go 0.00% <0.00%> (ø)
pkg/property/group.go 78.26% <83.33%> (+1.63%) ⬆️
pkg/scene/plugins.go 97.43% <91.66%> (ø)
internal/infrastructure/github/plugin_registry.go 100.00% <100.00%> (ø)
... and 17 more

@rot1024 rot1024 merged commit 0d112c5 into main Jan 18, 2022
@rot1024 rot1024 deleted the refactor-tests branch January 18, 2022 10:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant