Open
Conversation
Extract core logic from testing_scripts into exported functions while preserving console output when run directly. Generate JSON fixture files from current outputs for use in upcoming tests.
Convert smoke test scripts into proper Jest tests that assert against captured JSON fixtures. Add missing Jest moduleNameMapper entries for bare module imports and enable resolveJsonModule.
Pin TZ=UTC in jest.config.js and regenerate fixtures in UTC so date serialization is consistent across local and CI environments.
Contributor
Author
|
@arthur-clara, turned the existing console tests into tests we can run in CI. Assumed the current outputs are correct and generated fixtures from them. |
Contributor
|
Heads up - my PR #142 removes That said, I think the approach here of capturing output as fixtures and running regression tests against them would be valuable applied to the remaining tools ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm run print:*console output viarequire.main === moduletesting_scripts/fixtures/testing_scripts/tests/smoke_tests.test.tswith 4 tests asserting against those fixturesmoduleNameMapperentries forvesting_schedule_generator_v1,iso_nso_calculator, andread_ocf_packagebare importsresolveJsonModulein tsconfig for fixture importscapture_fixtures.tsscript to regenerate fixtures when neededTotal test count: 170 (166 existing + 4 new)
Test plan
npm run buildpassesnpx jest)npm run print:vesting_schedule,print:vesting_status,print:iso_calculatorstill produce console output