Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ coverage:
project:
default: off
mobile:
paths: "packages/mobile/"
paths: 'packages/mobile/'
flags: mobile
threshold: 40%
target: 10%
web:
paths: "packages/web/"
flags: web
threshold: 5%
target: 70%
web:
paths: 'packages/web/'
flags: web
threshold: 2%
Copy link
Copy Markdown
Contributor Author

@aaronmgdr aaronmgdr Jan 24, 2020

Choose a reason for hiding this comment

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

from my understanding threshold is how much it can decrease from master before a flag is raised, and target is the absolute amount of lines that need to be tested overall

target: 75%
protocol:
paths: "packages/protocol/"
paths: 'packages/protocol/'
flags: protocol
threshold: 5%
target: 90%
Expand Down
20 changes: 20 additions & 0 deletions packages/web/src/dev/LeaderBoard.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { fireEvent, render } from '@testing-library/react'
import * as React from 'react'
import LeaderBoard from 'src/dev/LeaderBoard'

const leaders = new Array(12).fill({ points: 10, identity: 'annie', address: '0x1f3f' })

describe('LeaderBoard', () => {
it('it displays an expand button, and when pressed a "collapse" butto shows', () => {
const { getByText } = render(<LeaderBoard isLoading={false} leaders={leaders} />)

fireEvent.click(getByText(/expand/))
expect(getByText(/collapse/)).toBeTruthy()
})

it('displays a link to terms', () => {
const { getByText } = render(<LeaderBoard isLoading={false} leaders={leaders} />)

expect(getByText(/terms/i).getAttribute('href')).toEqual('/stake-off/terms')
})
})
26 changes: 0 additions & 26 deletions packages/web/src/home/MissionText.tsx

This file was deleted.

10 changes: 10 additions & 0 deletions packages/web/src/utils/abortableFetch.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const fetch = jest.fn()
jest.mock('cross-fetch', () => fetch)
import abortableFetch from 'src/utils/abortableFetch'

describe('abortableFetch', () => {
it('behaves like fetch', async () => {
await abortableFetch('with-any-given-url.domain', { method: 'get' })
expect(fetch).toHaveBeenCalledWith('with-any-given-url.domain', { method: 'get' })
})
})