Skip to content

Commit

Permalink
Update snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 19, 2024
1 parent b58cd8a commit 65c157a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function renderBaseLinearDisplaySvg(
{renderings.map(([block, rendering], index) => {
const { offsetPx, widthPx } = block
const offset = offsetPx - viewOffsetPx
const clipid = `${getId(id, index)}-${Math.random()}`
const clipid = getId(id, index)

return (
<React.Fragment key={`frag-${index}`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ export function getDisplayStr(totalBytes: number) {

// stabilize clipid under test for snapshot
export function getId(id: string, index: number) {
const isJest = typeof jest === 'undefined'
return `clip-${isJest ? id : 'jest'}-${index}`
const notJest = typeof jest === 'undefined'
return ['clip', notJest ? id : 'jest', index, notJest ? Math.random() : '']
.filter(f => !!f)
.join('-')
}

export async function getFeatureDensityStatsPre(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 65c157a

Please sign in to comment.