Skip to content

Conversation

@jsoules
Copy link
Collaborator

@jsoules jsoules commented Jun 2, 2023

Apparently I never actually hit the PR button on this--oops!

I think it's pretty straightforward--just adding some tests for the rest of the changes from the prior PR #85.

sequenceUpdates = resp.sequences
}
if (sequenceUpdates) {
if (sequenceUpdates && sequenceUpdates.length > 0) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out that an empty list ([]) is truthy.

if (resp.type !== 'getProjectFile') {
console.warn(resp)
throw Error('Unexpected response from Stan Playground')
throw Error('Unexpected response from Stan Playground while retrieving project file')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the error messages more specific to make it easier to distinguish the different test cases.

expect(colorSets.length).toEqual(chains.length)
colorSets.forEach(cs => expect(chainColorsBase.includes(rgbToHex(cs))).toBeTruthy())
})
test("Renders black color swatch if appropriate color not found", () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd missed this case earlier.

@codecov-commenter
Copy link

Codecov Report

Merging #92 (a03bf55) into main (ef52102) will increase coverage by 2.39%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
+ Coverage   16.15%   18.55%   +2.39%     
==========================================
  Files          80       80              
  Lines        5854     5854              
  Branches      138      161      +23     
==========================================
+ Hits          946     1086     +140     
+ Misses       4908     4768     -140     
Flag Coverage Δ
gui_units 23.90% <100.00%> (+3.17%) ⬆️
svc_units 2.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/MCMCMonitorDataManager/updateSequences.ts 100.00% <100.00%> (+19.04%) ⬆️
src/spaInterface/spaOutputsForRunIds.ts 100.00% <100.00%> (+66.12%) ⬆️
src/spaInterface/util.ts 100.00% <100.00%> (+63.15%) ⬆️

... and 6 files with indirect coverage changes

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

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 this pull request may close these issues.

3 participants