Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests - run.ts produces different visual output if the imports and test cases are sorted alphabetically #1109

Closed
ronyeh opened this issue Aug 18, 2021 · 1 comment · Fixed by #1110

Comments

@ronyeh
Copy link
Collaborator

ronyeh commented Aug 18, 2021

I tried cleaning up the run.ts tests by sorting everything alphabetically.

However, this changes the color of the stave lines in some of the tests. Perhaps the stave lines' color is initialized improperly either before or after the sort, due to the ordering of dependencies/imports?

Need to investigate this... as ideally the test suite should be more robust to sorting of imports.

ronyeh added a commit to ronyeh/vexflow4 that referenced this issue Aug 18, 2021
…KNESS.

This results in visual diffs in the stave lines in test cases that were
run after StaveConnectorTests.Start();
In summary, the reference images were wrong because they do not render
the stave lines correcty.
This patch addresses 0xfe#1109
ronyeh added a commit to ronyeh/vexflow4 that referenced this issue Aug 18, 2021
…KNESS.

This results in visual diffs in the stave lines in test cases that were
run after StaveConnectorTests.Start();
In summary, the reference images were wrong because they do not render
the stave lines correcty.
This patch addresses 0xfe#1109
ronyeh added a commit to ronyeh/vexflow4 that referenced this issue Aug 18, 2021
…KNESS.

This results in visual diffs in the stave lines in test cases that were run after StaveConnectorTests.Start();

The reference images were wrong because they do not render the stave lines correctly.
Fixes 0xfe#1109
@0xfe
Copy link
Owner

0xfe commented Aug 20, 2021

Good catch! The test suite should be robust to this. Part of the problem here is that we have some global configuration state.

I think we can do two things here:

  • Add a VF.reset() that restores all globals to it's original state. (Ideally, we'll have a class to capture all the globals to simplify this.
  • Update our test harness (VexFlowTests.runTest(...)) code to call VF.reset() before each test begins.

Does that make sense?

ronyeh added a commit to ronyeh/vexflow4 that referenced this issue Aug 20, 2021
This results in visual diffs in the stave lines in test cases that were run after StaveConnectorTests.Start();

The reference images were wrong because they do not render the stave lines correctly.
Fixes 0xfe#1109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants