Skip to content

Feat#3439/usecolors test coverage#3491

Merged
m0ksem merged 7 commits intoepicmaxco:developfrom
Evobaso-J:feat#3439/usecolors-test-coverage
Jun 13, 2023
Merged

Feat#3439/usecolors test coverage#3491
m0ksem merged 7 commits intoepicmaxco:developfrom
Evobaso-J:feat#3439/usecolors-test-coverage

Conversation

@Evobaso-J
Copy link
Copy Markdown
Contributor

@Evobaso-J Evobaso-J commented Jun 12, 2023

Create tests for useColor composable

  • Add tests to the applyPreset function and the currentPresetName computed
  • Refactor of the createTestComposable function (with retro-compatibility) to make multiple composables share state
  • Cleanup of unused vars and imports

Description

applyPreset and currentPresetName needed both the useColor and globalConfig composables to share state. This would not be possible by calling applyPreset twice with different arguments: the two composable instances would be on separate app instances. However, the feature was added without breaking changes.
A nice improvement would be adding the proper typing to reap the benefits of autocompletion

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

resolve #3439

@m0ksem m0ksem self-requested a review June 13, 2023 09:29
@m0ksem
Copy link
Copy Markdown
Member

m0ksem commented Jun 13, 2023

Looks perfect. Thanks!

@m0ksem m0ksem merged commit 0accf00 into epicmaxco:develop Jun 13, 2023
@m0ksem m0ksem added the tests Refers to testing label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Refers to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test coverageto make sure applyPreset and currentPresetName work correct

2 participants