asarazan / martok

https://www.npmjs.com/package/martok
10 stars 0 forks source link

Force correct value for tag types in tagged union generation. #40

Closed asarazan closed 2 years ago

asarazan commented 2 years ago

See Tagged.kt, Tagged2.kt, and Tagged3.kt for updated test output.

Example:

  @Serializable
  data class TaggedType_1(
    override val id: String,
    override val foo: String?,
    val state: State1
  ) : Tagged() {
    override val type: Type = Type.TYPE_1
  }
codecov-commenter commented 2 years ago

Codecov Report

Merging #40 (61fa341) into main (47133fd) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   93.21%   93.23%   +0.02%     
==========================================
  Files          22       22              
  Lines         781      784       +3     
  Branches      185      185              
==========================================
+ Hits          728      731       +3     
  Misses         50       50              
  Partials        3        3              
Impacted Files Coverage Δ
src/martok/declarations/TaggedUnionGenerator.ts 100.00% <100.00%> (ø)

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 47133fd...61fa341. Read the comment docs.

github-actions[bot] commented 2 years ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements 92.55% 658/711
🟢 Branches 89.97% 314/349
🟢 Functions 93.06% 134/144
🟢 Lines 93.56% 625/668

Test suite run success

22 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from 61fa341faa83bab88a4c2d7ec0f4fd35a6231055