Skip to content

Commit

Permalink
add basic get current election fixtures test
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinemodic committed Dec 12, 2024
1 parent 23ed8ce commit 83e0a5e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions libs/dev-dock/backend/src/dev_dock_api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,50 @@ test('card mock endpoints', async () => {
});
});

test('election fixture references', async () => {
const { apiClient } = setup();
await expect(
apiClient.getCurrentFixtureElectionPaths()
).resolves.toMatchObject([
{
path: expect.stringContaining(
'fixtures/data/electionFamousNames2021/electionGeneratedWithGridLayoutsEnglishOnly.json'
),
title: 'electionFamousNames2021',
},
{
path: expect.stringContaining(
'fixtures/data/electionGeneral/election.json'
),
title: 'electionGeneral',
},
{
path: expect.stringContaining(
'fixtures/data/electionGridLayoutNewHampshireHudson/election.json'
),
title: 'electionGridLayoutNewHampshireHudson',
},
{
path: expect.stringContaining(
'fixtures/data/electionGridLayoutNewHampshireTestBallot/election.json'
),
title: 'electionGridLayoutNewHampshireTestBallot',
},
{
path: expect.stringContaining(
'fixtures/data/electionPrimaryPrecinctSplits/electionGeneratedWithGridLayoutsMultiLang.json'
),
title: 'electionPrimaryPrecinctSplits',
},
{
path: expect.stringContaining(
'fixtures/data/electionTwoPartyPrimary/election.json'
),
title: 'electionTwoPartyPrimary',
},
]);
});

test('election setting', async () => {
const { apiClient } = setup();
// Default election
Expand Down

0 comments on commit 83e0a5e

Please sign in to comment.