-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from mkreiser/new-integration-test-seasons
New integration test seasons
- Loading branch information
Showing
9 changed files
with
55,211 additions
and
61 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
integration-tests/2016-season/__snapshots__/integration.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`2016 season integration tests getHistoricalScoreboardForWeek returns a populated array of Boxscores 1`] = ` | ||
[ | ||
Boxscore { | ||
"awayRoster": [], | ||
"awayScore": 106.06, | ||
"awayTeamId": 4, | ||
"homeRoster": [], | ||
"homeScore": 96.56, | ||
"homeTeamId": 1, | ||
}, | ||
Boxscore { | ||
"awayRoster": [], | ||
"awayScore": 87.86, | ||
"awayTeamId": 2, | ||
"homeRoster": [], | ||
"homeScore": 86.32, | ||
"homeTeamId": 9, | ||
}, | ||
Boxscore { | ||
"awayRoster": [], | ||
"awayScore": 123.3, | ||
"awayTeamId": 5, | ||
"homeRoster": [], | ||
"homeScore": 103.76, | ||
"homeTeamId": 3, | ||
}, | ||
Boxscore { | ||
"awayRoster": [], | ||
"awayScore": 94.72, | ||
"awayTeamId": 8, | ||
"homeRoster": [], | ||
"homeScore": 109.6, | ||
"homeTeamId": 12, | ||
}, | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'dotenv/config'; // Create a root .env file defining LEAGUE_ID, ESPN_S2, and SWID | ||
|
||
import { Client } from '../../src/index'; | ||
|
||
jest.setTimeout(10000); | ||
|
||
describe('2016 season integration tests', () => { | ||
let client; | ||
let leagueId; | ||
let seasonId; | ||
let scoringPeriodId; | ||
|
||
beforeEach(() => { | ||
leagueId = process.env.LEAGUE_ID; | ||
seasonId = 2016; | ||
scoringPeriodId = 1; | ||
|
||
client = new Client({ | ||
leagueId, | ||
espnS2: process.env.ESPN_S2, | ||
SWID: process.env.SWID | ||
}); | ||
}); | ||
|
||
describe('getHistoricalScoreboardForWeek', () => { | ||
test('returns a populated array of Boxscores', async () => { | ||
const scoreboards = await client.getHistoricalScoreboardForWeek({ | ||
seasonId, matchupPeriodId: scoringPeriodId, scoringPeriodId | ||
}); | ||
|
||
expect(scoreboards).toMatchSnapshot(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.