diff options
Diffstat (limited to '')
-rw-r--r-- | fixtures.js | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/fixtures.js b/fixtures.js index bfc6b3c..f036f01 100644 --- a/fixtures.js +++ b/fixtures.js @@ -1,4 +1,23 @@ -import {createUser} from "./database/users.js"; +import { newGame } from './database/games.js'; +import { createUser } from './database/users.js'; +import { emptyBoard } from './utils/board.js'; -createUser("Alice", "Alice42!", "alice@example.com"); -createUser("Bob", "Bob42!", "bob@example.com"); +await createUser('Alice', 'Alice42!', 'alice@example.com'); +await createUser('Bob', 'Bob42!', 'bob@example.com'); +const data = { + board: emptyBoard, + name: 'Alice vs Bob', + player1: { + id: 1, + username: 'Alice', + score: 0, + letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G'], + }, + player2: { + id: 2, + username: 'Bob', + score: 0, + letters: ['T', 'U', 'V', 'W', 'X', 'Y', 'Z'], + }, +}; +newGame(1, 2, data); |