diff --git a/ada-project-docs/testing-requirements.md b/ada-project-docs/testing-requirements.md index 5c73221f..5483bfe0 100644 --- a/ada-project-docs/testing-requirements.md +++ b/ada-project-docs/testing-requirements.md @@ -96,7 +96,7 @@ The wave 1 tests verify that: The wave 2 tests exist in all three test files: -- `src/components/App.test.js` +- `src/App.test.js` - `src/components/Board.test.js` - `src/components/Square.test.js` diff --git a/src/components/Board.test.js b/src/components/Board.test.js index 95e433a3..93571b2d 100644 --- a/src/components/Board.test.js +++ b/src/components/Board.test.js @@ -3,53 +3,53 @@ import '@testing-library/jest-dom/extend-expect'; import Board from './Board'; import { render, screen, fireEvent} from '@testing-library/react' +// Sample input to the Board component +const SAMPLE_BOARD = [ + [ + { + value: 'X', + id: 0, + }, + { + value: 'X', + id: 1, + }, + { + value: 'O', + id: 2, + }, + ], + [ + { + value: 'X', + id: 3, + }, + { + value: 'X', + id: 4, + }, + { + value: 'O', + id: 5, + }, + ], + [ + { + value: 'O', + id: 6, + }, + { + value: 'O', + id: 7, + }, + { + value: 'X', + id: 8, + }, + ], +]; describe('Wave 1: Board', () => { - // Sample input to the Board component - const SAMPLE_BOARD = [ - [ - { - value: 'X', - id: 0, - }, - { - value: 'X', - id: 1, - }, - { - value: 'O', - id: 2, - }, - ], - [ - { - value: 'X', - id: 3, - }, - { - value: 'X', - id: 4, - }, - { - value: 'O', - id: 5, - }, - ], - [ - { - value: 'O', - id: 6, - }, - { - value: 'O', - id: 7, - }, - { - value: 'X', - id: 8, - }, - ], - ]; test('that board will render with the proper number of Xs and Os', () => { // Act