Skip to content

Commit

Permalink
fix(api): feeds tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Nov 25, 2021
1 parent 8de7bf1 commit 2b6941b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/api/src/repository/Feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class FeedRepository {
)[0]
return {
feeds: aggregation.feeds.map(this.normalizeId),
total: aggregation.total[0].count
total: aggregation.total[0]?.count || 0
}
}

Expand All @@ -92,9 +92,7 @@ export class FeedRepository {
then: 1,
else: {
$cond: {
if: {
$regexMatch: { input: '$network', regex: /ethereum/i }
},
if: { $eq: [{ $substr: ['$network', 0, 8] }, 'ethereum'] },
then: 2,
else: 3
}
Expand Down
1 change: 0 additions & 1 deletion packages/api/test/feeds.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ describe('feeds', function () {
network: 'all'
}
})

expect(feeds.length).toBe(0)
})

Expand Down

0 comments on commit 2b6941b

Please sign in to comment.