Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Oct 5, 2024
1 parent 8d53a0b commit 66a14b0
Showing 1 changed file with 65 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,51 +54,53 @@ const mockFlagMeasurements = ({
owner: {
repository: {
__typename: 'Repository',
flags: {
edges: after
? [
{
node: {
name: 'flagD',
percentCovered: 10,
percentChange: -1,
measurements: [{ avg: 20 }, { avg: 30 }],
coverageAnalytics: {
flags: {
edges: after
? [
{
node: {
name: 'flagD',
percentCovered: 10,
percentChange: -1,
measurements: [{ avg: 20 }, { avg: 30 }],
},
},
},
]
: [
{
node: {
name: 'flagA',
percentCovered: 93.26,
percentChange: -1.56,
measurements: [{ avg: 51.78 }, { avg: 93.356 }],
]
: [
{
node: {
name: 'flagA',
percentCovered: 93.26,
percentChange: -1.56,
measurements: [{ avg: 51.78 }, { avg: 93.356 }],
},
},
},
{
node: {
name: 'flagB',
percentCovered: 91.74,
percentChange: null,
measurements: [{ avg: null }, { avg: null }],
{
node: {
name: 'flagB',
percentCovered: 91.74,
percentChange: null,
measurements: [{ avg: null }, { avg: null }],
},
},
},
{
node: includeNullFlag
? null
: {
name: 'testtest',
percentCovered: 1.0,
percentChange: 1.0,
measurements: [{ avg: 51.78 }, { avg: 93.356 }],
},
},
],
pageInfo: {
hasNextPage: after ? false : true,
endCursor: after
? 'aa'
: 'MjAyMC0wOC0xMSAxNzozMDowMiswMDowMHwxMDA=',
{
node: includeNullFlag
? null
: {
name: 'testtest',
percentCovered: 1.0,
percentChange: 1.0,
measurements: [{ avg: 51.78 }, { avg: 93.356 }],
},
},
],
pageInfo: {
hasNextPage: after ? false : true,
endCursor: after
? 'aa'
: 'MjAyMC0wOC0xMSAxNzozMDowMiswMDowMHwxMDA=',
},
},
},
},
Expand All @@ -110,20 +112,22 @@ const mockNoReportsUploadedMeasurements = {
owner: {
repository: {
__typename: 'Repository',
flags: {
edges: [
{
node: {
name: 'flagA',
percentCovered: null,
percentChange: null,
measurements: [{ avg: null }, { avg: null }],
coverageAnalytics: {
flags: {
edges: [
{
node: {
name: 'flagA',
percentCovered: null,
percentChange: null,
measurements: [{ avg: null }, { avg: null }],
},
},
],
pageInfo: {
hasNextPage: true,
endCursor: 'end-cursor',
},
],
pageInfo: {
hasNextPage: true,
endCursor: 'end-cursor',
},
},
},
Expand All @@ -134,11 +138,13 @@ const mockEmptyFlagMeasurements = {
owner: {
repository: {
__typename: 'Repository',
flags: {
edges: [],
pageInfo: {
hasNextPage: false,
endCursor: null,
coverageAnalytics: {
flags: {
edges: [],
pageInfo: {
hasNextPage: false,
endCursor: null,
},
},
},
},
Expand Down

0 comments on commit 66a14b0

Please sign in to comment.