dwyl / statuses

📝 A collection of statuses for use in our various apps.
GNU General Public License v2.0
5 stars 1 forks source link

[PR] Create `Dart` package #21

Closed LuchoTurtle closed 1 year ago

LuchoTurtle commented 1 year ago

closes #10

This creates a Dart package (that is already published in https://pub.dev/packages/statuses) and changes the CI workflows to take into account both Elixir and Dart packages.

The Elixir package fetches information from the json instead of a list of structs that are hardcoded. Both packages use the statuses.json file.

codecov[bot] commented 1 year ago

Codecov Report

Merging #21 (5afc679) into main (e1630bf) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #21   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         2    +1     
  Lines            1        17   +16     
=========================================
+ Hits             1        17   +16     
Impacted Files Coverage Δ
lib/statuses.dart 100.00% <100.00%> (ø)
lib/statuses.ex 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

LuchoTurtle commented 1 year ago

Should be fixed in 5afc679 (#21).

nelsonic commented 1 year ago

@LuchoTurtle thanks for updating. Are there tests that confirm this is working. Apologies if I'm missing something. are all the "old" tests still working? and how would they have passed before updating the file path? 💭

LuchoTurtle commented 1 year ago

The tests work because the path that was changed was "in case the statuses.json file didn't exist. However, this probably will never happen because the json file is shipped with the package. The pattern matching is just a "safe-guard", hence why it's also difficult to test the function. How can we test "the file is not there"? The only way to test is this is to pass the path as the function parameter. But I went against that because I wanted to be as similar to dwyl/quotes as possible so it'd be easier for people to understand.