🧪 Improve test readability and formatting in TournamentDetail component unit tests
This commit is contained in:
@@ -193,9 +193,7 @@ describe('TournamentDetail', () => {
|
|||||||
{ id: 1, name: 'Player 1' },
|
{ id: 1, name: 'Player 1' },
|
||||||
{ id: 2, name: 'Player 2' }
|
{ id: 2, name: 'Player 2' }
|
||||||
],
|
],
|
||||||
matches: [
|
matches: [{ id: 'm1', player1_id: 1, player2_id: 2, state: 'pending' }]
|
||||||
{ id: 'm1', player1_id: 1, player2_id: 2, state: 'pending' }
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const wrapper = mount(TournamentDetail, {
|
const wrapper = mount(TournamentDetail, {
|
||||||
@@ -236,7 +234,10 @@ describe('TournamentDetail', () => {
|
|||||||
expect(wrapper.text()).toContain('Test Tournament');
|
expect(wrapper.text()).toContain('Test Tournament');
|
||||||
|
|
||||||
const newDetails = {
|
const newDetails = {
|
||||||
tournament: { ...mockTournamentDetails.tournament, name: 'Updated Tournament' }
|
tournament: {
|
||||||
|
...mockTournamentDetails.tournament,
|
||||||
|
name: 'Updated Tournament'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
await wrapper.setProps({ tournamentDetails: newDetails });
|
await wrapper.setProps({ tournamentDetails: newDetails });
|
||||||
|
|||||||
Reference in New Issue
Block a user