- Connection pool and a small migration runner (schema_migrations, one transaction per migration, advisory lock) - games and game_players tables with indexes for a user's games and for popular games - PostgresGameHistoryRepository: idempotent save, get, recent games of a user, popular games - Integration tests against a real Postgres via testcontainers; a custom Jest environment gives tests Node's web globals, which Jest 27 leaves out - GameRecord carries the number of distinct spectators
7 lines
258 B
JavaScript
7 lines
258 B
JavaScript
module.exports = {
|
|
transform: {'^.+\\.ts?$': 'ts-jest'},
|
|
testEnvironment: '<rootDir>/tests/support/NodeEnvironment.js',
|
|
testRegex: '/tests/.*\\.(test|spec)?\\.(ts|tsx)$',
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
};
|