From 669ffa1ca977b357811c0f59162bc400a5a413d2 Mon Sep 17 00:00:00 2001 From: Antoine Zanardi Date: Tue, 29 Aug 2023 14:34:23 +0200 Subject: [PATCH] refactor(globals): correct UPPER_CASE casing for globals (#446) --- config/eslint/constants.js | 23 +- config/jest/jest-e2e.ts | 4 +- config/jest/jest-global.ts | 4 +- config/jest/jest-unit.ts | 4 +- .../game-additional-card.constant.ts | 48 - .../game-additional-cards.constant.ts | 48 + ...ame-history-record-play-source.constant.ts | 17 +- ...ame-history-record-play-target.constant.ts | 19 +- .../game-history-record-play-vote.constant.ts | 13 +- ...ame-history-record-play-voting.constant.ts | 16 +- .../game-history-record-play.constant.ts | 37 +- .../game-history-record.constant.ts | 30 +- .../composition-game-options.constant.ts | 13 +- .../game-options/game-options.constant.ts | 13 +- .../ancient-game-options.constant.ts | 19 +- .../bear-tamer-game-options.constant.ts | 13 +- .../big-bad-wolf-game-options.constant.ts | 13 +- .../dog-wolf-game-options.constant.ts | 13 +- .../fox-game-options.constant.ts | 13 +- .../guard-game-options.constant.ts | 13 +- .../idiot-game-options.constant.ts | 13 +- .../little-girl-game-options.constant.ts | 13 +- .../pied-piper-game-options.constant.ts | 19 +- .../raven-game-options.constant.ts | 15 +- .../roles-game-options.constant.ts | 19 +- .../seer-game-options.constant.ts | 19 +- .../sheriff-election-game-options.constant.ts | 19 +- .../sheriff-game-options.constant.ts | 19 +- .../stuttering-judge-game-options.constant.ts | 15 +- .../thief-judge-game-options.constant.ts | 19 +- .../three-brothers-game-options.constant.ts | 15 +- .../two-sisters-game-options.constant.ts | 15 +- .../white-werewolf-game-options.constant.ts | 15 +- .../wild-child-game-options.constant.ts | 13 +- .../votes-game-options.constant.ts | 12 +- .../game-play/game-play-source.constant.ts | 17 +- .../constants/game-play/game-play.constant.ts | 62 +- .../game-victory/game-victory.constant.ts | 17 +- src/modules/game/constants/game.constant.ts | 98 +- .../player-attribute-activation.constant.ts | 11 +- .../player-attribute.constant.ts | 15 +- .../constants/player/player-death.constant.ts | 8 +- .../constants/player/player-role.constant.ts | 4 +- .../constants/player/player-side.constant.ts | 4 +- .../game/constants/player/player.constant.ts | 17 +- .../game/controllers/game.controller.ts | 12 +- .../controllers/pipes/get-game-by-id.pipe.ts | 4 +- ...itional-cards-for-thief-roles.decorator.ts | 6 +- .../additional-cards-presence.decorator.ts | 4 +- ...ional-cards-roles-max-in-game.decorator.ts | 4 +- .../composition-bounds.decorator.ts | 6 +- .../composition-has-villager.decorator.ts | 10 +- .../composition-has-werewolf.decorator.ts | 10 +- ...composition-roles-max-in-game.decorator.ts | 8 +- ...composition-roles-min-in-game.decorator.ts | 8 +- .../game-player-role.base.dto.ts | 26 +- .../game-player-side.base.dto.ts | 16 +- .../base/game-player/game-player.base.dto.ts | 16 +- .../transformers/player-role.transformer.ts | 12 +- .../transformers/player-side.transformer.ts | 12 +- .../create-game-additional-card.dto.ts | 16 +- .../create-composition-game-options.dto.ts | 6 +- .../create-game-options.dto.ts | 8 +- .../create-ancient-game-options.dto.ts | 14 +- .../create-bear-tamer-game-options.dto.ts | 6 +- .../create-big-bad-wolf-game-options.dto.ts | 6 +- .../create-dog-wolf-game-options.dto.ts | 8 +- .../create-fox-game-options.dto.ts | 6 +- .../create-guard-game-options.dto.ts | 6 +- .../create-idiot-game-options.dto.ts | 6 +- .../create-little-girl-game-options.dto.ts | 6 +- .../create-pied-piper-game-options.dto.ts | 14 +- .../create-raven-game-options.dto.ts | 10 +- .../create-roles-game-options.dto.ts | 46 +- .../create-seer-game-options.dto.ts | 10 +- ...reate-sheriff-election-game-options.dto.ts | 16 +- .../create-sheriff-game-options.dto.ts | 12 +- ...reate-stuttering-judge-game-options.dto.ts | 10 +- .../create-thief-game-options.dto.ts | 14 +- .../create-three-brothers-game-options.dto.ts | 10 +- .../create-two-sisters-game-options.dto.ts | 10 +- .../create-white-werewolf-game-options.dto.ts | 10 +- .../create-wild-child-game-options.dto.ts | 6 +- .../create-votes-game-options.dto.ts | 6 +- .../create-game-player-role.dto.ts | 6 +- .../create-game-player-side.dto.ts | 6 +- .../create-game-player.dto.ts | 4 +- .../game/dto/create-game/create-game.dto.ts | 18 +- .../get-game-random-composition.dto.ts | 10 +- .../make-game-play-target.dto.ts | 10 +- .../dto/make-game-play/make-game-play.dto.ts | 20 +- .../game/enums/game-history-record.enum.ts | 4 +- src/modules/game/enums/game-play.enum.ts | 12 +- src/modules/game/enums/game-victory.enum.ts | 4 +- src/modules/game/enums/game.enum.ts | 9 +- src/modules/game/enums/player.enum.ts | 12 +- src/modules/game/game.module.ts | 8 +- .../helpers/game-play/game-play.factory.ts | 108 +- .../helpers/game-play/game-play.helper.ts | 24 +- .../game-victory/game-victory.helper.ts | 64 +- src/modules/game/helpers/game.factory.ts | 4 +- src/modules/game/helpers/game.helper.ts | 66 +- src/modules/game/helpers/game.mutator.ts | 4 +- .../player-attribute.factory.ts | 90 +- .../player-attribute.helper.ts | 18 +- .../player-death/player-death.factory.ts | 52 +- .../game/helpers/player/player.factory.ts | 4 +- .../game/helpers/player/player.helper.ts | 12 +- .../game-history-record.repository.ts | 47 +- .../providers/repositories/game.repository.ts | 2 +- .../game-history-record.service.ts | 66 +- .../services/game-phase/game-phase.service.ts | 18 +- .../game-play/game-play-maker.service.ts | 90 +- .../game-play/game-play-validator.service.ts | 180 +- .../game-play-vote/game-play-vote.service.ts | 16 +- .../services/game-play/game-play.service.ts | 92 +- .../game-random-composition.service.ts | 18 +- .../game/providers/services/game.service.ts | 20 +- .../services/player/player-killer.service.ts | 76 +- .../game-additional-card.schema.ts | 33 +- .../game-history-record-play-source.schema.ts | 25 +- .../game-history-record-play-target.schema.ts | 31 +- .../game-history-record-play-vote.schema.ts | 23 +- .../game-history-record-play-voting.schema.ts | 27 +- .../game-history-record-play.schema.ts | 81 +- .../game-history-record.schema.ts | 64 +- .../composition-game-options.schema.ts | 13 +- .../game-options/game-options.schema.ts | 27 +- .../ancient-game-options.schema.ts | 21 +- .../bear-tamer-game-options.schema.ts | 13 +- .../big-bad-wolf-game-options.schema.ts | 10 +- .../dog-wolf-game-options.schema.ts | 13 +- .../fox-game-options.schema.ts | 13 +- .../guard-game-options.schema.ts | 13 +- .../idiot-game-options.schema.ts | 13 +- .../little-girl-game-options.schema.ts | 13 +- .../pied-piper-game-options.schema.ts | 21 +- .../raven-game-options.schema.ts | 17 +- .../roles-game-options.schema.ts | 125 +- .../seer-game-options.schema.ts | 17 +- .../sheriff-election-game-options.schema.ts | 23 +- .../sheriff-game-options.schema.ts | 23 +- .../stuttering-judge-game-options.schema.ts | 17 +- .../thief-game-options.schema.ts | 21 +- .../three-brothers-game-options.schema.ts | 17 +- .../two-sisters-game-options.schema.ts | 17 +- .../white-werewolf-game-options.schema.ts | 17 +- .../wild-child-game-options.schema.ts | 13 +- .../game-options/votes-game-options.schema.ts | 10 +- .../game-play-source.schema.ts | 23 +- .../game-play/game-play.schema.constant.ts | 8 +- .../schemas/game-play/game-play.schema.ts | 22 +- .../game-victory/game-victory.schema.ts | 23 +- .../game/schemas/game.schema.constant.ts | 24 +- src/modules/game/schemas/game.schema.ts | 76 +- .../player-attribute-activation.schema.ts | 19 +- .../player-attribute.schema.ts | 29 +- .../schemas/player/player-death.schema.ts | 17 +- .../game/schemas/player/player-role.schema.ts | 21 +- .../game/schemas/player/player-side.schema.ts | 19 +- .../game/schemas/player/player.schema.ts | 51 +- .../game/types/game-history-record.type.ts | 5 + src/modules/game/types/game.type.ts | 14 +- .../health/controllers/health.controller.ts | 4 +- src/modules/role/constants/role.constant.ts | 192 +- .../role/controllers/role.controller.ts | 8 +- src/modules/role/enums/role.enum.ts | 8 +- src/modules/role/helpers/role.factory.ts | 4 +- src/modules/role/helpers/role.helper.ts | 4 +- src/modules/role/types/role.type.ts | 14 +- src/server/constants/server.constant.ts | 4 +- src/server/server.ts | 8 +- src/shared/api/enums/api.enum.ts | 4 +- src/shared/api/helpers/api.helper.ts | 16 +- .../enums/bad-game-play-payload-error.enum.ts | 4 +- .../enums/bad-resource-mutation-error.enum.ts | 4 +- .../enums/resource-not-found-error.enum.ts | 4 +- .../enums/unexpected-exception.enum.ts | 4 +- .../helpers/unexpected-exception.factory.ts | 12 +- .../bad-game-play-payload-exception.type.ts | 4 +- .../bad-resource-mutation-exception.type.ts | 6 +- .../resource-not-found-exception.type.ts | 6 +- .../types/unexpected-exception.type.ts | 4 +- .../constants/validation.constant.ts | 11 +- .../game/helpers/game-datatable.helper.ts | 4 +- .../game/step-definitions/game.given-steps.ts | 4 +- .../game/step-definitions/game.then-steps.ts | 30 +- .../game/step-definitions/game.when-steps.ts | 10 +- tests/e2e/helpers/nest-app.helper.ts | 8 +- .../controllers/game.controller.e2e-spec.ts | 248 +- ...game-history-record.repository.e2e-spec.ts | 108 +- .../controllers/role.controller.e2e-spec.ts | 4 +- ...create-game-additional-card.dto.factory.ts | 10 +- ...te-composition-game-options.dto.factory.ts | 4 +- .../create-game-options.dto.factory.ts | 4 +- .../create-roles-game-options.dto.factory.ts | 46 +- .../create-votes-game-options.dto.factory.ts | 4 +- .../create-game-player.dto.factory.ts | 8 +- .../create-game/create-game.dto.factory.ts | 22 +- ...get-game-random-composition.dto.factory.ts | 4 +- ...-play-target-with-relations.dto.factory.ts | 4 +- ...me-play-vote-with-relations.dto.factory.ts | 4 +- ...ke-game-play-with-relations.dto.factory.ts | 4 +- .../make-game-play.dto.factory.ts | 4 +- .../game-additional-card.schema.factory.ts | 10 +- .../game-history-record.schema.factory.ts | 126 +- ...composition-game-options.schema.factory.ts | 4 +- .../game-options.schema.factory.ts | 4 +- .../game-roles-options.schema.factory.ts | 46 +- .../votes-game-options.schema.factory.ts | 4 +- .../game-play-source.schema.factory.ts | 8 +- .../game-play/game-play.schema.factory.ts | 108 +- .../game-victory.schema.factory.ts | 8 +- .../game/schemas/game.schema.factory.ts | 12 +- .../player-attribute.schema.factory.ts | 100 +- .../player-death.schema.factory.ts | 58 +- .../player/player-with-role.schema.factory.ts | 66 +- .../schemas/player/player.schema.factory.ts | 18 +- .../game-history-record.type.factory.ts | 14 +- .../factories/role/types/role.type.factory.ts | 12 +- tests/stryker/incremental.json | 17850 ++++++++-------- .../pipes/get-game-by-id.pipe.spec.ts | 4 +- ...al-cards-for-thief-roles.decorator.spec.ts | 14 +- ...nal-cards-for-thief-size.decorator.spec.ts | 16 +- ...dditional-cards-presence.decorator.spec.ts | 44 +- ...-cards-roles-max-in-game.decorator.spec.ts | 50 +- ...composition-has-villager.decorator.spec.ts | 34 +- ...composition-has-werewolf.decorator.spec.ts | 34 +- ...on-positions-consistency.decorator.spec.ts | 58 +- ...sition-roles-max-in-game.decorator.spec.ts | 42 +- ...sition-roles-min-in-game.decorator.spec.ts | 44 +- .../player-role.transformer.spec.ts | 26 +- .../player-side.transformer.spec.ts | 20 +- .../game-play/game-play.factory.spec.ts | 114 +- .../game-play/game-play.helper.spec.ts | 30 +- .../game-victory/game-victory.helper.spec.ts | 36 +- .../modules/game/helpers/game.factory.spec.ts | 6 +- .../modules/game/helpers/game.helper.spec.ts | 104 +- .../modules/game/helpers/game.mutator.spec.ts | 8 +- .../player-attribute.factory.spec.ts | 102 +- .../player-attribute.helper.spec.ts | 80 +- .../player-death/player-death.factory.spec.ts | 56 +- .../game/helpers/player/player.helper.spec.ts | 8 +- .../game-history-record.service.spec.ts | 90 +- .../game-phase/game-phase.service.spec.ts | 16 +- .../game-play/game-play-maker.service.spec.ts | 50 +- .../game-play-validator.service.spec.ts | 144 +- .../game-play/game-play.service.spec.ts | 268 +- .../game-random-composition.service.spec.ts | 128 +- .../providers/services/game.service.spec.ts | 32 +- .../player/player-killer.service.spec.ts | 66 +- .../role/constants/role.constant.spec.ts | 14 +- .../modules/role/helpers/role.factory.spec.ts | 8 +- .../modules/role/helpers/role.helper.spec.ts | 22 +- .../server/constants/server.constant.spec.ts | 4 +- tests/unit/specs/server/server.spec.ts | 4 +- .../shared/api/helpers/api.helper.spec.ts | 14 +- ...d-game-play-payload-exception.type.spec.ts | 4 +- ...d-resource-mutation-exception.type.spec.ts | 8 +- .../resource-not-found-exception.type.spec.ts | 8 +- .../types/unexpected-exception.type.spec.ts | 6 +- 261 files changed, 12567 insertions(+), 12154 deletions(-) delete mode 100644 src/modules/game/constants/game-additional-card/game-additional-card.constant.ts create mode 100644 src/modules/game/constants/game-additional-cards/game-additional-cards.constant.ts diff --git a/config/eslint/constants.js b/config/eslint/constants.js index d15dd0211..6d0f12b16 100644 --- a/config/eslint/constants.js +++ b/config/eslint/constants.js @@ -14,21 +14,34 @@ const MAX_LENGTH_DEFAULT_CONFIG = { const BOOLEAN_PREFIXES = ["is", "was", "are", "were", "should", "has", "can", "does", "do", "did", "must"]; const NAMING_CONVENTION_DEFAULT_CONFIG = [ { - selector: ["enum", "enumMember"], + selector: ["enumMember"], format: ["UPPER_CASE"], - }, { - selector: ["class", "interface", "typeParameter"], + }, + { + selector: ["class", "interface", "typeParameter", "enum"], format: ["PascalCase"], - }, { + }, + { selector: ["function", "classProperty", "classMethod", "accessor"], format: ["camelCase"], leadingUnderscore: "allow", - }, { + }, + { selector: ["variable", "classProperty"], types: ["boolean"], format: ["PascalCase"], prefix: BOOLEAN_PREFIXES, }, + { + selector: ["variable"], + modifiers: ["exported"], + format: ["UPPER_CASE"], + }, + { + selector: ["objectLiteralProperty"], + modifiers: ["exported"], + format: ["UPPER_CASE"], + }, ]; module.exports = { diff --git a/config/jest/jest-e2e.ts b/config/jest/jest-e2e.ts index f371053b2..fa54ca654 100644 --- a/config/jest/jest-e2e.ts +++ b/config/jest/jest-e2e.ts @@ -3,7 +3,7 @@ import type { Config } from "jest"; import { compilerOptions } from "../../tsconfig.json"; -const config: Config = { +const JEST_E2E_CONFIG: Config = { moduleFileExtensions: ["js", "ts"], rootDir: "../../", testEnvironment: "node", @@ -35,4 +35,4 @@ const config: Config = { }, }; -export default config; \ No newline at end of file +export default JEST_E2E_CONFIG; \ No newline at end of file diff --git a/config/jest/jest-global.ts b/config/jest/jest-global.ts index 5cc1d3c07..7fc7ff201 100644 --- a/config/jest/jest-global.ts +++ b/config/jest/jest-global.ts @@ -3,7 +3,7 @@ import type { Config } from "jest"; import { compilerOptions } from "../../tsconfig.json"; -const config: Config = { +const JEST_GLOBAL_CONFIG: Config = { moduleFileExtensions: ["js", "ts"], rootDir: "../../", testEnvironment: "node", @@ -37,4 +37,4 @@ const config: Config = { }, }; -export default config; \ No newline at end of file +export default JEST_GLOBAL_CONFIG; \ No newline at end of file diff --git a/config/jest/jest-unit.ts b/config/jest/jest-unit.ts index 2942b8328..7e00a274f 100644 --- a/config/jest/jest-unit.ts +++ b/config/jest/jest-unit.ts @@ -3,7 +3,7 @@ import type { Config } from "jest"; import { compilerOptions } from "../../tsconfig.json"; -const config: Config = { +const JEST_UNIT_CONFIG: Config = { moduleFileExtensions: ["js", "ts"], rootDir: "../../", testEnvironment: "node", @@ -38,4 +38,4 @@ const config: Config = { }, }; -export default config; \ No newline at end of file +export default JEST_UNIT_CONFIG; \ No newline at end of file diff --git a/src/modules/game/constants/game-additional-card/game-additional-card.constant.ts b/src/modules/game/constants/game-additional-card/game-additional-card.constant.ts deleted file mode 100644 index cb170ea46..000000000 --- a/src/modules/game/constants/game-additional-card/game-additional-card.constant.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { ApiPropertyOptions } from "@nestjs/swagger"; - -import type { GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; -import { roles } from "@/modules/role/constants/role.constant"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; - -const gameAdditionalCardsThiefRoleNames: Readonly = Object.freeze(roles.filter(({ minInGame, name }) => name !== ROLE_NAMES.THIEF && minInGame === undefined).map(({ name }) => name)); - -const gameAdditionalCardFieldsSpecs: Readonly> = Object.freeze({ - _id: { required: true }, - roleName: { - required: true, - enum: ROLE_NAMES, - }, - recipient: { - required: true, - enum: [ROLE_NAMES.THIEF], - }, - isUsed: { - required: true, - default: false, - }, -}); - -const gameAdditionalCardApiProperties: Readonly> = Object.freeze({ - _id: { - description: "Game additional card Mongo Object Id", - ...gameAdditionalCardFieldsSpecs._id, - }, - roleName: { - description: `Game additional card role name. If \`recipient\` is \`${ROLE_NAMES.THIEF}\`, possible values are : ${gameAdditionalCardsThiefRoleNames.toString()}`, - ...gameAdditionalCardFieldsSpecs.roleName, - }, - recipient: { - description: "Game additional card recipient", - ...gameAdditionalCardFieldsSpecs.recipient, - }, - isUsed: { - description: "If set to `true`, the card has been used by its recipient", - ...gameAdditionalCardFieldsSpecs.isUsed, - }, -}); - -export { - gameAdditionalCardFieldsSpecs, - gameAdditionalCardApiProperties, - gameAdditionalCardsThiefRoleNames, -}; \ No newline at end of file diff --git a/src/modules/game/constants/game-additional-cards/game-additional-cards.constant.ts b/src/modules/game/constants/game-additional-cards/game-additional-cards.constant.ts new file mode 100644 index 000000000..023849342 --- /dev/null +++ b/src/modules/game/constants/game-additional-cards/game-additional-cards.constant.ts @@ -0,0 +1,48 @@ +import type { ApiPropertyOptions } from "@nestjs/swagger"; + +import type { GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import { RoleNames } from "@/modules/role/enums/role.enum"; + +const GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES: Readonly = Object.freeze(ROLES.filter(({ minInGame, name }) => name !== RoleNames.THIEF && minInGame === undefined).map(({ name }) => name)); + +const GAME_ADDITIONAL_CARDS_FIELDS_SPECS: Readonly> = Object.freeze({ + _id: { required: true }, + roleName: { + required: true, + enum: RoleNames, + }, + recipient: { + required: true, + enum: [RoleNames.THIEF], + }, + isUsed: { + required: true, + default: false, + }, +}); + +const GAME_ADDITIONAL_CARDS_API_PROPERTIES: Readonly> = Object.freeze({ + _id: { + description: "Game additional card Mongo Object Id", + ...GAME_ADDITIONAL_CARDS_FIELDS_SPECS._id, + }, + roleName: { + description: `Game additional card role name. If \`recipient\` is \`${RoleNames.THIEF}\`, possible values are : ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`, + ...GAME_ADDITIONAL_CARDS_FIELDS_SPECS.roleName, + }, + recipient: { + description: "Game additional card recipient", + ...GAME_ADDITIONAL_CARDS_FIELDS_SPECS.recipient, + }, + isUsed: { + description: "If set to `true`, the card has been used by its recipient", + ...GAME_ADDITIONAL_CARDS_FIELDS_SPECS.isUsed, + }, +}); + +export { + GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES, + GAME_ADDITIONAL_CARDS_FIELDS_SPECS, + GAME_ADDITIONAL_CARDS_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-source.constant.ts b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-source.constant.ts index fd78d5f0a..3a1c8f2c8 100644 --- a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-source.constant.ts +++ b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-source.constant.ts @@ -1,12 +1,12 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; import type { GameHistoryRecordPlaySource } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema"; -const gameHistoryRecordPlaySourceFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS = Object.freeze>({ name: { required: true, - enum: gameSourceValues, + enum: GAME_SOURCE_VALUES, }, players: { minItems: 1, @@ -14,15 +14,18 @@ const gameHistoryRecordPlaySourceFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_SOURCE_API_PROPERTIES = Object.freeze>({ name: { description: "Source of the play", - ...gameHistoryRecordPlaySourceFieldsSpecs.name, + ...GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS.name, }, players: { description: "Players that made the play", - ...gameHistoryRecordPlaySourceFieldsSpecs.players, + ...GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS.players, }, }); -export { gameHistoryRecordPlaySourceFieldsSpecs, gameHistoryRecordPlaySourceApiProperties }; \ No newline at end of file +export { + GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS, + GAME_HISTORY_RECORD_PLAY_SOURCE_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-target.constant.ts b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-target.constant.ts index e00b4b8b1..c2e10c69e 100644 --- a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-target.constant.ts +++ b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-target.constant.ts @@ -1,30 +1,33 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; +import { WitchPotions } from "@/modules/game/enums/game-play.enum"; import type { GameHistoryRecordPlayTarget } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema"; -const gameHistoryRecordPlayTargetFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS = Object.freeze>({ player: { required: true }, isInfected: { required: false }, drankPotion: { - enum: WITCH_POTIONS, + enum: WitchPotions, required: false, }, }); -const gameHistoryRecordPlayTargetApiProperties = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_TARGET_API_PROPERTIES = Object.freeze>({ player: { description: "Targeted player of this play", - ...gameHistoryRecordPlayTargetFieldsSpecs.player, + ...GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS.player, }, isInfected: { description: "Only if there is the `vile father of wolves` in the game and the action is eat from werewolves. If set to `true`, the target joined the werewolves side", - ...gameHistoryRecordPlayTargetFieldsSpecs.isInfected, + ...GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS.isInfected, }, drankPotion: { description: "Only if there is the `witch` in the game. The consequences depends on the type of potion", - ...gameHistoryRecordPlayTargetFieldsSpecs.drankPotion, + ...GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS.drankPotion, }, }); -export { gameHistoryRecordPlayTargetFieldsSpecs, gameHistoryRecordPlayTargetApiProperties }; \ No newline at end of file +export { + GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS, + GAME_HISTORY_RECORD_PLAY_TARGET_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-vote.constant.ts b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-vote.constant.ts index 8533d3f7c..1f4341c96 100644 --- a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-vote.constant.ts +++ b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-vote.constant.ts @@ -2,20 +2,23 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; import type { GameHistoryRecordPlayVote } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema"; -const gameHistoryRecordPlayVoteFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS = Object.freeze>({ source: { required: true }, target: { required: true }, }); -const gameHistoryRecordPlayTargetApiProperties = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_VOTE_API_PROPERTIES = Object.freeze>({ source: { description: "Player who made the vote", - ...gameHistoryRecordPlayVoteFieldsSpecs.source, + ...GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS.source, }, target: { description: "Player targeted by the vote", - ...gameHistoryRecordPlayVoteFieldsSpecs.target, + ...GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS.target, }, }); -export { gameHistoryRecordPlayVoteFieldsSpecs, gameHistoryRecordPlayTargetApiProperties }; \ No newline at end of file +export { + GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS, + GAME_HISTORY_RECORD_PLAY_VOTE_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-voting.constant.ts b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-voting.constant.ts index e0fc40fbf..3cfc3720b 100644 --- a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-voting.constant.ts +++ b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-voting.constant.ts @@ -1,28 +1,28 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; import type { GameHistoryRecordPlayVoting } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema"; -const gameHistoryRecordPlayVotingFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS = Object.freeze>({ result: { required: true, - enum: GAME_HISTORY_RECORD_VOTING_RESULTS, + enum: GameHistoryRecordVotingResults, }, nominatedPlayers: { required: false }, }); -const gameHistoryRecordPlayVotingApiProperties = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_VOTING_API_PROPERTIES = Object.freeze>({ result: { description: "Define the results and their consequences", - ...gameHistoryRecordPlayVotingFieldsSpecs.result, + ...GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS.result, }, nominatedPlayers: { description: "Nominated players from the play votes", - ...gameHistoryRecordPlayVotingFieldsSpecs.nominatedPlayers, + ...GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS.nominatedPlayers, }, }); export { - gameHistoryRecordPlayVotingFieldsSpecs, - gameHistoryRecordPlayVotingApiProperties, + GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS, + GAME_HISTORY_RECORD_PLAY_VOTING_API_PROPERTIES, }; \ No newline at end of file diff --git a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play.constant.ts b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play.constant.ts index a046cc2af..c04a578b9 100644 --- a/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play.constant.ts +++ b/src/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play.constant.ts @@ -1,18 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from "@/modules/game/enums/game-play.enum"; +import { GamePlayActions, GamePlayCauses } from "@/modules/game/enums/game-play.enum"; import type { GameHistoryRecordPlay } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; -const gameHistoryRecordPlayFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS = Object.freeze>({ action: { required: true, - enum: GAME_PLAY_ACTIONS, + enum: GamePlayActions, }, source: { required: true }, cause: { required: false, - enum: GAME_PLAY_CAUSES, + enum: GamePlayCauses, }, targets: { required: false }, votes: { required: false }, @@ -21,47 +21,50 @@ const gameHistoryRecordPlayFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_PLAY_API_PROPERTIES = Object.freeze>({ action: { description: "Play's action", - ...gameHistoryRecordPlayFieldsSpecs.action, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.action, }, source: { description: "Play's source", - ...gameHistoryRecordPlayFieldsSpecs.source, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.source, }, cause: { description: "Play's cause", - ...gameHistoryRecordPlayFieldsSpecs.cause, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.cause, }, targets: { description: "Players affected by the play.", - ...gameHistoryRecordPlayFieldsSpecs.targets, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.targets, }, votes: { description: "Play's votes", - ...gameHistoryRecordPlayFieldsSpecs.targets, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.targets, }, voting: { description: "Only if `votes` are set, voting summary and nominated players if applicable", - ...gameHistoryRecordPlayFieldsSpecs.voting, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.voting, }, didJudgeRequestAnotherVote: { description: "Only if there is the `stuttering judge` in the game and `action` is either `vote` or `settle-votes`. If set to `true`, there is another vote planned after this play", - ...gameHistoryRecordPlayFieldsSpecs.didJudgeRequestAnotherVote, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.didJudgeRequestAnotherVote, }, chosenCard: { description: "Only if there is a `thief` in the game, chosen card from additional cards.", - ...gameHistoryRecordPlayFieldsSpecs.chosenCard, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.chosenCard, }, chosenSide: { description: "Only if there is the `dog wolf` in the game, which side it joined", - ...gameHistoryRecordPlayFieldsSpecs.chosenSide, + ...GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.chosenSide, }, }); -export { gameHistoryRecordPlayFieldsSpecs, gameHistoryRecordPlayApiProperties }; \ No newline at end of file +export { + GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS, + GAME_HISTORY_RECORD_PLAY_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-history-record/game-history-record.constant.ts b/src/modules/game/constants/game-history-record/game-history-record.constant.ts index a0e952478..7e39aee59 100644 --- a/src/modules/game/constants/game-history-record/game-history-record.constant.ts +++ b/src/modules/game/constants/game-history-record/game-history-record.constant.ts @@ -1,9 +1,9 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; import type { GameHistoryRecord } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; -const gameHistoryRecordFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_FIELDS_SPECS = Object.freeze>({ _id: { required: true }, gameId: { required: true }, turn: { @@ -11,7 +11,7 @@ const gameHistoryRecordFieldsSpecs = Object.freeze>({ +const GAME_HISTORY_RECORD_API_PROPERTIES = Object.freeze>({ _id: { description: "Game history record's Mongo ObjectId", example: "507f1f77bcf86cd799439011", - ...gameHistoryRecordFieldsSpecs._id, + ...GAME_HISTORY_RECORD_FIELDS_SPECS._id, }, gameId: { description: "Game's Mongo ObjectId related to this history record", example: "507f1f77bcf86cd799439012", - ...gameHistoryRecordFieldsSpecs.gameId, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.gameId, }, turn: { description: "Game's turn recorded in history", - ...gameHistoryRecordFieldsSpecs.turn, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.turn, }, phase: { description: "Game's phase recorded in history", - ...gameHistoryRecordFieldsSpecs.phase, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.phase, }, tick: { description: "Game's tick recorded in history", - ...gameHistoryRecordFieldsSpecs.tick, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.tick, }, play: { description: "Game's play recorded in history", - ...gameHistoryRecordFieldsSpecs.play, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.play, }, revealedPlayers: { description: "Player(s) which the role has been revealed after the play", - ...gameHistoryRecordFieldsSpecs.revealedPlayers, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.revealedPlayers, }, deadPlayers: { description: "Player(s) that died after the play", - ...gameHistoryRecordFieldsSpecs.deadPlayers, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.deadPlayers, }, createdAt: { description: "When the game history record was created", - ...gameHistoryRecordFieldsSpecs.createdAt, + ...GAME_HISTORY_RECORD_FIELDS_SPECS.createdAt, }, }); export { - gameHistoryRecordFieldsSpecs, - gameHistoryRecordApiProperties, + GAME_HISTORY_RECORD_FIELDS_SPECS, + GAME_HISTORY_RECORD_API_PROPERTIES, }; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/composition-game-options.constant.ts b/src/modules/game/constants/game-options/composition-game-options.constant.ts index 0b3106473..518415597 100644 --- a/src/modules/game/constants/game-options/composition-game-options.constant.ts +++ b/src/modules/game/constants/game-options/composition-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { CompositionGameOptions } from "@/modules/game/schemas/game-options/composition-game-options.schema"; -const compositionGameOptionsFieldsSpecs = Object.freeze({ isHidden: { default: defaultGameOptions.composition.isHidden } }); +const COMPOSITION_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ isHidden: { default: DEFAULT_GAME_OPTIONS.composition.isHidden } }); -const compositionGameOptionsApiProperties: Record = Object.freeze({ +const COMPOSITION_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isHidden: { description: "If set to `true`, game's composition will be hidden to all players", - ...compositionGameOptionsFieldsSpecs.isHidden, + ...COMPOSITION_GAME_OPTIONS_FIELDS_SPECS.isHidden, }, }); -export { compositionGameOptionsApiProperties, compositionGameOptionsFieldsSpecs }; \ No newline at end of file +export { + COMPOSITION_GAME_OPTIONS_API_PROPERTIES, + COMPOSITION_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/game-options.constant.ts b/src/modules/game/constants/game-options/game-options.constant.ts index 1ac0c38f6..66c8fbeeb 100644 --- a/src/modules/game/constants/game-options/game-options.constant.ts +++ b/src/modules/game/constants/game-options/game-options.constant.ts @@ -1,9 +1,9 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; import type { GameOptions } from "@/modules/game/schemas/game-options/game-options.schema"; -const defaultGameOptions: GameOptions = Object.freeze({ +const DEFAULT_GAME_OPTIONS: GameOptions = Object.freeze({ composition: { isHidden: false }, votes: { canBeSkipped: true }, roles: { @@ -13,7 +13,7 @@ const defaultGameOptions: GameOptions = Object.freeze({ isEnabled: true, electedAt: { turn: 1, - phase: GAME_PHASES.NIGHT, + phase: GamePhases.NIGHT, }, hasDoubledVote: true, }, @@ -49,10 +49,13 @@ const defaultGameOptions: GameOptions = Object.freeze({ }, }); -const gameOptionsApiProperties: Record = Object.freeze({ +const GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ composition: { description: "Game's composition options" }, votes: { description: "Game's votes options" }, roles: { description: "Game's roles options" }, }); -export { defaultGameOptions, gameOptionsApiProperties }; \ No newline at end of file +export { + DEFAULT_GAME_OPTIONS, + GAME_OPTIONS_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant.ts index 941123610..356c38def 100644 --- a/src/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant.ts @@ -1,26 +1,29 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { AncientGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema"; -const ancientGameOptionsFieldsSpecs = Object.freeze({ +const ANCIENT_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ livesCountAgainstWerewolves: { - default: defaultGameOptions.roles.ancient.livesCountAgainstWerewolves, + default: DEFAULT_GAME_OPTIONS.roles.ancient.livesCountAgainstWerewolves, minimum: 1, maximum: 5, }, - doesTakeHisRevenge: { default: defaultGameOptions.roles.ancient.doesTakeHisRevenge }, + doesTakeHisRevenge: { default: DEFAULT_GAME_OPTIONS.roles.ancient.doesTakeHisRevenge }, }); -const ancientGameOptionsApiProperties: Record = Object.freeze({ +const ANCIENT_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ livesCountAgainstWerewolves: { description: "Number of lives `ancient` has against `werewolves`", - ...ancientGameOptionsFieldsSpecs.livesCountAgainstWerewolves, + ...ANCIENT_GAME_OPTIONS_FIELDS_SPECS.livesCountAgainstWerewolves, }, doesTakeHisRevenge: { description: "If set to `true`, the ancient will make all players from the villagers side powerless if he dies from them", - ...ancientGameOptionsFieldsSpecs.doesTakeHisRevenge, + ...ANCIENT_GAME_OPTIONS_FIELDS_SPECS.doesTakeHisRevenge, }, }); -export { ancientGameOptionsApiProperties, ancientGameOptionsFieldsSpecs }; \ No newline at end of file +export { + ANCIENT_GAME_OPTIONS_API_PROPERTIES, + ANCIENT_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant.ts index daa5a22ea..ba52f6a1c 100644 --- a/src/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { BearTamerGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema"; -const bearTamerGameOptionsFieldsSpecs = Object.freeze({ doesGrowlIfInfected: { default: defaultGameOptions.roles.bearTamer.doesGrowlIfInfected } }); +const BEAR_TAMER_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ doesGrowlIfInfected: { default: DEFAULT_GAME_OPTIONS.roles.bearTamer.doesGrowlIfInfected } }); -const bearTamerGameOptionsApiProperties: Record = Object.freeze({ +const BEAR_TAMER_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ doesGrowlIfInfected: { description: "If set to `true`, the bear tamer will have the `growls` attribute until he dies if he is `infected`", - ...bearTamerGameOptionsFieldsSpecs.doesGrowlIfInfected, + ...BEAR_TAMER_GAME_OPTIONS_FIELDS_SPECS.doesGrowlIfInfected, }, }); -export { bearTamerGameOptionsApiProperties, bearTamerGameOptionsFieldsSpecs }; \ No newline at end of file +export { + BEAR_TAMER_GAME_OPTIONS_API_PROPERTIES, + BEAR_TAMER_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant.ts index 75c467592..bb259b21f 100644 --- a/src/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { BigBadWolfGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema"; -const bigBadWolfGameOptionsFieldsSpecs = Object.freeze({ isPowerlessIfWerewolfDies: { default: defaultGameOptions.roles.bigBadWolf.isPowerlessIfWerewolfDies } }); +const BIG_BAD_WOLF_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ isPowerlessIfWerewolfDies: { default: DEFAULT_GAME_OPTIONS.roles.bigBadWolf.isPowerlessIfWerewolfDies } }); -const bigBadWolfGameOptionsApiProperties: Record = Object.freeze({ +const BIG_BAD_WOLF_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isPowerlessIfWerewolfDies: { description: "If set to `true`, `big bad wolf` won't wake up anymore during the night if at least one player from the `werewolves` side died", - ...bigBadWolfGameOptionsFieldsSpecs.isPowerlessIfWerewolfDies, + ...BIG_BAD_WOLF_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfWerewolfDies, }, }); -export { bigBadWolfGameOptionsApiProperties, bigBadWolfGameOptionsFieldsSpecs }; \ No newline at end of file +export { + BIG_BAD_WOLF_GAME_OPTIONS_API_PROPERTIES, + BIG_BAD_WOLF_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant.ts index 6f105aa8f..5a8f90753 100644 --- a/src/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { DogWolfGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/dog-wolf-game-options.schema"; -const dogWolfGameOptionsFieldsSpecs = Object.freeze({ isChosenSideRevealed: { default: defaultGameOptions.roles.dogWolf.isChosenSideRevealed } }); +const DOG_WOLF_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ isChosenSideRevealed: { default: DEFAULT_GAME_OPTIONS.roles.dogWolf.isChosenSideRevealed } }); -const dogWolfGameOptionsApiProperties: Record = Object.freeze({ +const DOG_WOLF_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isChosenSideRevealed: { description: "If set to `true`, when `dog-wolf` chooses his side at the beginning of the game, the game master will announce the chosen side to other players", - ...dogWolfGameOptionsFieldsSpecs.isChosenSideRevealed, + ...DOG_WOLF_GAME_OPTIONS_FIELDS_SPECS.isChosenSideRevealed, }, }); -export { dogWolfGameOptionsApiProperties, dogWolfGameOptionsFieldsSpecs }; \ No newline at end of file +export { + DOG_WOLF_GAME_OPTIONS_API_PROPERTIES, + DOG_WOLF_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/fox-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/fox-game-options.constant.ts index 562f19268..d18e87bf0 100644 --- a/src/modules/game/constants/game-options/roles-game-options/fox-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/fox-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { FoxGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/fox-game-options.schema"; -const foxGameOptionsFieldsSpecs = Object.freeze({ isPowerlessIfMissesWerewolf: { default: defaultGameOptions.roles.fox.isPowerlessIfMissesWerewolf } }); +const FOX_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ isPowerlessIfMissesWerewolf: { default: DEFAULT_GAME_OPTIONS.roles.fox.isPowerlessIfMissesWerewolf } }); -const foxGameOptionsApiProperties: Record = Object.freeze({ +const FOX_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isPowerlessIfMissesWerewolf: { description: "If set to `true`, the `fox` will loose his power if he doesn't find a player from the `werewolves` side during his turn if he doesn't skip", - ...foxGameOptionsFieldsSpecs.isPowerlessIfMissesWerewolf, + ...FOX_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfMissesWerewolf, }, }); -export { foxGameOptionsApiProperties, foxGameOptionsFieldsSpecs }; \ No newline at end of file +export { + FOX_GAME_OPTIONS_API_PROPERTIES, + FOX_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/guard-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/guard-game-options.constant.ts index e102a1c38..e4f63f773 100644 --- a/src/modules/game/constants/game-options/roles-game-options/guard-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/guard-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { GuardGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/guard-game-options.schema"; -const guardGameOptionsFieldsSpecs = Object.freeze({ canProtectTwice: { default: defaultGameOptions.roles.guard.canProtectTwice } }); +const GUARD_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ canProtectTwice: { default: DEFAULT_GAME_OPTIONS.roles.guard.canProtectTwice } }); -const guardGameOptionsApiProperties: Record = Object.freeze({ +const GUARD_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ canProtectTwice: { description: "If set to `true`, the guard can protect twice in a row the same target", - ...guardGameOptionsFieldsSpecs.canProtectTwice, + ...GUARD_GAME_OPTIONS_FIELDS_SPECS.canProtectTwice, }, }); -export { guardGameOptionsApiProperties, guardGameOptionsFieldsSpecs }; \ No newline at end of file +export { + GUARD_GAME_OPTIONS_API_PROPERTIES, + GUARD_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant.ts index 9baef751a..109e899f5 100644 --- a/src/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { IdiotGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/idiot-game-options.schema"; -const idiotGameOptionsFieldsSpecs = Object.freeze({ doesDieOnAncientDeath: { default: defaultGameOptions.roles.idiot.doesDieOnAncientDeath } }); +const IDIOT_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ doesDieOnAncientDeath: { default: DEFAULT_GAME_OPTIONS.roles.idiot.doesDieOnAncientDeath } }); -const idiotGameOptionsApiProperties: Record = Object.freeze({ +const IDIOT_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ doesDieOnAncientDeath: { description: "If set to `true`, the idiot will die if his role is revealed and the ancient just died", - ...idiotGameOptionsFieldsSpecs.doesDieOnAncientDeath, + ...IDIOT_GAME_OPTIONS_FIELDS_SPECS.doesDieOnAncientDeath, }, }); -export { idiotGameOptionsApiProperties, idiotGameOptionsFieldsSpecs }; \ No newline at end of file +export { + IDIOT_GAME_OPTIONS_API_PROPERTIES, + IDIOT_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant.ts index 8eb3df385..5b72ac951 100644 --- a/src/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { LittleGirlGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/little-girl-game-options.schema"; -const littleGirlGameOptionsFieldsSpecs = Object.freeze({ isProtectedByGuard: { default: defaultGameOptions.roles.littleGirl.isProtectedByGuard } }); +const LITTLE_GIRL_GAME_OPTIONS_SPECS_FIELDS = Object.freeze({ isProtectedByGuard: { default: DEFAULT_GAME_OPTIONS.roles.littleGirl.isProtectedByGuard } }); -const littleGirlGameOptionsApiProperties: Record = Object.freeze({ +const LITTLE_GIRL_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isProtectedByGuard: { description: "If set to `false`, the `little girl` won't be protected by the `guard` from the `werewolves` attacks", - ...littleGirlGameOptionsFieldsSpecs.isProtectedByGuard, + ...LITTLE_GIRL_GAME_OPTIONS_SPECS_FIELDS.isProtectedByGuard, }, }); -export { littleGirlGameOptionsApiProperties, littleGirlGameOptionsFieldsSpecs }; \ No newline at end of file +export { + LITTLE_GIRL_GAME_OPTIONS_API_PROPERTIES, + LITTLE_GIRL_GAME_OPTIONS_SPECS_FIELDS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant.ts index 104d453bf..7eb055052 100644 --- a/src/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant.ts @@ -1,26 +1,29 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { PiedPiperGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/pied-piper-game-options.schema"; -const piedPiperGameOptionsFieldsSpecs = Object.freeze({ +const PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ charmedPeopleCountPerNight: { - default: defaultGameOptions.roles.piedPiper.charmedPeopleCountPerNight, + default: DEFAULT_GAME_OPTIONS.roles.piedPiper.charmedPeopleCountPerNight, minimum: 1, maximum: 5, }, - isPowerlessIfInfected: { default: defaultGameOptions.roles.piedPiper.isPowerlessIfInfected }, + isPowerlessIfInfected: { default: DEFAULT_GAME_OPTIONS.roles.piedPiper.isPowerlessIfInfected }, }); -const piedPiperGameOptionsApiProperties: Record = Object.freeze({ +const PIED_PIPER_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ charmedPeopleCountPerNight: { description: "Number of `charmed` people by the `pied piper` per night if there are enough targets (or number of not charmed players otherwise)", - ...piedPiperGameOptionsFieldsSpecs.charmedPeopleCountPerNight, + ...PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.charmedPeopleCountPerNight, }, isPowerlessIfInfected: { description: "If set to `true`, `pied piper` will be `powerless` if he is infected by the `vile father of wolves`", - ...piedPiperGameOptionsFieldsSpecs.isPowerlessIfInfected, + ...PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfInfected, }, }); -export { piedPiperGameOptionsApiProperties, piedPiperGameOptionsFieldsSpecs }; \ No newline at end of file +export { + PIED_PIPER_GAME_OPTIONS_API_PROPERTIES, + PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/raven-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/raven-game-options.constant.ts index a2a8739dc..68a8f9589 100644 --- a/src/modules/game/constants/game-options/roles-game-options/raven-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/raven-game-options.constant.ts @@ -1,21 +1,24 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { RavenGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/raven-game-options.schema"; -const ravenGameOptionsFieldsSpecs = Object.freeze({ +const RAVEN_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ markPenalty: { - default: defaultGameOptions.roles.raven.markPenalty, + default: DEFAULT_GAME_OPTIONS.roles.raven.markPenalty, minimum: 1, maximum: 5, }, }); -const ravenGameOptionsApiProperties: Record = Object.freeze({ +const RAVEN_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ markPenalty: { description: "Penalty of votes against the player targeted by the `raven mark` for the next village's vote. In other words, the `raven marked` player will have two votes against himself if this value is set to `2`", - ...ravenGameOptionsFieldsSpecs.markPenalty, + ...RAVEN_GAME_OPTIONS_FIELDS_SPECS.markPenalty, }, }); -export { ravenGameOptionsApiProperties, ravenGameOptionsFieldsSpecs }; \ No newline at end of file +export { + RAVEN_GAME_OPTIONS_API_PROPERTIES, + RAVEN_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/roles-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/roles-game-options.constant.ts index 2f6ad484e..eaf2c24b9 100644 --- a/src/modules/game/constants/game-options/roles-game-options/roles-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/roles-game-options.constant.ts @@ -1,21 +1,21 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { RolesGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/roles-game-options.schema"; -const rolesGameOptionsFieldsSpecs = Object.freeze({ - areRevealedOnDeath: { default: defaultGameOptions.roles.areRevealedOnDeath }, - doSkipCallIfNoTarget: { default: defaultGameOptions.roles.doSkipCallIfNoTarget }, +const ROLES_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ + areRevealedOnDeath: { default: DEFAULT_GAME_OPTIONS.roles.areRevealedOnDeath }, + doSkipCallIfNoTarget: { default: DEFAULT_GAME_OPTIONS.roles.doSkipCallIfNoTarget }, }); -const rolesGameOptionsApiProperties: Record = Object.freeze({ +const ROLES_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ areRevealedOnDeath: { description: "If set to `true`, player's role is revealed when he's dead", - ...rolesGameOptionsFieldsSpecs.areRevealedOnDeath, + ...ROLES_GAME_OPTIONS_FIELDS_SPECS.areRevealedOnDeath, }, doSkipCallIfNoTarget: { description: "If set to `true`, player's role won't be called if there is no target available for him", - ...rolesGameOptionsFieldsSpecs.doSkipCallIfNoTarget, + ...ROLES_GAME_OPTIONS_FIELDS_SPECS.doSkipCallIfNoTarget, }, sheriff: { description: "Game `sheriff` role's options." }, bigBadWolf: { description: "Game `big bad wolf` role's options." }, @@ -37,4 +37,7 @@ const rolesGameOptionsApiProperties: Record = Object.freeze({ +const SEER_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isTalkative: { description: "If set to `true`, the game master must say out loud what the `seer` saw during her night, otherwise, he must mime the seen role to the `seer`", - ...seerGameOptionsFieldsSpecs.isTalkative, + ...SEER_GAME_OPTIONS_FIELDS_SPECS.isTalkative, }, canSeeRoles: { description: "If set to `true`, the seer can see the exact `role` of the target, otherwise, she only sees the `side`", - ...seerGameOptionsFieldsSpecs.canSeeRoles, + ...SEER_GAME_OPTIONS_FIELDS_SPECS.canSeeRoles, }, }); -export { seerGameOptionsApiProperties, seerGameOptionsFieldsSpecs }; \ No newline at end of file +export { + SEER_GAME_OPTIONS_API_PROPERTIES, + SEER_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant.ts index c9aa00172..cb73d084f 100644 --- a/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant.ts @@ -1,25 +1,28 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { SheriffElectionGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.schema"; -const sheriffElectionGameOptionsFieldsSpecs = Object.freeze({ +const SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ turn: { - default: defaultGameOptions.roles.sheriff.electedAt.turn, + default: DEFAULT_GAME_OPTIONS.roles.sheriff.electedAt.turn, minimum: 1, }, - phase: { default: defaultGameOptions.roles.sheriff.electedAt.phase }, + phase: { default: DEFAULT_GAME_OPTIONS.roles.sheriff.electedAt.phase }, }); -const sheriffElectionGameOptionsApiProperties: Record = Object.freeze({ +const SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ turn: { description: "Game's turn when the `sheriff` is elected", - ...sheriffElectionGameOptionsFieldsSpecs.turn, + ...SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.turn, }, phase: { description: "Game's phase when the `sheriff` is elected", - ...sheriffElectionGameOptionsFieldsSpecs.phase, + ...SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.phase, }, }); -export { sheriffElectionGameOptionsApiProperties, sheriffElectionGameOptionsFieldsSpecs }; \ No newline at end of file +export { + SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES, + SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant.ts index d576ee5c6..1e2417ebd 100644 --- a/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant.ts @@ -1,23 +1,26 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { SheriffGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema"; -const sheriffGameOptionsFieldsSpecs = Object.freeze({ - isEnabled: { default: defaultGameOptions.roles.sheriff.isEnabled }, - hasDoubledVote: { default: defaultGameOptions.roles.sheriff.hasDoubledVote }, +const SHERIFF_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ + isEnabled: { default: DEFAULT_GAME_OPTIONS.roles.sheriff.isEnabled }, + hasDoubledVote: { default: DEFAULT_GAME_OPTIONS.roles.sheriff.hasDoubledVote }, }); -const sheriffGameOptionsApiProperties: Record = Object.freeze({ +const SHERIFF_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isEnabled: { description: "If set to `true`, `sheriff` will be elected the first tick and the responsibility will be delegated when he dies. Otherwise, there will be no sheriff in the game and tie in votes will result in another vote between the tied players. In case of another equality, there will be no vote", - ...sheriffGameOptionsFieldsSpecs.isEnabled, + ...SHERIFF_GAME_OPTIONS_FIELDS_SPECS.isEnabled, }, electedAt: { description: "When the sheriff is elected during the game" }, hasDoubledVote: { description: "If set to `true`, `sheriff` vote during the village's vote is doubled, otherwise, it's a regular vote", - ...sheriffGameOptionsFieldsSpecs.hasDoubledVote, + ...SHERIFF_GAME_OPTIONS_FIELDS_SPECS.hasDoubledVote, }, }); -export { sheriffGameOptionsApiProperties, sheriffGameOptionsFieldsSpecs }; \ No newline at end of file +export { + SHERIFF_GAME_OPTIONS_API_PROPERTIES, + SHERIFF_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant.ts index 3d9a830ee..9d1ce5d5d 100644 --- a/src/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant.ts @@ -1,21 +1,24 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { StutteringJudgeGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/stuttering-judge-game-options.schema"; -const stutteringJudgeGameOptionsFieldsSpecs = Object.freeze({ +const STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ voteRequestsCount: { - default: defaultGameOptions.roles.stutteringJudge.voteRequestsCount, + default: DEFAULT_GAME_OPTIONS.roles.stutteringJudge.voteRequestsCount, minimum: 1, maximum: 5, }, }); -const stutteringJudgeGameOptionsApiProperties: Record = Object.freeze({ +const STUTTERING_JUDGE_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ voteRequestsCount: { description: "Number of vote requests that the `stuttering judge` can make during the game", - ...stutteringJudgeGameOptionsFieldsSpecs.voteRequestsCount, + ...STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS.voteRequestsCount, }, }); -export { stutteringJudgeGameOptionsApiProperties, stutteringJudgeGameOptionsFieldsSpecs }; \ No newline at end of file +export { + STUTTERING_JUDGE_GAME_OPTIONS_API_PROPERTIES, + STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant.ts index b1f2fca75..eb69f97c6 100644 --- a/src/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant.ts @@ -1,26 +1,29 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { ThiefGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/thief-game-options.schema"; -const thiefGameOptionsFieldsSpecs = Object.freeze({ - mustChooseBetweenWerewolves: { default: defaultGameOptions.roles.thief.mustChooseBetweenWerewolves }, +const THIEF_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ + mustChooseBetweenWerewolves: { default: DEFAULT_GAME_OPTIONS.roles.thief.mustChooseBetweenWerewolves }, additionalCardsCount: { - default: defaultGameOptions.roles.thief.additionalCardsCount, + default: DEFAULT_GAME_OPTIONS.roles.thief.additionalCardsCount, minimum: 1, maximum: 5, }, }); -const thiefGameOptionsApiProperties: Record = Object.freeze({ +const THIEF_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ mustChooseBetweenWerewolves: { description: "If set to `true`, if all `thief` additional cards are from the `werewolves` side, he can't skip and must choose one", - ...thiefGameOptionsFieldsSpecs.mustChooseBetweenWerewolves, + ...THIEF_GAME_OPTIONS_FIELDS_SPECS.mustChooseBetweenWerewolves, }, additionalCardsCount: { description: "Number of additional cards for the `thief` at the beginning of the game", - ...thiefGameOptionsFieldsSpecs.additionalCardsCount, + ...THIEF_GAME_OPTIONS_FIELDS_SPECS.additionalCardsCount, }, }); -export { thiefGameOptionsApiProperties, thiefGameOptionsFieldsSpecs }; \ No newline at end of file +export { + THIEF_GAME_OPTIONS_API_PROPERTIES, + THIEF_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant.ts index 8609e49c0..98908818e 100644 --- a/src/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant.ts @@ -1,21 +1,24 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { ThreeBrothersGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/three-brothers-game-options.schema"; -const threeBrothersGameOptionsFieldsSpecs = Object.freeze({ +const THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ wakingUpInterval: { - default: defaultGameOptions.roles.threeBrothers.wakingUpInterval, + default: DEFAULT_GAME_OPTIONS.roles.threeBrothers.wakingUpInterval, minimum: 0, maximum: 5, }, }); -const threeBrothersGameOptionsApiProperties: Record = Object.freeze({ +const THREE_BROTHERS_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ wakingUpInterval: { description: "Since the first `night`, interval of `nights` when the `three brothers` are waking up. In other words, they wake up every other night if value is `1`. If set to `0`, they are waking up the first night only", - ...threeBrothersGameOptionsFieldsSpecs.wakingUpInterval, + ...THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval, }, }); -export { threeBrothersGameOptionsApiProperties, threeBrothersGameOptionsFieldsSpecs }; \ No newline at end of file +export { + THREE_BROTHERS_GAME_OPTIONS_API_PROPERTIES, + THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant.ts index 84728e68c..336100b32 100644 --- a/src/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant.ts @@ -1,21 +1,24 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { TwoSistersGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/two-sisters-game-options.schema"; -const twoSistersGameOptionsFieldsSpecs = Object.freeze({ +const TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ wakingUpInterval: { - default: defaultGameOptions.roles.twoSisters.wakingUpInterval, + default: DEFAULT_GAME_OPTIONS.roles.twoSisters.wakingUpInterval, minimum: 0, maximum: 5, }, }); -const twoSistersGameOptionsApiProperties: Record = Object.freeze({ +const TWO_SISTERS_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ wakingUpInterval: { description: "Since the first `night`, interval of `nights` when the `two sisters` are waking up. In other words, they wake up every other night if value is `1`. If set to `0`, they are waking up the first night only", - ...twoSistersGameOptionsFieldsSpecs.wakingUpInterval, + ...TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval, }, }); -export { twoSistersGameOptionsApiProperties, twoSistersGameOptionsFieldsSpecs }; \ No newline at end of file +export { + TWO_SISTERS_GAME_OPTIONS_API_PROPERTIES, + TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant.ts index 590f8fe26..e9cc112d1 100644 --- a/src/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant.ts @@ -1,21 +1,24 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { WhiteWerewolfGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema"; -const whiteWerewolfGameOptionsFieldsSpecs = Object.freeze({ +const WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ wakingUpInterval: { - default: defaultGameOptions.roles.whiteWerewolf.wakingUpInterval, + default: DEFAULT_GAME_OPTIONS.roles.whiteWerewolf.wakingUpInterval, minimum: 1, maximum: 5, }, }); -const whiteWerewolfGameOptionsApiProperties: Record = Object.freeze({ +const WHITE_WEREWOLF_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ wakingUpInterval: { description: "Since the first `night`, interval of `nights` when the `white werewolf` is waking up. In other words, he wakes up every other night if value is `1`", - ...whiteWerewolfGameOptionsFieldsSpecs.wakingUpInterval, + ...WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval, }, }); -export { whiteWerewolfGameOptionsApiProperties, whiteWerewolfGameOptionsFieldsSpecs }; \ No newline at end of file +export { + WHITE_WEREWOLF_GAME_OPTIONS_API_PROPERTIES, + WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant.ts b/src/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant.ts index 0225fd4c5..c267bfff4 100644 --- a/src/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant.ts +++ b/src/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant.ts @@ -1,15 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { WildChildGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema"; -const wildChildGameOptionsFieldsSpecs = Object.freeze({ isTransformationRevealed: { default: defaultGameOptions.roles.wildChild.isTransformationRevealed } }); +const WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ isTransformationRevealed: { default: DEFAULT_GAME_OPTIONS.roles.wildChild.isTransformationRevealed } }); -const wildChildGameOptionsApiProperties: Record = Object.freeze({ +const WILD_CHILD_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ isTransformationRevealed: { description: "If set to `true`, when `wild child` joins the `werewolves` side because his model died, the `game master` will announce his transformation to other players", - ...wildChildGameOptionsFieldsSpecs.isTransformationRevealed, + ...WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS.isTransformationRevealed, }, }); -export { wildChildGameOptionsApiProperties, wildChildGameOptionsFieldsSpecs }; \ No newline at end of file +export { + WILD_CHILD_GAME_OPTIONS_API_PROPERTIES, + WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-options/votes-game-options.constant.ts b/src/modules/game/constants/game-options/votes-game-options.constant.ts index 298ebc731..f2eff0dd8 100644 --- a/src/modules/game/constants/game-options/votes-game-options.constant.ts +++ b/src/modules/game/constants/game-options/votes-game-options.constant.ts @@ -1,18 +1,18 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { VotesGameOptions } from "@/modules/game/schemas/game-options/votes-game-options.schema"; -const votesGameOptionsFieldsSpecs = Object.freeze({ canBeSkipped: { default: defaultGameOptions.votes.canBeSkipped } }); +const VOTES_GAME_OPTIONS_FIELDS_SPECS = Object.freeze({ canBeSkipped: { default: DEFAULT_GAME_OPTIONS.votes.canBeSkipped } }); -const votesGameOptionsApiProperties: Record = Object.freeze({ +const VOTES_GAME_OPTIONS_API_PROPERTIES: Record = Object.freeze({ canBeSkipped: { description: "If set to `true`, players are not obliged to vote. There won't be any death if votes are skipped. Sheriff election nor votes because of the angel presence can't be skipped", - ...votesGameOptionsFieldsSpecs.canBeSkipped, + ...VOTES_GAME_OPTIONS_FIELDS_SPECS.canBeSkipped, }, }); export { - votesGameOptionsApiProperties, - votesGameOptionsFieldsSpecs, + VOTES_GAME_OPTIONS_API_PROPERTIES, + VOTES_GAME_OPTIONS_FIELDS_SPECS, }; \ No newline at end of file diff --git a/src/modules/game/constants/game-play/game-play-source.constant.ts b/src/modules/game/constants/game-play/game-play-source.constant.ts index c688d3dd0..bff26a3c7 100644 --- a/src/modules/game/constants/game-play/game-play-source.constant.ts +++ b/src/modules/game/constants/game-play/game-play-source.constant.ts @@ -1,12 +1,12 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; import type { GamePlaySource } from "@/modules/game/schemas/game-play/game-play-source/game-play-source.schema"; -const gamePlaySourceFieldsSpecs = Object.freeze>({ +const GAME_PLAY_SOURCE_FIELDS_SPECS = Object.freeze>({ name: { required: true, - enum: gameSourceValues, + enum: GAME_SOURCE_VALUES, }, players: { required: false, @@ -14,15 +14,18 @@ const gamePlaySourceFieldsSpecs = Object.freeze>({ +const GAME_PLAY_SOURCE_API_PROPERTIES = Object.freeze>({ name: { description: "Source's name of the play", - ...gamePlaySourceFieldsSpecs.name, + ...GAME_PLAY_SOURCE_FIELDS_SPECS.name, }, players: { description: "Expected players who will make the play. Only set for the current play, not the upcoming one", - ...gamePlaySourceFieldsSpecs.players, + ...GAME_PLAY_SOURCE_FIELDS_SPECS.players, }, }); -export { gamePlaySourceFieldsSpecs, gamePlaySourceApiProperties }; \ No newline at end of file +export { + GAME_PLAY_SOURCE_FIELDS_SPECS, + GAME_PLAY_SOURCE_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game-play/game-play.constant.ts b/src/modules/game/constants/game-play/game-play.constant.ts index 166b433ff..6e4c1b7fe 100644 --- a/src/modules/game/constants/game-play/game-play.constant.ts +++ b/src/modules/game/constants/game-play/game-play.constant.ts @@ -1,47 +1,47 @@ -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from "@/modules/game/enums/game-play.enum"; +import { GamePlayActions, GamePlayCauses } from "@/modules/game/enums/game-play.enum"; import { createGamePlayAllElectSheriff, createGamePlayAllVote, createGamePlayBigBadWolfEats, createGamePlayCharmedMeetEachOther, createGamePlayCupidCharms, createGamePlayDogWolfChoosesSide, createGamePlayFoxSniffs, createGamePlayGuardProtects, createGamePlayHunterShoots, createGamePlayLoversMeetEachOther, createGamePlayPiedPiperCharms, createGamePlayRavenMarks, createGamePlayScapegoatBansVoting, createGamePlaySeerLooks, createGamePlaySheriffDelegates, createGamePlayStutteringJudgeChoosesSign, createGamePlayThiefChoosesCard, createGamePlayThreeBrothersMeetEachOther, createGamePlayTwoSistersMeetEachOther, createGamePlayWerewolvesEat, createGamePlayWhiteWerewolfEats, createGamePlayWildChildChoosesModel, createGamePlayWitchUsesPotions } from "@/modules/game/helpers/game-play/game-play.factory"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; import { createFakeGamePlaySheriffSettlesVotes } from "@tests/factories/game/schemas/game-play/game-play.schema.factory"; -const requiredTargetsActions: Readonly = Object.freeze([ - GAME_PLAY_ACTIONS.LOOK, - GAME_PLAY_ACTIONS.CHARM, - GAME_PLAY_ACTIONS.SHOOT, - GAME_PLAY_ACTIONS.PROTECT, - GAME_PLAY_ACTIONS.CHOOSE_MODEL, - GAME_PLAY_ACTIONS.DELEGATE, - GAME_PLAY_ACTIONS.SETTLE_VOTES, +const REQUIRED_TARGET_ACTIONS: Readonly = Object.freeze([ + GamePlayActions.LOOK, + GamePlayActions.CHARM, + GamePlayActions.SHOOT, + GamePlayActions.PROTECT, + GamePlayActions.CHOOSE_MODEL, + GamePlayActions.DELEGATE, + GamePlayActions.SETTLE_VOTES, ]); -const optionalTargetsActions: Readonly = Object.freeze([ - GAME_PLAY_ACTIONS.EAT, - GAME_PLAY_ACTIONS.USE_POTIONS, - GAME_PLAY_ACTIONS.MARK, - GAME_PLAY_ACTIONS.SNIFF, - GAME_PLAY_ACTIONS.BAN_VOTING, +const OPTIONAL_TARGET_ACTIONS: Readonly = Object.freeze([ + GamePlayActions.EAT, + GamePlayActions.USE_POTIONS, + GamePlayActions.MARK, + GamePlayActions.SNIFF, + GamePlayActions.BAN_VOTING, ]); -const requiredVotesActions: Readonly = Object.freeze([ - GAME_PLAY_ACTIONS.VOTE, - GAME_PLAY_ACTIONS.ELECT_SHERIFF, +const REQUIRED_VOTE_ACTIONS: Readonly = Object.freeze([ + GamePlayActions.VOTE, + GamePlayActions.ELECT_SHERIFF, ]); -const stutteringJudgeRequestOpportunityActions: Readonly = Object.freeze([ - GAME_PLAY_ACTIONS.VOTE, - GAME_PLAY_ACTIONS.SETTLE_VOTES, +const STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS: Readonly = Object.freeze([ + GamePlayActions.VOTE, + GamePlayActions.SETTLE_VOTES, ]); -const gamePlaysPriorityList: Readonly = Object.freeze([ +const GAME_PLAYS_PRIORITY_LIST: Readonly = Object.freeze([ createGamePlayHunterShoots(), - createGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), + createGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), createGamePlayAllElectSheriff(), createGamePlaySheriffDelegates(), createGamePlayScapegoatBansVoting(), createFakeGamePlaySheriffSettlesVotes(), - createGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), - createGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }), - createGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }), + createGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), + createGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }), + createGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }), createGamePlayAllVote(), createGamePlayThiefChoosesCard(), createGamePlayDogWolfChoosesSide(), @@ -64,9 +64,9 @@ const gamePlaysPriorityList: Readonly = Object.freeze([ ]); export { - requiredTargetsActions, - optionalTargetsActions, - requiredVotesActions, - stutteringJudgeRequestOpportunityActions, - gamePlaysPriorityList, + REQUIRED_TARGET_ACTIONS, + OPTIONAL_TARGET_ACTIONS, + REQUIRED_VOTE_ACTIONS, + STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS, + GAME_PLAYS_PRIORITY_LIST, }; \ No newline at end of file diff --git a/src/modules/game/constants/game-victory/game-victory.constant.ts b/src/modules/game/constants/game-victory/game-victory.constant.ts index bcb78cca7..0e4cde423 100644 --- a/src/modules/game/constants/game-victory/game-victory.constant.ts +++ b/src/modules/game/constants/game-victory/game-victory.constant.ts @@ -1,25 +1,28 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { GAME_VICTORY_TYPES } from "@/modules/game/enums/game-victory.enum"; +import { GameVictoryTypes } from "@/modules/game/enums/game-victory.enum"; import type { GameVictory } from "@/modules/game/schemas/game-victory/game-victory.schema"; -const gameVictoryFieldsSpecs: Readonly> = Object.freeze({ +const GAME_VICTORY_FIELDS_SPECS: Readonly> = Object.freeze({ type: { required: true, - enum: GAME_VICTORY_TYPES, + enum: GameVictoryTypes, }, winners: { required: false }, }); -const gameVictoryApiProperties: Readonly> = Object.freeze({ +const GAME_VICTORY_API_PROPERTIES: Readonly> = Object.freeze({ type: { description: "Type of victory of this game", - ...gameVictoryFieldsSpecs.type, + ...GAME_VICTORY_FIELDS_SPECS.type, }, winners: { description: "List of players who won the game, even the dead ones. Not set if `type` is `none`", - ...gameVictoryFieldsSpecs.winners, + ...GAME_VICTORY_FIELDS_SPECS.winners, }, }); -export { gameVictoryFieldsSpecs, gameVictoryApiProperties }; \ No newline at end of file +export { + GAME_VICTORY_FIELDS_SPECS, + GAME_VICTORY_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/game.constant.ts b/src/modules/game/constants/game.constant.ts index ed072dc3f..9fee11d6b 100644 --- a/src/modules/game/constants/game.constant.ts +++ b/src/modules/game/constants/game.constant.ts @@ -1,103 +1,103 @@ -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions, GamePlayCauses } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; import type { GameSource } from "@/modules/game/types/game.type"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -const gameSourceValues: Readonly = Object.freeze([ - ...Object.values(PLAYER_GROUPS), - ...Object.values(ROLE_NAMES), - PLAYER_ATTRIBUTE_NAMES.SHERIFF, +const GAME_SOURCE_VALUES: Readonly = Object.freeze([ + ...Object.values(PlayerGroups), + ...Object.values(RoleNames), + PlayerAttributeNames.SHERIFF, ]); -const gamePlaysNightOrder: Readonly<(GamePlay & { isFirstNightOnly?: boolean })[]> = Object.freeze([ +const GAME_PLAYS_NIGHT_ORDER: Readonly<(GamePlay & { isFirstNightOnly?: boolean })[]> = Object.freeze([ { - source: { name: PLAYER_GROUPS.ALL }, - action: GAME_PLAY_ACTIONS.VOTE, - cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE, + source: { name: PlayerGroups.ALL }, + action: GamePlayActions.VOTE, + cause: GamePlayCauses.ANGEL_PRESENCE, isFirstNightOnly: true, }, { - source: { name: ROLE_NAMES.THIEF }, - action: GAME_PLAY_ACTIONS.CHOOSE_CARD, + source: { name: RoleNames.THIEF }, + action: GamePlayActions.CHOOSE_CARD, isFirstNightOnly: true, }, { - source: { name: ROLE_NAMES.DOG_WOLF }, - action: GAME_PLAY_ACTIONS.CHOOSE_SIDE, + source: { name: RoleNames.DOG_WOLF }, + action: GamePlayActions.CHOOSE_SIDE, isFirstNightOnly: true, }, { - source: { name: ROLE_NAMES.CUPID }, - action: GAME_PLAY_ACTIONS.CHARM, + source: { name: RoleNames.CUPID }, + action: GamePlayActions.CHARM, isFirstNightOnly: true, }, { - source: { name: ROLE_NAMES.SEER }, - action: GAME_PLAY_ACTIONS.LOOK, + source: { name: RoleNames.SEER }, + action: GamePlayActions.LOOK, }, { - source: { name: ROLE_NAMES.FOX }, - action: GAME_PLAY_ACTIONS.SNIFF, + source: { name: RoleNames.FOX }, + action: GamePlayActions.SNIFF, }, { - source: { name: PLAYER_GROUPS.LOVERS }, - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: { name: PlayerGroups.LOVERS }, + action: GamePlayActions.MEET_EACH_OTHER, isFirstNightOnly: true, }, { - source: { name: ROLE_NAMES.STUTTERING_JUDGE }, - action: GAME_PLAY_ACTIONS.CHOOSE_SIGN, + source: { name: RoleNames.STUTTERING_JUDGE }, + action: GamePlayActions.CHOOSE_SIGN, isFirstNightOnly: true, }, { - source: { name: ROLE_NAMES.TWO_SISTERS }, - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: { name: RoleNames.TWO_SISTERS }, + action: GamePlayActions.MEET_EACH_OTHER, }, { - source: { name: ROLE_NAMES.THREE_BROTHERS }, - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: { name: RoleNames.THREE_BROTHERS }, + action: GamePlayActions.MEET_EACH_OTHER, }, { - source: { name: ROLE_NAMES.WILD_CHILD }, - action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, + source: { name: RoleNames.WILD_CHILD }, + action: GamePlayActions.CHOOSE_MODEL, isFirstNightOnly: true, }, { - source: { name: ROLE_NAMES.RAVEN }, - action: GAME_PLAY_ACTIONS.MARK, + source: { name: RoleNames.RAVEN }, + action: GamePlayActions.MARK, }, { - source: { name: ROLE_NAMES.GUARD }, - action: GAME_PLAY_ACTIONS.PROTECT, + source: { name: RoleNames.GUARD }, + action: GamePlayActions.PROTECT, }, { - source: { name: PLAYER_GROUPS.WEREWOLVES }, - action: GAME_PLAY_ACTIONS.EAT, + source: { name: PlayerGroups.WEREWOLVES }, + action: GamePlayActions.EAT, }, { - source: { name: ROLE_NAMES.WHITE_WEREWOLF }, - action: GAME_PLAY_ACTIONS.EAT, + source: { name: RoleNames.WHITE_WEREWOLF }, + action: GamePlayActions.EAT, }, { - source: { name: ROLE_NAMES.BIG_BAD_WOLF }, - action: GAME_PLAY_ACTIONS.EAT, + source: { name: RoleNames.BIG_BAD_WOLF }, + action: GamePlayActions.EAT, }, { - source: { name: ROLE_NAMES.WITCH }, - action: GAME_PLAY_ACTIONS.USE_POTIONS, + source: { name: RoleNames.WITCH }, + action: GamePlayActions.USE_POTIONS, }, { - source: { name: ROLE_NAMES.PIED_PIPER }, - action: GAME_PLAY_ACTIONS.CHARM, + source: { name: RoleNames.PIED_PIPER }, + action: GamePlayActions.CHARM, }, { - source: { name: PLAYER_GROUPS.CHARMED }, - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: { name: PlayerGroups.CHARMED }, + action: GamePlayActions.MEET_EACH_OTHER, }, ]); export { - gameSourceValues, - gamePlaysNightOrder, + GAME_SOURCE_VALUES, + GAME_PLAYS_NIGHT_ORDER, }; \ No newline at end of file diff --git a/src/modules/game/constants/player/player-attribute/player-attribute-activation.constant.ts b/src/modules/game/constants/player/player-attribute/player-attribute-activation.constant.ts index 5df20bd09..1d11494f0 100644 --- a/src/modules/game/constants/player/player-attribute/player-attribute-activation.constant.ts +++ b/src/modules/game/constants/player/player-attribute/player-attribute-activation.constant.ts @@ -2,14 +2,17 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; import type { PlayerAttributeActivation } from "@/modules/game/schemas/player/player-attribute/player-attribute-activation.schema"; -const playerAttributeActivationFieldsSpecs = Object.freeze({ turn: { minimum: 1 } }); +const PLAYER_ATTRIBUTE_ACTIVATION_FIELDS_SPECS = Object.freeze({ turn: { minimum: 1 } }); -const playerAttributeActivationApiProperties: Record = Object.freeze({ +const PLAYER_ATTRIBUTE_ACTIVATION_API_PROPERTIES: Record = Object.freeze({ turn: { description: "From which game's turn the attribute will become active", - ...playerAttributeActivationFieldsSpecs.turn, + ...PLAYER_ATTRIBUTE_ACTIVATION_FIELDS_SPECS.turn, }, phase: { description: "From which game turn's phase (`day` or `night`) the attribute will become active" }, }); -export { playerAttributeActivationFieldsSpecs, playerAttributeActivationApiProperties }; \ No newline at end of file +export { + PLAYER_ATTRIBUTE_ACTIVATION_FIELDS_SPECS, + PLAYER_ATTRIBUTE_ACTIVATION_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/constants/player/player-attribute/player-attribute.constant.ts b/src/modules/game/constants/player/player-attribute/player-attribute.constant.ts index 09e2f0716..237614262 100644 --- a/src/modules/game/constants/player/player-attribute/player-attribute.constant.ts +++ b/src/modules/game/constants/player/player-attribute/player-attribute.constant.ts @@ -1,25 +1,28 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; import type { PlayerAttribute } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; -const playerAttributeFieldsSpecs = Object.freeze({ +const PLAYER_ATTRIBUTE_FIELDS_SPECS = Object.freeze({ remainingPhases: { minimum: 1 }, doesRemainAfterDeath: { default: false }, }); -const playerAttributeApiProperties: Record = Object.freeze({ +const PLAYER_ATTRIBUTE_API_PROPERTIES: Record = Object.freeze({ name: { description: "Attribute's name on the player." }, source: { description: "Which entity gave this attribute to the player", - enum: gameSourceValues, + enum: GAME_SOURCE_VALUES, }, remainingPhases: { description: "Remaining time for this attribute before disappear. If not set, the attribute will remain forever on the player. Else, decreases after each `phase` if `activeAt` conditions are met or if `activeAt` is not set", - ...playerAttributeFieldsSpecs.remainingPhases, + ...PLAYER_ATTRIBUTE_FIELDS_SPECS.remainingPhases, }, activeAt: { description: "When the attribute will become active and will have consequences on players. Used for attributes with delay. If not set, the attribute is immediately active." }, doesRemainAfterDeath: { description: "If the attribute is removed on player's death" }, }); -export { playerAttributeApiProperties, playerAttributeFieldsSpecs }; \ No newline at end of file +export { + PLAYER_ATTRIBUTE_API_PROPERTIES, + PLAYER_ATTRIBUTE_FIELDS_SPECS, +}; \ No newline at end of file diff --git a/src/modules/game/constants/player/player-death.constant.ts b/src/modules/game/constants/player/player-death.constant.ts index 377f34ddc..f64463b88 100644 --- a/src/modules/game/constants/player/player-death.constant.ts +++ b/src/modules/game/constants/player/player-death.constant.ts @@ -1,14 +1,14 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; import type { PlayerDeath } from "@/modules/game/schemas/player/player-death.schema"; -const playerDeathApiProperties: Record = Object.freeze({ +const PLAYER_DEATH_API_PROPERTIES: Record = Object.freeze({ source: { description: "Which entity killed the player", - enum: gameSourceValues, + enum: GAME_SOURCE_VALUES, }, cause: { description: "Death's cause of the player" }, }); -export { playerDeathApiProperties }; \ No newline at end of file +export { PLAYER_DEATH_API_PROPERTIES }; \ No newline at end of file diff --git a/src/modules/game/constants/player/player-role.constant.ts b/src/modules/game/constants/player/player-role.constant.ts index d9d53434f..c30e2ad99 100644 --- a/src/modules/game/constants/player/player-role.constant.ts +++ b/src/modules/game/constants/player/player-role.constant.ts @@ -2,10 +2,10 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; import type { PlayerRole } from "@/modules/game/schemas/player/player-role.schema"; -const playerRoleApiProperties: Record = Object.freeze({ +const PLAYER_ROLE_API_PROPERTIES: Record = Object.freeze({ original: { description: "Player's original role when the game started" }, current: { description: "Player's current role" }, isRevealed: { description: "If player's role is revealed to other players" }, }); -export { playerRoleApiProperties }; \ No newline at end of file +export { PLAYER_ROLE_API_PROPERTIES }; \ No newline at end of file diff --git a/src/modules/game/constants/player/player-side.constant.ts b/src/modules/game/constants/player/player-side.constant.ts index e464178f4..61ea7e146 100644 --- a/src/modules/game/constants/player/player-side.constant.ts +++ b/src/modules/game/constants/player/player-side.constant.ts @@ -2,9 +2,9 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; import type { PlayerSide } from "@/modules/game/schemas/player/player-side.schema"; -const playerSideApiProperties: Readonly> = Object.freeze({ +const PLAYER_SIDE_API_PROPERTIES: Readonly> = Object.freeze({ original: { description: "Player's original side when the game started" }, current: { description: "Player's current side" }, }); -export { playerSideApiProperties }; \ No newline at end of file +export { PLAYER_SIDE_API_PROPERTIES }; \ No newline at end of file diff --git a/src/modules/game/constants/player/player.constant.ts b/src/modules/game/constants/player/player.constant.ts index 23131b938..a01d4edad 100644 --- a/src/modules/game/constants/player/player.constant.ts +++ b/src/modules/game/constants/player/player.constant.ts @@ -2,7 +2,7 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -const playersFieldsSpecs = Object.freeze({ +const PLAYER_FIELDS_SPECS = Object.freeze({ name: { minLength: 1, maxLength: 30, @@ -12,7 +12,7 @@ const playersFieldsSpecs = Object.freeze({ isAlive: { default: true }, }); -const playerApiProperties: Readonly> = Object.freeze({ +const PLAYER_API_PROPERTIES: Readonly> = Object.freeze({ _id: { description: "Player's ID", example: "507f1f77bcf86cd799439011", @@ -20,24 +20,27 @@ const playerApiProperties: Readonly> = name: { description: "Player's name. Unique in the array", example: "Antoine", - ...playersFieldsSpecs.name, + ...PLAYER_FIELDS_SPECS.name, }, role: { description: "Player's role" }, side: { description: "Player's side" }, attributes: { description: "An attribute is an effect or a status on a player", - ...playersFieldsSpecs.attributes, + ...PLAYER_FIELDS_SPECS.attributes, }, position: { description: "Unique player's position among all game's players. Increment from 0 to `players.length - 1`", example: 3, - ...playersFieldsSpecs.position, + ...PLAYER_FIELDS_SPECS.position, }, isAlive: { description: "If the player is currently alive or not", - ...playersFieldsSpecs.isAlive, + ...PLAYER_FIELDS_SPECS.isAlive, }, death: { description: "Set if `isAlive` is `false`" }, }); -export { playersFieldsSpecs, playerApiProperties }; \ No newline at end of file +export { + PLAYER_FIELDS_SPECS, + PLAYER_API_PROPERTIES, +}; \ No newline at end of file diff --git a/src/modules/game/controllers/game.controller.ts b/src/modules/game/controllers/game.controller.ts index dcc4782f6..ca2aeaa0f 100644 --- a/src/modules/game/controllers/game.controller.ts +++ b/src/modules/game/controllers/game.controller.ts @@ -8,17 +8,17 @@ import { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; import { GetGameRandomCompositionPlayerResponseDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition-player-response/get-game-random-composition-player-response.dto"; import { GetGameRandomCompositionDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto"; import { MakeGamePlayDto } from "@/modules/game/dto/make-game-play/make-game-play.dto"; -import { GAME_STATUSES } from "@/modules/game/enums/game.enum"; +import { GameStatuses } from "@/modules/game/enums/game.enum"; import { GameHistoryRecordService } from "@/modules/game/providers/services/game-history/game-history-record.service"; import { GameRandomCompositionService } from "@/modules/game/providers/services/game-random-composition.service"; import { GameService } from "@/modules/game/providers/services/game.service"; import { GameHistoryRecord } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; import { Game } from "@/modules/game/schemas/game.schema"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; @ApiTags("🎲 Games") -@Controller(API_RESOURCES.GAMES) +@Controller(ApiResources.GAMES) export class GameController { public constructor( private readonly gameService: GameService, @@ -56,9 +56,9 @@ export class GameController { } @Delete(":id") - @ApiOperation({ summary: "Cancel a playing game", description: `This endpoint won't delete the game, but set its status to ${GAME_STATUSES.CANCELED}. In this status, the game can't be mutated anymore.` }) + @ApiOperation({ summary: "Cancel a playing game", description: `This endpoint won't delete the game, but set its status to ${GameStatuses.CANCELED}. In this status, the game can't be mutated anymore.` }) @ApiGameIdParam() - @ApiResponse({ status: HttpStatus.OK, type: Game, description: `Game's status will be set to ${GAME_STATUSES.CANCELED}` }) + @ApiResponse({ status: HttpStatus.OK, type: Game, description: `Game's status will be set to ${GameStatuses.CANCELED}` }) @ApiGameNotFoundResponse() private async cancelGame(@Param("id", GetGameByIdPipe) game: Game): Promise { return this.gameService.cancelGame(game); @@ -66,7 +66,7 @@ export class GameController { @Post(":id/play") @HttpCode(HttpStatus.OK) - @ApiOperation({ summary: "Make a game play", description: `Make a play for a game with the \`${GAME_STATUSES.PLAYING}\` status. Body parameters fields are required or optional based on the upcoming game play.` }) + @ApiOperation({ summary: "Make a game play", description: `Make a play for a game with the \`${GameStatuses.PLAYING}\` status. Body parameters fields are required or optional based on the upcoming game play.` }) private async makeGamePlay(@Param("id", GetGameByIdPipe) game: Game, @Body() makeGamePlayDto: MakeGamePlayDto): Promise { return this.gameService.makeGamePlay(game, makeGamePlayDto); } diff --git a/src/modules/game/controllers/pipes/get-game-by-id.pipe.ts b/src/modules/game/controllers/pipes/get-game-by-id.pipe.ts index 295cbb8e4..77703c273 100644 --- a/src/modules/game/controllers/pipes/get-game-by-id.pipe.ts +++ b/src/modules/game/controllers/pipes/get-game-by-id.pipe.ts @@ -4,7 +4,7 @@ import type { PipeTransform } from "@nestjs/common"; import { GameRepository } from "@/modules/game/providers/repositories/game.repository"; import type { Game } from "@/modules/game/schemas/game.schema"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; import { ValidateMongoId } from "@/shared/api/pipes/validate-mongo-id.pipe"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; @@ -16,7 +16,7 @@ export class GetGameByIdPipe implements PipeTransform { const objectId = validateMongoIdPipe.transform(value); const game = await this.gameRepository.findOne({ _id: objectId }); if (game === null) { - throw new ResourceNotFoundException(API_RESOURCES.GAMES, objectId.toString()); + throw new ResourceNotFoundException(ApiResources.GAMES, objectId.toString()); } return game; } diff --git a/src/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.ts b/src/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.ts index 3fcb053e5..6d36914ef 100644 --- a/src/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.ts +++ b/src/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.ts @@ -1,7 +1,7 @@ import { registerDecorator } from "class-validator"; import type { ValidationOptions } from "class-validator"; -import { gameAdditionalCardsThiefRoleNames } from "@/modules/game/constants/game-additional-card/game-additional-card.constant"; +import { GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES } from "@/modules/game/constants/game-additional-cards/game-additional-cards.constant"; import type { CreateGameAdditionalCardDto } from "@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto"; function areAdditionalCardsForThiefRolesRespected(value: unknown): boolean { @@ -9,11 +9,11 @@ function areAdditionalCardsForThiefRolesRespected(value: unknown): boolean { return true; } const thiefAdditionalCards = value as CreateGameAdditionalCardDto[]; - return thiefAdditionalCards.every(({ roleName }) => gameAdditionalCardsThiefRoleNames.includes(roleName)); + return thiefAdditionalCards.every(({ roleName }) => GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.includes(roleName)); } function getAdditionalCardsForThiefRolesDefaultMessage(): string { - return `additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`; + return `additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`; } function AdditionalCardsForThiefRoles(validationOptions?: ValidationOptions) { diff --git a/src/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.ts b/src/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.ts index db592b496..a83ace9ba 100644 --- a/src/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.ts +++ b/src/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.ts @@ -2,11 +2,11 @@ import { registerDecorator } from "class-validator"; import type { ValidationArguments, ValidationOptions } from "class-validator"; import type { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; function isAdditionalCardsPresenceRespected(value: unknown, validationArguments: ValidationArguments): boolean { const { players } = validationArguments.object as Partial; - const doSomePlayersNeedAdditionalCards = players?.some(player => player.role.name === ROLE_NAMES.THIEF) === true; + const doSomePlayersNeedAdditionalCards = players?.some(player => player.role.name === RoleNames.THIEF) === true; return doSomePlayersNeedAdditionalCards ? Array.isArray(value) : value === undefined; } diff --git a/src/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.ts b/src/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.ts index 166c8aed6..fb2f479e0 100644 --- a/src/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.ts +++ b/src/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.ts @@ -3,7 +3,7 @@ import type { ValidationArguments, ValidationOptions } from "class-validator"; import type { CreateGameAdditionalCardDto } from "@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto"; import type { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; -import { roles } from "@/modules/role/constants/role.constant"; +import { ROLES } from "@/modules/role/constants/role.constant"; function areAdditionalCardsRolesMaxInGameRespected(value: unknown, validationArguments: ValidationArguments): boolean { if (value === undefined) { @@ -14,7 +14,7 @@ function areAdditionalCardsRolesMaxInGameRespected(value: unknown, validationArg return false; } const additionalCards = value as CreateGameAdditionalCardDto[]; - return roles.every(role => { + return ROLES.every(role => { const playersRoleCount = players.filter(player => player.role.name === role.name).length; const additionalCardsRoleCount = additionalCards.filter(additionalCard => additionalCard.roleName === role.name).length; return playersRoleCount + additionalCardsRoleCount <= role.maxInGame; diff --git a/src/modules/game/dto/base/decorators/composition/composition-bounds.decorator.ts b/src/modules/game/dto/base/decorators/composition/composition-bounds.decorator.ts index 82e8d4aed..fdb29b490 100644 --- a/src/modules/game/dto/base/decorators/composition/composition-bounds.decorator.ts +++ b/src/modules/game/dto/base/decorators/composition/composition-bounds.decorator.ts @@ -1,12 +1,12 @@ import { applyDecorators } from "@nestjs/common"; import { ArrayMaxSize, ArrayMinSize } from "class-validator"; -import { gameFieldsSpecs } from "@/modules/game/schemas/game.schema.constant"; +import { GAME_FIELDS_SPECS } from "@/modules/game/schemas/game.schema.constant"; function CompositionBounds(): void, Y>(target: (TFunction | object), propertyKey?: (string | symbol), descriptor?: TypedPropertyDescriptor) => void { return applyDecorators( - ArrayMinSize(gameFieldsSpecs.players.minItems), - ArrayMaxSize(gameFieldsSpecs.players.maxItems), + ArrayMinSize(GAME_FIELDS_SPECS.players.minItems), + ArrayMaxSize(GAME_FIELDS_SPECS.players.maxItems), ); } diff --git a/src/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.ts b/src/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.ts index f80ebc534..5f36c6ec3 100644 --- a/src/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.ts +++ b/src/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.ts @@ -3,16 +3,16 @@ import isObject from "isobject"; import { has } from "lodash"; import type { ValidationOptions } from "class-validator"; -import { roles } from "@/modules/role/constants/role.constant"; -import type { ROLE_NAMES } from "@/modules/role/enums/role.enum"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import type { RoleNames } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; function doesCompositionHaveAtLeastOneVillager(value?: unknown): boolean { if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, ["role", "name"]))) { return false; } - const players = value as { role: { name: ROLE_NAMES } }[]; - const werewolfRoles = roles.filter(role => role.side === ROLE_SIDES.VILLAGERS); + const players = value as { role: { name: RoleNames } }[]; + const werewolfRoles = ROLES.filter(role => role.side === RoleSides.VILLAGERS); return players.some(({ role }) => werewolfRoles.find(werewolfRole => role.name === werewolfRole.name)); } diff --git a/src/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.ts b/src/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.ts index 2c143c9ed..8c003dc76 100644 --- a/src/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.ts +++ b/src/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.ts @@ -3,16 +3,16 @@ import isObject from "isobject"; import { has } from "lodash"; import type { ValidationOptions } from "class-validator"; -import { roles } from "@/modules/role/constants/role.constant"; -import type { ROLE_NAMES } from "@/modules/role/enums/role.enum"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import type { RoleNames } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; function doesCompositionHaveAtLeastOneWerewolf(value?: unknown): boolean { if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, ["role", "name"]))) { return false; } - const players = value as { role: { name: ROLE_NAMES } }[]; - const werewolfRoles = roles.filter(role => role.side === ROLE_SIDES.WEREWOLVES); + const players = value as { role: { name: RoleNames } }[]; + const werewolfRoles = ROLES.filter(role => role.side === RoleSides.WEREWOLVES); return players.some(({ role }) => werewolfRoles.find(werewolfRole => role.name === werewolfRole.name)); } diff --git a/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts b/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts index 14393e439..b3fc88c7a 100644 --- a/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts +++ b/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts @@ -3,15 +3,15 @@ import isObject from "isobject"; import { has } from "lodash"; import type { ValidationOptions } from "class-validator"; -import { roles } from "@/modules/role/constants/role.constant"; -import type { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import type { RoleNames } from "@/modules/role/enums/role.enum"; function areCompositionRolesMaxInGameRespected(value?: unknown): boolean { if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, ["role", "name"]))) { return false; } - const players = value as { role: { name: ROLE_NAMES } }[]; - return roles.every(role => { + const players = value as { role: { name: RoleNames } }[]; + return ROLES.every(role => { const roleCount = players.filter(player => player.role.name === role.name).length; return roleCount <= role.maxInGame; }); diff --git a/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts b/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts index 5f2228e32..e915b0684 100644 --- a/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts +++ b/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts @@ -3,16 +3,16 @@ import isObject from "isobject"; import { has } from "lodash"; import type { ValidationOptions } from "class-validator"; -import { roles } from "@/modules/role/constants/role.constant"; -import type { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import type { RoleNames } from "@/modules/role/enums/role.enum"; import type { Role } from "@/modules/role/types/role.type"; function areCompositionRolesMinInGameRespected(value?: unknown): boolean { if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, ["role", "name"]))) { return false; } - const players = value as { role: { name: ROLE_NAMES } }[]; - return roles + const players = value as { role: { name: RoleNames } }[]; + return ROLES .filter((role): role is Role & { minInGame: number } => role.minInGame !== undefined) .every(role => { const roleCount = players.filter(player => player.role.name === role.name).length; diff --git a/src/modules/game/dto/base/game-player/game-player-role/game-player-role.base.dto.ts b/src/modules/game/dto/base/game-player/game-player-role/game-player-role.base.dto.ts index d681e0fa8..d3d0b5eb4 100644 --- a/src/modules/game/dto/base/game-player/game-player-role/game-player-role.base.dto.ts +++ b/src/modules/game/dto/base/game-player/game-player-role/game-player-role.base.dto.ts @@ -1,24 +1,24 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsEnum } from "class-validator"; -import { playerRoleApiProperties } from "@/modules/game/constants/player/player-role.constant"; -import { playerApiProperties } from "@/modules/game/constants/player/player.constant"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { PLAYER_ROLE_API_PROPERTIES } from "@/modules/game/constants/player/player-role.constant"; +import { PLAYER_API_PROPERTIES } from "@/modules/game/constants/player/player.constant"; +import { RoleNames } from "@/modules/role/enums/role.enum"; class GamePlayerRoleBaseDto { - @ApiProperty(playerApiProperties.role) - @IsEnum(ROLE_NAMES) - public name: ROLE_NAMES; + @ApiProperty(PLAYER_API_PROPERTIES.role) + @IsEnum(RoleNames) + public name: RoleNames; - @ApiProperty(playerRoleApiProperties.original) - @IsEnum(ROLE_NAMES) - public original: ROLE_NAMES; + @ApiProperty(PLAYER_ROLE_API_PROPERTIES.original) + @IsEnum(RoleNames) + public original: RoleNames; - @ApiProperty(playerRoleApiProperties.current) - @IsEnum(ROLE_NAMES) - public current: ROLE_NAMES; + @ApiProperty(PLAYER_ROLE_API_PROPERTIES.current) + @IsEnum(RoleNames) + public current: RoleNames; - @ApiProperty(playerRoleApiProperties.isRevealed) + @ApiProperty(PLAYER_ROLE_API_PROPERTIES.isRevealed) @IsBoolean() public isRevealed: boolean; } diff --git a/src/modules/game/dto/base/game-player/game-player-side/game-player-side.base.dto.ts b/src/modules/game/dto/base/game-player/game-player-side/game-player-side.base.dto.ts index 40cf8c116..a3b1472e3 100644 --- a/src/modules/game/dto/base/game-player/game-player-side/game-player-side.base.dto.ts +++ b/src/modules/game/dto/base/game-player/game-player-side/game-player-side.base.dto.ts @@ -1,17 +1,17 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsEnum } from "class-validator"; -import { playerSideApiProperties } from "@/modules/game/constants/player/player-side.constant"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { PLAYER_SIDE_API_PROPERTIES } from "@/modules/game/constants/player/player-side.constant"; +import { RoleSides } from "@/modules/role/enums/role.enum"; class GamePlayerSideBaseDto { - @ApiProperty(playerSideApiProperties.original) - @IsEnum(ROLE_SIDES) - public original: ROLE_SIDES; + @ApiProperty(PLAYER_SIDE_API_PROPERTIES.original) + @IsEnum(RoleSides) + public original: RoleSides; - @ApiProperty(playerSideApiProperties.current) - @IsEnum(ROLE_SIDES) - public current: ROLE_SIDES; + @ApiProperty(PLAYER_SIDE_API_PROPERTIES.current) + @IsEnum(RoleSides) + public current: RoleSides; } export { GamePlayerSideBaseDto }; \ No newline at end of file diff --git a/src/modules/game/dto/base/game-player/game-player.base.dto.ts b/src/modules/game/dto/base/game-player/game-player.base.dto.ts index e32bd6ffa..c188e6383 100644 --- a/src/modules/game/dto/base/game-player/game-player.base.dto.ts +++ b/src/modules/game/dto/base/game-player/game-player.base.dto.ts @@ -2,37 +2,37 @@ import { ApiProperty } from "@nestjs/swagger"; import { Expose, Transform, Type } from "class-transformer"; import { IsInt, IsString, MaxLength, Min, MinLength, ValidateNested } from "class-validator"; -import { playerApiProperties, playersFieldsSpecs } from "@/modules/game/constants/player/player.constant"; +import { PLAYER_API_PROPERTIES, PLAYER_FIELDS_SPECS } from "@/modules/game/constants/player/player.constant"; import { GamePlayerRoleBaseDto } from "@/modules/game/dto/base/game-player/game-player-role/game-player-role.base.dto"; import { GamePlayerSideBaseDto } from "@/modules/game/dto/base/game-player/game-player-side/game-player-side.base.dto"; import { playerRoleTransformer } from "@/modules/game/dto/base/game-player/transformers/player-role.transformer"; import { playerSideTransformer } from "@/modules/game/dto/base/game-player/transformers/player-side.transformer"; class GamePlayerBaseDto { - @ApiProperty(playerApiProperties.name) + @ApiProperty(PLAYER_API_PROPERTIES.name) @IsString() - @MinLength(playersFieldsSpecs.name.minLength) - @MaxLength(playersFieldsSpecs.name.maxLength) + @MinLength(PLAYER_FIELDS_SPECS.name.minLength) + @MaxLength(PLAYER_FIELDS_SPECS.name.maxLength) @Expose() public name: string; - @ApiProperty(playerApiProperties.role) + @ApiProperty(PLAYER_API_PROPERTIES.role) @Transform(playerRoleTransformer) @Type(() => GamePlayerRoleBaseDto) @ValidateNested() @Expose() public role: GamePlayerRoleBaseDto; - @ApiProperty(playerApiProperties.role) + @ApiProperty(PLAYER_API_PROPERTIES.role) @Transform(playerSideTransformer) @Type(() => GamePlayerRoleBaseDto) @ValidateNested() @Expose() public side: GamePlayerSideBaseDto; - @ApiProperty(playerApiProperties.position) + @ApiProperty(PLAYER_API_PROPERTIES.position) @IsInt() - @Min(playersFieldsSpecs.position.minimum) + @Min(PLAYER_FIELDS_SPECS.position.minimum) @Expose() public position: number; } diff --git a/src/modules/game/dto/base/game-player/transformers/player-role.transformer.ts b/src/modules/game/dto/base/game-player/transformers/player-role.transformer.ts index 4531e14ac..e81569972 100644 --- a/src/modules/game/dto/base/game-player/transformers/player-role.transformer.ts +++ b/src/modules/game/dto/base/game-player/transformers/player-role.transformer.ts @@ -1,8 +1,8 @@ import { has } from "lodash"; import type { TransformFnParams } from "class-transformer/types/interfaces"; -import { roles } from "@/modules/role/constants/role.constant"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import { RoleNames } from "@/modules/role/enums/role.enum"; function playerRoleTransformer(params: TransformFnParams): unknown { if (!has(params.value as object, "name")) { @@ -10,17 +10,17 @@ function playerRoleTransformer(params: TransformFnParams): unknown { } const value = params.value as { name: string; - current: ROLE_NAMES; - original: ROLE_NAMES; + current: RoleNames; + original: RoleNames; isRevealed: boolean; }; - const role = roles.find(({ name }) => name === value.name); + const role = ROLES.find(({ name }) => name === value.name); if (role === undefined) { return value; } value.current = role.name; value.original = role.name; - value.isRevealed = role.name === ROLE_NAMES.VILLAGER_VILLAGER; + value.isRevealed = role.name === RoleNames.VILLAGER_VILLAGER; return value; } diff --git a/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts b/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts index a6497e5af..ba38b9f3b 100644 --- a/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts +++ b/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts @@ -2,19 +2,19 @@ import isObject from "isobject"; import { has } from "lodash"; import type { TransformFnParams } from "class-transformer/types/interfaces"; -import { roles } from "@/modules/role/constants/role.constant"; -import type { ROLE_SIDES, ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import type { RoleSides, RoleNames } from "@/modules/role/enums/role.enum"; function playerSideTransformer(params: TransformFnParams): unknown { if (!isObject(params.value) || !isObject(params.obj) || !has(params.obj as object, ["role", "name"])) { return params.value; } - const obj = params.obj as { role: { name: ROLE_NAMES } }; + const obj = params.obj as { role: { name: RoleNames } }; const value = params.value as { - current: ROLE_SIDES; - original: ROLE_SIDES; + current: RoleSides; + original: RoleSides; }; - const role = roles.find(({ name }) => name === obj.role.name); + const role = ROLES.find(({ name }) => name === obj.role.name); if (role === undefined) { return value; } diff --git a/src/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.ts b/src/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.ts index cf2886d05..523f9082a 100644 --- a/src/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.ts +++ b/src/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.ts @@ -2,19 +2,19 @@ import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; import { Equals, IsEnum } from "class-validator"; -import { gameAdditionalCardApiProperties } from "@/modules/game/constants/game-additional-card/game-additional-card.constant"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { GAME_ADDITIONAL_CARDS_API_PROPERTIES } from "@/modules/game/constants/game-additional-cards/game-additional-cards.constant"; +import { RoleNames } from "@/modules/role/enums/role.enum"; class CreateGameAdditionalCardDto { - @ApiProperty(gameAdditionalCardApiProperties.roleName) - @IsEnum(ROLE_NAMES) + @ApiProperty(GAME_ADDITIONAL_CARDS_API_PROPERTIES.roleName) + @IsEnum(RoleNames) @Expose() - public roleName: ROLE_NAMES; + public roleName: RoleNames; - @ApiProperty(gameAdditionalCardApiProperties.recipient) - @Equals(ROLE_NAMES.THIEF) + @ApiProperty(GAME_ADDITIONAL_CARDS_API_PROPERTIES.recipient) + @Equals(RoleNames.THIEF) @Expose() - public recipient: ROLE_NAMES.THIEF; + public recipient: RoleNames.THIEF; } export { CreateGameAdditionalCardDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.ts index 3ae2c7d2c..9d95b03ce 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.ts @@ -2,17 +2,17 @@ import { ApiProperty } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsBoolean, IsOptional } from "class-validator"; -import { compositionGameOptionsApiProperties, compositionGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/composition-game-options.constant"; +import { COMPOSITION_GAME_OPTIONS_API_PROPERTIES, COMPOSITION_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/composition-game-options.constant"; class CreateCompositionGameOptionsDto { @ApiProperty({ - ...compositionGameOptionsApiProperties.isHidden, + ...COMPOSITION_GAME_OPTIONS_API_PROPERTIES.isHidden, required: false, }) @Type(() => Boolean) @IsOptional() @IsBoolean() - public isHidden: boolean = compositionGameOptionsFieldsSpecs.isHidden.default; + public isHidden: boolean = COMPOSITION_GAME_OPTIONS_FIELDS_SPECS.isHidden.default; } export { CreateCompositionGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-game-options.dto.ts index 0eda08fd2..e4664fb68 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-game-options.dto.ts @@ -2,14 +2,14 @@ import { ApiProperty } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsOptional, ValidateNested } from "class-validator"; -import { gameOptionsApiProperties } from "@/modules/game/constants/game-options/game-options.constant"; +import { GAME_OPTIONS_API_PROPERTIES } from "@/modules/game/constants/game-options/game-options.constant"; import { CreateCompositionGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto"; import { CreateRolesGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto"; import { CreateVotesGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-votes-game-options/create-votes-game-options.dto"; class CreateGameOptionsDto { @ApiProperty({ - ...gameOptionsApiProperties.composition, + ...GAME_OPTIONS_API_PROPERTIES.composition, required: false, }) @IsOptional() @@ -18,7 +18,7 @@ class CreateGameOptionsDto { public composition: CreateCompositionGameOptionsDto = new CreateCompositionGameOptionsDto(); @ApiProperty({ - ...gameOptionsApiProperties.votes, + ...GAME_OPTIONS_API_PROPERTIES.votes, required: false, }) @IsOptional() @@ -27,7 +27,7 @@ class CreateGameOptionsDto { public votes: CreateVotesGameOptionsDto = new CreateVotesGameOptionsDto(); @ApiProperty({ - ...gameOptionsApiProperties.roles, + ...GAME_OPTIONS_API_PROPERTIES.roles, required: false, }) @IsOptional() diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-ancient-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-ancient-game-options.dto.ts index 81e8f141a..1ef17857c 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-ancient-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-ancient-game-options.dto.ts @@ -1,26 +1,26 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsInt, IsOptional, Max, Min } from "class-validator"; -import { ancientGameOptionsApiProperties, ancientGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant"; +import { ANCIENT_GAME_OPTIONS_API_PROPERTIES, ANCIENT_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant"; class CreateAncientGameOptionsDto { @ApiProperty({ - ...ancientGameOptionsApiProperties.livesCountAgainstWerewolves, + ...ANCIENT_GAME_OPTIONS_API_PROPERTIES.livesCountAgainstWerewolves, required: false, }) @IsOptional() @IsInt() - @Min(ancientGameOptionsFieldsSpecs.livesCountAgainstWerewolves.minimum) - @Max(ancientGameOptionsFieldsSpecs.livesCountAgainstWerewolves.maximum) - public livesCountAgainstWerewolves: number = ancientGameOptionsFieldsSpecs.livesCountAgainstWerewolves.default; + @Min(ANCIENT_GAME_OPTIONS_FIELDS_SPECS.livesCountAgainstWerewolves.minimum) + @Max(ANCIENT_GAME_OPTIONS_FIELDS_SPECS.livesCountAgainstWerewolves.maximum) + public livesCountAgainstWerewolves: number = ANCIENT_GAME_OPTIONS_FIELDS_SPECS.livesCountAgainstWerewolves.default; @ApiProperty({ - ...ancientGameOptionsApiProperties.doesTakeHisRevenge, + ...ANCIENT_GAME_OPTIONS_API_PROPERTIES.doesTakeHisRevenge, required: false, }) @IsOptional() @IsBoolean() - public doesTakeHisRevenge: boolean = ancientGameOptionsFieldsSpecs.doesTakeHisRevenge.default; + public doesTakeHisRevenge: boolean = ANCIENT_GAME_OPTIONS_FIELDS_SPECS.doesTakeHisRevenge.default; } export { CreateAncientGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-bear-tamer-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-bear-tamer-game-options.dto.ts index 80cf5ffcb..0924f7128 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-bear-tamer-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-bear-tamer-game-options.dto.ts @@ -1,16 +1,16 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { bearTamerGameOptionsApiProperties, bearTamerGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant"; +import { BEAR_TAMER_GAME_OPTIONS_API_PROPERTIES, BEAR_TAMER_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant"; class CreateBearTamerGameOptionsDto { @ApiProperty({ - ...bearTamerGameOptionsApiProperties.doesGrowlIfInfected, + ...BEAR_TAMER_GAME_OPTIONS_API_PROPERTIES.doesGrowlIfInfected, required: false, }) @IsOptional() @IsBoolean() - public doesGrowlIfInfected: boolean = bearTamerGameOptionsFieldsSpecs.doesGrowlIfInfected.default; + public doesGrowlIfInfected: boolean = BEAR_TAMER_GAME_OPTIONS_FIELDS_SPECS.doesGrowlIfInfected.default; } export { CreateBearTamerGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-big-bad-wolf-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-big-bad-wolf-game-options.dto.ts index e9e59868d..314b15463 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-big-bad-wolf-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-big-bad-wolf-game-options.dto.ts @@ -1,16 +1,16 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { bigBadWolfGameOptionsApiProperties, bigBadWolfGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant"; +import { BIG_BAD_WOLF_GAME_OPTIONS_API_PROPERTIES, BIG_BAD_WOLF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant"; class CreateBigBadWolfGameOptionsDto { @ApiProperty({ - ...bigBadWolfGameOptionsApiProperties.isPowerlessIfWerewolfDies, + ...BIG_BAD_WOLF_GAME_OPTIONS_API_PROPERTIES.isPowerlessIfWerewolfDies, required: false, }) @IsOptional() @IsBoolean() - public isPowerlessIfWerewolfDies: boolean = bigBadWolfGameOptionsFieldsSpecs.isPowerlessIfWerewolfDies.default; + public isPowerlessIfWerewolfDies: boolean = BIG_BAD_WOLF_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfWerewolfDies.default; } export { CreateBigBadWolfGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-dog-wolf-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-dog-wolf-game-options.dto.ts index 1339bade7..d413580e8 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-dog-wolf-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-dog-wolf-game-options.dto.ts @@ -1,17 +1,17 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { dogWolfGameOptionsApiProperties } from "@/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant"; -import { wildChildGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant"; +import { DOG_WOLF_GAME_OPTIONS_API_PROPERTIES } from "@/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant"; +import { WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant"; class CreateDogWolfGameOptionsDto { @ApiProperty({ - ...dogWolfGameOptionsApiProperties.isChosenSideRevealed, + ...DOG_WOLF_GAME_OPTIONS_API_PROPERTIES.isChosenSideRevealed, required: false, }) @IsOptional() @IsBoolean() - public isChosenSideRevealed: boolean = wildChildGameOptionsFieldsSpecs.isTransformationRevealed.default; + public isChosenSideRevealed: boolean = WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS.isTransformationRevealed.default; } export { CreateDogWolfGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-fox-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-fox-game-options.dto.ts index fe7c19036..37e5ea33b 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-fox-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-fox-game-options.dto.ts @@ -1,16 +1,16 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { foxGameOptionsApiProperties, foxGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/fox-game-options.constant"; +import { FOX_GAME_OPTIONS_API_PROPERTIES, FOX_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/fox-game-options.constant"; class CreateFoxGameOptionsDto { @ApiProperty({ - ...foxGameOptionsApiProperties.isPowerlessIfMissesWerewolf, + ...FOX_GAME_OPTIONS_API_PROPERTIES.isPowerlessIfMissesWerewolf, required: false, }) @IsOptional() @IsBoolean() - public isPowerlessIfMissesWerewolf: boolean = foxGameOptionsFieldsSpecs.isPowerlessIfMissesWerewolf.default; + public isPowerlessIfMissesWerewolf: boolean = FOX_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfMissesWerewolf.default; } export { CreateFoxGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-guard-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-guard-game-options.dto.ts index 4045103a5..704adbede 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-guard-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-guard-game-options.dto.ts @@ -1,16 +1,16 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { guardGameOptionsApiProperties, guardGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/guard-game-options.constant"; +import { GUARD_GAME_OPTIONS_API_PROPERTIES, GUARD_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/guard-game-options.constant"; class CreateGuardGameOptionsDto { @ApiProperty({ - ...guardGameOptionsApiProperties.canProtectTwice, + ...GUARD_GAME_OPTIONS_API_PROPERTIES.canProtectTwice, required: false, }) @IsOptional() @IsBoolean() - public canProtectTwice: boolean = guardGameOptionsFieldsSpecs.canProtectTwice.default; + public canProtectTwice: boolean = GUARD_GAME_OPTIONS_FIELDS_SPECS.canProtectTwice.default; } export { CreateGuardGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-idiot-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-idiot-game-options.dto.ts index 25a8e4198..6efa67c42 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-idiot-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-idiot-game-options.dto.ts @@ -1,16 +1,16 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { idiotGameOptionsApiProperties, idiotGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant"; +import { IDIOT_GAME_OPTIONS_API_PROPERTIES, IDIOT_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant"; class CreateIdiotGameOptionsDto { @ApiProperty({ - ...idiotGameOptionsApiProperties.doesDieOnAncientDeath, + ...IDIOT_GAME_OPTIONS_API_PROPERTIES.doesDieOnAncientDeath, required: false, }) @IsOptional() @IsBoolean() - public doesDieOnAncientDeath: boolean = idiotGameOptionsFieldsSpecs.doesDieOnAncientDeath.default; + public doesDieOnAncientDeath: boolean = IDIOT_GAME_OPTIONS_FIELDS_SPECS.doesDieOnAncientDeath.default; } export { CreateIdiotGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-little-girl-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-little-girl-game-options.dto.ts index cc54f2134..a5175463c 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-little-girl-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-little-girl-game-options.dto.ts @@ -1,16 +1,16 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { littleGirlGameOptionsApiProperties, littleGirlGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant"; +import { LITTLE_GIRL_GAME_OPTIONS_API_PROPERTIES, LITTLE_GIRL_GAME_OPTIONS_SPECS_FIELDS } from "@/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant"; class CreateLittleGirlGameOptionsDto { @ApiProperty({ - ...littleGirlGameOptionsApiProperties.isProtectedByGuard, + ...LITTLE_GIRL_GAME_OPTIONS_API_PROPERTIES.isProtectedByGuard, required: false, }) @IsOptional() @IsBoolean() - public isProtectedByGuard: boolean = littleGirlGameOptionsFieldsSpecs.isProtectedByGuard.default; + public isProtectedByGuard: boolean = LITTLE_GIRL_GAME_OPTIONS_SPECS_FIELDS.isProtectedByGuard.default; } export { CreateLittleGirlGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-pied-piper-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-pied-piper-game-options.dto.ts index 8ea909081..41cd774d6 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-pied-piper-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-pied-piper-game-options.dto.ts @@ -1,26 +1,26 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsInt, IsOptional, Max, Min } from "class-validator"; -import { piedPiperGameOptionsApiProperties, piedPiperGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant"; +import { PIED_PIPER_GAME_OPTIONS_API_PROPERTIES, PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant"; class CreatePiedPiperGameOptionsDto { @ApiProperty({ - ...piedPiperGameOptionsApiProperties.charmedPeopleCountPerNight, + ...PIED_PIPER_GAME_OPTIONS_API_PROPERTIES.charmedPeopleCountPerNight, required: false, }) @IsOptional() @IsInt() - @Min(piedPiperGameOptionsFieldsSpecs.charmedPeopleCountPerNight.minimum) - @Max(piedPiperGameOptionsFieldsSpecs.charmedPeopleCountPerNight.maximum) - public charmedPeopleCountPerNight: number = piedPiperGameOptionsFieldsSpecs.charmedPeopleCountPerNight.default; + @Min(PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.charmedPeopleCountPerNight.minimum) + @Max(PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.charmedPeopleCountPerNight.maximum) + public charmedPeopleCountPerNight: number = PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.charmedPeopleCountPerNight.default; @ApiProperty({ - ...piedPiperGameOptionsApiProperties.isPowerlessIfInfected, + ...PIED_PIPER_GAME_OPTIONS_API_PROPERTIES.isPowerlessIfInfected, required: false, }) @IsOptional() @IsBoolean() - public isPowerlessIfInfected: boolean = piedPiperGameOptionsFieldsSpecs.isPowerlessIfInfected.default; + public isPowerlessIfInfected: boolean = PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfInfected.default; } export { CreatePiedPiperGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-raven-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-raven-game-options.dto.ts index e9d4384a5..43b6a510a 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-raven-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-raven-game-options.dto.ts @@ -1,18 +1,18 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsInt, IsOptional, Max, Min } from "class-validator"; -import { ravenGameOptionsApiProperties, ravenGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/raven-game-options.constant"; +import { RAVEN_GAME_OPTIONS_API_PROPERTIES, RAVEN_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/raven-game-options.constant"; class CreateRavenGameOptionsDto { @ApiProperty({ - ...ravenGameOptionsApiProperties.markPenalty, + ...RAVEN_GAME_OPTIONS_API_PROPERTIES.markPenalty, required: false, }) @IsOptional() @IsInt() - @Min(ravenGameOptionsFieldsSpecs.markPenalty.minimum) - @Max(ravenGameOptionsFieldsSpecs.markPenalty.maximum) - public markPenalty: number = ravenGameOptionsFieldsSpecs.markPenalty.default; + @Min(RAVEN_GAME_OPTIONS_FIELDS_SPECS.markPenalty.minimum) + @Max(RAVEN_GAME_OPTIONS_FIELDS_SPECS.markPenalty.maximum) + public markPenalty: number = RAVEN_GAME_OPTIONS_FIELDS_SPECS.markPenalty.default; } export { CreateRavenGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.ts index ce58ef64c..ad05dc575 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.ts @@ -2,7 +2,7 @@ import { ApiProperty } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsBoolean, IsOptional, ValidateNested } from "class-validator"; -import { rolesGameOptionsApiProperties, rolesGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/roles-game-options.constant"; +import { ROLES_GAME_OPTIONS_API_PROPERTIES, ROLES_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/roles-game-options.constant"; import { CreateAncientGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-ancient-game-options.dto"; import { CreateBearTamerGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-bear-tamer-game-options.dto"; import { CreateBigBadWolfGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-big-bad-wolf-game-options.dto"; @@ -24,23 +24,23 @@ import { CreateWildChildGameOptionsDto } from "@/modules/game/dto/create-game/cr class CreateRolesGameOptionsDto { @ApiProperty({ - ...rolesGameOptionsApiProperties.doSkipCallIfNoTarget, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.doSkipCallIfNoTarget, required: false, }) @IsOptional() @IsBoolean() - public doSkipCallIfNoTarget: boolean = rolesGameOptionsFieldsSpecs.doSkipCallIfNoTarget.default; + public doSkipCallIfNoTarget: boolean = ROLES_GAME_OPTIONS_FIELDS_SPECS.doSkipCallIfNoTarget.default; @ApiProperty({ - ...rolesGameOptionsApiProperties.areRevealedOnDeath, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.areRevealedOnDeath, required: false, }) @IsOptional() @IsBoolean() - public areRevealedOnDeath: boolean = rolesGameOptionsFieldsSpecs.areRevealedOnDeath.default; + public areRevealedOnDeath: boolean = ROLES_GAME_OPTIONS_FIELDS_SPECS.areRevealedOnDeath.default; @ApiProperty({ - ...rolesGameOptionsApiProperties.sheriff, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.sheriff, required: false, }) @IsOptional() @@ -49,7 +49,7 @@ class CreateRolesGameOptionsDto { public sheriff: CreateSheriffGameOptionsDto = new CreateSheriffGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.bigBadWolf, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.bigBadWolf, required: false, }) @IsOptional() @@ -58,7 +58,7 @@ class CreateRolesGameOptionsDto { public bigBadWolf: CreateBigBadWolfGameOptionsDto = new CreateBigBadWolfGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.whiteWerewolf, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.whiteWerewolf, required: false, }) @IsOptional() @@ -67,7 +67,7 @@ class CreateRolesGameOptionsDto { public whiteWerewolf: CreateWhiteWerewolfGameOptionsDto = new CreateWhiteWerewolfGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.seer, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.seer, required: false, }) @IsOptional() @@ -76,7 +76,7 @@ class CreateRolesGameOptionsDto { public seer: CreateSeerGameOptionsDto = new CreateSeerGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.littleGirl, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.littleGirl, required: false, }) @IsOptional() @@ -85,7 +85,7 @@ class CreateRolesGameOptionsDto { public littleGirl: CreateLittleGirlGameOptionsDto = new CreateLittleGirlGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.guard, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.guard, required: false, }) @IsOptional() @@ -94,7 +94,7 @@ class CreateRolesGameOptionsDto { public guard: CreateGuardGameOptionsDto = new CreateGuardGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.ancient, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.ancient, required: false, }) @IsOptional() @@ -103,7 +103,7 @@ class CreateRolesGameOptionsDto { public ancient: CreateAncientGameOptionsDto = new CreateAncientGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.idiot, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.idiot, required: false, }) @IsOptional() @@ -112,7 +112,7 @@ class CreateRolesGameOptionsDto { public idiot: CreateIdiotGameOptionsDto = new CreateIdiotGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.twoSisters, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.twoSisters, required: false, }) @IsOptional() @@ -121,7 +121,7 @@ class CreateRolesGameOptionsDto { public twoSisters: CreateTwoSistersGameOptionsDto = new CreateTwoSistersGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.threeBrothers, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.threeBrothers, required: false, }) @IsOptional() @@ -130,7 +130,7 @@ class CreateRolesGameOptionsDto { public threeBrothers: CreateThreeBrothersGameOptionsDto = new CreateThreeBrothersGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.fox, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.fox, required: false, }) @IsOptional() @@ -139,7 +139,7 @@ class CreateRolesGameOptionsDto { public fox: CreateFoxGameOptionsDto = new CreateFoxGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.bearTamer, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.bearTamer, required: false, }) @IsOptional() @@ -148,7 +148,7 @@ class CreateRolesGameOptionsDto { public bearTamer: CreateBearTamerGameOptionsDto = new CreateBearTamerGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.stutteringJudge, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.stutteringJudge, required: false, }) @IsOptional() @@ -157,7 +157,7 @@ class CreateRolesGameOptionsDto { public stutteringJudge: CreateStutteringJudgeGameOptionsDto = new CreateStutteringJudgeGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.wildChild, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.wildChild, required: false, }) @IsOptional() @@ -166,7 +166,7 @@ class CreateRolesGameOptionsDto { public wildChild: CreateWildChildGameOptionsDto = new CreateWildChildGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.dogWolf, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.dogWolf, required: false, }) @IsOptional() @@ -175,7 +175,7 @@ class CreateRolesGameOptionsDto { public dogWolf: CreateDogWolfGameOptionsDto = new CreateDogWolfGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.thief, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.thief, required: false, }) @IsOptional() @@ -184,7 +184,7 @@ class CreateRolesGameOptionsDto { public thief: CreateThiefGameOptionsDto = new CreateThiefGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.piedPiper, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.piedPiper, required: false, }) @IsOptional() @@ -193,7 +193,7 @@ class CreateRolesGameOptionsDto { public piedPiper: CreatePiedPiperGameOptionsDto = new CreatePiedPiperGameOptionsDto(); @ApiProperty({ - ...rolesGameOptionsApiProperties.raven, + ...ROLES_GAME_OPTIONS_API_PROPERTIES.raven, required: false, }) @IsOptional() diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-seer-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-seer-game-options.dto.ts index 49e72e6ab..4075ef3c0 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-seer-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-seer-game-options.dto.ts @@ -1,24 +1,24 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { seerGameOptionsApiProperties, seerGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/seer-game-options.constant"; +import { SEER_GAME_OPTIONS_API_PROPERTIES, SEER_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/seer-game-options.constant"; class CreateSeerGameOptionsDto { @ApiProperty({ - ...seerGameOptionsApiProperties.isTalkative, + ...SEER_GAME_OPTIONS_API_PROPERTIES.isTalkative, required: false, }) @IsOptional() @IsBoolean() - public isTalkative: boolean = seerGameOptionsFieldsSpecs.isTalkative.default; + public isTalkative: boolean = SEER_GAME_OPTIONS_FIELDS_SPECS.isTalkative.default; @ApiProperty({ - ...seerGameOptionsApiProperties.canSeeRoles, + ...SEER_GAME_OPTIONS_API_PROPERTIES.canSeeRoles, required: false, }) @IsOptional() @IsBoolean() - public canSeeRoles: boolean = seerGameOptionsFieldsSpecs.canSeeRoles.default; + public canSeeRoles: boolean = SEER_GAME_OPTIONS_FIELDS_SPECS.canSeeRoles.default; } export { CreateSeerGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-election-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-election-game-options.dto.ts index b5a9aa11d..6a3c4f0c6 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-election-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-election-game-options.dto.ts @@ -1,26 +1,26 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsEnum, IsInt, IsOptional, Min } from "class-validator"; -import { sheriffElectionGameOptionsApiProperties, sheriffElectionGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES, SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant"; +import { GamePhases } from "@/modules/game/enums/game.enum"; class CreateSheriffElectionGameOptionsDto { @ApiProperty({ - ...sheriffElectionGameOptionsApiProperties.turn, + ...SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES.turn, required: false, }) @IsOptional() @IsInt() - @Min(sheriffElectionGameOptionsFieldsSpecs.turn.minimum) - public turn: number = sheriffElectionGameOptionsFieldsSpecs.turn.default; + @Min(SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.turn.minimum) + public turn: number = SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.turn.default; @ApiProperty({ - ...sheriffElectionGameOptionsApiProperties.phase, + ...SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES.phase, required: false, }) @IsOptional() - @IsEnum(GAME_PHASES) - public phase: GAME_PHASES = sheriffElectionGameOptionsFieldsSpecs.phase.default; + @IsEnum(GamePhases) + public phase: GamePhases = SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.phase.default; } export { CreateSheriffElectionGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-game-options.dto.ts index 57368b200..08abc0725 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-game-options.dto.ts @@ -2,20 +2,20 @@ import { ApiProperty } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsBoolean, IsOptional, ValidateNested } from "class-validator"; -import { sheriffGameOptionsApiProperties, sheriffGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant"; +import { SHERIFF_GAME_OPTIONS_API_PROPERTIES, SHERIFF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant"; import { CreateSheriffElectionGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-sheriff-game-options/create-sheriff-election-game-options.dto"; class CreateSheriffGameOptionsDto { @ApiProperty({ - ...sheriffGameOptionsApiProperties.isEnabled, + ...SHERIFF_GAME_OPTIONS_API_PROPERTIES.isEnabled, required: false, }) @IsOptional() @IsBoolean() - public isEnabled: boolean = sheriffGameOptionsFieldsSpecs.isEnabled.default; + public isEnabled: boolean = SHERIFF_GAME_OPTIONS_FIELDS_SPECS.isEnabled.default; @ApiProperty({ - ...sheriffGameOptionsApiProperties.electedAt, + ...SHERIFF_GAME_OPTIONS_API_PROPERTIES.electedAt, required: false, }) @IsOptional() @@ -24,12 +24,12 @@ class CreateSheriffGameOptionsDto { public electedAt: CreateSheriffElectionGameOptionsDto = new CreateSheriffElectionGameOptionsDto(); @ApiProperty({ - ...sheriffGameOptionsApiProperties.hasDoubledVote, + ...SHERIFF_GAME_OPTIONS_API_PROPERTIES.hasDoubledVote, required: false, }) @IsOptional() @IsBoolean() - public hasDoubledVote: boolean = sheriffGameOptionsFieldsSpecs.hasDoubledVote.default; + public hasDoubledVote: boolean = SHERIFF_GAME_OPTIONS_FIELDS_SPECS.hasDoubledVote.default; } export { CreateSheriffGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-stuttering-judge-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-stuttering-judge-game-options.dto.ts index 5fcf33b8d..96dd1797a 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-stuttering-judge-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-stuttering-judge-game-options.dto.ts @@ -1,18 +1,18 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsInt, IsOptional, Max, Min } from "class-validator"; -import { stutteringJudgeGameOptionsApiProperties, stutteringJudgeGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant"; +import { STUTTERING_JUDGE_GAME_OPTIONS_API_PROPERTIES, STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant"; class CreateStutteringJudgeGameOptionsDto { @ApiProperty({ - ...stutteringJudgeGameOptionsApiProperties.voteRequestsCount, + ...STUTTERING_JUDGE_GAME_OPTIONS_API_PROPERTIES.voteRequestsCount, required: false, }) @IsOptional() @IsInt() - @Min(stutteringJudgeGameOptionsFieldsSpecs.voteRequestsCount.minimum) - @Max(stutteringJudgeGameOptionsFieldsSpecs.voteRequestsCount.maximum) - public voteRequestsCount: number = stutteringJudgeGameOptionsFieldsSpecs.voteRequestsCount.default; + @Min(STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS.voteRequestsCount.minimum) + @Max(STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS.voteRequestsCount.maximum) + public voteRequestsCount: number = STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS.voteRequestsCount.default; } export { CreateStutteringJudgeGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-thief-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-thief-game-options.dto.ts index 3273174aa..0987c3edb 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-thief-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-thief-game-options.dto.ts @@ -1,26 +1,26 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsInt, IsOptional, Max, Min } from "class-validator"; -import { thiefGameOptionsApiProperties, thiefGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant"; +import { THIEF_GAME_OPTIONS_API_PROPERTIES, THIEF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant"; class CreateThiefGameOptionsDto { @ApiProperty({ - ...thiefGameOptionsApiProperties.mustChooseBetweenWerewolves, + ...THIEF_GAME_OPTIONS_API_PROPERTIES.mustChooseBetweenWerewolves, required: false, }) @IsOptional() @IsBoolean() - public mustChooseBetweenWerewolves: boolean = thiefGameOptionsFieldsSpecs.mustChooseBetweenWerewolves.default; + public mustChooseBetweenWerewolves: boolean = THIEF_GAME_OPTIONS_FIELDS_SPECS.mustChooseBetweenWerewolves.default; @ApiProperty({ - ...thiefGameOptionsApiProperties.additionalCardsCount, + ...THIEF_GAME_OPTIONS_API_PROPERTIES.additionalCardsCount, required: false, }) @IsOptional() @IsInt() - @Min(thiefGameOptionsFieldsSpecs.additionalCardsCount.minimum) - @Max(thiefGameOptionsFieldsSpecs.additionalCardsCount.maximum) - public additionalCardsCount: number = thiefGameOptionsFieldsSpecs.additionalCardsCount.default; + @Min(THIEF_GAME_OPTIONS_FIELDS_SPECS.additionalCardsCount.minimum) + @Max(THIEF_GAME_OPTIONS_FIELDS_SPECS.additionalCardsCount.maximum) + public additionalCardsCount: number = THIEF_GAME_OPTIONS_FIELDS_SPECS.additionalCardsCount.default; } export { CreateThiefGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-three-brothers-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-three-brothers-game-options.dto.ts index b4a0d834e..c49a9c714 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-three-brothers-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-three-brothers-game-options.dto.ts @@ -1,18 +1,18 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsInt, IsOptional, Max, Min } from "class-validator"; -import { threeBrothersGameOptionsApiProperties, threeBrothersGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant"; +import { THREE_BROTHERS_GAME_OPTIONS_API_PROPERTIES, THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant"; class CreateThreeBrothersGameOptionsDto { @ApiProperty({ - ...threeBrothersGameOptionsApiProperties.wakingUpInterval, + ...THREE_BROTHERS_GAME_OPTIONS_API_PROPERTIES.wakingUpInterval, required: false, }) @IsOptional() @IsInt() - @Min(threeBrothersGameOptionsFieldsSpecs.wakingUpInterval.minimum) - @Max(threeBrothersGameOptionsFieldsSpecs.wakingUpInterval.maximum) - public wakingUpInterval: number = threeBrothersGameOptionsFieldsSpecs.wakingUpInterval.default; + @Min(THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.minimum) + @Max(THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.maximum) + public wakingUpInterval: number = THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.default; } export { CreateThreeBrothersGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-two-sisters-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-two-sisters-game-options.dto.ts index 8653c86fe..830175a6b 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-two-sisters-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-two-sisters-game-options.dto.ts @@ -1,18 +1,18 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsInt, IsOptional, Max, Min } from "class-validator"; -import { twoSistersGameOptionsApiProperties, twoSistersGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant"; +import { TWO_SISTERS_GAME_OPTIONS_API_PROPERTIES, TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant"; class CreateTwoSistersGameOptionsDto { @ApiProperty({ - ...twoSistersGameOptionsApiProperties.wakingUpInterval, + ...TWO_SISTERS_GAME_OPTIONS_API_PROPERTIES.wakingUpInterval, required: false, }) @IsOptional() @IsInt() - @Min(twoSistersGameOptionsFieldsSpecs.wakingUpInterval.minimum) - @Max(twoSistersGameOptionsFieldsSpecs.wakingUpInterval.maximum) - public wakingUpInterval: number = twoSistersGameOptionsFieldsSpecs.wakingUpInterval.default; + @Min(TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.minimum) + @Max(TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.maximum) + public wakingUpInterval: number = TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.default; } export { CreateTwoSistersGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-white-werewolf-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-white-werewolf-game-options.dto.ts index a1bee8d72..8c03cff98 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-white-werewolf-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-white-werewolf-game-options.dto.ts @@ -1,18 +1,18 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsInt, IsOptional, Max, Min } from "class-validator"; -import { whiteWerewolfGameOptionsApiProperties, whiteWerewolfGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant"; +import { WHITE_WEREWOLF_GAME_OPTIONS_API_PROPERTIES, WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant"; class CreateWhiteWerewolfGameOptionsDto { @ApiProperty({ - ...whiteWerewolfGameOptionsApiProperties.wakingUpInterval, + ...WHITE_WEREWOLF_GAME_OPTIONS_API_PROPERTIES.wakingUpInterval, required: false, }) @IsOptional() @IsInt() - @Min(whiteWerewolfGameOptionsFieldsSpecs.wakingUpInterval.minimum) - @Max(whiteWerewolfGameOptionsFieldsSpecs.wakingUpInterval.maximum) - public wakingUpInterval: number = whiteWerewolfGameOptionsFieldsSpecs.wakingUpInterval.default; + @Min(WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.minimum) + @Max(WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.maximum) + public wakingUpInterval: number = WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.default; } export { CreateWhiteWerewolfGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-wild-child-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-wild-child-game-options.dto.ts index 6bdebf0a0..f898e4dcc 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-wild-child-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-roles-game-options/create-wild-child-game-options.dto.ts @@ -1,16 +1,16 @@ import { ApiProperty } from "@nestjs/swagger"; import { IsBoolean, IsOptional } from "class-validator"; -import { wildChildGameOptionsApiProperties, wildChildGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant"; +import { WILD_CHILD_GAME_OPTIONS_API_PROPERTIES, WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant"; class CreateWildChildGameOptionsDto { @ApiProperty({ - ...wildChildGameOptionsApiProperties.isTransformationRevealed, + ...WILD_CHILD_GAME_OPTIONS_API_PROPERTIES.isTransformationRevealed, required: false, }) @IsOptional() @IsBoolean() - public isTransformationRevealed: boolean = wildChildGameOptionsFieldsSpecs.isTransformationRevealed.default; + public isTransformationRevealed: boolean = WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS.isTransformationRevealed.default; } export { CreateWildChildGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-options/create-votes-game-options/create-votes-game-options.dto.ts b/src/modules/game/dto/create-game/create-game-options/create-votes-game-options/create-votes-game-options.dto.ts index 3645e4b0e..6726a0949 100644 --- a/src/modules/game/dto/create-game/create-game-options/create-votes-game-options/create-votes-game-options.dto.ts +++ b/src/modules/game/dto/create-game/create-game-options/create-votes-game-options/create-votes-game-options.dto.ts @@ -2,17 +2,17 @@ import { ApiProperty } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsBoolean, IsOptional } from "class-validator"; -import { votesGameOptionsApiProperties, votesGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/votes-game-options.constant"; +import { VOTES_GAME_OPTIONS_API_PROPERTIES, VOTES_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/votes-game-options.constant"; class CreateVotesGameOptionsDto { @ApiProperty({ - ...votesGameOptionsApiProperties.canBeSkipped, + ...VOTES_GAME_OPTIONS_API_PROPERTIES.canBeSkipped, required: false, }) @Type(() => Boolean) @IsOptional() @IsBoolean() - public canBeSkipped: boolean = votesGameOptionsFieldsSpecs.canBeSkipped.default; + public canBeSkipped: boolean = VOTES_GAME_OPTIONS_FIELDS_SPECS.canBeSkipped.default; } export { CreateVotesGameOptionsDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-player/create-game-player-role/create-game-player-role.dto.ts b/src/modules/game/dto/create-game/create-game-player/create-game-player-role/create-game-player-role.dto.ts index 8954ae8af..d25dde4ac 100644 --- a/src/modules/game/dto/create-game/create-game-player/create-game-player-role/create-game-player-role.dto.ts +++ b/src/modules/game/dto/create-game/create-game-player/create-game-player-role/create-game-player-role.dto.ts @@ -3,18 +3,18 @@ import { Expose } from "class-transformer"; import { Allow } from "class-validator"; import { GamePlayerRoleBaseDto } from "@/modules/game/dto/base/game-player/game-player-role/game-player-role.base.dto"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; class CreateGamePlayerRoleDto extends PickType(GamePlayerRoleBaseDto, ["name"] as const) { @ApiHideProperty() @Allow() @Expose() - public original?: ROLE_NAMES; + public original?: RoleNames; @ApiHideProperty() @Allow() @Expose() - public current?: ROLE_NAMES; + public current?: RoleNames; @ApiHideProperty() @Allow() diff --git a/src/modules/game/dto/create-game/create-game-player/create-game-player-side/create-game-player-side.dto.ts b/src/modules/game/dto/create-game/create-game-player/create-game-player-side/create-game-player-side.dto.ts index 3e56499a4..fc5f99797 100644 --- a/src/modules/game/dto/create-game/create-game-player/create-game-player-side/create-game-player-side.dto.ts +++ b/src/modules/game/dto/create-game/create-game-player/create-game-player-side/create-game-player-side.dto.ts @@ -2,18 +2,18 @@ import { ApiHideProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; import { Allow } from "class-validator"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; class CreateGamePlayerSideDto { @ApiHideProperty() @Allow() @Expose() - public original?: ROLE_SIDES; + public original?: RoleSides; @ApiHideProperty() @Allow() @Expose() - public current?: ROLE_SIDES; + public current?: RoleSides; } export { CreateGamePlayerSideDto }; \ No newline at end of file diff --git a/src/modules/game/dto/create-game/create-game-player/create-game-player.dto.ts b/src/modules/game/dto/create-game/create-game-player/create-game-player.dto.ts index 01f69e13c..995e33fe8 100644 --- a/src/modules/game/dto/create-game/create-game-player/create-game-player.dto.ts +++ b/src/modules/game/dto/create-game/create-game-player/create-game-player.dto.ts @@ -2,7 +2,7 @@ import { ApiHideProperty, ApiProperty, IntersectionType, PartialType, PickType } import { Expose, Transform, Type } from "class-transformer"; import { ValidateNested } from "class-validator"; -import { playerApiProperties } from "@/modules/game/constants/player/player.constant"; +import { PLAYER_API_PROPERTIES } from "@/modules/game/constants/player/player.constant"; import { GamePlayerBaseDto } from "@/modules/game/dto/base/game-player/game-player.base.dto"; import { playerRoleTransformer } from "@/modules/game/dto/base/game-player/transformers/player-role.transformer"; import { playerSideTransformer } from "@/modules/game/dto/base/game-player/transformers/player-side.transformer"; @@ -14,7 +14,7 @@ class CreateGamePlayerDto extends IntersectionType( PickType(PartialType(GamePlayerBaseDto), ["position"] as const), ) { @Transform(playerRoleTransformer) - @ApiProperty(playerApiProperties.role) + @ApiProperty(PLAYER_API_PROPERTIES.role) @Type(() => CreateGamePlayerRoleDto) @ValidateNested() @Expose() diff --git a/src/modules/game/dto/create-game/create-game.dto.ts b/src/modules/game/dto/create-game/create-game.dto.ts index eac72ad26..18e76a526 100644 --- a/src/modules/game/dto/create-game/create-game.dto.ts +++ b/src/modules/game/dto/create-game/create-game.dto.ts @@ -17,22 +17,22 @@ import { gamePlayersPositionTransformer } from "@/modules/game/dto/base/transfor import { CreateGameAdditionalCardDto } from "@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto"; import { CreateGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-game-options.dto"; import { CreateGamePlayerDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player.dto"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; import { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -import { gameApiProperties, gameFieldsSpecs } from "@/modules/game/schemas/game.schema.constant"; +import { GAME_API_PROPERTIES, GAME_FIELDS_SPECS } from "@/modules/game/schemas/game.schema.constant"; class CreateGameDto { @ApiHideProperty() @IsOptional() - @Equals(gameFieldsSpecs.turn.default) - public turn: number = gameFieldsSpecs.turn.default; + @Equals(GAME_FIELDS_SPECS.turn.default) + public turn: number = GAME_FIELDS_SPECS.turn.default; @ApiHideProperty() @IsOptional() - @Equals(gameFieldsSpecs.phase.default) - public phase: GAME_PHASES = gameFieldsSpecs.phase.default; + @Equals(GAME_FIELDS_SPECS.phase.default) + public phase: GamePhases = GAME_FIELDS_SPECS.phase.default; - @ApiProperty(gameApiProperties.players) + @ApiProperty(GAME_API_PROPERTIES.players) @Transform(gamePlayersPositionTransformer) @Type(() => CreateGamePlayerDto) @ValidateNested({ each: true }) @@ -57,7 +57,7 @@ class CreateGameDto { public upcomingPlays: GamePlay[] = []; @ApiProperty({ - ...gameApiProperties.additionalCards, + ...GAME_API_PROPERTIES.additionalCards, required: false, }) @Type(() => CreateGameAdditionalCardDto) @@ -69,7 +69,7 @@ class CreateGameDto { public additionalCards?: CreateGameAdditionalCardDto[]; @ApiProperty({ - ...gameApiProperties.options, + ...GAME_API_PROPERTIES.options, required: false, }) @Type(() => CreateGameOptionsDto) diff --git a/src/modules/game/dto/get-game-random-composition/get-game-random-composition.dto.ts b/src/modules/game/dto/get-game-random-composition/get-game-random-composition.dto.ts index 11740ab1b..3ac24524a 100644 --- a/src/modules/game/dto/get-game-random-composition/get-game-random-composition.dto.ts +++ b/src/modules/game/dto/get-game-random-composition/get-game-random-composition.dto.ts @@ -5,7 +5,7 @@ import { ArrayNotContains, ArrayUnique, IsArray, IsBoolean, IsOptional, Validate import { CompositionBounds } from "@/modules/game/dto/base/decorators/composition/composition-bounds.decorator"; import { CompositionUniqueNames } from "@/modules/game/dto/base/decorators/composition/composition-unique-names.decorator"; import { GetGameRandomCompositionPlayerDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition-player/get-game-random-composition-player.dto"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { toBoolean } from "@/shared/validation/transformers/validation.transformer"; @@ -21,15 +21,15 @@ class GetGameRandomCompositionDto { @ApiProperty({ name: "excluded-roles", description: "Roles that won't be given by game random composition. All roles can be excluded except `villager` and `werewolf`", - enum: ROLE_NAMES, + enum: RoleNames, required: false, }) @Expose({ name: "excluded-roles" }) @IsOptional() @IsArray() - @ArrayNotContains([ROLE_NAMES.VILLAGER, ROLE_NAMES.WEREWOLF]) - @ArrayUnique((role: ROLE_NAMES) => role, { message: "excluded roles must be unique" }) - public excludedRoles: ROLE_NAMES[] = []; + @ArrayNotContains([RoleNames.VILLAGER, RoleNames.WEREWOLF]) + @ArrayUnique((role: RoleNames) => role, { message: "excluded roles must be unique" }) + public excludedRoles: RoleNames[] = []; @ApiProperty({ name: "are-recommended-min-players-respected", diff --git a/src/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target.dto.ts b/src/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target.dto.ts index 402fe1f92..51a6695f2 100644 --- a/src/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target.dto.ts +++ b/src/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target.dto.ts @@ -3,7 +3,7 @@ import { Expose, Type } from "class-transformer"; import { IsBoolean, IsEnum, IsMongoId, IsOptional } from "class-validator"; import { Types } from "mongoose"; -import { GAME_PLAY_ACTIONS, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; +import { GamePlayActions, WitchPotions } from "@/modules/game/enums/game-play.enum"; class MakeGamePlayTargetDto { @ApiProperty({ description: `Player's Id` }) @@ -11,17 +11,17 @@ class MakeGamePlayTargetDto { @IsMongoId() public playerId: Types.ObjectId; - @ApiProperty({ description: `Can be set only if there is a \`vile father of wolves\` in the game and game's upcoming action is \`${GAME_PLAY_ACTIONS.EAT}\`. If set to \`true\`, the \`werewolves\` victim will instantly join the \`werewolves\` side if possible.` }) + @ApiProperty({ description: `Can be set only if there is a \`vile father of wolves\` in the game and game's upcoming action is \`${GamePlayActions.EAT}\`. If set to \`true\`, the \`werewolves\` victim will instantly join the \`werewolves\` side if possible.` }) @IsOptional() @IsBoolean() @Expose() public isInfected?: boolean; - @ApiProperty({ description: `Can be set only if game's upcoming action is \`${GAME_PLAY_ACTIONS.USE_POTIONS}\`. If set to \`${WITCH_POTIONS.LIFE}\`, the \`witch\` saves target's life from \`werewolves\` meal. If set to \`${WITCH_POTIONS.DEATH}\`, the \`witch\` kills the target` }) + @ApiProperty({ description: `Can be set only if game's upcoming action is \`${GamePlayActions.USE_POTIONS}\`. If set to \`${WitchPotions.LIFE}\`, the \`witch\` saves target's life from \`werewolves\` meal. If set to \`${WitchPotions.DEATH}\`, the \`witch\` kills the target` }) @IsOptional() - @IsEnum(WITCH_POTIONS) + @IsEnum(WitchPotions) @Expose() - public drankPotion?: WITCH_POTIONS; + public drankPotion?: WitchPotions; } export { MakeGamePlayTargetDto }; \ No newline at end of file diff --git a/src/modules/game/dto/make-game-play/make-game-play.dto.ts b/src/modules/game/dto/make-game-play/make-game-play.dto.ts index dbc41dd40..98db25651 100644 --- a/src/modules/game/dto/make-game-play/make-game-play.dto.ts +++ b/src/modules/game/dto/make-game-play/make-game-play.dto.ts @@ -3,14 +3,14 @@ import { Expose, Type } from "class-transformer"; import { ArrayUnique, IsArray, IsBoolean, IsEnum, IsMongoId, IsOptional, ValidateNested } from "class-validator"; import { Types } from "mongoose"; -import { requiredTargetsActions, requiredVotesActions, stutteringJudgeRequestOpportunityActions } from "@/modules/game/constants/game-play/game-play.constant"; +import { REQUIRED_TARGET_ACTIONS, REQUIRED_VOTE_ACTIONS, STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS } from "@/modules/game/constants/game-play/game-play.constant"; import { MakeGamePlayTargetDto } from "@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target.dto"; import { MakeGamePlayVoteDto } from "@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote.dto"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; class MakeGamePlayDto { - @ApiProperty({ description: `Players affected by the play. Must be set when game's upcoming play action is one of the following : ${requiredTargetsActions.toString()}` }) + @ApiProperty({ description: `Players affected by the play. Must be set when game's upcoming play action is one of the following : ${REQUIRED_TARGET_ACTIONS.toString()}` }) @IsOptional() @Type(() => MakeGamePlayTargetDto) @ValidateNested() @@ -19,7 +19,7 @@ class MakeGamePlayDto { @Expose() public targets?: MakeGamePlayTargetDto[]; - @ApiProperty({ description: `Players votes. Must be set when game's upcoming play action is one of the following : ${requiredVotesActions.toString()}` }) + @ApiProperty({ description: `Players votes. Must be set when game's upcoming play action is one of the following : ${REQUIRED_VOTE_ACTIONS.toString()}` }) @IsOptional() @Type(() => MakeGamePlayVoteDto) @ValidateNested() @@ -28,24 +28,24 @@ class MakeGamePlayDto { @Expose() public votes?: MakeGamePlayVoteDto[]; - @ApiProperty({ description: `Can be set to \`true\` only if there is a \`stuttering judge\` in the game and the game's upcoming action is one of the following : ${stutteringJudgeRequestOpportunityActions.toString()}. If set to \`true\`, there is another vote immediately` }) + @ApiProperty({ description: `Can be set to \`true\` only if there is a \`stuttering judge\` in the game and the game's upcoming action is one of the following : ${STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS.toString()}. If set to \`true\`, there is another vote immediately` }) @IsOptional() @IsBoolean() @Expose() public doesJudgeRequestAnotherVote?: boolean; - @ApiProperty({ description: `Can be set when game's upcoming action is \`${GAME_PLAY_ACTIONS.CHOOSE_CARD}\`` }) + @ApiProperty({ description: `Can be set when game's upcoming action is \`${GamePlayActions.CHOOSE_CARD}\`` }) @IsOptional() @Type(() => String) @IsMongoId() @Expose() public chosenCardId?: Types.ObjectId; - @ApiProperty({ description: `Side chosen by \`${ROLE_NAMES.DOG_WOLF}\`. Required when game's upcoming action is \`${GAME_PLAY_ACTIONS.CHOOSE_SIDE}\`` }) + @ApiProperty({ description: `Side chosen by \`${RoleNames.DOG_WOLF}\`. Required when game's upcoming action is \`${GamePlayActions.CHOOSE_SIDE}\`` }) @IsOptional() - @IsEnum(ROLE_SIDES) + @IsEnum(RoleSides) @Expose() - public chosenSide?: ROLE_SIDES; + public chosenSide?: RoleSides; } export { MakeGamePlayDto }; \ No newline at end of file diff --git a/src/modules/game/enums/game-history-record.enum.ts b/src/modules/game/enums/game-history-record.enum.ts index 7daa2080d..4aff3b7d1 100644 --- a/src/modules/game/enums/game-history-record.enum.ts +++ b/src/modules/game/enums/game-history-record.enum.ts @@ -1,4 +1,4 @@ -enum GAME_HISTORY_RECORD_VOTING_RESULTS { +enum GameHistoryRecordVotingResults { SHERIFF_ELECTION = "sheriff-election", TIE = "tie", DEATH = "death", @@ -6,4 +6,4 @@ enum GAME_HISTORY_RECORD_VOTING_RESULTS { SKIPPED = "skipped", } -export { GAME_HISTORY_RECORD_VOTING_RESULTS }; \ No newline at end of file +export { GameHistoryRecordVotingResults }; \ No newline at end of file diff --git a/src/modules/game/enums/game-play.enum.ts b/src/modules/game/enums/game-play.enum.ts index 6acc2dd84..c9626cefe 100644 --- a/src/modules/game/enums/game-play.enum.ts +++ b/src/modules/game/enums/game-play.enum.ts @@ -1,4 +1,4 @@ -enum GAME_PLAY_ACTIONS { +enum GamePlayActions { EAT = "eat", LOOK = "look", CHARM = "charm", @@ -19,19 +19,19 @@ enum GAME_PLAY_ACTIONS { SETTLE_VOTES = "settle-votes", } -enum GAME_PLAY_CAUSES { +enum GamePlayCauses { STUTTERING_JUDGE_REQUEST = "stuttering-judge-request", PREVIOUS_VOTES_WERE_IN_TIES = "previous-votes-were-in-ties", ANGEL_PRESENCE = "angel-presence", } -enum WITCH_POTIONS { +enum WitchPotions { LIFE = "life", DEATH = "death", } export { - GAME_PLAY_ACTIONS, - GAME_PLAY_CAUSES, - WITCH_POTIONS, + GamePlayActions, + GamePlayCauses, + WitchPotions, }; \ No newline at end of file diff --git a/src/modules/game/enums/game-victory.enum.ts b/src/modules/game/enums/game-victory.enum.ts index fc1e9e6bd..fff02474a 100644 --- a/src/modules/game/enums/game-victory.enum.ts +++ b/src/modules/game/enums/game-victory.enum.ts @@ -1,4 +1,4 @@ -enum GAME_VICTORY_TYPES { +enum GameVictoryTypes { NONE = "none", WEREWOLVES = "werewolves", VILLAGERS = "villagers", @@ -8,4 +8,4 @@ enum GAME_VICTORY_TYPES { ANGEL = "angel", } -export { GAME_VICTORY_TYPES }; \ No newline at end of file +export { GameVictoryTypes }; \ No newline at end of file diff --git a/src/modules/game/enums/game.enum.ts b/src/modules/game/enums/game.enum.ts index 63cfebe79..f3b0aee3b 100644 --- a/src/modules/game/enums/game.enum.ts +++ b/src/modules/game/enums/game.enum.ts @@ -1,12 +1,15 @@ -enum GAME_PHASES { +enum GamePhases { DAY = "day", NIGHT = "night", } -enum GAME_STATUSES { +enum GameStatuses { PLAYING = "playing", OVER = "over", CANCELED = "canceled", } -export { GAME_PHASES, GAME_STATUSES }; \ No newline at end of file +export { + GamePhases, + GameStatuses, +}; \ No newline at end of file diff --git a/src/modules/game/enums/player.enum.ts b/src/modules/game/enums/player.enum.ts index ed211d0f4..1e03ba8b2 100644 --- a/src/modules/game/enums/player.enum.ts +++ b/src/modules/game/enums/player.enum.ts @@ -1,4 +1,4 @@ -enum PLAYER_GROUPS { +enum PlayerGroups { ALL = "all", VILLAGERS = "villagers", WEREWOLVES = "werewolves", @@ -6,7 +6,7 @@ enum PLAYER_GROUPS { CHARMED = "charmed", } -enum PLAYER_ATTRIBUTE_NAMES { +enum PlayerAttributeNames { SHERIFF = "sheriff", SEEN = "seen", EATEN = "eaten", @@ -23,7 +23,7 @@ enum PLAYER_ATTRIBUTE_NAMES { CONTAMINATED = "contaminated", } -enum PLAYER_DEATH_CAUSES { +enum PlayerDeathCauses { DEATH_POTION = "death-potion", EATEN = "eaten", SHOT = "shot", @@ -35,7 +35,7 @@ enum PLAYER_DEATH_CAUSES { } export { - PLAYER_GROUPS, - PLAYER_ATTRIBUTE_NAMES, - PLAYER_DEATH_CAUSES, + PlayerGroups, + PlayerAttributeNames, + PlayerDeathCauses, }; \ No newline at end of file diff --git a/src/modules/game/game.module.ts b/src/modules/game/game.module.ts index e48c58c33..61df1cdb4 100644 --- a/src/modules/game/game.module.ts +++ b/src/modules/game/game.module.ts @@ -15,15 +15,15 @@ import { GameRandomCompositionService } from "@/modules/game/providers/services/ import { GameService } from "@/modules/game/providers/services/game.service"; import { PlayerAttributeService } from "@/modules/game/providers/services/player/player-attribute.service"; import { PlayerKillerService } from "@/modules/game/providers/services/player/player-killer.service"; -import { GameHistoryRecord, GameHistoryRecordSchema } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; -import { Game, GameSchema } from "@/modules/game/schemas/game.schema"; +import { GameHistoryRecord, GAME_HISTORY_RECORD_SCHEMA } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; +import { Game, GAME_SCHEMA } from "@/modules/game/schemas/game.schema"; @Module({ imports: [ DatabaseModule, MongooseModule.forFeature([ - { name: Game.name, schema: GameSchema }, - { name: GameHistoryRecord.name, schema: GameHistoryRecordSchema }, + { name: Game.name, schema: GAME_SCHEMA }, + { name: GameHistoryRecord.name, schema: GAME_HISTORY_RECORD_SCHEMA }, ]), ], controllers: [GameController], diff --git a/src/modules/game/helpers/game-play/game-play.factory.ts b/src/modules/game/helpers/game-play/game-play.factory.ts index 5137e651d..b004102c2 100644 --- a/src/modules/game/helpers/game-play/game-play.factory.ts +++ b/src/modules/game/helpers/game-play/game-play.factory.ts @@ -1,211 +1,211 @@ import { plainToInstance } from "class-transformer"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { GamePlaySource } from "@/modules/game/schemas/game-play/game-play-source/game-play-source.schema"; import { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createGamePlaySheriffSettlesVotes(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }), - action: GAME_PLAY_ACTIONS.SETTLE_VOTES, + source: createGamePlaySource({ name: PlayerAttributeNames.SHERIFF }), + action: GamePlayActions.SETTLE_VOTES, ...gamePlay, }); } function createGamePlaySheriffDelegates(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }), - action: GAME_PLAY_ACTIONS.DELEGATE, + source: createGamePlaySource({ name: PlayerAttributeNames.SHERIFF }), + action: GamePlayActions.DELEGATE, ...gamePlay, }); } function createGamePlayAllVote(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: PLAYER_GROUPS.ALL }), - action: GAME_PLAY_ACTIONS.VOTE, + source: createGamePlaySource({ name: PlayerGroups.ALL }), + action: GamePlayActions.VOTE, ...gamePlay, }); } function createGamePlayAllElectSheriff(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: PLAYER_GROUPS.ALL }), - action: GAME_PLAY_ACTIONS.ELECT_SHERIFF, + source: createGamePlaySource({ name: PlayerGroups.ALL }), + action: GamePlayActions.ELECT_SHERIFF, ...gamePlay, }); } function createGamePlayThiefChoosesCard(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.THIEF }), - action: GAME_PLAY_ACTIONS.CHOOSE_CARD, + source: createGamePlaySource({ name: RoleNames.THIEF }), + action: GamePlayActions.CHOOSE_CARD, ...gamePlay, }); } function createGamePlayStutteringJudgeChoosesSign(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.STUTTERING_JUDGE }), - action: GAME_PLAY_ACTIONS.CHOOSE_SIGN, + source: createGamePlaySource({ name: RoleNames.STUTTERING_JUDGE }), + action: GamePlayActions.CHOOSE_SIGN, ...gamePlay, }); } function createGamePlayScapegoatBansVoting(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.SCAPEGOAT }), - action: GAME_PLAY_ACTIONS.BAN_VOTING, + source: createGamePlaySource({ name: RoleNames.SCAPEGOAT }), + action: GamePlayActions.BAN_VOTING, ...gamePlay, }); } function createGamePlayDogWolfChoosesSide(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.DOG_WOLF }), - action: GAME_PLAY_ACTIONS.CHOOSE_SIDE, + source: createGamePlaySource({ name: RoleNames.DOG_WOLF }), + action: GamePlayActions.CHOOSE_SIDE, ...gamePlay, }); } function createGamePlayWildChildChoosesModel(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }), - action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, + source: createGamePlaySource({ name: RoleNames.WILD_CHILD }), + action: GamePlayActions.CHOOSE_MODEL, ...gamePlay, }); } function createGamePlayFoxSniffs(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.FOX }), - action: GAME_PLAY_ACTIONS.SNIFF, + source: createGamePlaySource({ name: RoleNames.FOX }), + action: GamePlayActions.SNIFF, ...gamePlay, }); } function createGamePlayCharmedMeetEachOther(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: PLAYER_GROUPS.CHARMED }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createGamePlaySource({ name: PlayerGroups.CHARMED }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }); } function createGamePlayLoversMeetEachOther(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: PLAYER_GROUPS.LOVERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createGamePlaySource({ name: PlayerGroups.LOVERS }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }); } function createGamePlayThreeBrothersMeetEachOther(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.THREE_BROTHERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createGamePlaySource({ name: RoleNames.THREE_BROTHERS }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }); } function createGamePlayTwoSistersMeetEachOther(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.TWO_SISTERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createGamePlaySource({ name: RoleNames.TWO_SISTERS }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }); } function createGamePlayRavenMarks(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.RAVEN }), - action: GAME_PLAY_ACTIONS.MARK, + source: createGamePlaySource({ name: RoleNames.RAVEN }), + action: GamePlayActions.MARK, ...gamePlay, }); } function createGamePlayGuardProtects(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.GUARD }), - action: GAME_PLAY_ACTIONS.PROTECT, + source: createGamePlaySource({ name: RoleNames.GUARD }), + action: GamePlayActions.PROTECT, ...gamePlay, }); } function createGamePlayHunterShoots(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.HUNTER }), - action: GAME_PLAY_ACTIONS.SHOOT, + source: createGamePlaySource({ name: RoleNames.HUNTER }), + action: GamePlayActions.SHOOT, ...gamePlay, }); } function createGamePlayWitchUsesPotions(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.WITCH }), - action: GAME_PLAY_ACTIONS.USE_POTIONS, + source: createGamePlaySource({ name: RoleNames.WITCH }), + action: GamePlayActions.USE_POTIONS, ...gamePlay, }); } function createGamePlayPiedPiperCharms(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.PIED_PIPER }), - action: GAME_PLAY_ACTIONS.CHARM, + source: createGamePlaySource({ name: RoleNames.PIED_PIPER }), + action: GamePlayActions.CHARM, ...gamePlay, }); } function createGamePlayCupidCharms(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.CUPID }), - action: GAME_PLAY_ACTIONS.CHARM, + source: createGamePlaySource({ name: RoleNames.CUPID }), + action: GamePlayActions.CHARM, ...gamePlay, }); } function createGamePlaySeerLooks(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.SEER }), - action: GAME_PLAY_ACTIONS.LOOK, + source: createGamePlaySource({ name: RoleNames.SEER }), + action: GamePlayActions.LOOK, ...gamePlay, }); } function createGamePlayWhiteWerewolfEats(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.WHITE_WEREWOLF }), - action: GAME_PLAY_ACTIONS.EAT, + source: createGamePlaySource({ name: RoleNames.WHITE_WEREWOLF }), + action: GamePlayActions.EAT, ...gamePlay, }); } function createGamePlayBigBadWolfEats(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: ROLE_NAMES.BIG_BAD_WOLF }), - action: GAME_PLAY_ACTIONS.EAT, + source: createGamePlaySource({ name: RoleNames.BIG_BAD_WOLF }), + action: GamePlayActions.EAT, ...gamePlay, }); } function createGamePlayWerewolvesEat(gamePlay: Partial = {}): GamePlay { return createGamePlay({ - source: createGamePlaySource({ name: PLAYER_GROUPS.WEREWOLVES }), - action: GAME_PLAY_ACTIONS.EAT, + source: createGamePlaySource({ name: PlayerGroups.WEREWOLVES }), + action: GamePlayActions.EAT, ...gamePlay, }); } function createGamePlaySource(gamePlaySource: GamePlaySource): GamePlaySource { - return plainToInstance(GamePlaySource, gamePlaySource, { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true }); + return plainToInstance(GamePlaySource, gamePlaySource, { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true }); } function createGamePlay(gamePlay: GamePlay): GamePlay { - return plainToInstance(GamePlay, gamePlay, { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true }); + return plainToInstance(GamePlay, gamePlay, { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true }); } export { diff --git a/src/modules/game/helpers/game-play/game-play.helper.ts b/src/modules/game/helpers/game-play/game-play.helper.ts index 89555a95f..2ab39e2ba 100644 --- a/src/modules/game/helpers/game-play/game-play.helper.ts +++ b/src/modules/game/helpers/game-play/game-play.helper.ts @@ -1,6 +1,6 @@ import { plainToInstance } from "class-transformer"; -import { gamePlaysPriorityList } from "@/modules/game/constants/game-play/game-play.constant"; +import { GAME_PLAYS_PRIORITY_LIST } from "@/modules/game/constants/game-play/game-play.constant"; import { MakeGamePlayTargetWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto"; import { MakeGamePlayVoteWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto"; import { MakeGamePlayWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-with-relations.dto"; @@ -10,10 +10,10 @@ import type { GameAdditionalCard } from "@/modules/game/schemas/game-additional- import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; import type { Game } from "@/modules/game/schemas/game.schema"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import { RESOURCE_NOT_FOUND_REASONS } from "@/shared/exception/enums/resource-not-found-error.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; +import { ResourceNotFoundReasons } from "@/shared/exception/enums/resource-not-found-error.enum"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game: Game): MakeGamePlayVoteWithRelationsDto[] | undefined { if (makeGamePlayDto.votes === undefined) { @@ -23,12 +23,12 @@ function getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayD const source = getPlayerWithId(game, vote.sourceId); const target = getPlayerWithId(game, vote.targetId); if (source === undefined) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, vote.sourceId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE); + throw new ResourceNotFoundException(ApiResources.PLAYERS, vote.sourceId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE); } if (target === undefined) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, vote.targetId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET); + throw new ResourceNotFoundException(ApiResources.PLAYERS, vote.targetId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET); } - const plainToInstanceOptions = { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true }; + const plainToInstanceOptions = { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true }; const voteWithRelations = plainToInstance(MakeGamePlayVoteWithRelationsDto, vote, plainToInstanceOptions); voteWithRelations.source = source; voteWithRelations.target = target; @@ -43,9 +43,9 @@ function getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto: MakeGamePla return makeGamePlayDto.targets.reduce((acc, target) => { const player = getPlayerWithId(game, target.playerId); if (player === undefined) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, target.playerId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_TARGET); + throw new ResourceNotFoundException(ApiResources.PLAYERS, target.playerId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_TARGET); } - const plainToInstanceOptions = { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true }; + const plainToInstanceOptions = { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true }; const targetWithRelations = plainToInstance(MakeGamePlayTargetWithRelationsDto, target, plainToInstanceOptions); targetWithRelations.player = player; return [...acc, targetWithRelations]; @@ -58,7 +58,7 @@ function getChosenCardFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game } const chosenCard = getAdditionalCardWithId(game.additionalCards, makeGamePlayDto.chosenCardId); if (chosenCard === undefined) { - throw new ResourceNotFoundException(API_RESOURCES.GAME_ADDITIONAL_CARDS, makeGamePlayDto.chosenCardId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_CHOSEN_CARD); + throw new ResourceNotFoundException(ApiResources.GAME_ADDITIONAL_CARDS, makeGamePlayDto.chosenCardId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_CHOSEN_CARD); } return chosenCard; } @@ -67,7 +67,7 @@ function createMakeGamePlayDtoWithRelations(makeGamePlayDto: MakeGamePlayDto, ga const chosenCard = getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game); const targets = getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game); const votes = getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game); - const makeGamePlayWithRelationsDto = plainToInstance(MakeGamePlayWithRelationsDto, makeGamePlayDto, { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true }); + const makeGamePlayWithRelationsDto = plainToInstance(MakeGamePlayWithRelationsDto, makeGamePlayDto, { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true }); makeGamePlayWithRelationsDto.chosenCard = chosenCard; makeGamePlayWithRelationsDto.targets = targets; makeGamePlayWithRelationsDto.votes = votes; @@ -75,7 +75,7 @@ function createMakeGamePlayDtoWithRelations(makeGamePlayDto: MakeGamePlayDto, ga } function findPlayPriorityIndex(play: GamePlay): number { - return gamePlaysPriorityList.findIndex(playInPriorityList => { + return GAME_PLAYS_PRIORITY_LIST.findIndex(playInPriorityList => { const { source, action, cause } = playInPriorityList; return source.name === play.source.name && action === play.action && cause === play.cause; }); diff --git a/src/modules/game/helpers/game-victory/game-victory.helper.ts b/src/modules/game/helpers/game-victory/game-victory.helper.ts index 00bdb4c01..a89309706 100644 --- a/src/modules/game/helpers/game-victory/game-victory.helper.ts +++ b/src/modules/game/helpers/game-victory/game-victory.helper.ts @@ -1,56 +1,56 @@ import { plainToInstance } from "class-transformer"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { GAME_VICTORY_TYPES } from "@/modules/game/enums/game-victory.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES } from "@/modules/game/enums/player.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { GameVictoryTypes } from "@/modules/game/enums/game-victory.enum"; +import { PlayerAttributeNames, PlayerDeathCauses } from "@/modules/game/enums/player.enum"; import { areAllPlayersDead, getLeftToCharmByPiedPiperPlayers, getPlayersWithActiveAttributeName, getPlayersWithCurrentSide, getPlayerWithCurrentRole } from "@/modules/game/helpers/game.helper"; import { doesPlayerHaveActiveAttributeWithName } from "@/modules/game/helpers/player/player-attribute/player-attribute.helper"; import { isPlayerAliveAndPowerful, isPlayerPowerful } from "@/modules/game/helpers/player/player.helper"; import { GameVictory } from "@/modules/game/schemas/game-victory/game-victory.schema"; import type { Game } from "@/modules/game/schemas/game.schema"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { createNoCurrentGamePlayUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function doWerewolvesWin(game: Game): boolean { - const werewolvesSidedPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES); - return werewolvesSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === ROLE_SIDES.VILLAGERS && isAlive); + const werewolvesSidedPlayers = getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES); + return werewolvesSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === RoleSides.VILLAGERS && isAlive); } function doVillagersWin(game: Game): boolean { - const villagersSidedPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS); - return villagersSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === ROLE_SIDES.WEREWOLVES && isAlive); + const villagersSidedPlayers = getPlayersWithCurrentSide(game, RoleSides.VILLAGERS); + return villagersSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === RoleSides.WEREWOLVES && isAlive); } function doLoversWin(game: Game): boolean { - const lovers = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE); + const lovers = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE); return lovers.length > 0 && game.players.every(player => { - const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game); + const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game); return isPlayerInLove && player.isAlive || !isPlayerInLove && !player.isAlive; }); } function doesWhiteWerewolfWin(game: Game): boolean { - const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WHITE_WEREWOLF); + const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, RoleNames.WHITE_WEREWOLF); return !!whiteWerewolfPlayer && game.players.every(({ role, isAlive }) => - role.current === ROLE_NAMES.WHITE_WEREWOLF && isAlive || role.current !== ROLE_NAMES.WHITE_WEREWOLF && !isAlive); + role.current === RoleNames.WHITE_WEREWOLF && isAlive || role.current !== RoleNames.WHITE_WEREWOLF && !isAlive); } function doesPiedPiperWin(game: Game): boolean { const { isPowerlessIfInfected } = game.options.roles.piedPiper; - const piedPiperPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.PIED_PIPER); + const piedPiperPlayer = getPlayerWithCurrentRole(game, RoleNames.PIED_PIPER); const leftToCharmPlayers = getLeftToCharmByPiedPiperPlayers(game); return !!piedPiperPlayer && isPlayerAliveAndPowerful(piedPiperPlayer, game) && !leftToCharmPlayers.length && - (!isPowerlessIfInfected || piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS); + (!isPowerlessIfInfected || piedPiperPlayer.side.current === RoleSides.VILLAGERS); } function doesAngelWin(game: Game): boolean { - const angelPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.ANGEL); + const angelPlayer = getPlayerWithCurrentRole(game, RoleNames.ANGEL); if (!angelPlayer?.death || angelPlayer.isAlive || !isPlayerPowerful(angelPlayer, game) || game.turn > 1) { return false; } - return [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.EATEN].includes(angelPlayer.death.cause); + return [PlayerDeathCauses.VOTE, PlayerDeathCauses.EATEN].includes(angelPlayer.death.cause); } function isGameOver(game: Game): boolean { @@ -58,38 +58,38 @@ function isGameOver(game: Game): boolean { if (!currentPlay) { throw createNoCurrentGamePlayUnexpectedException("isGameOver", { gameId: game._id }); } - const isShootPlayIncoming = !!upcomingPlays.find(({ action, source }) => action === GAME_PLAY_ACTIONS.SHOOT && source.name === ROLE_NAMES.HUNTER); - return areAllPlayersDead(game) || currentPlay.action !== GAME_PLAY_ACTIONS.SHOOT && !isShootPlayIncoming && + const isShootPlayIncoming = !!upcomingPlays.find(({ action, source }) => action === GamePlayActions.SHOOT && source.name === RoleNames.HUNTER); + return areAllPlayersDead(game) || currentPlay.action !== GamePlayActions.SHOOT && !isShootPlayIncoming && (doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game) || doesAngelWin(game)); } function generateGameVictoryData(game: Game): GameVictory | undefined { if (areAllPlayersDead(game)) { - return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.NONE }, plainToInstanceDefaultOptions); + return plainToInstance(GameVictory, { type: GameVictoryTypes.NONE }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } if (doesAngelWin(game)) { - const angelPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.ANGEL); - return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.ANGEL, winners: [angelPlayer] }, plainToInstanceDefaultOptions); + const angelPlayer = getPlayerWithCurrentRole(game, RoleNames.ANGEL); + return plainToInstance(GameVictory, { type: GameVictoryTypes.ANGEL, winners: [angelPlayer] }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } if (doLoversWin(game)) { - const inLovePlayers = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE); - return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.LOVERS, winners: inLovePlayers }, plainToInstanceDefaultOptions); + const inLovePlayers = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE); + return plainToInstance(GameVictory, { type: GameVictoryTypes.LOVERS, winners: inLovePlayers }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } if (doesPiedPiperWin(game)) { - const piedPiperPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.PIED_PIPER); - return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.PIED_PIPER, winners: [piedPiperPlayer] }, plainToInstanceDefaultOptions); + const piedPiperPlayer = getPlayerWithCurrentRole(game, RoleNames.PIED_PIPER); + return plainToInstance(GameVictory, { type: GameVictoryTypes.PIED_PIPER, winners: [piedPiperPlayer] }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } if (doesWhiteWerewolfWin(game)) { - const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WHITE_WEREWOLF); - return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.WHITE_WEREWOLF, winners: [whiteWerewolfPlayer] }, plainToInstanceDefaultOptions); + const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, RoleNames.WHITE_WEREWOLF); + return plainToInstance(GameVictory, { type: GameVictoryTypes.WHITE_WEREWOLF, winners: [whiteWerewolfPlayer] }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } if (doWerewolvesWin(game)) { - const werewolvesSidePlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES); - return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.WEREWOLVES, winners: werewolvesSidePlayers }, plainToInstanceDefaultOptions); + const werewolvesSidePlayers = getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES); + return plainToInstance(GameVictory, { type: GameVictoryTypes.WEREWOLVES, winners: werewolvesSidePlayers }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } if (doVillagersWin(game)) { - const villagersSidePlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS); - return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.VILLAGERS, winners: villagersSidePlayers }, plainToInstanceDefaultOptions); + const villagersSidePlayers = getPlayersWithCurrentSide(game, RoleSides.VILLAGERS); + return plainToInstance(GameVictory, { type: GameVictoryTypes.VILLAGERS, winners: villagersSidePlayers }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } } diff --git a/src/modules/game/helpers/game.factory.ts b/src/modules/game/helpers/game.factory.ts index eb6adf8e0..5624a5427 100644 --- a/src/modules/game/helpers/game.factory.ts +++ b/src/modules/game/helpers/game.factory.ts @@ -2,12 +2,12 @@ import { plainToInstance } from "class-transformer"; import { Game } from "@/modules/game/schemas/game.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { toJSON } from "@tests/helpers/object/object.helper"; function createGame(game: Game): Game { - return plainToInstance(Game, toJSON(game), plainToInstanceDefaultOptions); + return plainToInstance(Game, toJSON(game), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createGame }; \ No newline at end of file diff --git a/src/modules/game/helpers/game.helper.ts b/src/modules/game/helpers/game.helper.ts index c1e37aa60..142e7daf8 100644 --- a/src/modules/game/helpers/game.helper.ts +++ b/src/modules/game/helpers/game.helper.ts @@ -2,31 +2,31 @@ import type { Types } from "mongoose"; import type { CreateGamePlayerDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player.dto"; import type { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { doesPlayerHaveActiveAttributeWithName } from "@/modules/game/helpers/player/player-attribute/player-attribute.helper"; import { createPlayer } from "@/modules/game/helpers/player/player.factory"; import type { GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; import type { Game } from "@/modules/game/schemas/game.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; import type { GameSource, GetNearestPlayerOptions } from "@/modules/game/types/game.type"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { createCantFindPlayerUnexpectedException, createNoCurrentGamePlayUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; -function getPlayerDtoWithRole(game: CreateGameDto, role: ROLE_NAMES): CreateGamePlayerDto | undefined { +function getPlayerDtoWithRole(game: CreateGameDto, role: RoleNames): CreateGamePlayerDto | undefined { return game.players.find(player => player.role.name === role); } -function getPlayerWithCurrentRole(game: Game, role: ROLE_NAMES): Player | undefined { +function getPlayerWithCurrentRole(game: Game, role: RoleNames): Player | undefined { return game.players.find(player => player.role.current === role); } -function getPlayersWithCurrentRole(game: Game, role: ROLE_NAMES): Player[] { +function getPlayersWithCurrentRole(game: Game, role: RoleNames): Player[] { return game.players.filter(player => player.role.current === role); } -function getPlayersWithCurrentSide(game: Game, side: ROLE_SIDES): Player[] { +function getPlayersWithCurrentSide(game: Game, side: RoleSides): Player[] { return game.players.filter(player => player.side.current === side); } @@ -59,12 +59,12 @@ function getAdditionalCardWithId(cards: GameAdditionalCard[] | undefined, id: Ty } function areAllWerewolvesAlive(game: Game): boolean { - const werewolfPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES); + const werewolfPlayers = getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES); return werewolfPlayers.length > 0 && werewolfPlayers.every(werewolf => werewolf.isAlive); } function areAllVillagersAlive(game: Game): boolean { - const villagerPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS); + const villagerPlayers = getPlayersWithCurrentSide(game, RoleSides.VILLAGERS); return villagerPlayers.length > 0 && villagerPlayers.every(villager => villager.isAlive); } @@ -72,11 +72,11 @@ function areAllPlayersDead(game: Game): boolean { return game.players.length > 0 && game.players.every(({ isAlive }) => !isAlive); } -function getPlayerWithActiveAttributeName(game: Game, attributeName: PLAYER_ATTRIBUTE_NAMES): Player | undefined { +function getPlayerWithActiveAttributeName(game: Game, attributeName: PlayerAttributeNames): Player | undefined { return game.players.find(player => doesPlayerHaveActiveAttributeWithName(player, attributeName, game)); } -function getPlayersWithActiveAttributeName(game: Game, attribute: PLAYER_ATTRIBUTE_NAMES): Player[] { +function getPlayersWithActiveAttributeName(game: Game, attribute: PlayerAttributeNames): Player[] { return game.players.filter(player => doesPlayerHaveActiveAttributeWithName(player, attribute, game)); } @@ -85,49 +85,49 @@ function getAlivePlayers(game: Game): Player[] { } function getAliveVillagerSidedPlayers(game: Game): Player[] { - return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.VILLAGERS); + return game.players.filter(player => player.isAlive && player.side.current === RoleSides.VILLAGERS); } function getAliveWerewolfSidedPlayers(game: Game): Player[] { - return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.WEREWOLVES); + return game.players.filter(player => player.isAlive && player.side.current === RoleSides.WEREWOLVES); } function getLeftToCharmByPiedPiperPlayers(game: Game): Player[] { - return game.players.filter(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CHARMED, game) && - player.role.current !== ROLE_NAMES.PIED_PIPER); + return game.players.filter(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CHARMED, game) && + player.role.current !== RoleNames.PIED_PIPER); } function getLeftToEatByWerewolvesPlayers(game: Game): Player[] { - return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.VILLAGERS && - !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.EATEN, game)); + return game.players.filter(player => player.isAlive && player.side.current === RoleSides.VILLAGERS && + !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.EATEN, game)); } function getLeftToEatByWhiteWerewolfPlayers(game: Game): Player[] { - return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.WEREWOLVES && player.role.current !== ROLE_NAMES.WHITE_WEREWOLF); + return game.players.filter(player => player.isAlive && player.side.current === RoleSides.WEREWOLVES && player.role.current !== RoleNames.WHITE_WEREWOLF); } -function getGroupOfPlayers(game: Game, group: PLAYER_GROUPS): Player[] { - if (group === PLAYER_GROUPS.ALL) { +function getGroupOfPlayers(game: Game, group: PlayerGroups): Player[] { + if (group === PlayerGroups.ALL) { return game.players; } - if (group === PLAYER_GROUPS.LOVERS) { - return getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE); + if (group === PlayerGroups.LOVERS) { + return getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE); } - if (group === PLAYER_GROUPS.CHARMED) { - return getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.CHARMED); + if (group === PlayerGroups.CHARMED) { + return getPlayersWithActiveAttributeName(game, PlayerAttributeNames.CHARMED); } - if (group === PLAYER_GROUPS.VILLAGERS) { - return getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS); + if (group === PlayerGroups.VILLAGERS) { + return getPlayersWithCurrentSide(game, RoleSides.VILLAGERS); } - return getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES); + return getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES); } -function isGameSourceRole(source: GameSource): source is ROLE_NAMES { - return Object.values(ROLE_NAMES).includes(source as ROLE_NAMES); +function isGameSourceRole(source: GameSource): source is RoleNames { + return Object.values(RoleNames).includes(source as RoleNames); } -function isGameSourceGroup(source: GameSource): source is PLAYER_GROUPS { - return Object.values(PLAYER_GROUPS).includes(source as PLAYER_GROUPS); +function isGameSourceGroup(source: GameSource): source is PlayerGroups { + return Object.values(PlayerGroups).includes(source as PlayerGroups); } function getNonexistentPlayerId(game: Game, candidateIds?: Types.ObjectId[]): Types.ObjectId | undefined { @@ -177,7 +177,7 @@ function getNearestAliveNeighbor(playerId: Types.ObjectId, game: Game, options: function getExpectedPlayersToPlay(game: Game): Player[] { const { currentPlay } = game; - const mustIncludeDeadPlayersGamePlayActions = [GAME_PLAY_ACTIONS.SHOOT, GAME_PLAY_ACTIONS.BAN_VOTING, GAME_PLAY_ACTIONS.DELEGATE]; + const mustIncludeDeadPlayersGamePlayActions = [GamePlayActions.SHOOT, GamePlayActions.BAN_VOTING, GamePlayActions.DELEGATE]; let expectedPlayersToPlay: Player[] = []; if (currentPlay === null) { throw createNoCurrentGamePlayUnexpectedException("getExpectedPlayersToPlay", { gameId: game._id }); @@ -187,7 +187,7 @@ function getExpectedPlayersToPlay(game: Game): Player[] { } else if (isGameSourceRole(currentPlay.source.name)) { expectedPlayersToPlay = getPlayersWithCurrentRole(game, currentPlay.source.name); } else { - expectedPlayersToPlay = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SHERIFF); + expectedPlayersToPlay = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.SHERIFF); } if (!mustIncludeDeadPlayersGamePlayActions.includes(currentPlay.action)) { expectedPlayersToPlay = expectedPlayersToPlay.filter(player => player.isAlive); diff --git a/src/modules/game/helpers/game.mutator.ts b/src/modules/game/helpers/game.mutator.ts index 68f9f6c4e..88ece4ab5 100644 --- a/src/modules/game/helpers/game.mutator.ts +++ b/src/modules/game/helpers/game.mutator.ts @@ -1,6 +1,6 @@ import type { Types } from "mongoose"; -import type { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import type { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { createGame } from "@/modules/game/helpers/game.factory"; import { getPlayerWithId } from "@/modules/game/helpers/game.helper"; import { createPlayerAttribute } from "@/modules/game/helpers/player/player-attribute/player-attribute.factory"; @@ -41,7 +41,7 @@ function addPlayersAttributeInGame(playerIds: Types.ObjectId[], game: Game, attr return clonedGame; } -function removePlayerAttributeByNameInGame(playerId: Types.ObjectId, game: Game, attributeName: PLAYER_ATTRIBUTE_NAMES): Game { +function removePlayerAttributeByNameInGame(playerId: Types.ObjectId, game: Game, attributeName: PlayerAttributeNames): Game { const clonedGame = createGame(game); const player = getPlayerWithId(clonedGame, playerId); if (!player) { diff --git a/src/modules/game/helpers/player/player-attribute/player-attribute.factory.ts b/src/modules/game/helpers/player/player-attribute/player-attribute.factory.ts index aaaa1ebd8..9aa3394ac 100644 --- a/src/modules/game/helpers/player/player-attribute/player-attribute.factory.ts +++ b/src/modules/game/helpers/player/player-attribute/player-attribute.factory.ts @@ -1,19 +1,19 @@ import { plainToInstance } from "class-transformer"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import type { Game } from "@/modules/game/schemas/game.schema"; import { PlayerAttribute } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { toJSON } from "@tests/helpers/object/object.helper"; function createContaminatedByRustySwordKnightPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CONTAMINATED, - source: ROLE_NAMES.RUSTY_SWORD_KNIGHT, + name: PlayerAttributeNames.CONTAMINATED, + source: RoleNames.RUSTY_SWORD_KNIGHT, remainingPhases: 2, ...playerAttribute, }); @@ -21,8 +21,8 @@ function createContaminatedByRustySwordKnightPlayerAttribute(playerAttribute: Pa function createGrowledByBearTamerPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.GROWLED, - source: ROLE_NAMES.BEAR_TAMER, + name: PlayerAttributeNames.GROWLED, + source: RoleNames.BEAR_TAMER, remainingPhases: 1, ...playerAttribute, }); @@ -30,28 +30,28 @@ function createGrowledByBearTamerPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CHARMED, - source: ROLE_NAMES.PIED_PIPER, + name: PlayerAttributeNames.CHARMED, + source: RoleNames.PIED_PIPER, ...playerAttribute, }); } function createCantVoteByAllPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, - source: PLAYER_GROUPS.ALL, + name: PlayerAttributeNames.CANT_VOTE, + source: PlayerGroups.ALL, ...playerAttribute, }); } function createCantVoteByScapegoatPlayerAttribute(game: Game, playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, - source: ROLE_NAMES.SCAPEGOAT, + name: PlayerAttributeNames.CANT_VOTE, + source: RoleNames.SCAPEGOAT, remainingPhases: 1, activeAt: { - turn: game.phase === GAME_PHASES.DAY ? game.turn + 1 : game.turn, - phase: GAME_PHASES.DAY, + turn: game.phase === GamePhases.DAY ? game.turn + 1 : game.turn, + phase: GamePhases.DAY, }, ...playerAttribute, }); @@ -59,8 +59,8 @@ function createCantVoteByScapegoatPlayerAttribute(game: Game, playerAttribute: P function createPowerlessByFoxPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.POWERLESS, - source: ROLE_NAMES.FOX, + name: PlayerAttributeNames.POWERLESS, + source: RoleNames.FOX, doesRemainAfterDeath: true, ...playerAttribute, }); @@ -68,8 +68,8 @@ function createPowerlessByFoxPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.POWERLESS, - source: ROLE_NAMES.ANCIENT, + name: PlayerAttributeNames.POWERLESS, + source: RoleNames.ANCIENT, doesRemainAfterDeath: true, ...playerAttribute, }); @@ -77,24 +77,24 @@ function createPowerlessByAncientPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.WORSHIPED, - source: ROLE_NAMES.WILD_CHILD, + name: PlayerAttributeNames.WORSHIPED, + source: RoleNames.WILD_CHILD, ...playerAttribute, }); } function createInLoveByCupidPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.IN_LOVE, - source: ROLE_NAMES.CUPID, + name: PlayerAttributeNames.IN_LOVE, + source: RoleNames.CUPID, ...playerAttribute, }); } function createRavenMarkByRavenPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.RAVEN_MARKED, - source: ROLE_NAMES.RAVEN, + name: PlayerAttributeNames.RAVEN_MARKED, + source: RoleNames.RAVEN, remainingPhases: 2, ...playerAttribute, }); @@ -102,8 +102,8 @@ function createRavenMarkByRavenPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.PROTECTED, - source: ROLE_NAMES.GUARD, + name: PlayerAttributeNames.PROTECTED, + source: RoleNames.GUARD, remainingPhases: 1, ...playerAttribute, }); @@ -111,8 +111,8 @@ function createProtectedByGuardPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.DRANK_DEATH_POTION, - source: ROLE_NAMES.WITCH, + name: PlayerAttributeNames.DRANK_DEATH_POTION, + source: RoleNames.WITCH, remainingPhases: 1, ...playerAttribute, }); @@ -120,8 +120,8 @@ function createDrankDeathPotionByWitchPlayerAttribute(playerAttribute: Partial

= {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.DRANK_LIFE_POTION, - source: ROLE_NAMES.WITCH, + name: PlayerAttributeNames.DRANK_LIFE_POTION, + source: RoleNames.WITCH, remainingPhases: 1, ...playerAttribute, }); @@ -129,8 +129,8 @@ function createDrankLifePotionByWitchPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: ROLE_NAMES.BIG_BAD_WOLF, + name: PlayerAttributeNames.EATEN, + source: RoleNames.BIG_BAD_WOLF, remainingPhases: 1, ...playerAttribute, }); @@ -138,8 +138,8 @@ function createEatenByBigBadWolfPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: ROLE_NAMES.WHITE_WEREWOLF, + name: PlayerAttributeNames.EATEN, + source: RoleNames.WHITE_WEREWOLF, remainingPhases: 1, ...playerAttribute, }); @@ -147,8 +147,8 @@ function createEatenByWhiteWerewolfPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: PLAYER_GROUPS.WEREWOLVES, + name: PlayerAttributeNames.EATEN, + source: PlayerGroups.WEREWOLVES, remainingPhases: 1, ...playerAttribute, }); @@ -156,8 +156,8 @@ function createEatenByWerewolvesPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SEEN, - source: ROLE_NAMES.SEER, + name: PlayerAttributeNames.SEEN, + source: RoleNames.SEER, remainingPhases: 1, ...playerAttribute, }); @@ -165,8 +165,8 @@ function createSeenBySeerPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, - source: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, + source: PlayerAttributeNames.SHERIFF, doesRemainAfterDeath: true, ...playerAttribute, }); @@ -174,15 +174,15 @@ function createSheriffBySheriffPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute { return createPlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, - source: PLAYER_GROUPS.ALL, + name: PlayerAttributeNames.SHERIFF, + source: PlayerGroups.ALL, doesRemainAfterDeath: true, ...playerAttribute, }); } function createPlayerAttribute(playerAttribute: PlayerAttribute): PlayerAttribute { - return plainToInstance(PlayerAttribute, toJSON(playerAttribute), plainToInstanceDefaultOptions); + return plainToInstance(PlayerAttribute, toJSON(playerAttribute), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { diff --git a/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts b/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts index 778a75e3d..ebb490cbf 100644 --- a/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts +++ b/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts @@ -1,5 +1,5 @@ -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import type { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import type { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import type { Game } from "@/modules/game/schemas/game.schema"; import type { PlayerAttribute } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; @@ -7,30 +7,30 @@ import type { GameSource } from "@/modules/game/types/game.type"; function isPlayerAttributeActive({ activeAt }: PlayerAttribute, game: Game): boolean { return activeAt === undefined || activeAt.turn < game.turn || - activeAt.turn === game.turn && (activeAt.phase === game.phase || game.phase === GAME_PHASES.DAY); + activeAt.turn === game.turn && (activeAt.phase === game.phase || game.phase === GamePhases.DAY); } -function getPlayerAttributeWithName({ attributes }: Player, attributeName: PLAYER_ATTRIBUTE_NAMES): PlayerAttribute | undefined { +function getPlayerAttributeWithName({ attributes }: Player, attributeName: PlayerAttributeNames): PlayerAttribute | undefined { return attributes.find(({ name }) => name === attributeName); } -function doesPlayerHaveAttributeWithName(player: Player, attributeName: PLAYER_ATTRIBUTE_NAMES): boolean { +function doesPlayerHaveAttributeWithName(player: Player, attributeName: PlayerAttributeNames): boolean { return !!getPlayerAttributeWithName(player, attributeName); } -function getActivePlayerAttributeWithName({ attributes }: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, game: Game): PlayerAttribute | undefined { +function getActivePlayerAttributeWithName({ attributes }: Player, attributeName: PlayerAttributeNames, game: Game): PlayerAttribute | undefined { return attributes.find(attribute => attribute.name === attributeName && isPlayerAttributeActive(attribute, game)); } -function doesPlayerHaveActiveAttributeWithName(player: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, game: Game): boolean { +function doesPlayerHaveActiveAttributeWithName(player: Player, attributeName: PlayerAttributeNames, game: Game): boolean { return !!getActivePlayerAttributeWithName(player, attributeName, game); } -function getPlayerAttributeWithNameAndSource({ attributes }: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, attributeSource: GameSource): PlayerAttribute | undefined { +function getPlayerAttributeWithNameAndSource({ attributes }: Player, attributeName: PlayerAttributeNames, attributeSource: GameSource): PlayerAttribute | undefined { return attributes.find(({ name, source }) => name === attributeName && source === attributeSource); } -function doesPlayerHaveAttributeWithNameAndSource(player: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, attributeSource: GameSource): boolean { +function doesPlayerHaveAttributeWithNameAndSource(player: Player, attributeName: PlayerAttributeNames, attributeSource: GameSource): boolean { return !!getPlayerAttributeWithNameAndSource(player, attributeName, attributeSource); } diff --git a/src/modules/game/helpers/player/player-death/player-death.factory.ts b/src/modules/game/helpers/player/player-death/player-death.factory.ts index 60775e88d..104cac4e7 100644 --- a/src/modules/game/helpers/player/player-death/player-death.factory.ts +++ b/src/modules/game/helpers/player/player-death/player-death.factory.ts @@ -1,101 +1,101 @@ import { plainToInstance } from "class-transformer"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { PlayerAttributeNames, PlayerDeathCauses, PlayerGroups } from "@/modules/game/enums/player.enum"; import { PlayerDeath } from "@/modules/game/schemas/player/player-death.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createPlayerDiseaseByRustySwordKnightDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.DISEASE, - source: ROLE_NAMES.RUSTY_SWORD_KNIGHT, + cause: PlayerDeathCauses.DISEASE, + source: RoleNames.RUSTY_SWORD_KNIGHT, ...playerDeath, }); } function createPlayerBrokenHeartByCupidDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.BROKEN_HEART, - source: ROLE_NAMES.CUPID, + cause: PlayerDeathCauses.BROKEN_HEART, + source: RoleNames.CUPID, ...playerDeath, }); } function createPlayerReconsiderPardonByAllDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.RECONSIDER_PARDON, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.RECONSIDER_PARDON, + source: PlayerGroups.ALL, ...playerDeath, }); } function createPlayerVoteScapegoatedByAllDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.VOTE_SCAPEGOATED, + source: PlayerGroups.ALL, ...playerDeath, }); } function createPlayerVoteBySheriffDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE, - source: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + cause: PlayerDeathCauses.VOTE, + source: PlayerAttributeNames.SHERIFF, ...playerDeath, }); } function createPlayerVoteByAllDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.VOTE, + source: PlayerGroups.ALL, ...playerDeath, }); } function createPlayerShotByHunterDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.SHOT, - source: ROLE_NAMES.HUNTER, + cause: PlayerDeathCauses.SHOT, + source: RoleNames.HUNTER, ...playerDeath, }); } function createPlayerEatenByWhiteWerewolfDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: ROLE_NAMES.WHITE_WEREWOLF, + cause: PlayerDeathCauses.EATEN, + source: RoleNames.WHITE_WEREWOLF, ...playerDeath, }); } function createPlayerEatenByBigBadWolfDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: ROLE_NAMES.BIG_BAD_WOLF, + cause: PlayerDeathCauses.EATEN, + source: RoleNames.BIG_BAD_WOLF, ...playerDeath, }); } function createPlayerEatenByWerewolvesDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: PLAYER_GROUPS.WEREWOLVES, + cause: PlayerDeathCauses.EATEN, + source: PlayerGroups.WEREWOLVES, ...playerDeath, }); } function createPlayerDeathPotionByWitchDeath(playerDeath: Partial = {}): PlayerDeath { return createPlayerDeath({ - cause: PLAYER_DEATH_CAUSES.DEATH_POTION, - source: ROLE_NAMES.WITCH, + cause: PlayerDeathCauses.DEATH_POTION, + source: RoleNames.WITCH, ...playerDeath, }); } function createPlayerDeath(playerDeath: PlayerDeath): PlayerDeath { - return plainToInstance(PlayerDeath, playerDeath, plainToInstanceDefaultOptions); + return plainToInstance(PlayerDeath, playerDeath, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { diff --git a/src/modules/game/helpers/player/player.factory.ts b/src/modules/game/helpers/player/player.factory.ts index 6e79a9b8f..67277277f 100644 --- a/src/modules/game/helpers/player/player.factory.ts +++ b/src/modules/game/helpers/player/player.factory.ts @@ -2,12 +2,12 @@ import { plainToInstance } from "class-transformer"; import { Player } from "@/modules/game/schemas/player/player.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { toJSON } from "@tests/helpers/object/object.helper"; function createPlayer(player: Player): Player { - return plainToInstance(Player, toJSON(player), { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true }); + return plainToInstance(Player, toJSON(player), { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true }); } export { createPlayer }; \ No newline at end of file diff --git a/src/modules/game/helpers/player/player.helper.ts b/src/modules/game/helpers/player/player.helper.ts index e66dec3ec..533549663 100644 --- a/src/modules/game/helpers/player/player.helper.ts +++ b/src/modules/game/helpers/player/player.helper.ts @@ -1,16 +1,16 @@ -import { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { doesPlayerHaveActiveAttributeWithName } from "@/modules/game/helpers/player/player-attribute/player-attribute.helper"; import type { Game } from "@/modules/game/schemas/game.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; function canPiedPiperCharm(piedPiperPlayer: Player, game: Game): boolean { const { isPowerlessIfInfected } = game.options.roles.piedPiper; - return isPlayerAliveAndPowerful(piedPiperPlayer, game) && (!isPowerlessIfInfected || piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS); + return isPlayerAliveAndPowerful(piedPiperPlayer, game) && (!isPowerlessIfInfected || piedPiperPlayer.side.current === RoleSides.VILLAGERS); } function isPlayerPowerful(player: Player, game: Game): boolean { - return !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, game); + return !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.POWERLESS, game); } function isPlayerAliveAndPowerful(player: Player, game: Game): boolean { @@ -18,11 +18,11 @@ function isPlayerAliveAndPowerful(player: Player, game: Game): boolean { } function isPlayerOnWerewolvesSide(player: Player): boolean { - return player.side.current === ROLE_SIDES.WEREWOLVES; + return player.side.current === RoleSides.WEREWOLVES; } function isPlayerOnVillagersSide(player: Player): boolean { - return player.side.current === ROLE_SIDES.VILLAGERS; + return player.side.current === RoleSides.VILLAGERS; } export { diff --git a/src/modules/game/providers/repositories/game-history-record.repository.ts b/src/modules/game/providers/repositories/game-history-record.repository.ts index df916df4c..767bc0e4f 100644 --- a/src/modules/game/providers/repositories/game-history-record.repository.ts +++ b/src/modules/game/providers/repositories/game-history-record.repository.ts @@ -3,13 +3,12 @@ import { InjectModel } from "@nestjs/mongoose"; import { Model } from "mongoose"; import type { FilterQuery, Types } from "mongoose"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; -import { GAME_PLAY_ACTIONS, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import type { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import type { GameHistoryRecordDocument } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; +import { GamePlayActions, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import type { GamePhases } from "@/modules/game/enums/game.enum"; import { GameHistoryRecord } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; -import type { GameHistoryRecordToInsert } from "@/modules/game/types/game-history-record.type"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import type { GameHistoryRecordDocument, GameHistoryRecordToInsert } from "@/modules/game/types/game-history-record.type"; +import { RoleNames } from "@/modules/role/enums/role.enum"; @Injectable() export class GameHistoryRecordRepository { @@ -26,26 +25,26 @@ export class GameHistoryRecordRepository { public async getLastGameHistoryGuardProtectsRecord(gameId: Types.ObjectId): Promise { const filter: FilterQuery = { gameId, - "play.action": GAME_PLAY_ACTIONS.PROTECT, - "play.source.name": ROLE_NAMES.GUARD, + "play.action": GamePlayActions.PROTECT, + "play.source.name": RoleNames.GUARD, }; return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } }); } - public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GAME_PLAY_ACTIONS): Promise { + public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GamePlayActions): Promise { const filter: FilterQuery = { gameId, "play.action": action, - "play.voting.result": GAME_HISTORY_RECORD_VOTING_RESULTS.TIE, + "play.voting.result": GameHistoryRecordVotingResults.TIE, }; return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } }); } - public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WITCH_POTIONS): Promise { + public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WitchPotions): Promise { const filter: FilterQuery = { gameId, - "play.source.name": ROLE_NAMES.WITCH, - "play.action": GAME_PLAY_ACTIONS.USE_POTIONS, + "play.source.name": RoleNames.WITCH, + "play.action": GamePlayActions.USE_POTIONS, "play.targets.drankPotion": potion, }; return this.gameHistoryRecordModel.find(filter); @@ -54,7 +53,7 @@ export class GameHistoryRecordRepository { public async getGameHistoryVileFatherOfWolvesInfectedRecords(gameId: Types.ObjectId): Promise { const filter: FilterQuery = { gameId, - "play.action": GAME_PLAY_ACTIONS.EAT, + "play.action": GamePlayActions.EAT, "play.targets.isInfected": true, }; return this.gameHistoryRecordModel.find(filter); @@ -71,8 +70,8 @@ export class GameHistoryRecordRepository { public async getGameHistoryWerewolvesEatAncientRecords(gameId: Types.ObjectId): Promise { const filter: FilterQuery = { gameId, - "play.action": GAME_PLAY_ACTIONS.EAT, - "play.targets.player.role.current": ROLE_NAMES.ANCIENT, + "play.action": GamePlayActions.EAT, + "play.targets.player.role.current": RoleNames.ANCIENT, }; return this.gameHistoryRecordModel.find(filter); } @@ -82,17 +81,17 @@ export class GameHistoryRecordRepository { gameId, $or: [ { - "play.source.name": ROLE_NAMES.GUARD, - "play.action": GAME_PLAY_ACTIONS.PROTECT, - "play.targets.player.role.current": ROLE_NAMES.ANCIENT, + "play.source.name": RoleNames.GUARD, + "play.action": GamePlayActions.PROTECT, + "play.targets.player.role.current": RoleNames.ANCIENT, }, { - "play.source.name": ROLE_NAMES.WITCH, - "play.action": GAME_PLAY_ACTIONS.USE_POTIONS, + "play.source.name": RoleNames.WITCH, + "play.action": GamePlayActions.USE_POTIONS, "play.targets": { $elemMatch: { - "player.role.current": ROLE_NAMES.ANCIENT, - "drankPotion": WITCH_POTIONS.LIFE, + "player.role.current": RoleNames.ANCIENT, + "drankPotion": WitchPotions.LIFE, }, }, }, @@ -106,7 +105,7 @@ export class GameHistoryRecordRepository { return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } }); } - public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GAME_PHASES): Promise { + public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GamePhases): Promise { return this.gameHistoryRecordModel.find({ gameId, turn, phase }); } } \ No newline at end of file diff --git a/src/modules/game/providers/repositories/game.repository.ts b/src/modules/game/providers/repositories/game.repository.ts index 77990e4dd..be691a2b9 100644 --- a/src/modules/game/providers/repositories/game.repository.ts +++ b/src/modules/game/providers/repositories/game.repository.ts @@ -3,8 +3,8 @@ import { InjectModel } from "@nestjs/mongoose"; import { Model } from "mongoose"; import type { FilterQuery, QueryOptions } from "mongoose"; +import type { GameDocument } from "@/modules/game/types/game.type"; import type { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; -import type { GameDocument } from "@/modules/game/schemas/game.schema"; import { Game } from "@/modules/game/schemas/game.schema"; @Injectable() diff --git a/src/modules/game/providers/services/game-history/game-history-record.service.ts b/src/modules/game/providers/services/game-history/game-history-record.service.ts index 7586fd2ec..c9ba14431 100644 --- a/src/modules/game/providers/services/game-history/game-history-record.service.ts +++ b/src/modules/game/providers/services/game-history/game-history-record.service.ts @@ -3,11 +3,11 @@ import { plainToInstance } from "class-transformer"; import type { Types } from "mongoose"; import type { MakeGamePlayWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-with-relations.dto"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; -import type { WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from "@/modules/game/enums/game-play.enum"; -import type { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES } from "@/modules/game/enums/player.enum"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; +import type { WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { GamePlayActions, GamePlayCauses } from "@/modules/game/enums/game-play.enum"; +import type { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames, PlayerDeathCauses } from "@/modules/game/enums/player.enum"; import { getAdditionalCardWithId, getNonexistentPlayer, getPlayerWithActiveAttributeName, getPlayerWithId } from "@/modules/game/helpers/game.helper"; import { GameHistoryRecordRepository } from "@/modules/game/providers/repositories/game-history-record.repository"; import { GameRepository } from "@/modules/game/providers/repositories/game.repository"; @@ -21,11 +21,11 @@ import type { Player } from "@/modules/game/schemas/player/player.schema"; import { GameHistoryRecordToInsert } from "@/modules/game/types/game-history-record.type"; import type { GameWithCurrentPlay } from "@/modules/game/types/game-with-current-play"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import { RESOURCE_NOT_FOUND_REASONS } from "@/shared/exception/enums/resource-not-found-error.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; +import { ResourceNotFoundReasons } from "@/shared/exception/enums/resource-not-found-error.enum"; import { createNoCurrentGamePlayUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { toJSON } from "@tests/helpers/object/object.helper"; @@ -46,11 +46,11 @@ export class GameHistoryRecordService { return this.gameHistoryRecordRepository.getLastGameHistoryGuardProtectsRecord(gameId); } - public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GAME_PLAY_ACTIONS): Promise { + public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GamePlayActions): Promise { return this.gameHistoryRecordRepository.getLastGameHistoryTieInVotesRecord(gameId, action); } - public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WITCH_POTIONS): Promise { + public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WitchPotions): Promise { return this.gameHistoryRecordRepository.getGameHistoryWitchUsesSpecificPotionRecords(gameId, potion); } @@ -70,7 +70,7 @@ export class GameHistoryRecordService { return this.gameHistoryRecordRepository.getGameHistoryAncientProtectedFromWerewolvesRecords(gameId); } - public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GAME_PHASES): Promise { + public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GamePhases): Promise { return this.gameHistoryRecordRepository.getGameHistoryPhaseRecords(gameId, turn, phase); } @@ -94,7 +94,7 @@ export class GameHistoryRecordService { if (gameHistoryRecordToInsert.play.votes) { gameHistoryRecordToInsert.play.voting = this.generateCurrentGameHistoryRecordPlayVotingToInsert(baseGame as GameWithCurrentPlay, newGame, gameHistoryRecordToInsert); } - return plainToInstance(GameHistoryRecordToInsert, gameHistoryRecordToInsert, plainToInstanceDefaultOptions); + return plainToInstance(GameHistoryRecordToInsert, gameHistoryRecordToInsert, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } public async getGameHistory(gameId: Types.ObjectId): Promise { @@ -130,32 +130,32 @@ export class GameHistoryRecordService { chosenCard: play.chosenCard, chosenSide: play.chosenSide, }; - return plainToInstance(GameHistoryRecordPlay, toJSON(gameHistoryRecordPlayToInsert), plainToInstanceDefaultOptions); + return plainToInstance(GameHistoryRecordPlay, toJSON(gameHistoryRecordPlayToInsert), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } private generateCurrentGameHistoryRecordPlayVotingResultToInsert( baseGame: GameWithCurrentPlay, newGame: Game, gameHistoryRecordToInsert: GameHistoryRecordToInsert, - ): GAME_HISTORY_RECORD_VOTING_RESULTS { - const sheriffPlayer = getPlayerWithActiveAttributeName(newGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF); + ): GameHistoryRecordVotingResults { + const sheriffPlayer = getPlayerWithActiveAttributeName(newGame, PlayerAttributeNames.SHERIFF); const areSomePlayersDeadFromCurrentVotes = gameHistoryRecordToInsert.deadPlayers?.some(({ death }) => { - const deathFromVoteCauses = [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED]; + const deathFromVoteCauses = [PlayerDeathCauses.VOTE, PlayerDeathCauses.VOTE_SCAPEGOATED]; return death?.cause !== undefined && deathFromVoteCauses.includes(death.cause); }) === true; - if (baseGame.currentPlay.action === GAME_PLAY_ACTIONS.ELECT_SHERIFF) { - return sheriffPlayer ? GAME_HISTORY_RECORD_VOTING_RESULTS.SHERIFF_ELECTION : GAME_HISTORY_RECORD_VOTING_RESULTS.TIE; + if (baseGame.currentPlay.action === GamePlayActions.ELECT_SHERIFF) { + return sheriffPlayer ? GameHistoryRecordVotingResults.SHERIFF_ELECTION : GameHistoryRecordVotingResults.TIE; } if (!gameHistoryRecordToInsert.play.votes || gameHistoryRecordToInsert.play.votes.length === 0) { - return GAME_HISTORY_RECORD_VOTING_RESULTS.SKIPPED; + return GameHistoryRecordVotingResults.SKIPPED; } if (areSomePlayersDeadFromCurrentVotes) { - return GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH; + return GameHistoryRecordVotingResults.DEATH; } - if (baseGame.currentPlay.cause === GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) { - return GAME_HISTORY_RECORD_VOTING_RESULTS.INCONSEQUENTIAL; + if (baseGame.currentPlay.cause === GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) { + return GameHistoryRecordVotingResults.INCONSEQUENTIAL; } - return GAME_HISTORY_RECORD_VOTING_RESULTS.TIE; + return GameHistoryRecordVotingResults.TIE; } private generateCurrentGameHistoryRecordPlayVotingToInsert( @@ -169,32 +169,32 @@ export class GameHistoryRecordService { result: this.generateCurrentGameHistoryRecordPlayVotingResultToInsert(baseGame, newGame, gameHistoryRecordToInsert), nominatedPlayers, }; - return plainToInstance(GameHistoryRecordPlayVoting, gameHistoryRecordPlayVoting, plainToInstanceDefaultOptions); + return plainToInstance(GameHistoryRecordPlayVoting, gameHistoryRecordPlayVoting, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } private generateCurrentGameHistoryRecordPlaySourceToInsert(baseGame: GameWithCurrentPlay): GameHistoryRecordPlaySource { - return plainToInstance(GameHistoryRecordPlaySource, toJSON(baseGame.currentPlay.source), plainToInstanceDefaultOptions); + return plainToInstance(GameHistoryRecordPlaySource, toJSON(baseGame.currentPlay.source), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } private validateGameHistoryRecordToInsertPlayData(play: GameHistoryRecordPlay, game: Game): void { const unmatchedSource = getNonexistentPlayer(game, play.source.players); if (unmatchedSource) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedSource._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_SOURCE); + throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedSource._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_SOURCE); } const unmatchedTarget = getNonexistentPlayer(game, play.targets?.map(target => target.player)); if (unmatchedTarget) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedTarget._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_TARGET); + throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedTarget._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_TARGET); } const unmatchedVoter = getNonexistentPlayer(game, play.votes?.map(vote => vote.source)); if (unmatchedVoter) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedVoter._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE); + throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedVoter._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE); } const unmatchedVoteTarget = getNonexistentPlayer(game, play.votes?.map(vote => vote.target)); if (unmatchedVoteTarget) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedVoteTarget._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET); + throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedVoteTarget._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET); } if (play.chosenCard && !getAdditionalCardWithId(game.additionalCards, play.chosenCard._id)) { - throw new ResourceNotFoundException(API_RESOURCES.GAME_ADDITIONAL_CARDS, play.chosenCard._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_CHOSEN_CARD); + throw new ResourceNotFoundException(ApiResources.GAME_ADDITIONAL_CARDS, play.chosenCard._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_CHOSEN_CARD); } } @@ -202,15 +202,15 @@ export class GameHistoryRecordService { const { gameId, play, revealedPlayers, deadPlayers } = gameHistoryRecordToInsert; const game = await this.gameRepository.findOne({ _id: gameId }); if (game === null) { - throw new ResourceNotFoundException(API_RESOURCES.GAMES, gameId.toString(), RESOURCE_NOT_FOUND_REASONS.UNKNOWN_GAME_PLAY_GAME_ID); + throw new ResourceNotFoundException(ApiResources.GAMES, gameId.toString(), ResourceNotFoundReasons.UNKNOWN_GAME_PLAY_GAME_ID); } const unmatchedRevealedPlayer = getNonexistentPlayer(game, revealedPlayers); if (unmatchedRevealedPlayer) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedRevealedPlayer._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_REVEALED_PLAYER); + throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedRevealedPlayer._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_REVEALED_PLAYER); } const unmatchedDeadPlayer = getNonexistentPlayer(game, deadPlayers); if (unmatchedDeadPlayer) { - throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedDeadPlayer._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_DEAD_PLAYER); + throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedDeadPlayer._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_DEAD_PLAYER); } this.validateGameHistoryRecordToInsertPlayData(play, game); } diff --git a/src/modules/game/providers/services/game-phase/game-phase.service.ts b/src/modules/game/providers/services/game-phase/game-phase.service.ts index 22498a8eb..eeaea71e8 100644 --- a/src/modules/game/providers/services/game-phase/game-phase.service.ts +++ b/src/modules/game/providers/services/game-phase/game-phase.service.ts @@ -1,7 +1,7 @@ import { Injectable } from "@nestjs/common"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { createGame } from "@/modules/game/helpers/game.factory"; import { doesPlayerHaveActiveAttributeWithName, getActivePlayerAttributeWithName } from "@/modules/game/helpers/player/player-attribute/player-attribute.helper"; import { createPlayer } from "@/modules/game/helpers/player/player.factory"; @@ -27,13 +27,13 @@ export class GamePhaseService { public async switchPhaseAndAppendGamePhaseUpcomingPlays(game: Game): Promise { const clonedGame = createGame(game); - clonedGame.phase = clonedGame.phase === GAME_PHASES.NIGHT ? GAME_PHASES.DAY : GAME_PHASES.NIGHT; - if (clonedGame.phase === GAME_PHASES.NIGHT) { + clonedGame.phase = clonedGame.phase === GamePhases.NIGHT ? GamePhases.DAY : GamePhases.NIGHT; + if (clonedGame.phase === GamePhases.NIGHT) { clonedGame.turn++; } const upcomingNightPlays = await this.gamePlayService.getUpcomingNightPlays(clonedGame); const upcomingDayPlays = this.gamePlayService.getUpcomingDayPlays(); - const phaseUpcomingPlays = clonedGame.phase === GAME_PHASES.NIGHT ? upcomingNightPlays : upcomingDayPlays; + const phaseUpcomingPlays = clonedGame.phase === GamePhases.NIGHT ? upcomingNightPlays : upcomingDayPlays; clonedGame.upcomingPlays = [...clonedGame.upcomingPlays, ...phaseUpcomingPlays]; return clonedGame; } @@ -41,7 +41,7 @@ export class GamePhaseService { private async applyEndingDayPlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise { let clonedGame = createGame(game); const clonedPlayer = createPlayer(player); - if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PLAYER_ATTRIBUTE_NAMES.CONTAMINATED, clonedGame)) { + if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PlayerAttributeNames.CONTAMINATED, clonedGame)) { clonedGame = await this.playerAttributeService.applyContaminatedAttributeOutcomes(clonedPlayer, clonedGame); } return clonedGame; @@ -50,11 +50,11 @@ export class GamePhaseService { private async applyEndingNightPlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise { let clonedGame = createGame(game); const clonedPlayer = createPlayer(player); - const eatenAttribute = getActivePlayerAttributeWithName(clonedPlayer, PLAYER_ATTRIBUTE_NAMES.EATEN, clonedGame); + const eatenAttribute = getActivePlayerAttributeWithName(clonedPlayer, PlayerAttributeNames.EATEN, clonedGame); if (eatenAttribute) { clonedGame = await this.playerAttributeService.applyEatenAttributeOutcomes(clonedPlayer, clonedGame, eatenAttribute); } - if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PLAYER_ATTRIBUTE_NAMES.DRANK_DEATH_POTION, clonedGame)) { + if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PlayerAttributeNames.DRANK_DEATH_POTION, clonedGame)) { clonedGame = await this.playerAttributeService.applyDrankDeathPotionAttributeOutcomes(clonedPlayer, clonedGame); } return clonedGame; @@ -63,7 +63,7 @@ export class GamePhaseService { private async applyEndingGamePhasePlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise { const clonedGame = createGame(game); const clonedPlayer = createPlayer(player); - if (clonedGame.phase === GAME_PHASES.NIGHT) { + if (clonedGame.phase === GamePhases.NIGHT) { return this.applyEndingNightPlayerAttributesOutcomesToPlayer(clonedPlayer, clonedGame); } return this.applyEndingDayPlayerAttributesOutcomesToPlayer(clonedPlayer, clonedGame); diff --git a/src/modules/game/providers/services/game-play/game-play-maker.service.ts b/src/modules/game/providers/services/game-play/game-play-maker.service.ts index ca7a2c552..cba0c039c 100644 --- a/src/modules/game/providers/services/game-play/game-play-maker.service.ts +++ b/src/modules/game/providers/services/game-play/game-play-maker.service.ts @@ -2,8 +2,8 @@ import { Injectable } from "@nestjs/common"; import { sample } from "lodash"; import type { MakeGamePlayWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-with-relations.dto"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions, GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerDeathCauses, PlayerGroups } from "@/modules/game/enums/player.enum"; import { createGamePlayAllVote, createGamePlaySheriffSettlesVotes } from "@/modules/game/helpers/game-play/game-play.factory"; import { createGame } from "@/modules/game/helpers/game.factory"; import { getFoxSniffedPlayers, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole } from "@/modules/game/helpers/game.helper"; @@ -19,8 +19,8 @@ import type { PlayerSide } from "@/modules/game/schemas/player/player-side.schem import type { Player } from "@/modules/game/schemas/player/player.schema"; import type { GameWithCurrentPlay } from "@/modules/game/types/game-with-current-play"; import type { GameSource } from "@/modules/game/types/game.type"; -import { roles } from "@/modules/role/constants/role.constant"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { createNoCurrentGamePlayUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; @@ -29,23 +29,23 @@ import { createFakeGamePlayAllElectSheriff } from "@tests/factories/game/schemas @Injectable() export class GamePlayMakerService { private readonly gameSourcePlayMethods: Partial Game | Promise>> = { - [PLAYER_GROUPS.WEREWOLVES]: async(play, game) => this.werewolvesEat(play, game), - [ROLE_NAMES.BIG_BAD_WOLF]: (play, game) => this.bigBadWolfEats(play, game), - [ROLE_NAMES.WHITE_WEREWOLF]: (play, game) => this.whiteWerewolfEats(play, game), - [ROLE_NAMES.SEER]: (play, game) => this.seerLooks(play, game), - [ROLE_NAMES.CUPID]: (play, game) => this.cupidCharms(play, game), - [ROLE_NAMES.PIED_PIPER]: (play, game) => this.piedPiperCharms(play, game), - [ROLE_NAMES.WITCH]: (play, game) => this.witchUsesPotions(play, game), - [ROLE_NAMES.HUNTER]: async(play, game) => this.hunterShoots(play, game), - [ROLE_NAMES.GUARD]: (play, game) => this.guardProtects(play, game), - [ROLE_NAMES.FOX]: (play, game) => this.foxSniffs(play, game), - [ROLE_NAMES.WILD_CHILD]: (play, game) => this.wildChildChoosesModel(play, game), - [ROLE_NAMES.DOG_WOLF]: (play, game) => this.dogWolfChoosesSide(play, game), - [ROLE_NAMES.SCAPEGOAT]: (play, game) => this.scapegoatBansVoting(play, game), - [ROLE_NAMES.THIEF]: (play, game) => this.thiefChoosesCard(play, game), - [PLAYER_GROUPS.ALL]: async(play, game) => this.allPlay(play, game), - [ROLE_NAMES.RAVEN]: (play, game) => this.ravenMarks(play, game), - [PLAYER_ATTRIBUTE_NAMES.SHERIFF]: async(play, game) => this.sheriffPlays(play, game), + [PlayerGroups.WEREWOLVES]: async(play, game) => this.werewolvesEat(play, game), + [RoleNames.BIG_BAD_WOLF]: (play, game) => this.bigBadWolfEats(play, game), + [RoleNames.WHITE_WEREWOLF]: (play, game) => this.whiteWerewolfEats(play, game), + [RoleNames.SEER]: (play, game) => this.seerLooks(play, game), + [RoleNames.CUPID]: (play, game) => this.cupidCharms(play, game), + [RoleNames.PIED_PIPER]: (play, game) => this.piedPiperCharms(play, game), + [RoleNames.WITCH]: (play, game) => this.witchUsesPotions(play, game), + [RoleNames.HUNTER]: async(play, game) => this.hunterShoots(play, game), + [RoleNames.GUARD]: (play, game) => this.guardProtects(play, game), + [RoleNames.FOX]: (play, game) => this.foxSniffs(play, game), + [RoleNames.WILD_CHILD]: (play, game) => this.wildChildChoosesModel(play, game), + [RoleNames.DOG_WOLF]: (play, game) => this.dogWolfChoosesSide(play, game), + [RoleNames.SCAPEGOAT]: (play, game) => this.scapegoatBansVoting(play, game), + [RoleNames.THIEF]: (play, game) => this.thiefChoosesCard(play, game), + [PlayerGroups.ALL]: async(play, game) => this.allPlay(play, game), + [RoleNames.RAVEN]: (play, game) => this.ravenMarks(play, game), + [PlayerAttributeNames.SHERIFF]: async(play, game) => this.sheriffPlays(play, game), }; public constructor( @@ -83,9 +83,9 @@ export class GamePlayMakerService { return clonedGame; } const targetedPlayer = targets[0].player; - const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF); + const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PlayerAttributeNames.SHERIFF); if (sheriffPlayer) { - clonedGame = removePlayerAttributeByNameInGame(sheriffPlayer._id, clonedGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF) as GameWithCurrentPlay; + clonedGame = removePlayerAttributeByNameInGame(sheriffPlayer._id, clonedGame, PlayerAttributeNames.SHERIFF) as GameWithCurrentPlay; } const sheriffBySheriffPlayerAttribute = createSheriffBySheriffPlayerAttribute(); return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, sheriffBySheriffPlayerAttribute); @@ -93,9 +93,9 @@ export class GamePlayMakerService { private async sheriffPlays(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise { const clonedGame = createGame(game) as GameWithCurrentPlay; - const sheriffPlayMethods: Partial Game | Promise>> = { - [GAME_PLAY_ACTIONS.DELEGATE]: () => this.sheriffDelegates(play, clonedGame), - [GAME_PLAY_ACTIONS.SETTLE_VOTES]: async() => this.sheriffSettlesVotes(play, clonedGame), + const sheriffPlayMethods: Partial Game | Promise>> = { + [GamePlayActions.DELEGATE]: () => this.sheriffDelegates(play, clonedGame), + [GamePlayActions.SETTLE_VOTES]: async() => this.sheriffSettlesVotes(play, clonedGame), }; const sheriffPlayMethod = sheriffPlayMethods[clonedGame.currentPlay.action]; if (sheriffPlayMethod === undefined) { @@ -106,18 +106,18 @@ export class GamePlayMakerService { private async handleTieInVotes(game: GameWithCurrentPlay): Promise { const clonedGame = createGame(game) as GameWithCurrentPlay; - const scapegoatPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.SCAPEGOAT); + const scapegoatPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.SCAPEGOAT); if (scapegoatPlayer && isPlayerAliveAndPowerful(scapegoatPlayer, game)) { const playerVoteScapegoatedByAllDeath = createPlayerVoteScapegoatedByAllDeath(); return this.playerKillerService.killOrRevealPlayer(scapegoatPlayer._id, clonedGame, playerVoteScapegoatedByAllDeath); } - const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF); + const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PlayerAttributeNames.SHERIFF); if (sheriffPlayer?.isAlive === true) { const gamePlaySheriffSettlesVotes = createGamePlaySheriffSettlesVotes(); return prependUpcomingPlayInGame(gamePlaySheriffSettlesVotes, clonedGame); } - if (clonedGame.currentPlay.cause !== GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) { - const gamePlayAllVote = createGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + if (clonedGame.currentPlay.cause !== GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) { + const gamePlayAllVote = createGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); return prependUpcomingPlayInGame(gamePlayAllVote, clonedGame); } return clonedGame; @@ -130,7 +130,7 @@ export class GamePlayMakerService { } const nominatedPlayers = this.gamePlayVoteService.getNominatedPlayers(votes, clonedGame); if (doesJudgeRequestAnotherVote === true) { - const gamePlayAllVote = createGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }); + const gamePlayAllVote = createGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }); clonedGame = appendUpcomingPlayInGame(gamePlayAllVote, clonedGame) as GameWithCurrentPlay; } if (nominatedPlayers.length > 1) { @@ -145,8 +145,8 @@ export class GamePlayMakerService { private handleTieInSheriffElection(nominatedPlayers: Player[], game: GameWithCurrentPlay): Game { const clonedGame = createGame(game) as GameWithCurrentPlay; - if (clonedGame.currentPlay.cause !== GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) { - const gamePlayAllElectSheriff = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + if (clonedGame.currentPlay.cause !== GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) { + const gamePlayAllElectSheriff = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); return prependUpcomingPlayInGame(gamePlayAllElectSheriff, clonedGame); } const randomNominatedPlayer = sample(nominatedPlayers); @@ -176,9 +176,9 @@ export class GamePlayMakerService { private async allPlay(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise { const clonedGame = createGame(game) as GameWithCurrentPlay; - const allPlayMethods: Partial Game | Promise>> = { - [GAME_PLAY_ACTIONS.ELECT_SHERIFF]: () => this.allElectSheriff(play, clonedGame), - [GAME_PLAY_ACTIONS.VOTE]: async() => this.allVote(play, clonedGame), + const allPlayMethods: Partial Game | Promise>> = { + [GamePlayActions.ELECT_SHERIFF]: () => this.allElectSheriff(play, clonedGame), + [GamePlayActions.VOTE]: async() => this.allVote(play, clonedGame), }; const allPlayMethod = allPlayMethods[clonedGame.currentPlay.action]; if (allPlayMethod === undefined) { @@ -189,11 +189,11 @@ export class GamePlayMakerService { private thiefChoosesCard({ chosenCard }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game { const clonedGame = createGame(game); - const thiefPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.THIEF); + const thiefPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.THIEF); if (!thiefPlayer || !chosenCard) { return clonedGame; } - const chosenRole = roles.find(role => role.name === chosenCard.roleName); + const chosenRole = ROLES.find(role => role.name === chosenCard.roleName); if (!chosenRole) { return clonedGame; } @@ -214,7 +214,7 @@ export class GamePlayMakerService { private dogWolfChoosesSide({ chosenSide }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game { const clonedGame = createGame(game); - const dogWolfPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.DOG_WOLF); + const dogWolfPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.DOG_WOLF); if (chosenSide === undefined || !dogWolfPlayer) { return clonedGame; } @@ -236,14 +236,14 @@ export class GamePlayMakerService { private foxSniffs({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game { const clonedGame = createGame(game); const expectedTargetCount = 1; - const foxPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.FOX); + const foxPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.FOX); const { isPowerlessIfMissesWerewolf: isFoxPowerlessIfMissesWerewolf } = clonedGame.options.roles.fox; if (targets?.length !== expectedTargetCount || !foxPlayer) { return clonedGame; } const { player: targetedPlayer } = targets[0]; const foxSniffedPlayers = getFoxSniffedPlayers(targetedPlayer._id, clonedGame); - const areEveryFoxSniffedPlayersVillagerSided = foxSniffedPlayers.every(player => player.side.current === ROLE_SIDES.VILLAGERS); + const areEveryFoxSniffedPlayersVillagerSided = foxSniffedPlayers.every(player => player.side.current === RoleSides.VILLAGERS); if (isFoxPowerlessIfMissesWerewolf && areEveryFoxSniffedPlayersVillagerSided) { const powerlessByFoxPlayerAttribute = createPowerlessByFoxPlayerAttribute(); return addPlayerAttributeInGame(foxPlayer._id, clonedGame, powerlessByFoxPlayerAttribute); @@ -293,7 +293,7 @@ export class GamePlayMakerService { const deathPotionAttribute = createDrankDeathPotionByWitchPlayerAttribute(); for (const target of targets) { const { player: targetedPlayer } = target; - const drankPotionAttribute = target.drankPotion === WITCH_POTIONS.LIFE ? lifePotionAttribute : deathPotionAttribute; + const drankPotionAttribute = target.drankPotion === WitchPotions.LIFE ? lifePotionAttribute : deathPotionAttribute; clonedGame = addPlayerAttributeInGame(targetedPlayer._id, clonedGame, drankPotionAttribute) as GameWithCurrentPlay; } return clonedGame; @@ -359,9 +359,9 @@ export class GamePlayMakerService { } const { player: targetedPlayer, isInfected: isTargetInfected } = targets[0]; const eatenByWerewolvesPlayerAttribute = createEatenByWerewolvesPlayerAttribute(); - const isAncientKillable = await this.playerKillerService.isAncientKillable(clonedGame, PLAYER_DEATH_CAUSES.EATEN); - if (isTargetInfected === true && (targetedPlayer.role.current !== ROLE_NAMES.ANCIENT || isAncientKillable)) { - const playerDataToUpdate: Partial = { side: { ...targetedPlayer.side, current: ROLE_SIDES.WEREWOLVES } }; + const isAncientKillable = await this.playerKillerService.isAncientKillable(clonedGame, PlayerDeathCauses.EATEN); + if (isTargetInfected === true && (targetedPlayer.role.current !== RoleNames.ANCIENT || isAncientKillable)) { + const playerDataToUpdate: Partial = { side: { ...targetedPlayer.side, current: RoleSides.WEREWOLVES } }; return updatePlayerInGame(targetedPlayer._id, playerDataToUpdate, clonedGame); } return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, eatenByWerewolvesPlayerAttribute); diff --git a/src/modules/game/providers/services/game-play/game-play-validator.service.ts b/src/modules/game/providers/services/game-play/game-play-validator.service.ts index 1c798ce79..8deced123 100644 --- a/src/modules/game/providers/services/game-play/game-play-validator.service.ts +++ b/src/modules/game/providers/services/game-play/game-play-validator.service.ts @@ -1,11 +1,11 @@ import { Injectable } from "@nestjs/common"; -import { optionalTargetsActions, requiredTargetsActions, requiredVotesActions, stutteringJudgeRequestOpportunityActions } from "@/modules/game/constants/game-play/game-play.constant"; +import { OPTIONAL_TARGET_ACTIONS, REQUIRED_TARGET_ACTIONS, REQUIRED_VOTE_ACTIONS, STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS } from "@/modules/game/constants/game-play/game-play.constant"; import type { MakeGamePlayTargetWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto"; import type { MakeGamePlayVoteWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto"; import type { MakeGamePlayWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-with-relations.dto"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions, GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { createGame } from "@/modules/game/helpers/game.factory"; import { getLeftToCharmByPiedPiperPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getPlayerWithCurrentRole } from "@/modules/game/helpers/game.helper"; import { doesPlayerHaveActiveAttributeWithName } from "@/modules/game/helpers/player/player-attribute/player-attribute.helper"; @@ -15,10 +15,10 @@ import type { GameAdditionalCard } from "@/modules/game/schemas/game-additional- import type { Game } from "@/modules/game/schemas/game.schema"; import type { GameWithCurrentPlay } from "@/modules/game/types/game-with-current-play"; import type { GameSource } from "@/modules/game/types/game.type"; -import { werewolvesRoles } from "@/modules/role/constants/role.constant"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { WEREWOLF_ROLES } from "@/modules/role/constants/role.constant"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { BAD_GAME_PLAY_PAYLOAD_REASONS } from "@/shared/exception/enums/bad-game-play-payload-error.enum"; +import { BadGamePlayPayloadReasons } from "@/shared/exception/enums/bad-game-play-payload-error.enum"; import { createNoCurrentGamePlayUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; import { BadGamePlayPayloadException } from "@/shared/exception/types/bad-game-play-payload-exception.type"; @@ -44,16 +44,16 @@ export class GamePlayValidatorService { if (!game.additionalCards || !mustChooseBetweenWerewolves) { return; } - const areAllAdditionalCardsWerewolves = game.additionalCards.every(({ roleName }) => werewolvesRoles.find(role => role.name === roleName)); + const areAllAdditionalCardsWerewolves = game.additionalCards.every(({ roleName }) => WEREWOLF_ROLES.find(role => role.name === roleName)); if (areAllAdditionalCardsWerewolves && !chosenCard) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.THIEF_MUST_CHOOSE_CARD); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.THIEF_MUST_CHOOSE_CARD); } } private validateGamePlayWithRelationsDtoChosenCard({ chosenCard }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): void { - if (game.currentPlay.action !== GAME_PLAY_ACTIONS.CHOOSE_CARD) { + if (game.currentPlay.action !== GamePlayActions.CHOOSE_CARD) { if (chosenCard) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_CHOSEN_CARD); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_CHOSEN_CARD); } return; } @@ -62,30 +62,30 @@ export class GamePlayValidatorService { private validateDrankLifePotionTargets(drankLifePotionTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void { if (drankLifePotionTargets.length > 1) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_DRANK_LIFE_POTION_TARGETS); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_DRANK_LIFE_POTION_TARGETS); } if (drankLifePotionTargets.length && - (!doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game) || !drankLifePotionTargets[0].player.isAlive)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_LIFE_POTION_TARGET); + (!doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game) || !drankLifePotionTargets[0].player.isAlive)) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_LIFE_POTION_TARGET); } } private validateDrankDeathPotionTargets(drankDeathPotionTargets: MakeGamePlayTargetWithRelationsDto[]): void { if (drankDeathPotionTargets.length > 1) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_DRANK_DEATH_POTION_TARGETS); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_DRANK_DEATH_POTION_TARGETS); } if (drankDeathPotionTargets.length && !drankDeathPotionTargets[0].player.isAlive) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_DEATH_POTION_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_DEATH_POTION_TARGET); } } private async validateGamePlayWitchTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): Promise { - const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length > 0; - const drankLifePotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WITCH_POTIONS.LIFE); - const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length > 0; - const drankDeathPotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WITCH_POTIONS.DEATH); + const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length > 0; + const drankLifePotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WitchPotions.LIFE); + const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length > 0; + const drankDeathPotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WitchPotions.DEATH); if (hasWitchUsedLifePotion && drankLifePotionTargets.length || hasWitchUsedDeathPotion && drankDeathPotionTargets.length) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_DRANK_POTION_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_DRANK_POTION_TARGET); } this.validateDrankLifePotionTargets(drankLifePotionTargets, game); this.validateDrankDeathPotionTargets(drankDeathPotionTargets); @@ -97,9 +97,9 @@ export class GamePlayValidatorService { return; } const hasVileFatherOfWolvesInfected = (await this.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords(game._id)).length > 0; - const vileFatherOfWolvesPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.VILE_FATHER_OF_WOLVES); + const vileFatherOfWolvesPlayer = getPlayerWithCurrentRole(game, RoleNames.VILE_FATHER_OF_WOLVES); if (!vileFatherOfWolvesPlayer || !isPlayerAliveAndPowerful(vileFatherOfWolvesPlayer, game) || hasVileFatherOfWolvesInfected) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_INFECTED_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_INFECTED_TARGET); } this.validateGamePlayTargetsBoundaries(infectedTargets, { min: 1, max: 1 }); } @@ -110,9 +110,9 @@ export class GamePlayValidatorService { const bigBadWolfExpectedTargetsCount = leftToEatByWerewolvesPlayers.length ? 1 : 0; const whiteWerewolfMaxTargetsCount = leftToEatByWhiteWerewolfPlayers.length ? 1 : 0; const werewolvesSourceTargetsBoundaries: Partial> = { - [PLAYER_GROUPS.WEREWOLVES]: { min: 1, max: 1 }, - [ROLE_NAMES.BIG_BAD_WOLF]: { min: bigBadWolfExpectedTargetsCount, max: bigBadWolfExpectedTargetsCount }, - [ROLE_NAMES.WHITE_WEREWOLF]: { min: 0, max: whiteWerewolfMaxTargetsCount }, + [PlayerGroups.WEREWOLVES]: { min: 1, max: 1 }, + [RoleNames.BIG_BAD_WOLF]: { min: bigBadWolfExpectedTargetsCount, max: bigBadWolfExpectedTargetsCount }, + [RoleNames.WHITE_WEREWOLF]: { min: 0, max: whiteWerewolfMaxTargetsCount }, }; const targetsBoundaries = werewolvesSourceTargetsBoundaries[game.currentPlay.source.name]; if (!targetsBoundaries) { @@ -129,16 +129,16 @@ export class GamePlayValidatorService { const targetedPlayer = playTargets[0].player; const pureWolvesAvailableTargets = getLeftToEatByWerewolvesPlayers(game); const isTargetedPlayerInPureWolvesTargets = !!pureWolvesAvailableTargets.find(({ _id }) => _id.toString() === targetedPlayer._id.toString()); - if (game.currentPlay.source.name === PLAYER_GROUPS.WEREWOLVES && !isTargetedPlayerInPureWolvesTargets) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_WEREWOLVES_TARGET); + if (game.currentPlay.source.name === PlayerGroups.WEREWOLVES && !isTargetedPlayerInPureWolvesTargets) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_WEREWOLVES_TARGET); } - if (game.currentPlay.source.name === ROLE_NAMES.BIG_BAD_WOLF && !isTargetedPlayerInPureWolvesTargets) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_BIG_BAD_WOLF_TARGET); + if (game.currentPlay.source.name === RoleNames.BIG_BAD_WOLF && !isTargetedPlayerInPureWolvesTargets) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_BIG_BAD_WOLF_TARGET); } const whiteWerewolfAvailableTargets = getLeftToEatByWhiteWerewolfPlayers(game); const isTargetedPlayerInWhiteWerewolfTargets = !!whiteWerewolfAvailableTargets.find(({ _id }) => _id.toString() === targetedPlayer._id.toString()); - if (game.currentPlay.source.name === ROLE_NAMES.WHITE_WEREWOLF && !isTargetedPlayerInWhiteWerewolfTargets) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_WHITE_WEREWOLF_TARGET); + if (game.currentPlay.source.name === RoleNames.WHITE_WEREWOLF && !isTargetedPlayerInWhiteWerewolfTargets) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_WHITE_WEREWOLF_TARGET); } await this.validateGamePlayInfectedTargets(playTargets, game); } @@ -147,21 +147,21 @@ export class GamePlayValidatorService { this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 }); const targetedPlayer = playTargets[0].player; if (!targetedPlayer.isAlive) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_HUNTER_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_HUNTER_TARGET); } } private validateGamePlayScapegoatTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void { this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: game.players.length }); if (playTargets.some(({ player }) => !player.isAlive)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SCAPEGOAT_TARGETS); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SCAPEGOAT_TARGETS); } } private validateGamePlayCupidTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void { this.validateGamePlayTargetsBoundaries(playTargets, { min: 2, max: 2 }); if (playTargets.some(({ player }) => !player.isAlive)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_CUPID_TARGETS); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_CUPID_TARGETS); } } @@ -169,32 +169,32 @@ export class GamePlayValidatorService { this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: 1 }); const targetedPlayer = playTargets[0].player; if (!targetedPlayer.isAlive) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_FOX_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_FOX_TARGET); } } private validateGamePlaySeerTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void { this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 }); - const seerPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.SEER); + const seerPlayer = getPlayerWithCurrentRole(game, RoleNames.SEER); const targetedPlayer = playTargets[0].player; if (!targetedPlayer.isAlive || targetedPlayer._id === seerPlayer?._id) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SEER_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SEER_TARGET); } } private validateGamePlayRavenTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void { this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: 1 }); if (playTargets.length && !playTargets[0].player.isAlive) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_RAVEN_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_RAVEN_TARGET); } } private validateGamePlayWildChildTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void { this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 }); - const wildChildPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WILD_CHILD); + const wildChildPlayer = getPlayerWithCurrentRole(game, RoleNames.WILD_CHILD); const targetedPlayer = playTargets[0].player; if (!targetedPlayer.isAlive || targetedPlayer._id === wildChildPlayer?._id) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_WILD_CHILD_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_WILD_CHILD_TARGET); } } @@ -205,7 +205,7 @@ export class GamePlayValidatorService { const countToCharm = Math.min(charmedPeopleCountPerNight, leftToCharmByPiedPiperPlayersCount); this.validateGamePlayTargetsBoundaries(playTargets, { min: countToCharm, max: countToCharm }); if (playTargets.some(({ player }) => !leftToCharmByPiedPiperPlayers.find(({ _id }) => player._id === _id))) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_PIED_PIPER_TARGETS); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_PIED_PIPER_TARGETS); } } @@ -216,49 +216,49 @@ export class GamePlayValidatorService { const lastProtectedPlayer = lastGuardHistoryRecord?.play.targets?.[0].player; const targetedPlayer = playTargets[0].player; if (!targetedPlayer.isAlive || !canProtectTwice && lastProtectedPlayer?._id === targetedPlayer._id) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_GUARD_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_GUARD_TARGET); } } private async validateGamePlaySheriffTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise { this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 }); const targetedPlayer = playTargets[0].player; - if (game.currentPlay.action === GAME_PLAY_ACTIONS.DELEGATE && !targetedPlayer.isAlive) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SHERIFF_DELEGATE_TARGET); + if (game.currentPlay.action === GamePlayActions.DELEGATE && !targetedPlayer.isAlive) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SHERIFF_DELEGATE_TARGET); } const lastTieInVotesRecord = await this.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord(game._id, game.currentPlay.action); const lastTieInVotesRecordNominatedPlayers = lastTieInVotesRecord?.play.voting?.nominatedPlayers ?? []; const isSheriffTargetInLastNominatedPlayers = lastTieInVotesRecordNominatedPlayers.find(({ _id }) => _id === targetedPlayer._id); - if (game.currentPlay.action === GAME_PLAY_ACTIONS.SETTLE_VOTES && !isSheriffTargetInLastNominatedPlayers) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SHERIFF_SETTLE_VOTES_TARGET); + if (game.currentPlay.action === GamePlayActions.SETTLE_VOTES && !isSheriffTargetInLastNominatedPlayers) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SHERIFF_SETTLE_VOTES_TARGET); } } private validateGamePlayTargetsBoundaries(playTargets: MakeGamePlayTargetWithRelationsDto[], lengthBoundaries: { min: number; max: number }): void { if (playTargets.length < lengthBoundaries.min) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_LESS_TARGETS); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_LESS_TARGETS); } if (playTargets.length > lengthBoundaries.max) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_TARGETS); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_TARGETS); } } private async validateGamePlaySourceTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise { const gamePlaySourceValidationMethods: Partial Promise | void>> = { - [PLAYER_ATTRIBUTE_NAMES.SHERIFF]: async() => this.validateGamePlaySheriffTargets(playTargets, game), - [PLAYER_GROUPS.WEREWOLVES]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game), - [ROLE_NAMES.BIG_BAD_WOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game), - [ROLE_NAMES.WHITE_WEREWOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game), - [ROLE_NAMES.GUARD]: async() => this.validateGamePlayGuardTargets(playTargets, game), - [ROLE_NAMES.PIED_PIPER]: () => this.validateGamePlayPiedPiperTargets(playTargets, game), - [ROLE_NAMES.WILD_CHILD]: () => this.validateGamePlayWildChildTargets(playTargets, game), - [ROLE_NAMES.RAVEN]: () => this.validateGamePlayRavenTargets(playTargets), - [ROLE_NAMES.SEER]: () => this.validateGamePlaySeerTargets(playTargets, game), - [ROLE_NAMES.FOX]: () => this.validateGamePlayFoxTargets(playTargets), - [ROLE_NAMES.CUPID]: () => this.validateGamePlayCupidTargets(playTargets), - [ROLE_NAMES.SCAPEGOAT]: () => this.validateGamePlayScapegoatTargets(playTargets, game), - [ROLE_NAMES.HUNTER]: () => this.validateGamePlayHunterTargets(playTargets), - [ROLE_NAMES.WITCH]: async() => this.validateGamePlayWitchTargets(playTargets, game), + [PlayerAttributeNames.SHERIFF]: async() => this.validateGamePlaySheriffTargets(playTargets, game), + [PlayerGroups.WEREWOLVES]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game), + [RoleNames.BIG_BAD_WOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game), + [RoleNames.WHITE_WEREWOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game), + [RoleNames.GUARD]: async() => this.validateGamePlayGuardTargets(playTargets, game), + [RoleNames.PIED_PIPER]: () => this.validateGamePlayPiedPiperTargets(playTargets, game), + [RoleNames.WILD_CHILD]: () => this.validateGamePlayWildChildTargets(playTargets, game), + [RoleNames.RAVEN]: () => this.validateGamePlayRavenTargets(playTargets), + [RoleNames.SEER]: () => this.validateGamePlaySeerTargets(playTargets, game), + [RoleNames.FOX]: () => this.validateGamePlayFoxTargets(playTargets), + [RoleNames.CUPID]: () => this.validateGamePlayCupidTargets(playTargets), + [RoleNames.SCAPEGOAT]: () => this.validateGamePlayScapegoatTargets(playTargets, game), + [RoleNames.HUNTER]: () => this.validateGamePlayHunterTargets(playTargets), + [RoleNames.WITCH]: async() => this.validateGamePlayWitchTargets(playTargets, game), }; const gamePlaySourceValidationMethod = gamePlaySourceValidationMethods[game.currentPlay.source.name]; if (gamePlaySourceValidationMethod) { @@ -269,24 +269,24 @@ export class GamePlayValidatorService { private validateInfectedTargetsAndPotionUsage(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): void { const { source: currentPlaySource, action: currentPlayAction } = game.currentPlay; const isSomeTargetInfected = playTargets.some(({ isInfected }) => isInfected); - if (isSomeTargetInfected && (currentPlayAction !== GAME_PLAY_ACTIONS.EAT || currentPlaySource.name !== PLAYER_GROUPS.WEREWOLVES)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_INFECTED_TARGET); + if (isSomeTargetInfected && (currentPlayAction !== GamePlayActions.EAT || currentPlaySource.name !== PlayerGroups.WEREWOLVES)) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_INFECTED_TARGET); } const hasSomePlayerDrankPotion = playTargets.some(({ drankPotion }) => drankPotion); - if (hasSomePlayerDrankPotion && (currentPlayAction !== GAME_PLAY_ACTIONS.USE_POTIONS || currentPlaySource.name !== ROLE_NAMES.WITCH)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_DRANK_POTION_TARGET); + if (hasSomePlayerDrankPotion && (currentPlayAction !== GamePlayActions.USE_POTIONS || currentPlaySource.name !== RoleNames.WITCH)) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_DRANK_POTION_TARGET); } } private async validateGamePlayTargetsWithRelationsDto(playTargets: MakeGamePlayTargetWithRelationsDto[] | undefined, game: GameWithCurrentPlay): Promise { if (playTargets === undefined || playTargets.length === 0) { - if (requiredTargetsActions.includes(game.currentPlay.action)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.REQUIRED_TARGETS); + if (REQUIRED_TARGET_ACTIONS.includes(game.currentPlay.action)) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.REQUIRED_TARGETS); } return; } - if (![...requiredTargetsActions, ...optionalTargetsActions].includes(game.currentPlay.action)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_TARGETS); + if (![...REQUIRED_TARGET_ACTIONS, ...OPTIONAL_TARGET_ACTIONS].includes(game.currentPlay.action)) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_TARGETS); } this.validateInfectedTargetsAndPotionUsage(playTargets, game); await this.validateGamePlaySourceTargets(playTargets, game); @@ -296,30 +296,30 @@ export class GamePlayValidatorService { const lastTieInVotesRecord = await this.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord(game._id, game.currentPlay.action); const lastTieInVotesRecordNominatedPlayers = lastTieInVotesRecord?.play.voting?.nominatedPlayers ?? []; if (playVotes.some(vote => !lastTieInVotesRecordNominatedPlayers.find(player => vote.target._id.toString() === player._id.toString()))) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_VOTE_TARGET_FOR_TIE_BREAKER); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_VOTE_TARGET_FOR_TIE_BREAKER); } } private validateGamePlayVotesWithRelationsDtoSourceAndTarget(playVotes: MakeGamePlayVoteWithRelationsDto[], game: Game): void { - if (playVotes.some(({ source }) => !source.isAlive || doesPlayerHaveActiveAttributeWithName(source, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game))) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_VOTE_SOURCE); + if (playVotes.some(({ source }) => !source.isAlive || doesPlayerHaveActiveAttributeWithName(source, PlayerAttributeNames.CANT_VOTE, game))) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_VOTE_SOURCE); } if (playVotes.some(({ target }) => !target.isAlive)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_VOTE_TARGET); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_VOTE_TARGET); } if (playVotes.some(({ source, target }) => source._id === target._id)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.SAME_SOURCE_AND_TARGET_VOTE); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.SAME_SOURCE_AND_TARGET_VOTE); } } private validateUnsetGamePlayVotesWithRelationsDto(game: GameWithCurrentPlay): void { const { action: currentPlayAction, cause: currentPlayCause } = game.currentPlay; const { canBeSkipped: canVotesBeSkipped } = game.options.votes; - const isCurrentPlayVoteCauseOfAngelPresence = currentPlayAction === GAME_PLAY_ACTIONS.VOTE && currentPlayCause === GAME_PLAY_CAUSES.ANGEL_PRESENCE; - const isCurrentPlayVoteInevitable = currentPlayAction === GAME_PLAY_ACTIONS.ELECT_SHERIFF || isCurrentPlayVoteCauseOfAngelPresence; - const canSomePlayerVote = game.players.some(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game)); - if (canSomePlayerVote && (!canVotesBeSkipped && requiredVotesActions.includes(currentPlayAction) || canVotesBeSkipped && isCurrentPlayVoteInevitable)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.REQUIRED_VOTES); + const isCurrentPlayVoteCauseOfAngelPresence = currentPlayAction === GamePlayActions.VOTE && currentPlayCause === GamePlayCauses.ANGEL_PRESENCE; + const isCurrentPlayVoteInevitable = currentPlayAction === GamePlayActions.ELECT_SHERIFF || isCurrentPlayVoteCauseOfAngelPresence; + const canSomePlayerVote = game.players.some(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CANT_VOTE, game)); + if (canSomePlayerVote && (!canVotesBeSkipped && REQUIRED_VOTE_ACTIONS.includes(currentPlayAction) || canVotesBeSkipped && isCurrentPlayVoteInevitable)) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.REQUIRED_VOTES); } } @@ -328,21 +328,21 @@ export class GamePlayValidatorService { this.validateUnsetGamePlayVotesWithRelationsDto(game); return; } - if (!requiredVotesActions.includes(game.currentPlay.action)) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_VOTES); + if (!REQUIRED_VOTE_ACTIONS.includes(game.currentPlay.action)) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_VOTES); } this.validateGamePlayVotesWithRelationsDtoSourceAndTarget(playVotes, game); - if (game.currentPlay.cause === GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) { + if (game.currentPlay.cause === GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) { await this.validateGamePlayVotesTieBreakerWithRelationsDto(playVotes, game); } } private validateGamePlayWithRelationsDtoChosenSide({ chosenSide }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): void { - if (chosenSide !== undefined && game.currentPlay.action !== GAME_PLAY_ACTIONS.CHOOSE_SIDE) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_CHOSEN_SIDE); + if (chosenSide !== undefined && game.currentPlay.action !== GamePlayActions.CHOOSE_SIDE) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_CHOSEN_SIDE); } - if (chosenSide === undefined && game.currentPlay.action === GAME_PLAY_ACTIONS.CHOOSE_SIDE) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.REQUIRED_CHOSEN_SIDE); + if (chosenSide === undefined && game.currentPlay.action === GamePlayActions.CHOOSE_SIDE) { + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.REQUIRED_CHOSEN_SIDE); } } @@ -352,11 +352,11 @@ export class GamePlayValidatorService { } const { voteRequestsCount } = game.options.roles.stutteringJudge; const gameHistoryJudgeRequestRecords = await this.gameHistoryRecordService.getGameHistoryJudgeRequestRecords(game._id); - const stutteringJudgePlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.STUTTERING_JUDGE); - if (!stutteringJudgeRequestOpportunityActions.includes(game.currentPlay.action) || + const stutteringJudgePlayer = getPlayerWithCurrentRole(game, RoleNames.STUTTERING_JUDGE); + if (!STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS.includes(game.currentPlay.action) || !stutteringJudgePlayer || !isPlayerAliveAndPowerful(stutteringJudgePlayer, game) || gameHistoryJudgeRequestRecords.length >= voteRequestsCount) { - throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_STUTTERING_JUDGE_VOTE_REQUEST); + throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_STUTTERING_JUDGE_VOTE_REQUEST); } } } \ No newline at end of file diff --git a/src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts b/src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts index e56d8ba9b..caa589ab1 100644 --- a/src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts +++ b/src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts @@ -1,8 +1,8 @@ import { Injectable } from "@nestjs/common"; import type { MakeGamePlayVoteWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { createGame } from "@/modules/game/helpers/game.factory"; import { getPlayerWithActiveAttributeName, getPlayerWithCurrentRole } from "@/modules/game/helpers/game.helper"; import { createPlayer } from "@/modules/game/helpers/player/player.factory"; @@ -10,7 +10,7 @@ import { isPlayerPowerful } from "@/modules/game/helpers/player/player.helper"; import type { Player } from "@/modules/game/schemas/player/player.schema"; import type { PlayerVoteCount } from "@/modules/game/types/game-play.type"; import type { GameWithCurrentPlay } from "@/modules/game/types/game-with-current-play"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; @Injectable() export class GamePlayVoteService { @@ -24,11 +24,11 @@ export class GamePlayVoteService { private getPlayerVoteCounts(votes: MakeGamePlayVoteWithRelationsDto[], game: GameWithCurrentPlay): PlayerVoteCount[] { const { hasDoubledVote: doesSheriffHaveDoubledVote } = game.options.roles.sheriff; - const sheriffPlayer = getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SHERIFF); + const sheriffPlayer = getPlayerWithActiveAttributeName(game, PlayerAttributeNames.SHERIFF); return votes.reduce((acc, vote) => { const doubledVoteValue = 2; const isVoteSourceSheriff = vote.source._id.toString() === sheriffPlayer?._id.toString(); - const voteValue = game.currentPlay.action === GAME_PLAY_ACTIONS.VOTE && isVoteSourceSheriff && doesSheriffHaveDoubledVote ? doubledVoteValue : 1; + const voteValue = game.currentPlay.action === GamePlayActions.VOTE && isVoteSourceSheriff && doesSheriffHaveDoubledVote ? doubledVoteValue : 1; const existingPlayerVoteCount = acc.find(value => value[0]._id.toString() === vote.target._id.toString()); if (existingPlayerVoteCount) { existingPlayerVoteCount[1] += voteValue; @@ -40,9 +40,9 @@ export class GamePlayVoteService { private addRavenMarkVoteToPlayerVoteCounts(playerVoteCounts: PlayerVoteCount[], game: GameWithCurrentPlay): PlayerVoteCount[] { const clonedGame = createGame(game) as GameWithCurrentPlay; - const ravenPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.RAVEN); - const ravenMarkedPlayer = getPlayerWithActiveAttributeName(clonedGame, PLAYER_ATTRIBUTE_NAMES.RAVEN_MARKED); - if (clonedGame.currentPlay.action !== GAME_PLAY_ACTIONS.VOTE || ravenPlayer?.isAlive !== true || + const ravenPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.RAVEN); + const ravenMarkedPlayer = getPlayerWithActiveAttributeName(clonedGame, PlayerAttributeNames.RAVEN_MARKED); + if (clonedGame.currentPlay.action !== GamePlayActions.VOTE || ravenPlayer?.isAlive !== true || !isPlayerPowerful(ravenPlayer, clonedGame) || ravenMarkedPlayer?.isAlive !== true) { return playerVoteCounts; } diff --git a/src/modules/game/providers/services/game-play/game-play.service.ts b/src/modules/game/providers/services/game-play/game-play.service.ts index 03b1eb7be..58ada2551 100644 --- a/src/modules/game/providers/services/game-play/game-play.service.ts +++ b/src/modules/game/providers/services/game-play/game-play.service.ts @@ -1,11 +1,11 @@ import { Injectable } from "@nestjs/common"; -import { gamePlaysNightOrder } from "@/modules/game/constants/game.constant"; +import { GAME_PLAYS_NIGHT_ORDER } from "@/modules/game/constants/game.constant"; import { CreateGamePlayerDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player.dto"; import { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; -import { GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { createGamePlay, createGamePlayAllElectSheriff, createGamePlayAllVote } from "@/modules/game/helpers/game-play/game-play.factory"; import { areGamePlaysEqual, findPlayPriorityIndex } from "@/modules/game/helpers/game-play/game-play.helper"; import { createGame } from "@/modules/game/helpers/game.factory"; @@ -16,7 +16,7 @@ import type { GameHistoryRecord } from "@/modules/game/schemas/game-history-reco import type { SheriffGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; import type { Game } from "@/modules/game/schemas/game.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createNoGamePlayPriorityUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; @@ -51,7 +51,7 @@ export class GamePlayService { public async getUpcomingNightPlays(game: CreateGameDto | Game): Promise { const isFirstNight = game.turn === 1; - const eligibleNightPlays = gamePlaysNightOrder.filter(play => isFirstNight || play.isFirstNightOnly !== true); + const eligibleNightPlays = GAME_PLAYS_NIGHT_ORDER.filter(play => isFirstNight || play.isFirstNightOnly !== true); const isSheriffElectionTime = this.isSheriffElectionTime(game.options.roles.sheriff, game.turn, game.phase); const upcomingNightPlays: GamePlay[] = isSheriffElectionTime ? [createGamePlayAllElectSheriff()] : []; for (const eligibleNightPlay of eligibleNightPlays) { @@ -87,7 +87,7 @@ export class GamePlayService { private async getNewUpcomingPlaysForCurrentPhase(game: Game): Promise { const { _id, turn, phase } = game; - const currentPhaseUpcomingPlays = game.phase === GAME_PHASES.NIGHT ? await this.getUpcomingNightPlays(game) : this.getUpcomingDayPlays(); + const currentPhaseUpcomingPlays = game.phase === GamePhases.NIGHT ? await this.getUpcomingNightPlays(game) : this.getUpcomingDayPlays(); const gameHistoryPhaseRecords = await this.gameHistoryRecordService.getGameHistoryPhaseRecords(_id, turn, phase); return currentPhaseUpcomingPlays.filter(gamePlay => this.isUpcomingPlayNewForCurrentPhase(gamePlay, game, gameHistoryPhaseRecords)); } @@ -111,54 +111,54 @@ export class GamePlayService { }); } - private isSheriffElectionTime(sheriffGameOptions: SheriffGameOptions, currentTurn: number, currentPhase: GAME_PHASES): boolean { + private isSheriffElectionTime(sheriffGameOptions: SheriffGameOptions, currentTurn: number, currentPhase: GamePhases): boolean { const { electedAt, isEnabled } = sheriffGameOptions; return isEnabled && electedAt.turn === currentTurn && electedAt.phase === currentPhase; } private isLoversGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean { if (game instanceof CreateGameDto) { - return !!getPlayerDtoWithRole(game, ROLE_NAMES.CUPID); + return !!getPlayerDtoWithRole(game, RoleNames.CUPID); } - const cupidPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.CUPID); + const cupidPlayer = getPlayerWithCurrentRole(game, RoleNames.CUPID); if (!cupidPlayer) { return false; } - const inLovePlayers = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE); + const inLovePlayers = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE); return !inLovePlayers.length && isPlayerAliveAndPowerful(cupidPlayer, game) || inLovePlayers.length > 0 && inLovePlayers.every(player => player.isAlive); } private isAllGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): boolean { - if (gamePlay.cause !== GAME_PLAY_CAUSES.ANGEL_PRESENCE) { + if (gamePlay.cause !== GamePlayCauses.ANGEL_PRESENCE) { return true; } if (game instanceof CreateGameDto) { - return !!getPlayerDtoWithRole(game, ROLE_NAMES.ANGEL); + return !!getPlayerDtoWithRole(game, RoleNames.ANGEL); } - const angelPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.ANGEL); + const angelPlayer = getPlayerWithCurrentRole(game, RoleNames.ANGEL); return !!angelPlayer && isPlayerAliveAndPowerful(angelPlayer, game); } private isGroupGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): boolean { - const source = gamePlay.source.name as PLAYER_GROUPS; - const specificGroupMethods: Record boolean> = { - [PLAYER_GROUPS.ALL]: this.isAllGamePlaySuitableForCurrentPhase, - [PLAYER_GROUPS.LOVERS]: this.isLoversGamePlaySuitableForCurrentPhase, - [PLAYER_GROUPS.CHARMED]: this.isPiedPiperGamePlaySuitableForCurrentPhase, - [PLAYER_GROUPS.WEREWOLVES]: () => game instanceof CreateGameDto || getGroupOfPlayers(game, source).some(werewolf => isPlayerAliveAndPowerful(werewolf, game)), - [PLAYER_GROUPS.VILLAGERS]: () => false, + const source = gamePlay.source.name as PlayerGroups; + const specificGroupMethods: Record boolean> = { + [PlayerGroups.ALL]: this.isAllGamePlaySuitableForCurrentPhase, + [PlayerGroups.LOVERS]: this.isLoversGamePlaySuitableForCurrentPhase, + [PlayerGroups.CHARMED]: this.isPiedPiperGamePlaySuitableForCurrentPhase, + [PlayerGroups.WEREWOLVES]: () => game instanceof CreateGameDto || getGroupOfPlayers(game, source).some(werewolf => isPlayerAliveAndPowerful(werewolf, game)), + [PlayerGroups.VILLAGERS]: () => false, }; return specificGroupMethods[source](game, gamePlay); } private async isWitchGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): Promise { if (game instanceof CreateGameDto) { - return !!getPlayerDtoWithRole(game, ROLE_NAMES.WITCH); + return !!getPlayerDtoWithRole(game, RoleNames.WITCH); } - const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length > 0; - const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length > 0; + const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length > 0; + const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length > 0; const { doSkipCallIfNoTarget } = game.options.roles; - const witchPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WITCH); + const witchPlayer = getPlayerWithCurrentRole(game, RoleNames.WITCH); return !!witchPlayer && isPlayerAliveAndPowerful(witchPlayer, game) && (!doSkipCallIfNoTarget || !hasWitchUsedLifePotion || !hasWitchUsedDeathPotion); } @@ -166,31 +166,31 @@ export class GamePlayService { const { wakingUpInterval } = game.options.roles.whiteWerewolf; const shouldWhiteWerewolfBeCalledOnCurrentTurn = (game.turn - 1) % wakingUpInterval === 0; if (game instanceof CreateGameDto) { - return shouldWhiteWerewolfBeCalledOnCurrentTurn && !!getPlayerDtoWithRole(game, ROLE_NAMES.WHITE_WEREWOLF); + return shouldWhiteWerewolfBeCalledOnCurrentTurn && !!getPlayerDtoWithRole(game, RoleNames.WHITE_WEREWOLF); } const { doSkipCallIfNoTarget } = game.options.roles; const availableTargets = getLeftToEatByWhiteWerewolfPlayers(game); - const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WHITE_WEREWOLF); + const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, RoleNames.WHITE_WEREWOLF); return shouldWhiteWerewolfBeCalledOnCurrentTurn && !!whiteWerewolfPlayer && isPlayerAliveAndPowerful(whiteWerewolfPlayer, game) && (!doSkipCallIfNoTarget || !!availableTargets.length); } private isPiedPiperGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean { if (game instanceof CreateGameDto) { - return !!getPlayerDtoWithRole(game, ROLE_NAMES.PIED_PIPER); + return !!getPlayerDtoWithRole(game, RoleNames.PIED_PIPER); } - const piedPiperPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.PIED_PIPER); + const piedPiperPlayer = getPlayerWithCurrentRole(game, RoleNames.PIED_PIPER); return !!piedPiperPlayer && canPiedPiperCharm(piedPiperPlayer, game); } private isBigBadWolfGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean { if (game instanceof CreateGameDto) { - return !!getPlayerDtoWithRole(game, ROLE_NAMES.BIG_BAD_WOLF); + return !!getPlayerDtoWithRole(game, RoleNames.BIG_BAD_WOLF); } const { doSkipCallIfNoTarget } = game.options.roles; const availableTargets = getLeftToEatByWerewolvesPlayers(game); const { isPowerlessIfWerewolfDies } = game.options.roles.bigBadWolf; - const bigBadWolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.BIG_BAD_WOLF); + const bigBadWolfPlayer = getPlayerWithCurrentRole(game, RoleNames.BIG_BAD_WOLF); return !!bigBadWolfPlayer && isPlayerAliveAndPowerful(bigBadWolfPlayer, game) && (!isPowerlessIfWerewolfDies || areAllWerewolvesAlive(game) && (!doSkipCallIfNoTarget || !!availableTargets.length)); } @@ -199,9 +199,9 @@ export class GamePlayService { const { wakingUpInterval } = game.options.roles.threeBrothers; const shouldThreeBrothersBeCalled = wakingUpInterval > 0; if (game instanceof CreateGameDto) { - return shouldThreeBrothersBeCalled && !!getPlayerDtoWithRole(game, ROLE_NAMES.THREE_BROTHERS); + return shouldThreeBrothersBeCalled && !!getPlayerDtoWithRole(game, RoleNames.THREE_BROTHERS); } - const threeBrothersPlayers = getPlayersWithCurrentRole(game, ROLE_NAMES.THREE_BROTHERS); + const threeBrothersPlayers = getPlayersWithCurrentRole(game, RoleNames.THREE_BROTHERS); const minimumBrotherCountToCall = 2; return shouldThreeBrothersBeCalled && threeBrothersPlayers.filter(brother => brother.isAlive).length >= minimumBrotherCountToCall; } @@ -210,27 +210,27 @@ export class GamePlayService { const { wakingUpInterval } = game.options.roles.twoSisters; const shouldTwoSistersBeCalled = wakingUpInterval > 0; if (game instanceof CreateGameDto) { - return shouldTwoSistersBeCalled && !!getPlayerDtoWithRole(game, ROLE_NAMES.TWO_SISTERS); + return shouldTwoSistersBeCalled && !!getPlayerDtoWithRole(game, RoleNames.TWO_SISTERS); } - const twoSistersPlayers = getPlayersWithCurrentRole(game, ROLE_NAMES.TWO_SISTERS); + const twoSistersPlayers = getPlayersWithCurrentRole(game, RoleNames.TWO_SISTERS); return shouldTwoSistersBeCalled && twoSistersPlayers.length > 0 && twoSistersPlayers.every(sister => sister.isAlive); } private async isRoleGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): Promise { - const source = gamePlay.source.name as ROLE_NAMES; + const source = gamePlay.source.name as RoleNames; const player = game instanceof CreateGameDto ? getPlayerDtoWithRole(game, source) : getPlayerWithCurrentRole(game, source); if (!player) { return false; } - const specificRoleMethods: Partial Promise | boolean>> = { - [ROLE_NAMES.TWO_SISTERS]: () => this.isTwoSistersGamePlaySuitableForCurrentPhase(game), - [ROLE_NAMES.THREE_BROTHERS]: () => this.isThreeBrothersGamePlaySuitableForCurrentPhase(game), - [ROLE_NAMES.BIG_BAD_WOLF]: () => this.isBigBadWolfGamePlaySuitableForCurrentPhase(game), - [ROLE_NAMES.PIED_PIPER]: () => this.isPiedPiperGamePlaySuitableForCurrentPhase(game), - [ROLE_NAMES.WHITE_WEREWOLF]: () => this.isWhiteWerewolfGamePlaySuitableForCurrentPhase(game), - [ROLE_NAMES.WITCH]: async() => this.isWitchGamePlaySuitableForCurrentPhase(game), - [ROLE_NAMES.HUNTER]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game), - [ROLE_NAMES.SCAPEGOAT]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game), + const specificRoleMethods: Partial Promise | boolean>> = { + [RoleNames.TWO_SISTERS]: () => this.isTwoSistersGamePlaySuitableForCurrentPhase(game), + [RoleNames.THREE_BROTHERS]: () => this.isThreeBrothersGamePlaySuitableForCurrentPhase(game), + [RoleNames.BIG_BAD_WOLF]: () => this.isBigBadWolfGamePlaySuitableForCurrentPhase(game), + [RoleNames.PIED_PIPER]: () => this.isPiedPiperGamePlaySuitableForCurrentPhase(game), + [RoleNames.WHITE_WEREWOLF]: () => this.isWhiteWerewolfGamePlaySuitableForCurrentPhase(game), + [RoleNames.WITCH]: async() => this.isWitchGamePlaySuitableForCurrentPhase(game), + [RoleNames.HUNTER]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game), + [RoleNames.SCAPEGOAT]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game), }; if (specificRoleMethods[source] !== undefined) { return await specificRoleMethods[source]?.() === true; @@ -245,7 +245,7 @@ export class GamePlayService { if (game instanceof CreateGameDto) { return true; } - const sheriffPlayer = getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SHERIFF); + const sheriffPlayer = getPlayerWithActiveAttributeName(game, PlayerAttributeNames.SHERIFF); return !!sheriffPlayer; } diff --git a/src/modules/game/providers/services/game-random-composition.service.ts b/src/modules/game/providers/services/game-random-composition.service.ts index 9494f2313..519c69faa 100644 --- a/src/modules/game/providers/services/game-random-composition.service.ts +++ b/src/modules/game/providers/services/game-random-composition.service.ts @@ -4,8 +4,8 @@ import { sample, shuffle } from "lodash"; import { GetGameRandomCompositionPlayerResponseDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition-player-response/get-game-random-composition-player-response.dto"; import type { GetGameRandomCompositionDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto"; -import { defaultVillagerRole, defaultWerewolfRole, roles } from "@/modules/role/constants/role.constant"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { DEFAULT_VILLAGER_ROLE, DEFAULT_WEREWOLF_ROLE, ROLES } from "@/modules/role/constants/role.constant"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { getRolesWithSide } from "@/modules/role/helpers/role.helper"; import { Role } from "@/modules/role/types/role.type"; @@ -16,8 +16,8 @@ export class GameRandomCompositionService { const werewolfRolesCount = this.getWerewolfCountForComposition(getGameRandomCompositionDto.players.length); const villagerRolesCount = getGameRandomCompositionDto.players.length - werewolfRolesCount; const randomRoles = [ - ...this.getRandomRolesForSide(availableRoles, werewolfRolesCount, ROLE_SIDES.WEREWOLVES), - ...this.getRandomRolesForSide(availableRoles, villagerRolesCount, ROLE_SIDES.VILLAGERS), + ...this.getRandomRolesForSide(availableRoles, werewolfRolesCount, RoleSides.WEREWOLVES), + ...this.getRandomRolesForSide(availableRoles, villagerRolesCount, RoleSides.VILLAGERS), ]; const shuffledRandomRoles = shuffle(randomRoles); return getGameRandomCompositionDto.players.map((player, index) => plainToInstance(GetGameRandomCompositionPlayerResponseDto, { @@ -27,10 +27,10 @@ export class GameRandomCompositionService { })); } - private getRandomRolesForSide(availableRoles: Role[], rolesToPickCount: number, side: ROLE_SIDES): Role[] { + private getRandomRolesForSide(availableRoles: Role[], rolesToPickCount: number, side: RoleSides): Role[] { const randomRoles: Role[] = []; const availableSidedRoles = getRolesWithSide(availableRoles, side); - const defaultSidedRole = side === ROLE_SIDES.VILLAGERS ? defaultVillagerRole : defaultWerewolfRole; + const defaultSidedRole = side === RoleSides.VILLAGERS ? DEFAULT_VILLAGER_ROLE : DEFAULT_WEREWOLF_ROLE; let randomRolesToPickCount = 1; for (let i = 0; i < rolesToPickCount; i += randomRolesToPickCount) { const leftRolesToPickCount = rolesToPickCount - i; @@ -63,10 +63,10 @@ export class GameRandomCompositionService { arePowerfulVillagerRolesPrioritized, arePowerfulWerewolfRolesPrioritized, } = getGameRandomCompositionDto; - return roles.filter(role => { - if (role.name === ROLE_NAMES.VILLAGER) { + return ROLES.filter(role => { + if (role.name === RoleNames.VILLAGER) { return !arePowerfulVillagerRolesPrioritized; - } else if (role.name === ROLE_NAMES.WEREWOLF) { + } else if (role.name === RoleNames.WEREWOLF) { return !arePowerfulWerewolfRolesPrioritized; } const isRolePermitted = !excludedRoles.includes(role.name); diff --git a/src/modules/game/providers/services/game.service.ts b/src/modules/game/providers/services/game.service.ts index d323cdf82..cbd79867a 100644 --- a/src/modules/game/providers/services/game.service.ts +++ b/src/modules/game/providers/services/game.service.ts @@ -4,7 +4,7 @@ import type { Types } from "mongoose"; import { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; import type { MakeGamePlayDto } from "@/modules/game/dto/make-game-play/make-game-play.dto"; -import { GAME_STATUSES } from "@/modules/game/enums/game.enum"; +import { GameStatuses } from "@/modules/game/enums/game.enum"; import { isGamePhaseOver } from "@/modules/game/helpers/game-phase/game-phase.helper"; import { createMakeGamePlayDtoWithRelations } from "@/modules/game/helpers/game-play/game-play.helper"; import { generateGameVictoryData, isGameOver } from "@/modules/game/helpers/game-victory/game-victory.helper"; @@ -20,8 +20,8 @@ import { PlayerAttributeService } from "@/modules/game/providers/services/player import type { Game } from "@/modules/game/schemas/game.schema"; import type { GameWithCurrentPlay } from "@/modules/game/types/game-with-current-play"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import { BAD_RESOURCE_MUTATION_REASONS } from "@/shared/exception/enums/bad-resource-mutation-error.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; +import { BadResourceMutationReasons } from "@/shared/exception/enums/bad-resource-mutation-error.enum"; import { createCantGenerateGamePlaysUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; import { BadResourceMutationException } from "@/shared/exception/types/bad-resource-mutation-exception.type"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; @@ -60,16 +60,16 @@ export class GameService { } public async cancelGame(game: Game): Promise { - if (game.status !== GAME_STATUSES.PLAYING) { - throw new BadResourceMutationException(API_RESOURCES.GAMES, game._id.toString(), BAD_RESOURCE_MUTATION_REASONS.GAME_NOT_PLAYING); + if (game.status !== GameStatuses.PLAYING) { + throw new BadResourceMutationException(ApiResources.GAMES, game._id.toString(), BadResourceMutationReasons.GAME_NOT_PLAYING); } - return this.updateGame(game._id, { status: GAME_STATUSES.CANCELED }); + return this.updateGame(game._id, { status: GameStatuses.CANCELED }); } public async makeGamePlay(game: Game, makeGamePlayDto: MakeGamePlayDto): Promise { let clonedGame = createGameFromFactory(game); - if (clonedGame.status !== GAME_STATUSES.PLAYING) { - throw new BadResourceMutationException(API_RESOURCES.GAMES, clonedGame._id.toString(), BAD_RESOURCE_MUTATION_REASONS.GAME_NOT_PLAYING); + if (clonedGame.status !== GameStatuses.PLAYING) { + throw new BadResourceMutationException(ApiResources.GAMES, clonedGame._id.toString(), BadResourceMutationReasons.GAME_NOT_PLAYING); } const play = createMakeGamePlayDtoWithRelations(makeGamePlayDto, clonedGame); await this.gamePlayValidatorService.validateGamePlayWithRelationsDto(play, clonedGame); @@ -99,14 +99,14 @@ export class GameService { private async updateGame(gameId: Types.ObjectId, gameDataToUpdate: Partial): Promise { const updatedGame = await this.gameRepository.updateOne({ _id: gameId }, gameDataToUpdate); if (updatedGame === null) { - throw new ResourceNotFoundException(API_RESOURCES.GAMES, gameId.toString()); + throw new ResourceNotFoundException(ApiResources.GAMES, gameId.toString()); } return updatedGame; } private setGameAsOver(game: Game): Game { const clonedGame = createGameFromFactory(game); - clonedGame.status = GAME_STATUSES.OVER; + clonedGame.status = GameStatuses.OVER; clonedGame.victory = generateGameVictoryData(clonedGame); return clonedGame; } diff --git a/src/modules/game/providers/services/player/player-killer.service.ts b/src/modules/game/providers/services/player/player-killer.service.ts index 160483433..40cc85c71 100644 --- a/src/modules/game/providers/services/player/player-killer.service.ts +++ b/src/modules/game/providers/services/player/player-killer.service.ts @@ -1,7 +1,7 @@ import { Injectable } from "@nestjs/common"; import type { Types } from "mongoose"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES } from "@/modules/game/enums/player.enum"; +import { PlayerAttributeNames, PlayerDeathCauses } from "@/modules/game/enums/player.enum"; import { createGamePlayHunterShoots, createGamePlayScapegoatBansVoting, createGamePlaySheriffDelegates } from "@/modules/game/helpers/game-play/game-play.factory"; import { createGame } from "@/modules/game/helpers/game.factory"; import { getAliveVillagerSidedPlayers, getNearestAliveNeighbor, getPlayerWithCurrentRole, getPlayerWithIdOrThrow } from "@/modules/game/helpers/game.helper"; @@ -15,7 +15,7 @@ import { GameHistoryRecordService } from "@/modules/game/providers/services/game import type { Game } from "@/modules/game/schemas/game.schema"; import type { PlayerDeath } from "@/modules/game/schemas/player/player-death.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { createCantFindPlayerUnexpectedException, createPlayerIsDeadUnexpectedException } from "@/shared/exception/helpers/unexpected-exception.factory"; @@ -35,8 +35,8 @@ export class PlayerKillerService { return clonedGame; } - public async isAncientKillable(game: Game, cause: PLAYER_DEATH_CAUSES): Promise { - if (cause !== PLAYER_DEATH_CAUSES.EATEN) { + public async isAncientKillable(game: Game, cause: PlayerDeathCauses): Promise { + if (cause !== PlayerDeathCauses.EATEN) { return true; } const ancientLivesCountAgainstWerewolves = await this.getAncientLivesCountAgainstWerewolves(game); @@ -45,7 +45,7 @@ export class PlayerKillerService { private applyPlayerRoleRevelationOutcomes(revealedPlayer: Player, game: Game): Game { const clonedGame = createGame(game); - if (revealedPlayer.role.current === ROLE_NAMES.IDIOT) { + if (revealedPlayer.role.current === RoleNames.IDIOT) { return addPlayerAttributeInGame(revealedPlayer._id, clonedGame, createCantVoteByAllPlayerAttribute()); } return clonedGame; @@ -62,8 +62,8 @@ export class PlayerKillerService { } private doesPlayerRoleMustBeRevealed(playerToReveal: Player, death: PlayerDeath, game: Game): boolean { - return !playerToReveal.role.isRevealed && playerToReveal.role.current === ROLE_NAMES.IDIOT && - isPlayerPowerful(playerToReveal, game) && death.cause === PLAYER_DEATH_CAUSES.VOTE; + return !playerToReveal.role.isRevealed && playerToReveal.role.current === RoleNames.IDIOT && + isPlayerPowerful(playerToReveal, game) && death.cause === PlayerDeathCauses.VOTE; } private removePlayerAttributesAfterDeath(player: Player): Player { @@ -85,26 +85,26 @@ export class PlayerKillerService { }, livesCountAgainstWerewolves); } - private isIdiotKillable(idiotPlayer: Player, cause: PLAYER_DEATH_CAUSES, game: Game): boolean { + private isIdiotKillable(idiotPlayer: Player, cause: PlayerDeathCauses, game: Game): boolean { const isIdiotPowerless = !isPlayerPowerful(idiotPlayer, game); - return idiotPlayer.role.isRevealed || cause !== PLAYER_DEATH_CAUSES.VOTE || isIdiotPowerless; + return idiotPlayer.role.isRevealed || cause !== PlayerDeathCauses.VOTE || isIdiotPowerless; } private canPlayerBeEaten(eatenPlayer: Player, game: Game): boolean { const { isProtectedByGuard: isLittleGirlProtectedByGuard } = game.options.roles.littleGirl; - const isPlayerSavedByWitch = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PLAYER_ATTRIBUTE_NAMES.DRANK_LIFE_POTION, game); - const isPlayerProtectedByGuard = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PLAYER_ATTRIBUTE_NAMES.PROTECTED, game); - return !isPlayerSavedByWitch && (!isPlayerProtectedByGuard || eatenPlayer.role.current === ROLE_NAMES.LITTLE_GIRL && !isLittleGirlProtectedByGuard); + const isPlayerSavedByWitch = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PlayerAttributeNames.DRANK_LIFE_POTION, game); + const isPlayerProtectedByGuard = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PlayerAttributeNames.PROTECTED, game); + return !isPlayerSavedByWitch && (!isPlayerProtectedByGuard || eatenPlayer.role.current === RoleNames.LITTLE_GIRL && !isLittleGirlProtectedByGuard); } - private async isPlayerKillable(player: Player, game: Game, cause: PLAYER_DEATH_CAUSES): Promise { - if (cause === PLAYER_DEATH_CAUSES.EATEN && !this.canPlayerBeEaten(player, game)) { + private async isPlayerKillable(player: Player, game: Game, cause: PlayerDeathCauses): Promise { + if (cause === PlayerDeathCauses.EATEN && !this.canPlayerBeEaten(player, game)) { return false; } - if (player.role.current === ROLE_NAMES.IDIOT) { + if (player.role.current === RoleNames.IDIOT) { return this.isIdiotKillable(player, cause, game); } - if (player.role.current === ROLE_NAMES.ANCIENT) { + if (player.role.current === RoleNames.ANCIENT) { return this.isAncientKillable(game, cause); } return true; @@ -112,21 +112,21 @@ export class PlayerKillerService { private applyWorshipedPlayerDeathOutcomes(killedPlayer: Player, game: Game): Game { const clonedGame = createGame(game); - const wildChildPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.WILD_CHILD); - if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame) || + const wildChildPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.WILD_CHILD); + if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.WORSHIPED, clonedGame) || wildChildPlayer === undefined || !wildChildPlayer.isAlive || !isPlayerPowerful(wildChildPlayer, clonedGame)) { return clonedGame; } - wildChildPlayer.side.current = ROLE_SIDES.WEREWOLVES; + wildChildPlayer.side.current = RoleSides.WEREWOLVES; return updatePlayerInGame(wildChildPlayer._id, wildChildPlayer, clonedGame); } private applyInLovePlayerDeathOutcomes(killedPlayer: Player, game: Game): Game { const clonedGame = createGame(game); - const otherLoverFinder = (player: Player): boolean => doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game) && + const otherLoverFinder = (player: Player): boolean => doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game) && player.isAlive && player._id !== killedPlayer._id; const otherPlayerInLove = clonedGame.players.find(otherLoverFinder); - if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, clonedGame) || !otherPlayerInLove) { + if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.IN_LOVE, clonedGame) || !otherPlayerInLove) { return clonedGame; } return this.killPlayer(otherPlayerInLove, clonedGame, createPlayerBrokenHeartByCupidDeath()); @@ -134,8 +134,8 @@ export class PlayerKillerService { private applySheriffPlayerDeathOutcomes(killedPlayer: Player, game: Game): Game { const clonedGame = createGame(game); - if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.SHERIFF, game) || - killedPlayer.role.current === ROLE_NAMES.IDIOT && isPlayerPowerful(killedPlayer, clonedGame)) { + if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.SHERIFF, game) || + killedPlayer.role.current === RoleNames.IDIOT && isPlayerPowerful(killedPlayer, clonedGame)) { return clonedGame; } return prependUpcomingPlayInGame(createGamePlaySheriffDelegates(), clonedGame); @@ -145,15 +145,15 @@ export class PlayerKillerService { let clonedGame = createGame(game); let clonedKilledPlayer = createPlayer(killedPlayer); const cantFindPlayerException = createCantFindPlayerUnexpectedException("applyPlayerAttributesDeathOutcomes", { gameId: game._id, playerId: killedPlayer._id }); - if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.SHERIFF, clonedGame)) { + if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.SHERIFF, clonedGame)) { clonedGame = this.applySheriffPlayerDeathOutcomes(clonedKilledPlayer, clonedGame); clonedKilledPlayer = getPlayerWithIdOrThrow(clonedKilledPlayer._id, clonedGame, cantFindPlayerException); } - if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, clonedGame)) { + if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.IN_LOVE, clonedGame)) { clonedGame = this.applyInLovePlayerDeathOutcomes(clonedKilledPlayer, clonedGame); clonedKilledPlayer = getPlayerWithIdOrThrow(clonedKilledPlayer._id, clonedGame, cantFindPlayerException); } - if (doesPlayerHaveActiveAttributeWithName(clonedKilledPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame)) { + if (doesPlayerHaveActiveAttributeWithName(clonedKilledPlayer, PlayerAttributeNames.WORSHIPED, clonedGame)) { clonedGame = this.applyWorshipedPlayerDeathOutcomes(clonedKilledPlayer, clonedGame); } return clonedGame; @@ -161,9 +161,9 @@ export class PlayerKillerService { private applyRustySwordKnightDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game { const clonedGame = createGame(game); - const leftAliveWerewolfNeighbor = getNearestAliveNeighbor(killedPlayer._id, clonedGame, { direction: "left", playerSide: ROLE_SIDES.WEREWOLVES }); - if (killedPlayer.role.current !== ROLE_NAMES.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame) || - death.cause !== PLAYER_DEATH_CAUSES.EATEN || !leftAliveWerewolfNeighbor) { + const leftAliveWerewolfNeighbor = getNearestAliveNeighbor(killedPlayer._id, clonedGame, { direction: "left", playerSide: RoleSides.WEREWOLVES }); + if (killedPlayer.role.current !== RoleNames.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame) || + death.cause !== PlayerDeathCauses.EATEN || !leftAliveWerewolfNeighbor) { return clonedGame; } return addPlayerAttributeInGame(leftAliveWerewolfNeighbor._id, clonedGame, createContaminatedByRustySwordKnightPlayerAttribute()); @@ -171,7 +171,7 @@ export class PlayerKillerService { private applyScapegoatDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game { const clonedGame = createGame(game); - if (killedPlayer.role.current !== ROLE_NAMES.SCAPEGOAT || !isPlayerPowerful(killedPlayer, clonedGame) || death.cause !== PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED) { + if (killedPlayer.role.current !== RoleNames.SCAPEGOAT || !isPlayerPowerful(killedPlayer, clonedGame) || death.cause !== PlayerDeathCauses.VOTE_SCAPEGOATED) { return clonedGame; } return prependUpcomingPlayInGame(createGamePlayScapegoatBansVoting(), clonedGame); @@ -179,16 +179,16 @@ export class PlayerKillerService { private applyAncientDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game { let clonedGame = createGame(game); - const ancientRevengeDeathCauses: PLAYER_DEATH_CAUSES[] = [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.SHOT, PLAYER_DEATH_CAUSES.DEATH_POTION]; + const ancientRevengeDeathCauses: PlayerDeathCauses[] = [PlayerDeathCauses.VOTE, PlayerDeathCauses.SHOT, PlayerDeathCauses.DEATH_POTION]; const { idiot: idiotOptions, ancient: ancientOptions } = clonedGame.options.roles; - if (killedPlayer.role.current !== ROLE_NAMES.ANCIENT || !isPlayerPowerful(killedPlayer, game)) { + if (killedPlayer.role.current !== RoleNames.ANCIENT || !isPlayerPowerful(killedPlayer, game)) { return clonedGame; } if (ancientRevengeDeathCauses.includes(death.cause) && ancientOptions.doesTakeHisRevenge) { const aliveVillagerSidedPlayersIds = getAliveVillagerSidedPlayers(clonedGame).map(({ _id }) => _id); clonedGame = addPlayersAttributeInGame(aliveVillagerSidedPlayersIds, clonedGame, createPowerlessByAncientPlayerAttribute()); } - const idiotPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.IDIOT); + const idiotPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.IDIOT); if (idiotPlayer?.isAlive === true && idiotPlayer.role.isRevealed && idiotOptions.doesDieOnAncientDeath) { return this.killPlayer(idiotPlayer, clonedGame, createPlayerReconsiderPardonByAllDeath()); } @@ -197,7 +197,7 @@ export class PlayerKillerService { private applyHunterDeathOutcomes(killedPlayer: Player, game: Game): Game { const clonedGame = createGame(game); - if (killedPlayer.role.current !== ROLE_NAMES.HUNTER || !isPlayerPowerful(killedPlayer, game)) { + if (killedPlayer.role.current !== RoleNames.HUNTER || !isPlayerPowerful(killedPlayer, game)) { return clonedGame; } return prependUpcomingPlayInGame(createGamePlayHunterShoots(), clonedGame); @@ -205,16 +205,16 @@ export class PlayerKillerService { private applyPlayerRoleDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game { const clonedGame = createGame(game); - if (killedPlayer.role.current === ROLE_NAMES.HUNTER) { + if (killedPlayer.role.current === RoleNames.HUNTER) { return this.applyHunterDeathOutcomes(killedPlayer, clonedGame); } - if (killedPlayer.role.current === ROLE_NAMES.ANCIENT) { + if (killedPlayer.role.current === RoleNames.ANCIENT) { return this.applyAncientDeathOutcomes(killedPlayer, clonedGame, death); } - if (killedPlayer.role.current === ROLE_NAMES.SCAPEGOAT) { + if (killedPlayer.role.current === RoleNames.SCAPEGOAT) { return this.applyScapegoatDeathOutcomes(killedPlayer, clonedGame, death); } - if (killedPlayer.role.current === ROLE_NAMES.RUSTY_SWORD_KNIGHT) { + if (killedPlayer.role.current === RoleNames.RUSTY_SWORD_KNIGHT) { return this.applyRustySwordKnightDeathOutcomes(killedPlayer, clonedGame, death); } return clonedGame; diff --git a/src/modules/game/schemas/game-additional-card/game-additional-card.schema.ts b/src/modules/game/schemas/game-additional-card/game-additional-card.schema.ts index e9e472610..e5a576d33 100644 --- a/src/modules/game/schemas/game-additional-card/game-additional-card.schema.ts +++ b/src/modules/game/schemas/game-additional-card/game-additional-card.schema.ts @@ -3,38 +3,41 @@ import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; import { Types } from "mongoose"; -import { gameAdditionalCardApiProperties, gameAdditionalCardFieldsSpecs } from "@/modules/game/constants/game-additional-card/game-additional-card.constant"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { GAME_ADDITIONAL_CARDS_API_PROPERTIES, GAME_ADDITIONAL_CARDS_FIELDS_SPECS } from "@/modules/game/constants/game-additional-cards/game-additional-cards.constant"; +import { RoleNames } from "@/modules/role/enums/role.enum"; @Schema({ versionKey: false }) class GameAdditionalCard { - @ApiProperty(gameAdditionalCardApiProperties._id) + @ApiProperty(GAME_ADDITIONAL_CARDS_API_PROPERTIES._id) @Type(() => String) @Expose() public _id: Types.ObjectId; - @ApiProperty(gameAdditionalCardApiProperties.roleName) + @ApiProperty(GAME_ADDITIONAL_CARDS_API_PROPERTIES.roleName) @Prop({ - required: gameAdditionalCardFieldsSpecs.roleName.required, - enum: gameAdditionalCardFieldsSpecs.roleName.enum, + required: GAME_ADDITIONAL_CARDS_FIELDS_SPECS.roleName.required, + enum: GAME_ADDITIONAL_CARDS_FIELDS_SPECS.roleName.enum, }) @Expose() - public roleName: ROLE_NAMES; + public roleName: RoleNames; - @ApiProperty(gameAdditionalCardApiProperties.recipient) + @ApiProperty(GAME_ADDITIONAL_CARDS_API_PROPERTIES.recipient) @Prop({ - required: gameAdditionalCardFieldsSpecs.recipient.required, - enum: gameAdditionalCardFieldsSpecs.recipient.enum, + required: GAME_ADDITIONAL_CARDS_FIELDS_SPECS.recipient.required, + enum: GAME_ADDITIONAL_CARDS_FIELDS_SPECS.recipient.enum, }) @Expose() - public recipient: ROLE_NAMES.THIEF; + public recipient: RoleNames.THIEF; - @ApiProperty(gameAdditionalCardApiProperties.isUsed) - @Prop({ default: gameAdditionalCardFieldsSpecs.isUsed.default as boolean }) + @ApiProperty(GAME_ADDITIONAL_CARDS_API_PROPERTIES.isUsed) + @Prop({ default: GAME_ADDITIONAL_CARDS_FIELDS_SPECS.isUsed.default as boolean }) @Expose() public isUsed: boolean; } -const GameAdditionalCardSchema = SchemaFactory.createForClass(GameAdditionalCard); +const GAME_ADDITIONAL_CARD_SCHEMA = SchemaFactory.createForClass(GameAdditionalCard); -export { GameAdditionalCard, GameAdditionalCardSchema }; \ No newline at end of file +export { + GameAdditionalCard, + GAME_ADDITIONAL_CARD_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema.ts b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema.ts index 56af32f2e..ff5f60672 100644 --- a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema.ts +++ b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gameHistoryRecordPlaySourceApiProperties, gameHistoryRecordPlaySourceFieldsSpecs } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-source.constant"; -import { PlayerSchema, Player } from "@/modules/game/schemas/player/player.schema"; +import { GAME_HISTORY_RECORD_PLAY_SOURCE_API_PROPERTIES, GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-source.constant"; +import { PLAYER_SCHEMA, Player } from "@/modules/game/schemas/player/player.schema"; import { GameSource } from "@/modules/game/types/game.type"; import { doesArrayRespectBounds } from "@/shared/validation/helpers/validation.helper"; @@ -14,25 +14,28 @@ import { doesArrayRespectBounds } from "@/shared/validation/helpers/validation.h _id: false, }) class GameHistoryRecordPlaySource { - @ApiProperty(gameHistoryRecordPlaySourceApiProperties.name) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_SOURCE_API_PROPERTIES.name) @Prop({ - required: gameHistoryRecordPlaySourceFieldsSpecs.name.required, - enum: gameHistoryRecordPlaySourceFieldsSpecs.name.enum, + required: GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS.name.required, + enum: GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS.name.enum, }) @Expose() public name: GameSource; - @ApiProperty(gameHistoryRecordPlaySourceApiProperties.players) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_SOURCE_API_PROPERTIES.players) @Prop({ - required: gameHistoryRecordPlaySourceFieldsSpecs.players.required, - validate: [(players: Player[]): boolean => doesArrayRespectBounds(players, { minItems: gameHistoryRecordPlaySourceFieldsSpecs.players.minItems }), "Path `play.source.players` length is less than minimum allowed value (1)."], - type: [PlayerSchema], + required: GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS.players.required, + validate: [(players: Player[]): boolean => doesArrayRespectBounds(players, { minItems: GAME_HISTORY_RECORD_PLAY_SOURCE_FIELDS_SPECS.players.minItems }), "Path `play.source.players` length is less than minimum allowed value (1)."], + type: [PLAYER_SCHEMA], }) @Type(() => Player) @Expose() public players: Player[]; } -const GameHistoryRecordPlaySourceSchema = SchemaFactory.createForClass(GameHistoryRecordPlaySource); +const GAME_HISTORY_RECORD_PLAY_SOURCE_SCHEMA = SchemaFactory.createForClass(GameHistoryRecordPlaySource); -export { GameHistoryRecordPlaySource, GameHistoryRecordPlaySourceSchema }; \ No newline at end of file +export { + GameHistoryRecordPlaySource, + GAME_HISTORY_RECORD_PLAY_SOURCE_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema.ts b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema.ts index 7efbf579b..4121173dc 100644 --- a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema.ts +++ b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema.ts @@ -2,9 +2,9 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gameHistoryRecordPlayTargetApiProperties, gameHistoryRecordPlayTargetFieldsSpecs } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-target.constant"; -import { WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { Player, PlayerSchema } from "@/modules/game/schemas/player/player.schema"; +import { GAME_HISTORY_RECORD_PLAY_TARGET_API_PROPERTIES, GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-target.constant"; +import { WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { Player, PLAYER_SCHEMA } from "@/modules/game/schemas/player/player.schema"; @Schema({ versionKey: false, @@ -12,29 +12,32 @@ import { Player, PlayerSchema } from "@/modules/game/schemas/player/player.schem _id: false, }) class GameHistoryRecordPlayTarget { - @ApiProperty(gameHistoryRecordPlayTargetApiProperties.player) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_TARGET_API_PROPERTIES.player) @Prop({ - required: gameHistoryRecordPlayTargetFieldsSpecs.player.required, - type: PlayerSchema, + required: GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS.player.required, + type: PLAYER_SCHEMA, }) @Type(() => Player) @Expose() public player: Player; - @ApiProperty(gameHistoryRecordPlayTargetApiProperties.isInfected) - @Prop({ required: gameHistoryRecordPlayTargetFieldsSpecs.isInfected.required }) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_TARGET_API_PROPERTIES.isInfected) + @Prop({ required: GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS.isInfected.required }) @Expose() public isInfected?: boolean; - @ApiProperty(gameHistoryRecordPlayTargetApiProperties.drankPotion) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_TARGET_API_PROPERTIES.drankPotion) @Prop({ - required: gameHistoryRecordPlayTargetFieldsSpecs.drankPotion.required, - enum: gameHistoryRecordPlayTargetFieldsSpecs.drankPotion.enum, + required: GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS.drankPotion.required, + enum: GAME_HISTORY_RECORD_PLAY_TARGET_FIELDS_SPECS.drankPotion.enum, }) @Expose() - public drankPotion?: WITCH_POTIONS; + public drankPotion?: WitchPotions; } -const GameHistoryRecordPlayTargetSchema = SchemaFactory.createForClass(GameHistoryRecordPlayTarget); +const GAME_HISTORY_RECORD_PLAY_TARGET_SCHEMA = SchemaFactory.createForClass(GameHistoryRecordPlayTarget); -export { GameHistoryRecordPlayTarget, GameHistoryRecordPlayTargetSchema }; \ No newline at end of file +export { + GameHistoryRecordPlayTarget, + GAME_HISTORY_RECORD_PLAY_TARGET_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema.ts b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema.ts index 6d58dc70b..f9fcfcb6c 100644 --- a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema.ts +++ b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gameHistoryRecordPlayVoteFieldsSpecs } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-vote.constant"; -import { Player, PlayerSchema } from "@/modules/game/schemas/player/player.schema"; +import { GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-vote.constant"; +import { Player, PLAYER_SCHEMA } from "@/modules/game/schemas/player/player.schema"; @Schema({ versionKey: false, @@ -11,25 +11,28 @@ import { Player, PlayerSchema } from "@/modules/game/schemas/player/player.schem _id: false, }) class GameHistoryRecordPlayVote { - @ApiProperty(gameHistoryRecordPlayVoteFieldsSpecs.source) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS.source) @Prop({ - required: gameHistoryRecordPlayVoteFieldsSpecs.source.required, - type: PlayerSchema, + required: GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS.source.required, + type: PLAYER_SCHEMA, }) @Type(() => Player) @Expose() public source: Player; - @ApiProperty(gameHistoryRecordPlayVoteFieldsSpecs.target) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS.target) @Prop({ - required: gameHistoryRecordPlayVoteFieldsSpecs.target.required, - type: PlayerSchema, + required: GAME_HISTORY_RECORD_PLAY_VOTE_FIELDS_SPECS.target.required, + type: PLAYER_SCHEMA, }) @Type(() => Player) @Expose() public target: Player; } -const GameHistoryRecordPlayVoteSchema = SchemaFactory.createForClass(GameHistoryRecordPlayVote); +const GAME_HISTORY_RECORD_PLAY_VOTE_SCHEMA = SchemaFactory.createForClass(GameHistoryRecordPlayVote); -export { GameHistoryRecordPlayVote, GameHistoryRecordPlayVoteSchema }; \ No newline at end of file +export { + GameHistoryRecordPlayVote, + GAME_HISTORY_RECORD_PLAY_VOTE_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema.ts b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema.ts index 7dae4125a..1ab1ce033 100644 --- a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema.ts +++ b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema.ts @@ -2,9 +2,9 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gameHistoryRecordPlayVotingApiProperties, gameHistoryRecordPlayVotingFieldsSpecs } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-voting.constant"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; -import { Player, PlayerSchema } from "@/modules/game/schemas/player/player.schema"; +import { GAME_HISTORY_RECORD_PLAY_VOTING_API_PROPERTIES, GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play-voting.constant"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; +import { Player, PLAYER_SCHEMA } from "@/modules/game/schemas/player/player.schema"; @Schema({ versionKey: false, @@ -12,18 +12,18 @@ import { Player, PlayerSchema } from "@/modules/game/schemas/player/player.schem _id: false, }) class GameHistoryRecordPlayVoting { - @ApiProperty(gameHistoryRecordPlayVotingApiProperties.result) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_VOTING_API_PROPERTIES.result) @Prop({ - required: gameHistoryRecordPlayVotingFieldsSpecs.result.required, - enum: gameHistoryRecordPlayVotingFieldsSpecs.result.enum, + required: GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS.result.required, + enum: GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS.result.enum, }) @Expose() - public result: GAME_HISTORY_RECORD_VOTING_RESULTS; + public result: GameHistoryRecordVotingResults; - @ApiProperty(gameHistoryRecordPlayVotingApiProperties.nominatedPlayers) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_VOTING_API_PROPERTIES.nominatedPlayers) @Prop({ - required: gameHistoryRecordPlayVotingFieldsSpecs.nominatedPlayers.required, - type: [PlayerSchema], + required: GAME_HISTORY_RECORD_PLAY_VOTING_FIELDS_SPECS.nominatedPlayers.required, + type: [PLAYER_SCHEMA], default: undefined, }) @Type(() => Player) @@ -31,6 +31,9 @@ class GameHistoryRecordPlayVoting { public nominatedPlayers?: Player[]; } -const GameHistoryRecordPlayVotingSchema = SchemaFactory.createForClass(GameHistoryRecordPlayVoting); +const GAME_HISTORY_RECORD_PLAY_VOTING_SCHEMA = SchemaFactory.createForClass(GameHistoryRecordPlayVoting); -export { GameHistoryRecordPlayVoting, GameHistoryRecordPlayVotingSchema }; \ No newline at end of file +export { + GameHistoryRecordPlayVoting, + GAME_HISTORY_RECORD_PLAY_VOTING_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema.ts b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema.ts index bd588b43f..533ead9b1 100644 --- a/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema.ts +++ b/src/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema.ts @@ -2,14 +2,14 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gameHistoryRecordPlayApiProperties, gameHistoryRecordPlayFieldsSpecs } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play.constant"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from "@/modules/game/enums/game-play.enum"; -import { GameAdditionalCardSchema, GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; -import { GameHistoryRecordPlaySource, GameHistoryRecordPlaySourceSchema } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema"; -import { GameHistoryRecordPlayTargetSchema, GameHistoryRecordPlayTarget } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema"; -import { GameHistoryRecordPlayVoteSchema, GameHistoryRecordPlayVote } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema"; -import { GameHistoryRecordPlayVoting, GameHistoryRecordPlayVotingSchema } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { GAME_HISTORY_RECORD_PLAY_API_PROPERTIES, GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS } from "@/modules/game/constants/game-history-record/game-history-record-play/game-history-record-play.constant"; +import { GamePlayActions, GamePlayCauses } from "@/modules/game/enums/game-play.enum"; +import { GAME_ADDITIONAL_CARD_SCHEMA, GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; +import { GameHistoryRecordPlaySource, GAME_HISTORY_RECORD_PLAY_SOURCE_SCHEMA } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema"; +import { GAME_HISTORY_RECORD_PLAY_TARGET_SCHEMA, GameHistoryRecordPlayTarget } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema"; +import { GAME_HISTORY_RECORD_PLAY_VOTE_SCHEMA, GameHistoryRecordPlayVote } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema"; +import { GameHistoryRecordPlayVoting, GAME_HISTORY_RECORD_PLAY_VOTING_SCHEMA } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema"; +import { RoleSides } from "@/modules/role/enums/role.enum"; @Schema({ versionKey: false, @@ -17,83 +17,86 @@ import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; _id: false, }) class GameHistoryRecordPlay { - @ApiProperty(gameHistoryRecordPlayApiProperties.action) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.action) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.action.required, - enum: gameHistoryRecordPlayFieldsSpecs.action.enum, + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.action.required, + enum: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.action.enum, }) @Expose() - public action: GAME_PLAY_ACTIONS; + public action: GamePlayActions; - @ApiProperty(gameHistoryRecordPlayApiProperties.source) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.source) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.source.required, - type: GameHistoryRecordPlaySourceSchema, + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.source.required, + type: GAME_HISTORY_RECORD_PLAY_SOURCE_SCHEMA, }) @Type(() => GameHistoryRecordPlaySource) @Expose() public source: GameHistoryRecordPlaySource; - @ApiProperty(gameHistoryRecordPlayApiProperties.cause) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.cause) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.cause.required, - enum: gameHistoryRecordPlayFieldsSpecs.cause.enum, + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.cause.required, + enum: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.cause.enum, }) @Expose() - public cause?: GAME_PLAY_CAUSES; + public cause?: GamePlayCauses; - @ApiProperty(gameHistoryRecordPlayApiProperties.targets) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.targets) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.targets.required, - type: [GameHistoryRecordPlayTargetSchema], + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.targets.required, + type: [GAME_HISTORY_RECORD_PLAY_TARGET_SCHEMA], default: undefined, }) @Type(() => GameHistoryRecordPlayTarget) @Expose() public targets?: GameHistoryRecordPlayTarget[]; - @ApiProperty(gameHistoryRecordPlayApiProperties.votes) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.votes) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.votes.required, - type: [GameHistoryRecordPlayVoteSchema], + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.votes.required, + type: [GAME_HISTORY_RECORD_PLAY_VOTE_SCHEMA], default: undefined, }) @Type(() => GameHistoryRecordPlayVote) @Expose() public votes?: GameHistoryRecordPlayVote[]; - @ApiProperty(gameHistoryRecordPlayApiProperties.voting) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.voting) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.voting.required, - type: GameHistoryRecordPlayVotingSchema, + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.voting.required, + type: GAME_HISTORY_RECORD_PLAY_VOTING_SCHEMA, }) @Type(() => GameHistoryRecordPlayVoting) @Expose() public voting?: GameHistoryRecordPlayVoting; - @ApiProperty(gameHistoryRecordPlayApiProperties.didJudgeRequestAnotherVote) - @Prop({ required: gameHistoryRecordPlayFieldsSpecs.didJudgeRequestAnotherVote.required }) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.didJudgeRequestAnotherVote) + @Prop({ required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.didJudgeRequestAnotherVote.required }) @Expose() public didJudgeRequestAnotherVote?: boolean; - @ApiProperty(gameHistoryRecordPlayApiProperties.chosenCard) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.chosenCard) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.chosenCard.required, - type: GameAdditionalCardSchema, + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.chosenCard.required, + type: GAME_ADDITIONAL_CARD_SCHEMA, }) @Type(() => GameAdditionalCard) @Expose() public chosenCard?: GameAdditionalCard; - @ApiProperty(gameHistoryRecordPlayApiProperties.chosenSide) + @ApiProperty(GAME_HISTORY_RECORD_PLAY_API_PROPERTIES.chosenSide) @Prop({ - required: gameHistoryRecordPlayFieldsSpecs.chosenSide.required, - enum: gameHistoryRecordPlayFieldsSpecs.chosenSide.enum, + required: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.chosenSide.required, + enum: GAME_HISTORY_RECORD_PLAY_FIELDS_SPECS.chosenSide.enum, }) @Expose() - public chosenSide?: ROLE_SIDES; + public chosenSide?: RoleSides; } -const GameHistoryRecordPlaySchema = SchemaFactory.createForClass(GameHistoryRecordPlay); +const GAME_HISTORY_RECORD_PLAY_SCHEMA = SchemaFactory.createForClass(GameHistoryRecordPlay); -export { GameHistoryRecordPlay, GameHistoryRecordPlaySchema }; \ No newline at end of file +export { + GameHistoryRecordPlay, + GAME_HISTORY_RECORD_PLAY_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-history-record/game-history-record.schema.ts b/src/modules/game/schemas/game-history-record/game-history-record.schema.ts index 8f416aac4..a011d1b70 100644 --- a/src/modules/game/schemas/game-history-record/game-history-record.schema.ts +++ b/src/modules/game/schemas/game-history-record/game-history-record.schema.ts @@ -2,92 +2,90 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; import { SchemaTypes, Types } from "mongoose"; -import type { HydratedDocument } from "mongoose"; -import { gameHistoryRecordApiProperties, gameHistoryRecordFieldsSpecs } from "@/modules/game/constants/game-history-record/game-history-record.constant"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { GameHistoryRecordPlay, GameHistoryRecordPlaySchema } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema"; -import { PlayerSchema, Player } from "@/modules/game/schemas/player/player.schema"; +import { GAME_HISTORY_RECORD_API_PROPERTIES, GAME_HISTORY_RECORD_FIELDS_SPECS } from "@/modules/game/constants/game-history-record/game-history-record.constant"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { GameHistoryRecordPlay, GAME_HISTORY_RECORD_PLAY_SCHEMA } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema"; +import { PLAYER_SCHEMA, Player } from "@/modules/game/schemas/player/player.schema"; @Schema({ timestamps: { createdAt: true, updatedAt: false }, versionKey: false, }) class GameHistoryRecord { - @ApiProperty(gameHistoryRecordApiProperties._id) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES._id) @Type(() => String) @Expose() public _id: Types.ObjectId; - @ApiProperty(gameHistoryRecordApiProperties.gameId) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.gameId) @Prop({ type: SchemaTypes.ObjectId, - required: gameHistoryRecordFieldsSpecs.gameId.required, + required: GAME_HISTORY_RECORD_FIELDS_SPECS.gameId.required, }) @Type(() => String) @Expose() public gameId: Types.ObjectId; - @ApiProperty(gameHistoryRecordApiProperties.turn) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.turn) @Prop({ - min: gameHistoryRecordApiProperties.turn.minimum, - required: gameHistoryRecordFieldsSpecs.turn.required, + min: GAME_HISTORY_RECORD_API_PROPERTIES.turn.minimum, + required: GAME_HISTORY_RECORD_FIELDS_SPECS.turn.required, }) @Expose() public turn: number; - @ApiProperty(gameHistoryRecordApiProperties.phase) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.phase) @Prop({ - enum: gameHistoryRecordFieldsSpecs.phase.enum, - required: gameHistoryRecordFieldsSpecs.phase.required, + enum: GAME_HISTORY_RECORD_FIELDS_SPECS.phase.enum, + required: GAME_HISTORY_RECORD_FIELDS_SPECS.phase.required, }) @Expose() - public phase: GAME_PHASES; + public phase: GamePhases; - @ApiProperty(gameHistoryRecordApiProperties.tick) - @Prop({ min: gameHistoryRecordApiProperties.tick.minimum }) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.tick) + @Prop({ min: GAME_HISTORY_RECORD_API_PROPERTIES.tick.minimum }) @Expose() public tick: number; - @ApiProperty(gameHistoryRecordApiProperties.play) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.play) @Prop({ - required: gameHistoryRecordFieldsSpecs.play.required, - type: GameHistoryRecordPlaySchema, + required: GAME_HISTORY_RECORD_FIELDS_SPECS.play.required, + type: GAME_HISTORY_RECORD_PLAY_SCHEMA, }) @Type(() => GameHistoryRecordPlay) @Expose() public play: GameHistoryRecordPlay; - @ApiProperty(gameHistoryRecordApiProperties.revealedPlayers) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.revealedPlayers) @Prop({ - required: gameHistoryRecordFieldsSpecs.revealedPlayers.required, - type: [PlayerSchema], + required: GAME_HISTORY_RECORD_FIELDS_SPECS.revealedPlayers.required, + type: [PLAYER_SCHEMA], default: undefined, }) @Type(() => Player) @Expose() public revealedPlayers?: Player[]; - @ApiProperty(gameHistoryRecordApiProperties.deadPlayers) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.deadPlayers) @Prop({ - required: gameHistoryRecordFieldsSpecs.deadPlayers.required, - type: [PlayerSchema], + required: GAME_HISTORY_RECORD_FIELDS_SPECS.deadPlayers.required, + type: [PLAYER_SCHEMA], default: undefined, }) @Type(() => Player) @Expose() public deadPlayers?: Player[]; - @ApiProperty(gameHistoryRecordApiProperties.createdAt) + @ApiProperty(GAME_HISTORY_RECORD_API_PROPERTIES.createdAt) @Type(() => Date) @Expose() public createdAt: Date; } -const GameHistoryRecordSchema = SchemaFactory.createForClass(GameHistoryRecord); +const GAME_HISTORY_RECORD_SCHEMA = SchemaFactory.createForClass(GameHistoryRecord); -type GameHistoryRecordDocument = HydratedDocument; - -export type { GameHistoryRecordDocument }; - -export { GameHistoryRecord, GameHistoryRecordSchema }; \ No newline at end of file +export { + GameHistoryRecord, + GAME_HISTORY_RECORD_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/composition-game-options.schema.ts b/src/modules/game/schemas/game-options/composition-game-options.schema.ts index 062d0a3f1..bc0664dfc 100644 --- a/src/modules/game/schemas/game-options/composition-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/composition-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { compositionGameOptionsApiProperties, compositionGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/composition-game-options.constant"; +import { COMPOSITION_GAME_OPTIONS_API_PROPERTIES, COMPOSITION_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/composition-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { compositionGameOptionsApiProperties, compositionGameOptionsFieldsSpecs _id: false, }) class CompositionGameOptions { - @ApiProperty(compositionGameOptionsApiProperties.isHidden) - @Prop({ default: compositionGameOptionsFieldsSpecs.isHidden.default }) + @ApiProperty(COMPOSITION_GAME_OPTIONS_API_PROPERTIES.isHidden) + @Prop({ default: COMPOSITION_GAME_OPTIONS_FIELDS_SPECS.isHidden.default }) @Expose() public isHidden: boolean; } -const CompositionGameOptionsSchema = SchemaFactory.createForClass(CompositionGameOptions); +const COMPOSITION_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(CompositionGameOptions); -export { CompositionGameOptions, CompositionGameOptionsSchema }; \ No newline at end of file +export { + CompositionGameOptions, + COMPOSITION_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/game-options.schema.ts b/src/modules/game/schemas/game-options/game-options.schema.ts index ed4cfe0ca..926e3289d 100644 --- a/src/modules/game/schemas/game-options/game-options.schema.ts +++ b/src/modules/game/schemas/game-options/game-options.schema.ts @@ -2,10 +2,10 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gameOptionsApiProperties } from "@/modules/game/constants/game-options/game-options.constant"; -import { CompositionGameOptions, CompositionGameOptionsSchema } from "@/modules/game/schemas/game-options/composition-game-options.schema"; -import { RolesGameOptions, RolesGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/roles-game-options.schema"; -import { VotesGameOptions, VotesGameOptionsSchema } from "@/modules/game/schemas/game-options/votes-game-options.schema"; +import { GAME_OPTIONS_API_PROPERTIES } from "@/modules/game/constants/game-options/game-options.constant"; +import { CompositionGameOptions, COMPOSITION_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/composition-game-options.schema"; +import { RolesGameOptions, ROLES_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/roles-game-options.schema"; +import { VotesGameOptions, VOTES_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/votes-game-options.schema"; @Schema({ versionKey: false, @@ -13,27 +13,27 @@ import { VotesGameOptions, VotesGameOptionsSchema } from "@/modules/game/schemas _id: false, }) class GameOptions { - @ApiProperty(gameOptionsApiProperties.composition) + @ApiProperty(GAME_OPTIONS_API_PROPERTIES.composition) @Prop({ - type: CompositionGameOptionsSchema, + type: COMPOSITION_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => CompositionGameOptions) @Expose() public composition: CompositionGameOptions; - @ApiProperty(gameOptionsApiProperties.votes) + @ApiProperty(GAME_OPTIONS_API_PROPERTIES.votes) @Prop({ - type: VotesGameOptionsSchema, + type: VOTES_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => VotesGameOptions) @Expose() public votes: VotesGameOptions; - @ApiProperty(gameOptionsApiProperties.roles) + @ApiProperty(GAME_OPTIONS_API_PROPERTIES.roles) @Prop({ - type: RolesGameOptionsSchema, + type: ROLES_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => RolesGameOptions) @@ -41,6 +41,9 @@ class GameOptions { public roles: RolesGameOptions; } -const GameOptionsSchema = SchemaFactory.createForClass(GameOptions); +const GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(GameOptions); -export { GameOptions, GameOptionsSchema }; \ No newline at end of file +export { + GameOptions, + GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema.ts index ebff80b06..524200612 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { ancientGameOptionsApiProperties, ancientGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant"; +import { ANCIENT_GAME_OPTIONS_API_PROPERTIES, ANCIENT_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/ancient-game-options.constant"; @Schema({ versionKey: false, @@ -10,21 +10,24 @@ import { ancientGameOptionsApiProperties, ancientGameOptionsFieldsSpecs } from " _id: false, }) class AncientGameOptions { - @ApiProperty(ancientGameOptionsApiProperties.livesCountAgainstWerewolves) + @ApiProperty(ANCIENT_GAME_OPTIONS_API_PROPERTIES.livesCountAgainstWerewolves) @Prop({ - default: ancientGameOptionsFieldsSpecs.livesCountAgainstWerewolves.default, - min: ancientGameOptionsFieldsSpecs.livesCountAgainstWerewolves.minimum, - max: ancientGameOptionsFieldsSpecs.livesCountAgainstWerewolves.maximum, + default: ANCIENT_GAME_OPTIONS_FIELDS_SPECS.livesCountAgainstWerewolves.default, + min: ANCIENT_GAME_OPTIONS_FIELDS_SPECS.livesCountAgainstWerewolves.minimum, + max: ANCIENT_GAME_OPTIONS_FIELDS_SPECS.livesCountAgainstWerewolves.maximum, }) @Expose() public livesCountAgainstWerewolves: number; - @ApiProperty(ancientGameOptionsApiProperties.doesTakeHisRevenge) - @Prop({ default: ancientGameOptionsFieldsSpecs.doesTakeHisRevenge.default }) + @ApiProperty(ANCIENT_GAME_OPTIONS_API_PROPERTIES.doesTakeHisRevenge) + @Prop({ default: ANCIENT_GAME_OPTIONS_FIELDS_SPECS.doesTakeHisRevenge.default }) @Expose() public doesTakeHisRevenge: boolean; } -const AncientGameOptionsSchema = SchemaFactory.createForClass(AncientGameOptions); +const ANCIENT_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(AncientGameOptions); -export { AncientGameOptions, AncientGameOptionsSchema }; \ No newline at end of file +export { + AncientGameOptions, + ANCIENT_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema.ts index d5d08cde2..6a0f3ba26 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { bearTamerGameOptionsApiProperties, bearTamerGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant"; +import { BEAR_TAMER_GAME_OPTIONS_API_PROPERTIES, BEAR_TAMER_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/bear-tamer-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { bearTamerGameOptionsApiProperties, bearTamerGameOptionsFieldsSpecs } fr _id: false, }) class BearTamerGameOptions { - @ApiProperty(bearTamerGameOptionsApiProperties.doesGrowlIfInfected) - @Prop({ default: bearTamerGameOptionsFieldsSpecs.doesGrowlIfInfected.default }) + @ApiProperty(BEAR_TAMER_GAME_OPTIONS_API_PROPERTIES.doesGrowlIfInfected) + @Prop({ default: BEAR_TAMER_GAME_OPTIONS_FIELDS_SPECS.doesGrowlIfInfected.default }) @Expose() public doesGrowlIfInfected: boolean; } -const BearTamerGameOptionsSchema = SchemaFactory.createForClass(BearTamerGameOptions); +const BEAR_TAMER_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(BearTamerGameOptions); -export { BearTamerGameOptions, BearTamerGameOptionsSchema }; \ No newline at end of file +export { + BearTamerGameOptions, + BEAR_TAMER_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema.ts index 1741d4b43..b7e5ec453 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { bigBadWolfGameOptionsApiProperties, bigBadWolfGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant"; +import { BIG_BAD_WOLF_GAME_OPTIONS_API_PROPERTIES, BIG_BAD_WOLF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/big-bad-wolf-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,12 @@ import { bigBadWolfGameOptionsApiProperties, bigBadWolfGameOptionsFieldsSpecs } _id: false, }) class BigBadWolfGameOptions { - @ApiProperty(bigBadWolfGameOptionsApiProperties.isPowerlessIfWerewolfDies) - @Prop({ default: bigBadWolfGameOptionsFieldsSpecs.isPowerlessIfWerewolfDies.default }) + @ApiProperty(BIG_BAD_WOLF_GAME_OPTIONS_API_PROPERTIES.isPowerlessIfWerewolfDies) + @Prop({ default: BIG_BAD_WOLF_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfWerewolfDies.default }) @Expose() public isPowerlessIfWerewolfDies: boolean; } -const BigBadWolfGameOptionsSchema = SchemaFactory.createForClass(BigBadWolfGameOptions); +const BIG_BAD_WOLF_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(BigBadWolfGameOptions); -export { BigBadWolfGameOptions, BigBadWolfGameOptionsSchema }; \ No newline at end of file +export { BigBadWolfGameOptions, BIG_BAD_WOLF_GAME_OPTIONS_SCHEMA }; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/dog-wolf-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/dog-wolf-game-options.schema.ts index c5897ed2c..3d2782939 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/dog-wolf-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/dog-wolf-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { dogWolfGameOptionsApiProperties, dogWolfGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant"; +import { DOG_WOLF_GAME_OPTIONS_API_PROPERTIES, DOG_WOLF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/dog-wolf-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { dogWolfGameOptionsApiProperties, dogWolfGameOptionsFieldsSpecs } from " _id: false, }) class DogWolfGameOptions { - @ApiProperty(dogWolfGameOptionsApiProperties.isChosenSideRevealed) - @Prop({ default: dogWolfGameOptionsFieldsSpecs.isChosenSideRevealed.default }) + @ApiProperty(DOG_WOLF_GAME_OPTIONS_API_PROPERTIES.isChosenSideRevealed) + @Prop({ default: DOG_WOLF_GAME_OPTIONS_FIELDS_SPECS.isChosenSideRevealed.default }) @Expose() public isChosenSideRevealed: boolean; } -const DogWolfGameOptionsSchema = SchemaFactory.createForClass(DogWolfGameOptions); +const DOG_WOLF_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(DogWolfGameOptions); -export { DogWolfGameOptions, DogWolfGameOptionsSchema }; \ No newline at end of file +export { + DogWolfGameOptions, + DOG_WOLF_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/fox-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/fox-game-options.schema.ts index 036bc187d..2b9803293 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/fox-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/fox-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { foxGameOptionsApiProperties, foxGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/fox-game-options.constant"; +import { FOX_GAME_OPTIONS_API_PROPERTIES, FOX_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/fox-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { foxGameOptionsApiProperties, foxGameOptionsFieldsSpecs } from "@/module _id: false, }) class FoxGameOptions { - @ApiProperty(foxGameOptionsApiProperties.isPowerlessIfMissesWerewolf) - @Prop({ default: foxGameOptionsFieldsSpecs.isPowerlessIfMissesWerewolf.default }) + @ApiProperty(FOX_GAME_OPTIONS_API_PROPERTIES.isPowerlessIfMissesWerewolf) + @Prop({ default: FOX_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfMissesWerewolf.default }) @Expose() public isPowerlessIfMissesWerewolf: boolean; } -const FoxGameOptionsSchema = SchemaFactory.createForClass(FoxGameOptions); +const FOX_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(FoxGameOptions); -export { FoxGameOptions, FoxGameOptionsSchema }; \ No newline at end of file +export { + FoxGameOptions, + FOX_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/guard-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/guard-game-options.schema.ts index c1bd93e8e..4dad7fcac 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/guard-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/guard-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { guardGameOptionsApiProperties, guardGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/guard-game-options.constant"; +import { GUARD_GAME_OPTIONS_API_PROPERTIES, GUARD_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/guard-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { guardGameOptionsApiProperties, guardGameOptionsFieldsSpecs } from "@/mo _id: false, }) class GuardGameOptions { - @ApiProperty(guardGameOptionsApiProperties.canProtectTwice) - @Prop({ default: guardGameOptionsFieldsSpecs.canProtectTwice.default }) + @ApiProperty(GUARD_GAME_OPTIONS_API_PROPERTIES.canProtectTwice) + @Prop({ default: GUARD_GAME_OPTIONS_FIELDS_SPECS.canProtectTwice.default }) @Expose() public canProtectTwice: boolean; } -const GuardGameOptionsSchema = SchemaFactory.createForClass(GuardGameOptions); +const GUARD_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(GuardGameOptions); -export { GuardGameOptions, GuardGameOptionsSchema }; \ No newline at end of file +export { + GuardGameOptions, + GUARD_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/idiot-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/idiot-game-options.schema.ts index f9b6ab7e7..e88677029 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/idiot-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/idiot-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { idiotGameOptionsApiProperties, idiotGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant"; +import { IDIOT_GAME_OPTIONS_API_PROPERTIES, IDIOT_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/idiot-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { idiotGameOptionsApiProperties, idiotGameOptionsFieldsSpecs } from "@/mo _id: false, }) class IdiotGameOptions { - @ApiProperty(idiotGameOptionsApiProperties.doesDieOnAncientDeath) - @Prop({ default: idiotGameOptionsFieldsSpecs.doesDieOnAncientDeath.default }) + @ApiProperty(IDIOT_GAME_OPTIONS_API_PROPERTIES.doesDieOnAncientDeath) + @Prop({ default: IDIOT_GAME_OPTIONS_FIELDS_SPECS.doesDieOnAncientDeath.default }) @Expose() public doesDieOnAncientDeath: boolean; } -const IdiotGameOptionsSchema = SchemaFactory.createForClass(IdiotGameOptions); +const IDIOT_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(IdiotGameOptions); -export { IdiotGameOptions, IdiotGameOptionsSchema }; \ No newline at end of file +export { + IdiotGameOptions, + IDIOT_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/little-girl-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/little-girl-game-options.schema.ts index 83ae25196..a37321dba 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/little-girl-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/little-girl-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { littleGirlGameOptionsApiProperties, littleGirlGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant"; +import { LITTLE_GIRL_GAME_OPTIONS_API_PROPERTIES, LITTLE_GIRL_GAME_OPTIONS_SPECS_FIELDS } from "@/modules/game/constants/game-options/roles-game-options/little-girl-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { littleGirlGameOptionsApiProperties, littleGirlGameOptionsFieldsSpecs } _id: false, }) class LittleGirlGameOptions { - @ApiProperty(littleGirlGameOptionsApiProperties.isProtectedByGuard) - @Prop({ default: littleGirlGameOptionsFieldsSpecs.isProtectedByGuard.default }) + @ApiProperty(LITTLE_GIRL_GAME_OPTIONS_API_PROPERTIES.isProtectedByGuard) + @Prop({ default: LITTLE_GIRL_GAME_OPTIONS_SPECS_FIELDS.isProtectedByGuard.default }) @Expose() public isProtectedByGuard: boolean; } -const LittleGirlGameOptionsSchema = SchemaFactory.createForClass(LittleGirlGameOptions); +const LITTLE_GIRL_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(LittleGirlGameOptions); -export { LittleGirlGameOptions, LittleGirlGameOptionsSchema }; \ No newline at end of file +export { + LittleGirlGameOptions, + LITTLE_GIRL_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/pied-piper-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/pied-piper-game-options.schema.ts index 53085ea26..79f94d7a0 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/pied-piper-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/pied-piper-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { piedPiperGameOptionsApiProperties, piedPiperGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant"; +import { PIED_PIPER_GAME_OPTIONS_API_PROPERTIES, PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/pied-piper-game-options.constant"; @Schema({ versionKey: false, @@ -10,21 +10,24 @@ import { piedPiperGameOptionsApiProperties, piedPiperGameOptionsFieldsSpecs } fr _id: false, }) class PiedPiperGameOptions { - @ApiProperty(piedPiperGameOptionsApiProperties.charmedPeopleCountPerNight) + @ApiProperty(PIED_PIPER_GAME_OPTIONS_API_PROPERTIES.charmedPeopleCountPerNight) @Prop({ - default: piedPiperGameOptionsFieldsSpecs.charmedPeopleCountPerNight.default, - min: piedPiperGameOptionsFieldsSpecs.charmedPeopleCountPerNight.minimum, - max: piedPiperGameOptionsFieldsSpecs.charmedPeopleCountPerNight.maximum, + default: PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.charmedPeopleCountPerNight.default, + min: PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.charmedPeopleCountPerNight.minimum, + max: PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.charmedPeopleCountPerNight.maximum, }) @Expose() public charmedPeopleCountPerNight: number; - @ApiProperty(piedPiperGameOptionsApiProperties.isPowerlessIfInfected) - @Prop({ default: piedPiperGameOptionsFieldsSpecs.isPowerlessIfInfected.default }) + @ApiProperty(PIED_PIPER_GAME_OPTIONS_API_PROPERTIES.isPowerlessIfInfected) + @Prop({ default: PIED_PIPER_GAME_OPTIONS_FIELDS_SPECS.isPowerlessIfInfected.default }) @Expose() public isPowerlessIfInfected: boolean; } -const PiedPiperGameOptionsSchema = SchemaFactory.createForClass(PiedPiperGameOptions); +const PIED_PIPER_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(PiedPiperGameOptions); -export { PiedPiperGameOptions, PiedPiperGameOptionsSchema }; \ No newline at end of file +export { + PiedPiperGameOptions, + PIED_PIPER_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/raven-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/raven-game-options.schema.ts index 82e7ef69c..af40696de 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/raven-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/raven-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { ravenGameOptionsApiProperties, ravenGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/raven-game-options.constant"; +import { RAVEN_GAME_OPTIONS_API_PROPERTIES, RAVEN_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/raven-game-options.constant"; @Schema({ versionKey: false, @@ -10,16 +10,19 @@ import { ravenGameOptionsApiProperties, ravenGameOptionsFieldsSpecs } from "@/mo _id: false, }) class RavenGameOptions { - @ApiProperty(ravenGameOptionsApiProperties.markPenalty) + @ApiProperty(RAVEN_GAME_OPTIONS_API_PROPERTIES.markPenalty) @Prop({ - default: ravenGameOptionsFieldsSpecs.markPenalty.default, - min: ravenGameOptionsFieldsSpecs.markPenalty.minimum, - max: ravenGameOptionsFieldsSpecs.markPenalty.maximum, + default: RAVEN_GAME_OPTIONS_FIELDS_SPECS.markPenalty.default, + min: RAVEN_GAME_OPTIONS_FIELDS_SPECS.markPenalty.minimum, + max: RAVEN_GAME_OPTIONS_FIELDS_SPECS.markPenalty.maximum, }) @Expose() public markPenalty: number; } -const RavenGameOptionsSchema = SchemaFactory.createForClass(RavenGameOptions); +const RAVEN_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(RavenGameOptions); -export { RavenGameOptions, RavenGameOptionsSchema }; \ No newline at end of file +export { + RavenGameOptions, + RAVEN_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/roles-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/roles-game-options.schema.ts index eef304f09..159af5dcf 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/roles-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/roles-game-options.schema.ts @@ -2,25 +2,25 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { rolesGameOptionsApiProperties, rolesGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/roles-game-options.constant"; -import { AncientGameOptions, AncientGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema"; -import { BearTamerGameOptions, BearTamerGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema"; -import { BigBadWolfGameOptions, BigBadWolfGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema"; -import { DogWolfGameOptions, DogWolfGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/dog-wolf-game-options.schema"; -import { FoxGameOptions, FoxGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/fox-game-options.schema"; -import { GuardGameOptions, GuardGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/guard-game-options.schema"; -import { IdiotGameOptions, IdiotGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/idiot-game-options.schema"; -import { LittleGirlGameOptions, LittleGirlGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/little-girl-game-options.schema"; -import { PiedPiperGameOptions, PiedPiperGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/pied-piper-game-options.schema"; -import { RavenGameOptions, RavenGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/raven-game-options.schema"; -import { SeerGameOptions, SeerGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/seer-game-options.schema"; -import { SheriffGameOptions, SheriffGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema"; -import { StutteringJudgeGameOptions, StutteringJudgeGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/stuttering-judge-game-options.schema"; -import { ThiefGameOptions, ThiefGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/thief-game-options.schema"; -import { ThreeBrothersGameOptions, ThreeBrothersGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/three-brothers-game-options.schema"; -import { TwoSistersGameOptions, TwoSistersGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/two-sisters-game-options.schema"; -import { WhiteWerewolfGameOptions, WhiteWerewolfGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema"; -import { WildChildGameOptions, WildChildGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema"; +import { ROLES_GAME_OPTIONS_API_PROPERTIES, ROLES_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/roles-game-options.constant"; +import { AncientGameOptions, ANCIENT_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema"; +import { BearTamerGameOptions, BEAR_TAMER_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema"; +import { BigBadWolfGameOptions, BIG_BAD_WOLF_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema"; +import { DogWolfGameOptions, DOG_WOLF_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/dog-wolf-game-options.schema"; +import { FoxGameOptions, FOX_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/fox-game-options.schema"; +import { GuardGameOptions, GUARD_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/guard-game-options.schema"; +import { IdiotGameOptions, IDIOT_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/idiot-game-options.schema"; +import { LittleGirlGameOptions, LITTLE_GIRL_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/little-girl-game-options.schema"; +import { PiedPiperGameOptions, PIED_PIPER_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/pied-piper-game-options.schema"; +import { RavenGameOptions, RAVEN_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/raven-game-options.schema"; +import { SeerGameOptions, SEER_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/seer-game-options.schema"; +import { SheriffGameOptions, SHERIFF_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema"; +import { StutteringJudgeGameOptions, STUTTERING_JUDGE_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/stuttering-judge-game-options.schema"; +import { ThiefGameOptions, THIEF_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/thief-game-options.schema"; +import { ThreeBrothersGameOptions, THREE_BROTHERS_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/three-brothers-game-options.schema"; +import { TwoSistersGameOptions, TWO_SISTERS_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/two-sisters-game-options.schema"; +import { WhiteWerewolfGameOptions, WHITE_WEREWOLF_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema"; +import { WildChildGameOptions, WILD_CHILD_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema"; @Schema({ versionKey: false, @@ -28,172 +28,172 @@ import { WildChildGameOptions, WildChildGameOptionsSchema } from "@/modules/game _id: false, }) class RolesGameOptions { - @ApiProperty(rolesGameOptionsApiProperties.doSkipCallIfNoTarget) - @Prop({ default: rolesGameOptionsFieldsSpecs.doSkipCallIfNoTarget.default }) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.doSkipCallIfNoTarget) + @Prop({ default: ROLES_GAME_OPTIONS_FIELDS_SPECS.doSkipCallIfNoTarget.default }) @Expose() public doSkipCallIfNoTarget: boolean; - @ApiProperty(rolesGameOptionsApiProperties.areRevealedOnDeath) - @Prop({ default: rolesGameOptionsFieldsSpecs.areRevealedOnDeath.default }) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.areRevealedOnDeath) + @Prop({ default: ROLES_GAME_OPTIONS_FIELDS_SPECS.areRevealedOnDeath.default }) @Expose() public areRevealedOnDeath: boolean; - @ApiProperty(rolesGameOptionsApiProperties.sheriff) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.sheriff) @Prop({ - type: SheriffGameOptionsSchema, + type: SHERIFF_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => SheriffGameOptions) @Expose() public sheriff: SheriffGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.bigBadWolf) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.bigBadWolf) @Prop({ - type: BigBadWolfGameOptionsSchema, + type: BIG_BAD_WOLF_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => BigBadWolfGameOptions) @Expose() public bigBadWolf: BigBadWolfGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.whiteWerewolf) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.whiteWerewolf) @Prop({ - type: WhiteWerewolfGameOptionsSchema, + type: WHITE_WEREWOLF_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => WhiteWerewolfGameOptions) @Expose() public whiteWerewolf: WhiteWerewolfGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.seer) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.seer) @Prop({ - type: SeerGameOptionsSchema, + type: SEER_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => SeerGameOptions) @Expose() public seer: SeerGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.littleGirl) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.littleGirl) @Prop({ - type: LittleGirlGameOptionsSchema, + type: LITTLE_GIRL_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => LittleGirlGameOptions) @Expose() public littleGirl: LittleGirlGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.guard) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.guard) @Prop({ - type: GuardGameOptionsSchema, + type: GUARD_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => GuardGameOptions) @Expose() public guard: GuardGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.ancient) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.ancient) @Prop({ - type: AncientGameOptionsSchema, + type: ANCIENT_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => AncientGameOptions) @Expose() public ancient: AncientGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.idiot) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.idiot) @Prop({ - type: IdiotGameOptionsSchema, + type: IDIOT_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => IdiotGameOptions) @Expose() public idiot: IdiotGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.twoSisters) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.twoSisters) @Prop({ - type: TwoSistersGameOptionsSchema, + type: TWO_SISTERS_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => TwoSistersGameOptions) @Expose() public twoSisters: TwoSistersGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.threeBrothers) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.threeBrothers) @Prop({ - type: ThreeBrothersGameOptionsSchema, + type: THREE_BROTHERS_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => ThreeBrothersGameOptions) @Expose() public threeBrothers: ThreeBrothersGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.fox) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.fox) @Prop({ - type: FoxGameOptionsSchema, + type: FOX_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => FoxGameOptions) @Expose() public fox: FoxGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.bearTamer) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.bearTamer) @Prop({ - type: BearTamerGameOptionsSchema, + type: BEAR_TAMER_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => BearTamerGameOptions) @Expose() public bearTamer: BearTamerGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.stutteringJudge) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.stutteringJudge) @Prop({ - type: StutteringJudgeGameOptionsSchema, + type: STUTTERING_JUDGE_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => StutteringJudgeGameOptions) @Expose() public stutteringJudge: StutteringJudgeGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.wildChild) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.wildChild) @Prop({ - type: WildChildGameOptionsSchema, + type: WILD_CHILD_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => WildChildGameOptions) @Expose() public wildChild: WildChildGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.dogWolf) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.dogWolf) @Prop({ - type: DogWolfGameOptionsSchema, + type: DOG_WOLF_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => DogWolfGameOptions) @Expose() public dogWolf: DogWolfGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.thief) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.thief) @Prop({ - type: ThiefGameOptionsSchema, + type: THIEF_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => ThiefGameOptions) @Expose() public thief: ThiefGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.piedPiper) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.piedPiper) @Prop({ - type: PiedPiperGameOptionsSchema, + type: PIED_PIPER_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => PiedPiperGameOptions) @Expose() public piedPiper: PiedPiperGameOptions; - @ApiProperty(rolesGameOptionsApiProperties.raven) + @ApiProperty(ROLES_GAME_OPTIONS_API_PROPERTIES.raven) @Prop({ - type: RavenGameOptionsSchema, + type: RAVEN_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => RavenGameOptions) @@ -201,6 +201,9 @@ class RolesGameOptions { public raven: RavenGameOptions; } -const RolesGameOptionsSchema = SchemaFactory.createForClass(RolesGameOptions); +const ROLES_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(RolesGameOptions); -export { RolesGameOptions, RolesGameOptionsSchema }; \ No newline at end of file +export { + RolesGameOptions, + ROLES_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/seer-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/seer-game-options.schema.ts index b680a28f0..7605cc9ed 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/seer-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/seer-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { seerGameOptionsApiProperties, seerGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/seer-game-options.constant"; +import { SEER_GAME_OPTIONS_API_PROPERTIES, SEER_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/seer-game-options.constant"; @Schema({ versionKey: false, @@ -10,17 +10,20 @@ import { seerGameOptionsApiProperties, seerGameOptionsFieldsSpecs } from "@/modu _id: false, }) class SeerGameOptions { - @ApiProperty(seerGameOptionsApiProperties.isTalkative) - @Prop({ default: seerGameOptionsFieldsSpecs.isTalkative.default }) + @ApiProperty(SEER_GAME_OPTIONS_API_PROPERTIES.isTalkative) + @Prop({ default: SEER_GAME_OPTIONS_FIELDS_SPECS.isTalkative.default }) @Expose() public isTalkative: boolean; - @ApiProperty(seerGameOptionsApiProperties.canSeeRoles) - @Prop({ default: seerGameOptionsFieldsSpecs.canSeeRoles.default }) + @ApiProperty(SEER_GAME_OPTIONS_API_PROPERTIES.canSeeRoles) + @Prop({ default: SEER_GAME_OPTIONS_FIELDS_SPECS.canSeeRoles.default }) @Expose() public canSeeRoles: boolean; } -const SeerGameOptionsSchema = SchemaFactory.createForClass(SeerGameOptions); +const SEER_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(SeerGameOptions); -export { SeerGameOptions, SeerGameOptionsSchema }; \ No newline at end of file +export { + SeerGameOptions, + SEER_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.schema.ts index a65d79cf9..7c63f51b6 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { sheriffElectionGameOptionsApiProperties, sheriffElectionGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES, SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.constant"; +import { GamePhases } from "@/modules/game/enums/game.enum"; @Schema({ versionKey: false, @@ -11,20 +11,23 @@ import { GAME_PHASES } from "@/modules/game/enums/game.enum"; _id: false, }) class SheriffElectionGameOptions { - @ApiProperty(sheriffElectionGameOptionsApiProperties.turn) + @ApiProperty(SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES.turn) @Prop({ - default: sheriffElectionGameOptionsFieldsSpecs.turn.default, - min: sheriffElectionGameOptionsFieldsSpecs.turn.minimum, + default: SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.turn.default, + min: SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.turn.minimum, }) @Expose() public turn: number; - @ApiProperty(sheriffElectionGameOptionsApiProperties.phase) - @Prop({ default: sheriffElectionGameOptionsFieldsSpecs.phase.default }) + @ApiProperty(SHERIFF_ELECTION_GAME_OPTIONS_API_PROPERTIES.phase) + @Prop({ default: SHERIFF_ELECTION_GAME_OPTIONS_FIELDS_SPECS.phase.default }) @Expose() - public phase: GAME_PHASES; + public phase: GamePhases; } -const SheriffElectionGameOptionsSchema = SchemaFactory.createForClass(SheriffElectionGameOptions); +const SHERIFF_ELECTION_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(SheriffElectionGameOptions); -export { SheriffElectionGameOptions, SheriffElectionGameOptionsSchema }; \ No newline at end of file +export { + SheriffElectionGameOptions, + SHERIFF_ELECTION_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema.ts index 3fe9c9c62..008c2c720 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { sheriffGameOptionsApiProperties, sheriffGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant"; -import { SheriffElectionGameOptions, SheriffElectionGameOptionsSchema } from "@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.schema"; +import { SHERIFF_GAME_OPTIONS_API_PROPERTIES, SHERIFF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.constant"; +import { SheriffElectionGameOptions, SHERIFF_ELECTION_GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-election-game-options.schema"; @Schema({ versionKey: false, @@ -11,26 +11,29 @@ import { SheriffElectionGameOptions, SheriffElectionGameOptionsSchema } from "@/ _id: false, }) class SheriffGameOptions { - @ApiProperty(sheriffGameOptionsApiProperties.isEnabled) - @Prop({ default: sheriffGameOptionsFieldsSpecs.isEnabled.default }) + @ApiProperty(SHERIFF_GAME_OPTIONS_API_PROPERTIES.isEnabled) + @Prop({ default: SHERIFF_GAME_OPTIONS_FIELDS_SPECS.isEnabled.default }) @Expose() public isEnabled: boolean; - @ApiProperty(sheriffGameOptionsApiProperties.electedAt) + @ApiProperty(SHERIFF_GAME_OPTIONS_API_PROPERTIES.electedAt) @Prop({ - type: SheriffElectionGameOptionsSchema, + type: SHERIFF_ELECTION_GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => SheriffElectionGameOptions) @Expose() public electedAt: SheriffElectionGameOptions; - @ApiProperty(sheriffGameOptionsApiProperties.hasDoubledVote) - @Prop({ default: sheriffGameOptionsFieldsSpecs.hasDoubledVote.default }) + @ApiProperty(SHERIFF_GAME_OPTIONS_API_PROPERTIES.hasDoubledVote) + @Prop({ default: SHERIFF_GAME_OPTIONS_FIELDS_SPECS.hasDoubledVote.default }) @Expose() public hasDoubledVote: boolean; } -const SheriffGameOptionsSchema = SchemaFactory.createForClass(SheriffGameOptions); +const SHERIFF_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(SheriffGameOptions); -export { SheriffGameOptions, SheriffGameOptionsSchema }; \ No newline at end of file +export { + SheriffGameOptions, + SHERIFF_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/stuttering-judge-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/stuttering-judge-game-options.schema.ts index f8a1cd35c..104eb7c36 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/stuttering-judge-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/stuttering-judge-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { stutteringJudgeGameOptionsApiProperties, stutteringJudgeGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant"; +import { STUTTERING_JUDGE_GAME_OPTIONS_API_PROPERTIES, STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/stuttering-judge-game-options.constant"; @Schema({ versionKey: false, @@ -10,16 +10,19 @@ import { stutteringJudgeGameOptionsApiProperties, stutteringJudgeGameOptionsFiel _id: false, }) class StutteringJudgeGameOptions { - @ApiProperty(stutteringJudgeGameOptionsApiProperties.voteRequestsCount) + @ApiProperty(STUTTERING_JUDGE_GAME_OPTIONS_API_PROPERTIES.voteRequestsCount) @Prop({ - default: stutteringJudgeGameOptionsFieldsSpecs.voteRequestsCount.default, - min: stutteringJudgeGameOptionsFieldsSpecs.voteRequestsCount.minimum, - max: stutteringJudgeGameOptionsFieldsSpecs.voteRequestsCount.maximum, + default: STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS.voteRequestsCount.default, + min: STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS.voteRequestsCount.minimum, + max: STUTTERING_JUDGE_GAME_OPTIONS_FIELDS_SPECS.voteRequestsCount.maximum, }) @Expose() public voteRequestsCount: number; } -const StutteringJudgeGameOptionsSchema = SchemaFactory.createForClass(StutteringJudgeGameOptions); +const STUTTERING_JUDGE_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(StutteringJudgeGameOptions); -export { StutteringJudgeGameOptions, StutteringJudgeGameOptionsSchema }; \ No newline at end of file +export { + StutteringJudgeGameOptions, + STUTTERING_JUDGE_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/thief-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/thief-game-options.schema.ts index ae4cd33e1..3b148903b 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/thief-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/thief-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { thiefGameOptionsApiProperties, thiefGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant"; +import { THIEF_GAME_OPTIONS_API_PROPERTIES, THIEF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/thief-judge-game-options.constant"; @Schema({ versionKey: false, @@ -10,21 +10,24 @@ import { thiefGameOptionsApiProperties, thiefGameOptionsFieldsSpecs } from "@/mo _id: false, }) class ThiefGameOptions { - @ApiProperty(thiefGameOptionsApiProperties.mustChooseBetweenWerewolves) - @Prop({ default: thiefGameOptionsFieldsSpecs.mustChooseBetweenWerewolves.default }) + @ApiProperty(THIEF_GAME_OPTIONS_API_PROPERTIES.mustChooseBetweenWerewolves) + @Prop({ default: THIEF_GAME_OPTIONS_FIELDS_SPECS.mustChooseBetweenWerewolves.default }) @Expose() public mustChooseBetweenWerewolves: boolean; - @ApiProperty(thiefGameOptionsApiProperties.additionalCardsCount) + @ApiProperty(THIEF_GAME_OPTIONS_API_PROPERTIES.additionalCardsCount) @Prop({ - default: thiefGameOptionsFieldsSpecs.additionalCardsCount.default, - min: thiefGameOptionsFieldsSpecs.additionalCardsCount.minimum, - max: thiefGameOptionsFieldsSpecs.additionalCardsCount.maximum, + default: THIEF_GAME_OPTIONS_FIELDS_SPECS.additionalCardsCount.default, + min: THIEF_GAME_OPTIONS_FIELDS_SPECS.additionalCardsCount.minimum, + max: THIEF_GAME_OPTIONS_FIELDS_SPECS.additionalCardsCount.maximum, }) @Expose() public additionalCardsCount: number; } -const ThiefGameOptionsSchema = SchemaFactory.createForClass(ThiefGameOptions); +const THIEF_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(ThiefGameOptions); -export { ThiefGameOptions, ThiefGameOptionsSchema }; \ No newline at end of file +export { + ThiefGameOptions, + THIEF_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/three-brothers-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/three-brothers-game-options.schema.ts index cc82554d3..8e25108fa 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/three-brothers-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/three-brothers-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { threeBrothersGameOptionsApiProperties, threeBrothersGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant"; +import { THREE_BROTHERS_GAME_OPTIONS_API_PROPERTIES, THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/three-brothers-game-options.constant"; @Schema({ versionKey: false, @@ -10,16 +10,19 @@ import { threeBrothersGameOptionsApiProperties, threeBrothersGameOptionsFieldsSp _id: false, }) class ThreeBrothersGameOptions { - @ApiProperty(threeBrothersGameOptionsApiProperties.wakingUpInterval) + @ApiProperty(THREE_BROTHERS_GAME_OPTIONS_API_PROPERTIES.wakingUpInterval) @Prop({ - default: threeBrothersGameOptionsFieldsSpecs.wakingUpInterval.default, - min: threeBrothersGameOptionsFieldsSpecs.wakingUpInterval.minimum, - max: threeBrothersGameOptionsFieldsSpecs.wakingUpInterval.maximum, + default: THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.default, + min: THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.minimum, + max: THREE_BROTHERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.maximum, }) @Expose() public wakingUpInterval: number; } -const ThreeBrothersGameOptionsSchema = SchemaFactory.createForClass(ThreeBrothersGameOptions); +const THREE_BROTHERS_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(ThreeBrothersGameOptions); -export { ThreeBrothersGameOptions, ThreeBrothersGameOptionsSchema }; \ No newline at end of file +export { + ThreeBrothersGameOptions, + THREE_BROTHERS_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/two-sisters-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/two-sisters-game-options.schema.ts index bce86fc4e..93d1b222a 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/two-sisters-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/two-sisters-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { twoSistersGameOptionsApiProperties, twoSistersGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant"; +import { TWO_SISTERS_GAME_OPTIONS_API_PROPERTIES, TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/two-sisters-game-options.constant"; @Schema({ versionKey: false, @@ -10,16 +10,19 @@ import { twoSistersGameOptionsApiProperties, twoSistersGameOptionsFieldsSpecs } _id: false, }) class TwoSistersGameOptions { - @ApiProperty(twoSistersGameOptionsApiProperties.wakingUpInterval) + @ApiProperty(TWO_SISTERS_GAME_OPTIONS_API_PROPERTIES.wakingUpInterval) @Prop({ - default: twoSistersGameOptionsFieldsSpecs.wakingUpInterval.default, - min: twoSistersGameOptionsFieldsSpecs.wakingUpInterval.minimum, - max: twoSistersGameOptionsFieldsSpecs.wakingUpInterval.maximum, + default: TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.default, + min: TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.minimum, + max: TWO_SISTERS_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.maximum, }) @Expose() public wakingUpInterval: number; } -const TwoSistersGameOptionsSchema = SchemaFactory.createForClass(TwoSistersGameOptions); +const TWO_SISTERS_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(TwoSistersGameOptions); -export { TwoSistersGameOptions, TwoSistersGameOptionsSchema }; \ No newline at end of file +export { + TwoSistersGameOptions, + TWO_SISTERS_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema.ts index 99ac1c139..1fe3d053f 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { whiteWerewolfGameOptionsApiProperties, whiteWerewolfGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant"; +import { WHITE_WEREWOLF_GAME_OPTIONS_API_PROPERTIES, WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/white-werewolf-game-options.constant"; @Schema({ versionKey: false, @@ -10,16 +10,19 @@ import { whiteWerewolfGameOptionsApiProperties, whiteWerewolfGameOptionsFieldsSp _id: false, }) class WhiteWerewolfGameOptions { - @ApiProperty(whiteWerewolfGameOptionsApiProperties.wakingUpInterval) + @ApiProperty(WHITE_WEREWOLF_GAME_OPTIONS_API_PROPERTIES.wakingUpInterval) @Prop({ - default: whiteWerewolfGameOptionsFieldsSpecs.wakingUpInterval.default, - min: whiteWerewolfGameOptionsFieldsSpecs.wakingUpInterval.minimum, - max: whiteWerewolfGameOptionsFieldsSpecs.wakingUpInterval.maximum, + default: WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.default, + min: WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.minimum, + max: WHITE_WEREWOLF_GAME_OPTIONS_FIELDS_SPECS.wakingUpInterval.maximum, }) @Expose() public wakingUpInterval: number; } -const WhiteWerewolfGameOptionsSchema = SchemaFactory.createForClass(WhiteWerewolfGameOptions); +const WHITE_WEREWOLF_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(WhiteWerewolfGameOptions); -export { WhiteWerewolfGameOptions, WhiteWerewolfGameOptionsSchema }; \ No newline at end of file +export { + WhiteWerewolfGameOptions, + WHITE_WEREWOLF_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema.ts b/src/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema.ts index 6adf49603..61bdc7ca6 100644 --- a/src/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { wildChildGameOptionsApiProperties, wildChildGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant"; +import { WILD_CHILD_GAME_OPTIONS_API_PROPERTIES, WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/roles-game-options/wild-child-game-options.constant"; @Schema({ versionKey: false, @@ -10,12 +10,15 @@ import { wildChildGameOptionsApiProperties, wildChildGameOptionsFieldsSpecs } fr _id: false, }) class WildChildGameOptions { - @ApiProperty(wildChildGameOptionsApiProperties.isTransformationRevealed) - @Prop({ default: wildChildGameOptionsFieldsSpecs.isTransformationRevealed.default }) + @ApiProperty(WILD_CHILD_GAME_OPTIONS_API_PROPERTIES.isTransformationRevealed) + @Prop({ default: WILD_CHILD_GAME_OPTIONS_FIELDS_SPECS.isTransformationRevealed.default }) @Expose() public isTransformationRevealed: boolean; } -const WildChildGameOptionsSchema = SchemaFactory.createForClass(WildChildGameOptions); +const WILD_CHILD_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(WildChildGameOptions); -export { WildChildGameOptions, WildChildGameOptionsSchema }; \ No newline at end of file +export { + WildChildGameOptions, + WILD_CHILD_GAME_OPTIONS_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-options/votes-game-options.schema.ts b/src/modules/game/schemas/game-options/votes-game-options.schema.ts index 1551cca7c..a68d4e6f2 100644 --- a/src/modules/game/schemas/game-options/votes-game-options.schema.ts +++ b/src/modules/game/schemas/game-options/votes-game-options.schema.ts @@ -2,7 +2,7 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { votesGameOptionsApiProperties, votesGameOptionsFieldsSpecs } from "@/modules/game/constants/game-options/votes-game-options.constant"; +import { VOTES_GAME_OPTIONS_API_PROPERTIES, VOTES_GAME_OPTIONS_FIELDS_SPECS } from "@/modules/game/constants/game-options/votes-game-options.constant"; @Schema({ versionKey: false, @@ -10,15 +10,15 @@ import { votesGameOptionsApiProperties, votesGameOptionsFieldsSpecs } from "@/mo _id: false, }) class VotesGameOptions { - @ApiProperty(votesGameOptionsApiProperties.canBeSkipped) - @Prop({ default: votesGameOptionsFieldsSpecs.canBeSkipped.default }) + @ApiProperty(VOTES_GAME_OPTIONS_API_PROPERTIES.canBeSkipped) + @Prop({ default: VOTES_GAME_OPTIONS_FIELDS_SPECS.canBeSkipped.default }) @Expose() public canBeSkipped: boolean; } -const VotesGameOptionsSchema = SchemaFactory.createForClass(VotesGameOptions); +const VOTES_GAME_OPTIONS_SCHEMA = SchemaFactory.createForClass(VotesGameOptions); export { VotesGameOptions, - VotesGameOptionsSchema, + VOTES_GAME_OPTIONS_SCHEMA, }; \ No newline at end of file diff --git a/src/modules/game/schemas/game-play/game-play-source/game-play-source.schema.ts b/src/modules/game/schemas/game-play/game-play-source/game-play-source.schema.ts index 8e5403449..f1c551034 100644 --- a/src/modules/game/schemas/game-play/game-play-source/game-play-source.schema.ts +++ b/src/modules/game/schemas/game-play/game-play-source/game-play-source.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gamePlaySourceApiProperties, gamePlaySourceFieldsSpecs } from "@/modules/game/constants/game-play/game-play-source.constant"; -import { Player, PlayerSchema } from "@/modules/game/schemas/player/player.schema"; +import { GAME_PLAY_SOURCE_API_PROPERTIES, GAME_PLAY_SOURCE_FIELDS_SPECS } from "@/modules/game/constants/game-play/game-play-source.constant"; +import { Player, PLAYER_SCHEMA } from "@/modules/game/schemas/player/player.schema"; import { GameSource } from "@/modules/game/types/game.type"; @Schema({ @@ -12,25 +12,28 @@ import { GameSource } from "@/modules/game/types/game.type"; _id: false, }) class GamePlaySource { - @ApiProperty(gamePlaySourceApiProperties.name) + @ApiProperty(GAME_PLAY_SOURCE_API_PROPERTIES.name) @Prop({ - required: gamePlaySourceFieldsSpecs.name.required, - enum: gamePlaySourceFieldsSpecs.name.enum, + required: GAME_PLAY_SOURCE_FIELDS_SPECS.name.required, + enum: GAME_PLAY_SOURCE_FIELDS_SPECS.name.enum, }) @Expose() public name: GameSource; - @ApiProperty(gamePlaySourceApiProperties.players) + @ApiProperty(GAME_PLAY_SOURCE_API_PROPERTIES.players) @Prop({ - required: gamePlaySourceFieldsSpecs.players.required, + required: GAME_PLAY_SOURCE_FIELDS_SPECS.players.required, default: undefined, - type: [PlayerSchema], + type: [PLAYER_SCHEMA], }) @Type(() => Player) @Expose() public players?: Player[]; } -const GamePlaySourceSchema = SchemaFactory.createForClass(GamePlaySource); +const GAME_PLAY_SOURCE_SCHEMA = SchemaFactory.createForClass(GamePlaySource); -export { GamePlaySource, GamePlaySourceSchema }; \ No newline at end of file +export { + GamePlaySource, + GAME_PLAY_SOURCE_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game-play/game-play.schema.constant.ts b/src/modules/game/schemas/game-play/game-play.schema.constant.ts index f5d2aa34d..bd16d43cb 100644 --- a/src/modules/game/schemas/game-play/game-play.schema.constant.ts +++ b/src/modules/game/schemas/game-play/game-play.schema.constant.ts @@ -1,15 +1,15 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -const gamePlayApiProperties: Readonly> = Object.freeze({ +const GAME_PLAY_API_PROPERTIES: Readonly> = Object.freeze({ source: { description: "Which role or group of people need to perform this action, with expected players to play" }, action: { description: "What action need to be performed for this play", - example: GAME_PLAY_ACTIONS.VOTE, + example: GamePlayActions.VOTE, }, cause: { description: "Why this play needs to be performed" }, }); -export { gamePlayApiProperties }; \ No newline at end of file +export { GAME_PLAY_API_PROPERTIES }; \ No newline at end of file diff --git a/src/modules/game/schemas/game-play/game-play.schema.ts b/src/modules/game/schemas/game-play/game-play.schema.ts index a54faaae4..49f9603d1 100644 --- a/src/modules/game/schemas/game-play/game-play.schema.ts +++ b/src/modules/game/schemas/game-play/game-play.schema.ts @@ -2,9 +2,9 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from "@/modules/game/enums/game-play.enum"; -import { GamePlaySource, GamePlaySourceSchema } from "@/modules/game/schemas/game-play/game-play-source/game-play-source.schema"; -import { gamePlayApiProperties } from "@/modules/game/schemas/game-play/game-play.schema.constant"; +import { GamePlayActions, GamePlayCauses } from "@/modules/game/enums/game-play.enum"; +import { GamePlaySource, GAME_PLAY_SOURCE_SCHEMA } from "@/modules/game/schemas/game-play/game-play-source/game-play-source.schema"; +import { GAME_PLAY_API_PROPERTIES } from "@/modules/game/schemas/game-play/game-play.schema.constant"; @Schema({ versionKey: false, @@ -12,29 +12,29 @@ import { gamePlayApiProperties } from "@/modules/game/schemas/game-play/game-pla _id: false, }) class GamePlay { - @ApiProperty(gamePlayApiProperties.source) + @ApiProperty(GAME_PLAY_API_PROPERTIES.source) @Prop({ required: true, - type: GamePlaySourceSchema, + type: GAME_PLAY_SOURCE_SCHEMA, }) @Type(() => GamePlaySource) @Expose() public source: GamePlaySource; - @ApiProperty(gamePlayApiProperties.action) + @ApiProperty(GAME_PLAY_API_PROPERTIES.action) @Prop({ required: true }) @Expose() - public action: GAME_PLAY_ACTIONS; + public action: GamePlayActions; - @ApiProperty(gamePlayApiProperties.cause) + @ApiProperty(GAME_PLAY_API_PROPERTIES.cause) @Prop() @Expose() - public cause?: GAME_PLAY_CAUSES; + public cause?: GamePlayCauses; } -const GamePlaySchema = SchemaFactory.createForClass(GamePlay); +const GAME_PLAY_SCHEMA = SchemaFactory.createForClass(GamePlay); export { GamePlay, - GamePlaySchema, + GAME_PLAY_SCHEMA, }; \ No newline at end of file diff --git a/src/modules/game/schemas/game-victory/game-victory.schema.ts b/src/modules/game/schemas/game-victory/game-victory.schema.ts index e1cbc530c..554d8c045 100644 --- a/src/modules/game/schemas/game-victory/game-victory.schema.ts +++ b/src/modules/game/schemas/game-victory/game-victory.schema.ts @@ -2,9 +2,9 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { gameVictoryApiProperties } from "@/modules/game/constants/game-victory/game-victory.constant"; -import { GAME_VICTORY_TYPES } from "@/modules/game/enums/game-victory.enum"; -import { PlayerSchema, Player } from "@/modules/game/schemas/player/player.schema"; +import { GAME_VICTORY_API_PROPERTIES } from "@/modules/game/constants/game-victory/game-victory.constant"; +import { GameVictoryTypes } from "@/modules/game/enums/game-victory.enum"; +import { PLAYER_SCHEMA, Player } from "@/modules/game/schemas/player/player.schema"; @Schema({ versionKey: false, @@ -12,18 +12,21 @@ import { PlayerSchema, Player } from "@/modules/game/schemas/player/player.schem _id: false, }) class GameVictory { - @ApiProperty(gameVictoryApiProperties.type) - @Prop({ required: true, enum: gameVictoryApiProperties.type.enum }) + @ApiProperty(GAME_VICTORY_API_PROPERTIES.type) + @Prop({ required: true, enum: GAME_VICTORY_API_PROPERTIES.type.enum }) @Expose() - public type: GAME_VICTORY_TYPES; + public type: GameVictoryTypes; - @ApiProperty(gameVictoryApiProperties.winners) - @Prop({ type: [PlayerSchema], default: undefined }) + @ApiProperty(GAME_VICTORY_API_PROPERTIES.winners) + @Prop({ type: [PLAYER_SCHEMA], default: undefined }) @Type(() => Player) @Expose() public winners?: Player[]; } -const GameVictorySchema = SchemaFactory.createForClass(GameVictory); +const GAME_VICTORY_SCHEMA = SchemaFactory.createForClass(GameVictory); -export { GameVictory, GameVictorySchema }; \ No newline at end of file +export { + GameVictory, + GAME_VICTORY_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/game.schema.constant.ts b/src/modules/game/schemas/game.schema.constant.ts index 39dcce273..358b15b1e 100644 --- a/src/modules/game/schemas/game.schema.constant.ts +++ b/src/modules/game/schemas/game.schema.constant.ts @@ -1,43 +1,43 @@ import type { ApiPropertyOptions } from "@nestjs/swagger"; -import { GAME_PHASES, GAME_STATUSES } from "@/modules/game/enums/game.enum"; +import { GamePhases, GameStatuses } from "@/modules/game/enums/game.enum"; import type { Game } from "@/modules/game/schemas/game.schema"; -const gameFieldsSpecs = Object.freeze({ +const GAME_FIELDS_SPECS = Object.freeze({ players: { minItems: 4, maxItems: 40, }, turn: { default: 1 }, - phase: { default: GAME_PHASES.NIGHT }, + phase: { default: GamePhases.NIGHT }, tick: { default: 1 }, - status: { default: GAME_STATUSES.PLAYING }, + status: { default: GameStatuses.PLAYING }, }); -const gameApiProperties: Readonly> = Object.freeze({ +const GAME_API_PROPERTIES: Readonly> = Object.freeze({ _id: { description: "Game's Mongo ObjectId", example: "507f1f77bcf86cd799439011", }, turn: { description: "Starting at `1`, a turn starts with the first phase (the `night`) and ends with the second phase (the `day`)", - ...gameFieldsSpecs.turn, + ...GAME_FIELDS_SPECS.turn, }, phase: { description: "Each turn has two phases, `day` and `night`. Starting at `night`", - ...gameFieldsSpecs.phase, + ...GAME_FIELDS_SPECS.phase, }, tick: { description: "Starting at `1`, tick increments each time a play is made", - ...gameFieldsSpecs.tick, + ...GAME_FIELDS_SPECS.tick, }, status: { description: "Game's current status", - ...gameFieldsSpecs.status, + ...GAME_FIELDS_SPECS.status, }, players: { description: "Players of the game", - ...gameFieldsSpecs.players, + ...GAME_FIELDS_SPECS.players, }, currentPlay: { description: "Current play which needs to be performed" }, upcomingPlays: { description: "Queue of upcoming plays that needs to be performed to continue the game right after the current play" }, @@ -49,6 +49,6 @@ const gameApiProperties: Readonly> = Obje }); export { - gameFieldsSpecs, - gameApiProperties, + GAME_FIELDS_SPECS, + GAME_API_PROPERTIES, }; \ No newline at end of file diff --git a/src/modules/game/schemas/game.schema.ts b/src/modules/game/schemas/game.schema.ts index 465e70d4d..870d21521 100644 --- a/src/modules/game/schemas/game.schema.ts +++ b/src/modules/game/schemas/game.schema.ts @@ -2,109 +2,107 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; import { Types } from "mongoose"; -import type { HydratedDocument } from "mongoose"; -import { GAME_PHASES, GAME_STATUSES } from "@/modules/game/enums/game.enum"; -import { GameAdditionalCardSchema, GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; -import { GameOptions, GameOptionsSchema } from "@/modules/game/schemas/game-options/game-options.schema"; -import { GamePlaySchema, GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -import { GameVictory, GameVictorySchema } from "@/modules/game/schemas/game-victory/game-victory.schema"; -import { gameApiProperties, gameFieldsSpecs } from "@/modules/game/schemas/game.schema.constant"; -import { PlayerSchema, Player } from "@/modules/game/schemas/player/player.schema"; +import { GamePhases, GameStatuses } from "@/modules/game/enums/game.enum"; +import { GAME_ADDITIONAL_CARD_SCHEMA, GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; +import { GameOptions, GAME_OPTIONS_SCHEMA } from "@/modules/game/schemas/game-options/game-options.schema"; +import { GAME_PLAY_SCHEMA, GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; +import { GameVictory, GAME_VICTORY_SCHEMA } from "@/modules/game/schemas/game-victory/game-victory.schema"; +import { GAME_API_PROPERTIES, GAME_FIELDS_SPECS } from "@/modules/game/schemas/game.schema.constant"; +import { PLAYER_SCHEMA, Player } from "@/modules/game/schemas/player/player.schema"; @Schema({ timestamps: true, versionKey: false, }) class Game { - @ApiProperty(gameApiProperties._id) + @ApiProperty(GAME_API_PROPERTIES._id) @Type(() => String) @Expose() public _id: Types.ObjectId; - @ApiProperty(gameApiProperties.turn) - @Prop({ default: gameFieldsSpecs.turn.default }) + @ApiProperty(GAME_API_PROPERTIES.turn) + @Prop({ default: GAME_FIELDS_SPECS.turn.default }) @Expose() public turn: number; - @ApiProperty(gameApiProperties.phase) - @Prop({ default: gameFieldsSpecs.phase.default }) + @ApiProperty(GAME_API_PROPERTIES.phase) + @Prop({ default: GAME_FIELDS_SPECS.phase.default }) @Expose() - public phase: GAME_PHASES; + public phase: GamePhases; - @ApiProperty(gameApiProperties.tick) - @Prop({ default: gameFieldsSpecs.tick.default }) + @ApiProperty(GAME_API_PROPERTIES.tick) + @Prop({ default: GAME_FIELDS_SPECS.tick.default }) @Expose() public tick: number; - @ApiProperty(gameApiProperties.status) - @Prop({ default: gameFieldsSpecs.status.default }) + @ApiProperty(GAME_API_PROPERTIES.status) + @Prop({ default: GAME_FIELDS_SPECS.status.default }) @Expose() - public status: GAME_STATUSES; + public status: GameStatuses; - @ApiProperty(gameApiProperties.players) + @ApiProperty(GAME_API_PROPERTIES.players) @Prop({ required: true, - type: [PlayerSchema], + type: [PLAYER_SCHEMA], }) @Type(() => Player) @Expose() public players: Player[]; - @ApiProperty(gameApiProperties.currentPlay) + @ApiProperty(GAME_API_PROPERTIES.currentPlay) @Prop({ required: true, - type: GamePlaySchema, + type: GAME_PLAY_SCHEMA, }) @Type(() => GamePlay) @Expose() public currentPlay: GamePlay | null; - @ApiProperty(gameApiProperties.upcomingPlays) + @ApiProperty(GAME_API_PROPERTIES.upcomingPlays) @Prop({ required: true, - type: [GamePlaySchema], + type: [GAME_PLAY_SCHEMA], }) @Type(() => GamePlay) @Expose() public upcomingPlays: GamePlay[]; - @ApiProperty(gameApiProperties.options) + @ApiProperty(GAME_API_PROPERTIES.options) @Prop({ - type: GameOptionsSchema, + type: GAME_OPTIONS_SCHEMA, default: () => ({}), }) @Type(() => GameOptions) @Expose() public options: GameOptions; - @ApiProperty(gameApiProperties.additionalCards) - @Prop({ type: [GameAdditionalCardSchema], default: undefined }) + @ApiProperty(GAME_API_PROPERTIES.additionalCards) + @Prop({ type: [GAME_ADDITIONAL_CARD_SCHEMA], default: undefined }) @Type(() => GameAdditionalCard) @Expose() public additionalCards?: GameAdditionalCard[]; - @ApiProperty(gameApiProperties.victory) - @Prop({ type: GameVictorySchema, default: undefined }) + @ApiProperty(GAME_API_PROPERTIES.victory) + @Prop({ type: GAME_VICTORY_SCHEMA, default: undefined }) @Type(() => GameVictory) @Expose() public victory?: GameVictory; - @ApiProperty(gameApiProperties.createdAt) + @ApiProperty(GAME_API_PROPERTIES.createdAt) @Type(() => Date) @Expose() public createdAt: Date; - @ApiProperty(gameApiProperties.updatedAt) + @ApiProperty(GAME_API_PROPERTIES.updatedAt) @Type(() => Date) @Expose() public updatedAt: Date; } -const GameSchema = SchemaFactory.createForClass(Game); +const GAME_SCHEMA = SchemaFactory.createForClass(Game); -type GameDocument = HydratedDocument; - -export type { GameDocument }; - -export { Game, GameSchema }; \ No newline at end of file +export { + Game, + GAME_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/player/player-attribute/player-attribute-activation.schema.ts b/src/modules/game/schemas/player/player-attribute/player-attribute-activation.schema.ts index eb030db16..e4aa0ebb8 100644 --- a/src/modules/game/schemas/player/player-attribute/player-attribute-activation.schema.ts +++ b/src/modules/game/schemas/player/player-attribute/player-attribute-activation.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { playerAttributeActivationApiProperties, playerAttributeActivationFieldsSpecs } from "@/modules/game/constants/player/player-attribute/player-attribute-activation.constant"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { PLAYER_ATTRIBUTE_ACTIVATION_API_PROPERTIES, PLAYER_ATTRIBUTE_ACTIVATION_FIELDS_SPECS } from "@/modules/game/constants/player/player-attribute/player-attribute-activation.constant"; +import { GamePhases } from "@/modules/game/enums/game.enum"; @Schema({ versionKey: false, @@ -11,20 +11,23 @@ import { GAME_PHASES } from "@/modules/game/enums/game.enum"; _id: false, }) class PlayerAttributeActivation { - @ApiProperty(playerAttributeActivationApiProperties.turn) + @ApiProperty(PLAYER_ATTRIBUTE_ACTIVATION_API_PROPERTIES.turn) @Prop({ required: true, - min: playerAttributeActivationFieldsSpecs.turn.minimum, + min: PLAYER_ATTRIBUTE_ACTIVATION_FIELDS_SPECS.turn.minimum, }) @Expose() public turn: number; - @ApiProperty(playerAttributeActivationApiProperties.phase) + @ApiProperty(PLAYER_ATTRIBUTE_ACTIVATION_API_PROPERTIES.phase) @Prop({ required: true }) @Expose() - public phase: GAME_PHASES; + public phase: GamePhases; } -const PlayerAttributeActivationSchema = SchemaFactory.createForClass(PlayerAttributeActivation); +const PLAYER_ATTRIBUTE_ACTIVATION_SCHEMA = SchemaFactory.createForClass(PlayerAttributeActivation); -export { PlayerAttributeActivation, PlayerAttributeActivationSchema }; \ No newline at end of file +export { + PlayerAttributeActivation, + PLAYER_ATTRIBUTE_ACTIVATION_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/player/player-attribute/player-attribute.schema.ts b/src/modules/game/schemas/player/player-attribute/player-attribute.schema.ts index 050cc376f..d728d216c 100644 --- a/src/modules/game/schemas/player/player-attribute/player-attribute.schema.ts +++ b/src/modules/game/schemas/player/player-attribute/player-attribute.schema.ts @@ -2,9 +2,9 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; -import { playerAttributeApiProperties, playerAttributeFieldsSpecs } from "@/modules/game/constants/player/player-attribute/player-attribute.constant"; -import { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; -import { PlayerAttributeActivation, PlayerAttributeActivationSchema } from "@/modules/game/schemas/player/player-attribute/player-attribute-activation.schema"; +import { PLAYER_ATTRIBUTE_API_PROPERTIES, PLAYER_ATTRIBUTE_FIELDS_SPECS } from "@/modules/game/constants/player/player-attribute/player-attribute.constant"; +import { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; +import { PlayerAttributeActivation, PLAYER_ATTRIBUTE_ACTIVATION_SCHEMA } from "@/modules/game/schemas/player/player-attribute/player-attribute-activation.schema"; import { GameSource } from "@/modules/game/types/game.type"; @Schema({ @@ -13,33 +13,36 @@ import { GameSource } from "@/modules/game/types/game.type"; _id: false, }) class PlayerAttribute { - @ApiProperty(playerAttributeApiProperties.name) + @ApiProperty(PLAYER_ATTRIBUTE_API_PROPERTIES.name) @Prop({ required: true }) @Expose() - public name: PLAYER_ATTRIBUTE_NAMES; + public name: PlayerAttributeNames; - @ApiProperty(playerAttributeApiProperties.source) + @ApiProperty(PLAYER_ATTRIBUTE_API_PROPERTIES.source) @Prop({ required: true }) @Expose() public source: GameSource; - @ApiProperty(playerAttributeApiProperties.remainingPhases) - @Prop({ min: playerAttributeFieldsSpecs.remainingPhases.minimum }) + @ApiProperty(PLAYER_ATTRIBUTE_API_PROPERTIES.remainingPhases) + @Prop({ min: PLAYER_ATTRIBUTE_FIELDS_SPECS.remainingPhases.minimum }) @Expose() public remainingPhases?: number; - @ApiProperty(playerAttributeApiProperties.activeAt) - @Prop({ type: PlayerAttributeActivationSchema }) + @ApiProperty(PLAYER_ATTRIBUTE_API_PROPERTIES.activeAt) + @Prop({ type: PLAYER_ATTRIBUTE_ACTIVATION_SCHEMA }) @Type(() => PlayerAttributeActivation) @Expose() public activeAt?: PlayerAttributeActivation; - @ApiProperty(playerAttributeApiProperties.doesRemainAfterDeath) + @ApiProperty(PLAYER_ATTRIBUTE_API_PROPERTIES.doesRemainAfterDeath) @Prop({ required: false }) @Expose() public doesRemainAfterDeath?: boolean; } -const PlayerAttributeSchema = SchemaFactory.createForClass(PlayerAttribute); +const PLAYER_ATTRIBUTE_SCHEMA = SchemaFactory.createForClass(PlayerAttribute); -export { PlayerAttribute, PlayerAttributeSchema }; \ No newline at end of file +export { + PlayerAttribute, + PLAYER_ATTRIBUTE_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/player/player-death.schema.ts b/src/modules/game/schemas/player/player-death.schema.ts index 5f6eb6165..40bf93c62 100644 --- a/src/modules/game/schemas/player/player-death.schema.ts +++ b/src/modules/game/schemas/player/player-death.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { playerDeathApiProperties } from "@/modules/game/constants/player/player-death.constant"; -import { PLAYER_DEATH_CAUSES } from "@/modules/game/enums/player.enum"; +import { PLAYER_DEATH_API_PROPERTIES } from "@/modules/game/constants/player/player-death.constant"; +import { PlayerDeathCauses } from "@/modules/game/enums/player.enum"; import { GameSource } from "@/modules/game/types/game.type"; @Schema({ @@ -12,17 +12,20 @@ import { GameSource } from "@/modules/game/types/game.type"; _id: false, }) class PlayerDeath { - @ApiProperty(playerDeathApiProperties.source) + @ApiProperty(PLAYER_DEATH_API_PROPERTIES.source) @Prop({ required: true }) @Expose() public source: GameSource; - @ApiProperty(playerDeathApiProperties.cause) + @ApiProperty(PLAYER_DEATH_API_PROPERTIES.cause) @Prop({ required: true }) @Expose() - public cause: PLAYER_DEATH_CAUSES; + public cause: PlayerDeathCauses; } -const PlayerDeathSchema = SchemaFactory.createForClass(PlayerDeath); +const PLAYER_DEATH_SCHEMA = SchemaFactory.createForClass(PlayerDeath); -export { PlayerDeath, PlayerDeathSchema }; \ No newline at end of file +export { + PlayerDeath, + PLAYER_DEATH_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/player/player-role.schema.ts b/src/modules/game/schemas/player/player-role.schema.ts index 4fea2af83..a04cfe16a 100644 --- a/src/modules/game/schemas/player/player-role.schema.ts +++ b/src/modules/game/schemas/player/player-role.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { playerRoleApiProperties } from "@/modules/game/constants/player/player-role.constant"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { PLAYER_ROLE_API_PROPERTIES } from "@/modules/game/constants/player/player-role.constant"; +import { RoleNames } from "@/modules/role/enums/role.enum"; @Schema({ versionKey: false, @@ -11,22 +11,25 @@ import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; _id: false, }) class PlayerRole { - @ApiProperty(playerRoleApiProperties.original) + @ApiProperty(PLAYER_ROLE_API_PROPERTIES.original) @Prop({ required: true }) @Expose() - public original: ROLE_NAMES; + public original: RoleNames; - @ApiProperty(playerRoleApiProperties.current) + @ApiProperty(PLAYER_ROLE_API_PROPERTIES.current) @Prop({ required: true }) @Expose() - public current: ROLE_NAMES; + public current: RoleNames; - @ApiProperty(playerRoleApiProperties.isRevealed) + @ApiProperty(PLAYER_ROLE_API_PROPERTIES.isRevealed) @Prop({ required: true }) @Expose() public isRevealed: boolean; } -const PlayerRoleSchema = SchemaFactory.createForClass(PlayerRole); +const PLAYER_ROLE_SCHEMA = SchemaFactory.createForClass(PlayerRole); -export { PlayerRole, PlayerRoleSchema }; \ No newline at end of file +export { + PlayerRole, + PLAYER_ROLE_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/player/player-side.schema.ts b/src/modules/game/schemas/player/player-side.schema.ts index c15ad8a8c..0a99333e0 100644 --- a/src/modules/game/schemas/player/player-side.schema.ts +++ b/src/modules/game/schemas/player/player-side.schema.ts @@ -2,8 +2,8 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; -import { playerSideApiProperties } from "@/modules/game/constants/player/player-side.constant"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { PLAYER_SIDE_API_PROPERTIES } from "@/modules/game/constants/player/player-side.constant"; +import { RoleSides } from "@/modules/role/enums/role.enum"; @Schema({ versionKey: false, @@ -11,17 +11,20 @@ import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; _id: false, }) class PlayerSide { - @ApiProperty(playerSideApiProperties.original) + @ApiProperty(PLAYER_SIDE_API_PROPERTIES.original) @Prop({ required: true }) @Expose() - public original: ROLE_SIDES; + public original: RoleSides; - @ApiProperty(playerSideApiProperties.current) + @ApiProperty(PLAYER_SIDE_API_PROPERTIES.current) @Prop({ required: true }) @Expose() - public current: ROLE_SIDES; + public current: RoleSides; } -const PlayerSideSchema = SchemaFactory.createForClass(PlayerSide); +const PLAYER_SIDE_SCHEMA = SchemaFactory.createForClass(PlayerSide); -export { PlayerSide, PlayerSideSchema }; \ No newline at end of file +export { + PlayerSide, + PLAYER_SIDE_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/schemas/player/player.schema.ts b/src/modules/game/schemas/player/player.schema.ts index 5cc2c9ed1..fa25cbaab 100644 --- a/src/modules/game/schemas/player/player.schema.ts +++ b/src/modules/game/schemas/player/player.schema.ts @@ -3,76 +3,79 @@ import { ApiProperty } from "@nestjs/swagger"; import { Expose, Type } from "class-transformer"; import { Types } from "mongoose"; -import { playerApiProperties, playersFieldsSpecs } from "@/modules/game/constants/player/player.constant"; -import { PlayerAttribute, PlayerAttributeSchema } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; -import { PlayerDeath, PlayerDeathSchema } from "@/modules/game/schemas/player/player-death.schema"; -import { PlayerRole, PlayerRoleSchema } from "@/modules/game/schemas/player/player-role.schema"; -import { PlayerSide, PlayerSideSchema } from "@/modules/game/schemas/player/player-side.schema"; +import { PLAYER_API_PROPERTIES, PLAYER_FIELDS_SPECS } from "@/modules/game/constants/player/player.constant"; +import { PlayerAttribute, PLAYER_ATTRIBUTE_SCHEMA } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; +import { PlayerDeath, PLAYER_DEATH_SCHEMA } from "@/modules/game/schemas/player/player-death.schema"; +import { PlayerRole, PLAYER_ROLE_SCHEMA } from "@/modules/game/schemas/player/player-role.schema"; +import { PlayerSide, PLAYER_SIDE_SCHEMA } from "@/modules/game/schemas/player/player-side.schema"; @Schema({ versionKey: false }) class Player { - @ApiProperty(playerApiProperties._id) + @ApiProperty(PLAYER_API_PROPERTIES._id) @Type(() => String) @Expose() public _id: Types.ObjectId; - @ApiProperty(playerApiProperties.name) + @ApiProperty(PLAYER_API_PROPERTIES.name) @Prop({ required: true, - minlength: playersFieldsSpecs.name.minLength, - maxLength: playersFieldsSpecs.name.maxLength, + minlength: PLAYER_FIELDS_SPECS.name.minLength, + maxLength: PLAYER_FIELDS_SPECS.name.maxLength, }) @Expose() public name: string; - @ApiProperty(playerApiProperties.role) + @ApiProperty(PLAYER_API_PROPERTIES.role) @Prop({ required: true, - type: PlayerRoleSchema, + type: PLAYER_ROLE_SCHEMA, }) @Type(() => PlayerRole) @Expose() public role: PlayerRole; - @ApiProperty(playerApiProperties.side) + @ApiProperty(PLAYER_API_PROPERTIES.side) @Prop({ required: true, - type: PlayerSideSchema, + type: PLAYER_SIDE_SCHEMA, }) @Type(() => PlayerSide) @Expose() public side: PlayerSide; - @ApiProperty(playerApiProperties.attributes) + @ApiProperty(PLAYER_API_PROPERTIES.attributes) @Prop({ required: true, - type: [PlayerAttributeSchema], - default: playersFieldsSpecs.attributes.default, + type: [PLAYER_ATTRIBUTE_SCHEMA], + default: PLAYER_FIELDS_SPECS.attributes.default, }) @Type(() => PlayerAttribute) @Expose() public attributes: PlayerAttribute[]; - @ApiProperty(playerApiProperties.position) + @ApiProperty(PLAYER_API_PROPERTIES.position) @Prop({ required: true, - min: playersFieldsSpecs.position.minimum, + min: PLAYER_FIELDS_SPECS.position.minimum, }) @Expose() public position: number; - @ApiProperty(playerApiProperties.isAlive) - @Prop({ default: playersFieldsSpecs.isAlive.default }) + @ApiProperty(PLAYER_API_PROPERTIES.isAlive) + @Prop({ default: PLAYER_FIELDS_SPECS.isAlive.default }) @Expose() public isAlive: boolean; - @ApiProperty(playerApiProperties.death) - @Prop({ type: PlayerDeathSchema }) + @ApiProperty(PLAYER_API_PROPERTIES.death) + @Prop({ type: PLAYER_DEATH_SCHEMA }) @Type(() => PlayerDeath) @Expose() public death?: PlayerDeath; } -const PlayerSchema = SchemaFactory.createForClass(Player); +const PLAYER_SCHEMA = SchemaFactory.createForClass(Player); -export { Player, PlayerSchema }; \ No newline at end of file +export { + Player, + PLAYER_SCHEMA, +}; \ No newline at end of file diff --git a/src/modules/game/types/game-history-record.type.ts b/src/modules/game/types/game-history-record.type.ts index 5455f52d7..a7407af81 100644 --- a/src/modules/game/types/game-history-record.type.ts +++ b/src/modules/game/types/game-history-record.type.ts @@ -1,7 +1,12 @@ import { OmitType } from "@nestjs/swagger"; +import type { HydratedDocument } from "mongoose"; import { GameHistoryRecord } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; class GameHistoryRecordToInsert extends OmitType(GameHistoryRecord, ["_id", "createdAt"] as const) {} +type GameHistoryRecordDocument = HydratedDocument; + +export type { GameHistoryRecordDocument }; + export { GameHistoryRecordToInsert }; \ No newline at end of file diff --git a/src/modules/game/types/game.type.ts b/src/modules/game/types/game.type.ts index d9db9dae2..c62cf07aa 100644 --- a/src/modules/game/types/game.type.ts +++ b/src/modules/game/types/game.type.ts @@ -1,11 +1,17 @@ -import type { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; -import type { ROLE_SIDES, ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import type { HydratedDocument } from "mongoose"; -type GameSource = PLAYER_ATTRIBUTE_NAMES.SHERIFF | PLAYER_GROUPS | ROLE_NAMES; +import type { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; +import type { Game } from "@/modules/game/schemas/game.schema"; +import type { RoleSides, RoleNames } from "@/modules/role/enums/role.enum"; -type GetNearestPlayerOptions = { direction: "left" | "right"; playerSide?: ROLE_SIDES }; +type GameDocument = HydratedDocument; + +type GameSource = PlayerAttributeNames.SHERIFF | PlayerGroups | RoleNames; + +type GetNearestPlayerOptions = { direction: "left" | "right"; playerSide?: RoleSides }; export type { + GameDocument, GameSource, GetNearestPlayerOptions, }; \ No newline at end of file diff --git a/src/modules/health/controllers/health.controller.ts b/src/modules/health/controllers/health.controller.ts index e14c97d45..f25c224cb 100644 --- a/src/modules/health/controllers/health.controller.ts +++ b/src/modules/health/controllers/health.controller.ts @@ -3,10 +3,10 @@ import { ApiOperation, ApiTags } from "@nestjs/swagger"; import { HealthCheck, HealthCheckService, MongooseHealthIndicator } from "@nestjs/terminus"; import type { HealthCheckResult, HealthIndicatorResult } from "@nestjs/terminus"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; @ApiTags("❤️ Health") -@Controller(API_RESOURCES.HEALTH) +@Controller(ApiResources.HEALTH) export class HealthController { public constructor( private readonly health: HealthCheckService, diff --git a/src/modules/role/constants/role.constant.ts b/src/modules/role/constants/role.constant.ts index 57c269e1a..9ca9b9ee2 100644 --- a/src/modules/role/constants/role.constant.ts +++ b/src/modules/role/constants/role.constant.ts @@ -1,198 +1,198 @@ import { plainToInstance } from "class-transformer"; -import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides, RoleTypes } from "@/modules/role/enums/role.enum"; import { Role } from "@/modules/role/types/role.type"; -const defaultWerewolfRole: Readonly = Object.freeze(plainToInstance(Role, { - name: ROLE_NAMES.WEREWOLF, - side: ROLE_SIDES.WEREWOLVES, - type: ROLE_TYPES.WEREWOLF, +const DEFAULT_WEREWOLF_ROLE: Readonly = Object.freeze(plainToInstance(Role, { + name: RoleNames.WEREWOLF, + side: RoleSides.WEREWOLVES, + type: RoleTypes.WEREWOLF, maxInGame: 99, })); -const werewolvesRoles: Readonly = plainToInstance(Role, [ - defaultWerewolfRole, +const WEREWOLF_ROLES: Readonly = plainToInstance(Role, [ + DEFAULT_WEREWOLF_ROLE, { - name: ROLE_NAMES.BIG_BAD_WOLF, - side: ROLE_SIDES.WEREWOLVES, - type: ROLE_TYPES.WEREWOLF, + name: RoleNames.BIG_BAD_WOLF, + side: RoleSides.WEREWOLVES, + type: RoleTypes.WEREWOLF, maxInGame: 1, recommendedMinPlayers: 15, }, { - name: ROLE_NAMES.VILE_FATHER_OF_WOLVES, - side: ROLE_SIDES.WEREWOLVES, - type: ROLE_TYPES.WEREWOLF, + name: RoleNames.VILE_FATHER_OF_WOLVES, + side: RoleSides.WEREWOLVES, + type: RoleTypes.WEREWOLF, maxInGame: 1, recommendedMinPlayers: 12, }, { - name: ROLE_NAMES.WHITE_WEREWOLF, - side: ROLE_SIDES.WEREWOLVES, - type: ROLE_TYPES.LONELY, + name: RoleNames.WHITE_WEREWOLF, + side: RoleSides.WEREWOLVES, + type: RoleTypes.LONELY, maxInGame: 1, recommendedMinPlayers: 12, }, ]).map(role => Object.freeze(role)); -const defaultVillagerRole: Readonly = Object.freeze(plainToInstance(Role, { - name: ROLE_NAMES.VILLAGER, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, +const DEFAULT_VILLAGER_ROLE: Readonly = Object.freeze(plainToInstance(Role, { + name: RoleNames.VILLAGER, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 99, })); -const villagerRoles: Readonly = plainToInstance(Role, [ - defaultVillagerRole, +const VILLAGER_ROLES: Readonly = plainToInstance(Role, [ + DEFAULT_VILLAGER_ROLE, { - name: ROLE_NAMES.VILLAGER_VILLAGER, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.VILLAGER_VILLAGER, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.SEER, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.SEER, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.CUPID, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.CUPID, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.WITCH, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.WITCH, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.HUNTER, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.HUNTER, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.LITTLE_GIRL, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.LITTLE_GIRL, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.GUARD, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.GUARD, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.ANCIENT, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.ANCIENT, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.SCAPEGOAT, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.SCAPEGOAT, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.IDIOT, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.IDIOT, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.TWO_SISTERS, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.TWO_SISTERS, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, minInGame: 2, maxInGame: 2, recommendedMinPlayers: 12, }, { - name: ROLE_NAMES.THREE_BROTHERS, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.THREE_BROTHERS, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, minInGame: 3, maxInGame: 3, recommendedMinPlayers: 15, }, { - name: ROLE_NAMES.FOX, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.FOX, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, recommendedMinPlayers: 12, }, { - name: ROLE_NAMES.BEAR_TAMER, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.BEAR_TAMER, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.STUTTERING_JUDGE, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.STUTTERING_JUDGE, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.RUSTY_SWORD_KNIGHT, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.VILLAGER, + name: RoleNames.RUSTY_SWORD_KNIGHT, + side: RoleSides.VILLAGERS, + type: RoleTypes.VILLAGER, maxInGame: 1, }, { - name: ROLE_NAMES.THIEF, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.AMBIGUOUS, + name: RoleNames.THIEF, + side: RoleSides.VILLAGERS, + type: RoleTypes.AMBIGUOUS, maxInGame: 1, }, { - name: ROLE_NAMES.WILD_CHILD, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.AMBIGUOUS, + name: RoleNames.WILD_CHILD, + side: RoleSides.VILLAGERS, + type: RoleTypes.AMBIGUOUS, maxInGame: 1, }, { - name: ROLE_NAMES.DOG_WOLF, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.AMBIGUOUS, + name: RoleNames.DOG_WOLF, + side: RoleSides.VILLAGERS, + type: RoleTypes.AMBIGUOUS, maxInGame: 1, }, { - name: ROLE_NAMES.ANGEL, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.LONELY, + name: RoleNames.ANGEL, + side: RoleSides.VILLAGERS, + type: RoleTypes.LONELY, maxInGame: 1, }, { - name: ROLE_NAMES.PIED_PIPER, - side: ROLE_SIDES.VILLAGERS, - type: ROLE_TYPES.LONELY, + name: RoleNames.PIED_PIPER, + side: RoleSides.VILLAGERS, + type: RoleTypes.LONELY, maxInGame: 1, recommendedMinPlayers: 12, }, { - name: ROLE_NAMES.RAVEN, - side: ROLE_SIDES.VILLAGERS, + name: RoleNames.RAVEN, + side: RoleSides.VILLAGERS, maxInGame: 1, - type: ROLE_TYPES.VILLAGER, + type: RoleTypes.VILLAGER, }, ]).map(role => Object.freeze(role)); -const roles: Readonly = plainToInstance(Role, [ - ...werewolvesRoles, - ...villagerRoles, +const ROLES: Readonly = plainToInstance(Role, [ + ...WEREWOLF_ROLES, + ...VILLAGER_ROLES, ]).map(role => Object.freeze(role)); export { - roles, - defaultWerewolfRole, - defaultVillagerRole, - werewolvesRoles, - villagerRoles, + ROLES, + DEFAULT_WEREWOLF_ROLE, + DEFAULT_VILLAGER_ROLE, + WEREWOLF_ROLES, + VILLAGER_ROLES, }; \ No newline at end of file diff --git a/src/modules/role/controllers/role.controller.ts b/src/modules/role/controllers/role.controller.ts index 94eaf657d..aa026cc7e 100644 --- a/src/modules/role/controllers/role.controller.ts +++ b/src/modules/role/controllers/role.controller.ts @@ -1,18 +1,18 @@ import { Controller, Get, HttpStatus } from "@nestjs/common"; import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger"; -import { roles } from "@/modules/role/constants/role.constant"; +import { ROLES } from "@/modules/role/constants/role.constant"; import { Role } from "@/modules/role/types/role.type"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; @ApiTags("🃏 Roles") -@Controller(API_RESOURCES.ROLES) +@Controller(ApiResources.ROLES) export class RoleController { @Get() @ApiOperation({ summary: "Get all available roles for games" }) @ApiResponse({ status: HttpStatus.OK, type: Role, isArray: true }) private getRoles(): readonly Role[] { - return roles; + return ROLES; } } \ No newline at end of file diff --git a/src/modules/role/enums/role.enum.ts b/src/modules/role/enums/role.enum.ts index 4826bf7bb..b0e612bc7 100644 --- a/src/modules/role/enums/role.enum.ts +++ b/src/modules/role/enums/role.enum.ts @@ -1,4 +1,4 @@ -enum ROLE_NAMES { +enum RoleNames { WEREWOLF = "werewolf", BIG_BAD_WOLF = "big-bad-wolf", VILE_FATHER_OF_WOLVES = "vile-father-of-wolves", @@ -28,16 +28,16 @@ enum ROLE_NAMES { RAVEN = "raven", } -enum ROLE_SIDES { +enum RoleSides { VILLAGERS = "villagers", WEREWOLVES = "werewolves", } -enum ROLE_TYPES { +enum RoleTypes { VILLAGER = "villager", WEREWOLF = "werewolf", LONELY = "lonely", AMBIGUOUS = "ambiguous", } -export { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES }; \ No newline at end of file +export { RoleNames, RoleSides, RoleTypes }; \ No newline at end of file diff --git a/src/modules/role/helpers/role.factory.ts b/src/modules/role/helpers/role.factory.ts index 3224c784c..8de945e79 100644 --- a/src/modules/role/helpers/role.factory.ts +++ b/src/modules/role/helpers/role.factory.ts @@ -2,12 +2,12 @@ import { plainToInstance } from "class-transformer"; import { Role } from "@/modules/role/types/role.type"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { toJSON } from "@tests/helpers/object/object.helper"; function createRole(role: Role): Role { - return plainToInstance(Role, toJSON(role), plainToInstanceDefaultOptions); + return plainToInstance(Role, toJSON(role), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createRole }; \ No newline at end of file diff --git a/src/modules/role/helpers/role.helper.ts b/src/modules/role/helpers/role.helper.ts index b9f05b8a3..647eec098 100644 --- a/src/modules/role/helpers/role.helper.ts +++ b/src/modules/role/helpers/role.helper.ts @@ -1,7 +1,7 @@ -import type { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import type { RoleSides } from "@/modules/role/enums/role.enum"; import type { Role } from "@/modules/role/types/role.type"; -function getRolesWithSide(roles: Role[], side: ROLE_SIDES): Role[] { +function getRolesWithSide(roles: Role[], side: RoleSides): Role[] { return roles.filter(role => role.side === side); } diff --git a/src/modules/role/types/role.type.ts b/src/modules/role/types/role.type.ts index b2e0f7bee..190d28570 100644 --- a/src/modules/role/types/role.type.ts +++ b/src/modules/role/types/role.type.ts @@ -2,23 +2,23 @@ import { ApiProperty } from "@nestjs/swagger"; import { Expose } from "class-transformer"; import { IsEnum, IsInt, IsOptional, Min } from "class-validator"; -import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides, RoleTypes } from "@/modules/role/enums/role.enum"; class Role { @ApiProperty({ description: "Role's name" }) - @IsEnum(ROLE_NAMES) + @IsEnum(RoleNames) @Expose() - public name: ROLE_NAMES; + public name: RoleNames; @ApiProperty({ description: "Role's side" }) - @IsEnum(ROLE_SIDES) + @IsEnum(RoleSides) @Expose() - public side: ROLE_SIDES; + public side: RoleSides; @ApiProperty({ description: "Role's type" }) - @IsEnum(ROLE_TYPES) + @IsEnum(RoleTypes) @Expose() - public type: ROLE_TYPES; + public type: RoleTypes; @ApiProperty({ description: "If the role is chosen by at least one player, then `minInGame` players must choose it to start the game" }) @IsOptional() diff --git a/src/server/constants/server.constant.ts b/src/server/constants/server.constant.ts index 429c17f21..1d86995e5 100644 --- a/src/server/constants/server.constant.ts +++ b/src/server/constants/server.constant.ts @@ -2,6 +2,6 @@ import type { FastifyServerOptions } from "fastify"; import { queryStringParser } from "@/server/helpers/server.helper"; -const fastifyServerDefaultOptions: Readonly = Object.freeze({ querystringParser: queryStringParser }); +const FASTIFY_SERVER_DEFAULT_OPTIONS: Readonly = Object.freeze({ querystringParser: queryStringParser }); -export { fastifyServerDefaultOptions }; \ No newline at end of file +export { FASTIFY_SERVER_DEFAULT_OPTIONS }; \ No newline at end of file diff --git a/src/server/server.ts b/src/server/server.ts index 6df5bd8bc..ca53bdb29 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -3,16 +3,16 @@ import { NestFactory } from "@nestjs/core"; import { FastifyAdapter } from "@nestjs/platform-fastify"; import type { NestFastifyApplication } from "@nestjs/platform-fastify"; -import { fastifyServerDefaultOptions } from "@/server/constants/server.constant"; +import { FASTIFY_SERVER_DEFAULT_OPTIONS } from "@/server/constants/server.constant"; import { createSwaggerDocument } from "@/server/swagger/swagger"; -import { validationPipeDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { VALIDATION_PIPE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { AppModule } from "@/app.module"; async function bootstrap(port = 3000): Promise { - const app = await NestFactory.create(AppModule, new FastifyAdapter(fastifyServerDefaultOptions)); - app.useGlobalPipes(new ValidationPipe(validationPipeDefaultOptions)); + const app = await NestFactory.create(AppModule, new FastifyAdapter(FASTIFY_SERVER_DEFAULT_OPTIONS)); + app.useGlobalPipes(new ValidationPipe(VALIDATION_PIPE_DEFAULT_OPTIONS)); const documentationPath = "docs"; createSwaggerDocument(documentationPath, app); app.useStaticAssets({ diff --git a/src/shared/api/enums/api.enum.ts b/src/shared/api/enums/api.enum.ts index d4da92e1c..aa4e66780 100644 --- a/src/shared/api/enums/api.enum.ts +++ b/src/shared/api/enums/api.enum.ts @@ -1,4 +1,4 @@ -enum API_RESOURCES { +enum ApiResources { GAMES = "games", PLAYERS = "players", GAME_ADDITIONAL_CARDS = "game-additional-cards", @@ -6,4 +6,4 @@ enum API_RESOURCES { HEALTH = "health", } -export { API_RESOURCES }; \ No newline at end of file +export { ApiResources }; \ No newline at end of file diff --git a/src/shared/api/helpers/api.helper.ts b/src/shared/api/helpers/api.helper.ts index 9244b7ee2..cf1ffc99d 100644 --- a/src/shared/api/helpers/api.helper.ts +++ b/src/shared/api/helpers/api.helper.ts @@ -1,12 +1,12 @@ -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; -function getResourceSingularForm(resource: API_RESOURCES): string { - const resourceSingularForms: Record = { - [API_RESOURCES.GAMES]: "game", - [API_RESOURCES.PLAYERS]: "player", - [API_RESOURCES.GAME_ADDITIONAL_CARDS]: "additional card", - [API_RESOURCES.ROLES]: "role", - [API_RESOURCES.HEALTH]: "health", +function getResourceSingularForm(resource: ApiResources): string { + const resourceSingularForms: Record = { + [ApiResources.GAMES]: "game", + [ApiResources.PLAYERS]: "player", + [ApiResources.GAME_ADDITIONAL_CARDS]: "additional card", + [ApiResources.ROLES]: "role", + [ApiResources.HEALTH]: "health", }; return resourceSingularForms[resource]; } diff --git a/src/shared/exception/enums/bad-game-play-payload-error.enum.ts b/src/shared/exception/enums/bad-game-play-payload-error.enum.ts index 68826a106..f71a996a5 100644 --- a/src/shared/exception/enums/bad-game-play-payload-error.enum.ts +++ b/src/shared/exception/enums/bad-game-play-payload-error.enum.ts @@ -1,4 +1,4 @@ -enum BAD_GAME_PLAY_PAYLOAD_REASONS { +enum BadGamePlayPayloadReasons { UNEXPECTED_STUTTERING_JUDGE_VOTE_REQUEST = "`doesJudgeRequestAnotherVote` can't be set on this current game's state", UNEXPECTED_CHOSEN_SIDE = "`chosenSide` can't be set on this current game's state", REQUIRED_CHOSEN_SIDE = "`chosenSide` is required on this current game's state", @@ -36,4 +36,4 @@ enum BAD_GAME_PLAY_PAYLOAD_REASONS { BAD_SHERIFF_SETTLE_VOTES_TARGET = "Sheriff can't break the tie in votes with this target", } -export { BAD_GAME_PLAY_PAYLOAD_REASONS }; \ No newline at end of file +export { BadGamePlayPayloadReasons }; \ No newline at end of file diff --git a/src/shared/exception/enums/bad-resource-mutation-error.enum.ts b/src/shared/exception/enums/bad-resource-mutation-error.enum.ts index dbb78c9ec..2e05f75e7 100644 --- a/src/shared/exception/enums/bad-resource-mutation-error.enum.ts +++ b/src/shared/exception/enums/bad-resource-mutation-error.enum.ts @@ -1,5 +1,5 @@ -enum BAD_RESOURCE_MUTATION_REASONS { +enum BadResourceMutationReasons { GAME_NOT_PLAYING = "Game doesn't have status with value \"playing\"", } -export { BAD_RESOURCE_MUTATION_REASONS }; \ No newline at end of file +export { BadResourceMutationReasons }; \ No newline at end of file diff --git a/src/shared/exception/enums/resource-not-found-error.enum.ts b/src/shared/exception/enums/resource-not-found-error.enum.ts index 231226636..c61d4868a 100644 --- a/src/shared/exception/enums/resource-not-found-error.enum.ts +++ b/src/shared/exception/enums/resource-not-found-error.enum.ts @@ -1,4 +1,4 @@ -enum RESOURCE_NOT_FOUND_REASONS { +enum ResourceNotFoundReasons { UNKNOWN_GAME_PLAY_GAME_ID = "Game Play - Game Id is unknown in database", UNMATCHED_GAME_PLAY_REVEALED_PLAYER = "Game Play - Player in `revealedPlayers` is not in the game players", UNMATCHED_GAME_PLAY_DEAD_PLAYER = "Game Play - Player in `deadPlayers` is not in the game players", @@ -9,4 +9,4 @@ enum RESOURCE_NOT_FOUND_REASONS { UNMATCHED_GAME_PLAY_CHOSEN_CARD = "Game Play - Chosen card is not in the game additional cards", } -export { RESOURCE_NOT_FOUND_REASONS }; \ No newline at end of file +export { ResourceNotFoundReasons }; \ No newline at end of file diff --git a/src/shared/exception/enums/unexpected-exception.enum.ts b/src/shared/exception/enums/unexpected-exception.enum.ts index 3f163b1d7..3aebc3056 100644 --- a/src/shared/exception/enums/unexpected-exception.enum.ts +++ b/src/shared/exception/enums/unexpected-exception.enum.ts @@ -1,4 +1,4 @@ -enum UNEXPECTED_EXCEPTION_REASONS { +enum UnexpectedExceptionReasons { CANT_FIND_PLAYER_WITH_ID_IN_GAME = `Can't find player with id "{{playerId}}" in game "{{gameId}}"`, PLAYER_IS_DEAD = `Player with id "{{playerId}}" is dead in game "{{gameId}}"`, CANT_GENERATE_GAME_PLAYS = `Can't generate game plays`, @@ -6,4 +6,4 @@ enum UNEXPECTED_EXCEPTION_REASONS { NO_GAME_PLAY_PRIORITY = `Game play "{{gamePlay}}" doesn't have a set priority`, } -export { UNEXPECTED_EXCEPTION_REASONS }; \ No newline at end of file +export { UnexpectedExceptionReasons }; \ No newline at end of file diff --git a/src/shared/exception/helpers/unexpected-exception.factory.ts b/src/shared/exception/helpers/unexpected-exception.factory.ts index e87db6a9a..2089b2c12 100644 --- a/src/shared/exception/helpers/unexpected-exception.factory.ts +++ b/src/shared/exception/helpers/unexpected-exception.factory.ts @@ -2,30 +2,30 @@ import type { Types } from "mongoose"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -import { UNEXPECTED_EXCEPTION_REASONS } from "@/shared/exception/enums/unexpected-exception.enum"; +import { UnexpectedExceptionReasons } from "@/shared/exception/enums/unexpected-exception.enum"; import { UnexpectedException } from "@/shared/exception/types/unexpected-exception.type"; function createCantFindPlayerUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId; playerId: Types.ObjectId }): UnexpectedException { const { gameId, playerId } = interpolations; - return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: gameId.toString(), playerId: playerId.toString() }); + return new UnexpectedException(scope, UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: gameId.toString(), playerId: playerId.toString() }); } function createPlayerIsDeadUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId; playerId: Types.ObjectId }): UnexpectedException { const { gameId, playerId } = interpolations; - return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.PLAYER_IS_DEAD, { gameId: gameId.toString(), playerId: playerId.toString() }); + return new UnexpectedException(scope, UnexpectedExceptionReasons.PLAYER_IS_DEAD, { gameId: gameId.toString(), playerId: playerId.toString() }); } function createCantGenerateGamePlaysUnexpectedException(scope: string): UnexpectedException { - return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.CANT_GENERATE_GAME_PLAYS); + return new UnexpectedException(scope, UnexpectedExceptionReasons.CANT_GENERATE_GAME_PLAYS); } function createNoCurrentGamePlayUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId }): UnexpectedException { const { gameId } = interpolations; - return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.NO_CURRENT_GAME_PLAY, { gameId: gameId.toString() }); + return new UnexpectedException(scope, UnexpectedExceptionReasons.NO_CURRENT_GAME_PLAY, { gameId: gameId.toString() }); } function createNoGamePlayPriorityUnexpectedException(scope: string, gamePlay: GamePlay): UnexpectedException { - return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.NO_GAME_PLAY_PRIORITY, { gamePlay: JSON.stringify(gamePlay) }); + return new UnexpectedException(scope, UnexpectedExceptionReasons.NO_GAME_PLAY_PRIORITY, { gamePlay: JSON.stringify(gamePlay) }); } export { diff --git a/src/shared/exception/types/bad-game-play-payload-exception.type.ts b/src/shared/exception/types/bad-game-play-payload-exception.type.ts index 31bed0381..fdcd1fdb8 100644 --- a/src/shared/exception/types/bad-game-play-payload-exception.type.ts +++ b/src/shared/exception/types/bad-game-play-payload-exception.type.ts @@ -1,9 +1,9 @@ import { BadRequestException } from "@nestjs/common"; -import type { BAD_GAME_PLAY_PAYLOAD_REASONS } from "@/shared/exception/enums/bad-game-play-payload-error.enum"; +import type { BadGamePlayPayloadReasons } from "@/shared/exception/enums/bad-game-play-payload-error.enum"; class BadGamePlayPayloadException extends BadRequestException { - public constructor(reason: BAD_GAME_PLAY_PAYLOAD_REASONS) { + public constructor(reason: BadGamePlayPayloadReasons) { const message = `Bad game play payload`; super(message, { description: reason }); } diff --git a/src/shared/exception/types/bad-resource-mutation-exception.type.ts b/src/shared/exception/types/bad-resource-mutation-exception.type.ts index 659f462a0..f7f472db6 100644 --- a/src/shared/exception/types/bad-resource-mutation-exception.type.ts +++ b/src/shared/exception/types/bad-resource-mutation-exception.type.ts @@ -1,12 +1,12 @@ import { BadRequestException } from "@nestjs/common"; import { upperFirst } from "lodash"; -import type { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import type { BAD_RESOURCE_MUTATION_REASONS } from "@/shared/exception/enums/bad-resource-mutation-error.enum"; +import type { ApiResources } from "@/shared/api/enums/api.enum"; +import type { BadResourceMutationReasons } from "@/shared/exception/enums/bad-resource-mutation-error.enum"; import { getResourceSingularForm } from "@/shared/api/helpers/api.helper"; class BadResourceMutationException extends BadRequestException { - public constructor(resource: API_RESOURCES, id: string, reason?: BAD_RESOURCE_MUTATION_REASONS) { + public constructor(resource: ApiResources, id: string, reason?: BadResourceMutationReasons) { const resourceSingularForm = getResourceSingularForm(resource); const message = `Bad mutation for ${upperFirst(resourceSingularForm)} with id "${id}"`; super(message, { description: reason }); diff --git a/src/shared/exception/types/resource-not-found-exception.type.ts b/src/shared/exception/types/resource-not-found-exception.type.ts index 2fc9c0bdd..e295380c9 100644 --- a/src/shared/exception/types/resource-not-found-exception.type.ts +++ b/src/shared/exception/types/resource-not-found-exception.type.ts @@ -1,12 +1,12 @@ import { NotFoundException } from "@nestjs/common"; import { upperFirst } from "lodash"; -import type { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import type { RESOURCE_NOT_FOUND_REASONS } from "@/shared/exception/enums/resource-not-found-error.enum"; +import type { ApiResources } from "@/shared/api/enums/api.enum"; +import type { ResourceNotFoundReasons } from "@/shared/exception/enums/resource-not-found-error.enum"; import { getResourceSingularForm } from "@/shared/api/helpers/api.helper"; class ResourceNotFoundException extends NotFoundException { - public constructor(resource: API_RESOURCES, id: string, reason?: RESOURCE_NOT_FOUND_REASONS) { + public constructor(resource: ApiResources, id: string, reason?: ResourceNotFoundReasons) { const resourceSingularForm = getResourceSingularForm(resource); const message = `${upperFirst(resourceSingularForm)} with id "${id}" not found`; super(message, { description: reason }); diff --git a/src/shared/exception/types/unexpected-exception.type.ts b/src/shared/exception/types/unexpected-exception.type.ts index c53348a29..864a3235c 100644 --- a/src/shared/exception/types/unexpected-exception.type.ts +++ b/src/shared/exception/types/unexpected-exception.type.ts @@ -1,11 +1,11 @@ import { InternalServerErrorException } from "@nestjs/common"; import { template } from "radash"; -import type { UNEXPECTED_EXCEPTION_REASONS } from "@/shared/exception/enums/unexpected-exception.enum"; +import type { UnexpectedExceptionReasons } from "@/shared/exception/enums/unexpected-exception.enum"; import type { ExceptionInterpolations } from "@/shared/exception/types/exception.type"; class UnexpectedException extends InternalServerErrorException { - public constructor(scope: string, reason: UNEXPECTED_EXCEPTION_REASONS, interpolations: ExceptionInterpolations = {}) { + public constructor(scope: string, reason: UnexpectedExceptionReasons, interpolations: ExceptionInterpolations = {}) { const message = `Unexpected exception in ${scope}`; super(message, { description: template(reason, interpolations) }); } diff --git a/src/shared/validation/constants/validation.constant.ts b/src/shared/validation/constants/validation.constant.ts index 983293859..1989cb5e7 100644 --- a/src/shared/validation/constants/validation.constant.ts +++ b/src/shared/validation/constants/validation.constant.ts @@ -1,15 +1,18 @@ import type { ValidationPipeOptions } from "@nestjs/common"; import type { ClassTransformOptions } from "class-transformer/types/interfaces"; -const plainToInstanceDefaultOptions: Readonly = Object.freeze({ +const PLAIN_TO_INSTANCE_DEFAULT_OPTIONS: Readonly = Object.freeze({ exposeDefaultValues: true, exposeUnsetFields: false, }); -const validationPipeDefaultOptions: Readonly = Object.freeze({ +const VALIDATION_PIPE_DEFAULT_OPTIONS: Readonly = Object.freeze({ transform: true, whitelist: true, - transformOptions: plainToInstanceDefaultOptions, + transformOptions: PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, }); -export { plainToInstanceDefaultOptions, validationPipeDefaultOptions }; \ No newline at end of file +export { + PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, + VALIDATION_PIPE_DEFAULT_OPTIONS, +}; \ No newline at end of file diff --git a/tests/acceptance/features/game/helpers/game-datatable.helper.ts b/tests/acceptance/features/game/helpers/game-datatable.helper.ts index 30c17ccbd..a7947321a 100644 --- a/tests/acceptance/features/game/helpers/game-datatable.helper.ts +++ b/tests/acceptance/features/game/helpers/game-datatable.helper.ts @@ -6,7 +6,7 @@ import { getPlayerWithNameOrThrow } from "@/modules/game/helpers/game.helper"; import type { Game } from "@/modules/game/schemas/game.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function convertDatatableToMakeGameplayVotes(datatable: string[][], game: Game): MakeGamePlayVoteDto[] { return datatable.map(([voterName, targetName]) => { @@ -24,7 +24,7 @@ function convertDatatableToCreateGamePlayersDto(datatable: string[][]): CreateGa return datatable.map(([playerName, playerRole]) => plainToInstance(CreateGamePlayerDto, { name: playerName, role: { name: playerRole }, - }, plainToInstanceDefaultOptions)); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS)); } export { diff --git a/tests/acceptance/features/game/step-definitions/game.given-steps.ts b/tests/acceptance/features/game/step-definitions/game.given-steps.ts index 6d493cac8..4a69db34d 100644 --- a/tests/acceptance/features/game/step-definitions/game.given-steps.ts +++ b/tests/acceptance/features/game/step-definitions/game.given-steps.ts @@ -8,7 +8,7 @@ import type { GameAdditionalCard } from "@/modules/game/schemas/game-additional- import type { GameOptions } from "@/modules/game/schemas/game-options/game-options.schema"; import type { Game } from "@/modules/game/schemas/game.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import type { CustomWorld } from "@tests/acceptance/shared/types/world.types"; import { readJsonFile } from "@tests/acceptance/shared/helpers/file.helper"; @@ -42,7 +42,7 @@ Given( players, options, additionalCards: additionalCards.length ? additionalCards : undefined, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); this.response = await createGameRequest(createGameDto, this.app); this.game = this.response.json(); diff --git a/tests/acceptance/features/game/step-definitions/game.then-steps.ts b/tests/acceptance/features/game/step-definitions/game.then-steps.ts index 771a97342..2fdb45322 100644 --- a/tests/acceptance/features/game/step-definitions/game.then-steps.ts +++ b/tests/acceptance/features/game/step-definitions/game.then-steps.ts @@ -3,14 +3,14 @@ import { expect } from "expect"; import { parseInt } from "lodash"; import type { DataTable } from "@cucumber/cucumber"; -import type { GAME_PLAY_CAUSES, GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import type { GAME_VICTORY_TYPES } from "@/modules/game/enums/game-victory.enum"; -import type { GAME_STATUSES, GAME_PHASES } from "@/modules/game/enums/game.enum"; -import type { PLAYER_DEATH_CAUSES, PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import type { GamePlayCauses, GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import type { GameVictoryTypes } from "@/modules/game/enums/game-victory.enum"; +import type { GameStatuses, GamePhases } from "@/modules/game/enums/game.enum"; +import type { PlayerDeathCauses, PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { getPlayerWithNameOrThrow } from "@/modules/game/helpers/game.helper"; import { getPlayerAttributeWithNameAndSource, isPlayerAttributeActive } from "@/modules/game/helpers/player/player-attribute/player-attribute.helper"; import type { GameSource } from "@/modules/game/types/game.type"; -import type { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import type { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import type { CustomWorld } from "@tests/acceptance/shared/types/world.types"; import { convertDatatableToPlayers } from "@tests/acceptance/features/game/helpers/game-datatable.helper"; @@ -23,17 +23,17 @@ Then(/^the game's turn should be (?\d)$/u, function(this: CustomWorld, tur expect(this.game.turn).toBe(parseInt(turn)); }); -Then(/^the game's phase should be (?night|day)$/u, function(this: CustomWorld, phase: GAME_PHASES): void { +Then(/^the game's phase should be (?night|day)$/u, function(this: CustomWorld, phase: GamePhases): void { expect(this.game.phase).toBe(phase); }); -Then(/^the game's status should be (?playing|over|canceled)$/u, function(this: CustomWorld, status: GAME_STATUSES): void { +Then(/^the game's status should be (?playing|over|canceled)$/u, function(this: CustomWorld, status: GameStatuses): void { expect(this.game.status).toBe(status); }); Then( /^the game's current play should be (?.+?) to (?.+?)(?: because (?.+?))?$/u, - function(this: CustomWorld, source: GameSource, action: GAME_PLAY_ACTIONS, cause: GAME_PLAY_CAUSES | null): void { + function(this: CustomWorld, source: GameSource, action: GamePlayActions, cause: GamePlayCauses | null): void { expect(this.game.currentPlay?.source.name).toBe(source); expect(this.game.currentPlay?.action).toBe(action); if (cause !== null) { @@ -52,7 +52,7 @@ Then( Then( /^the game's winners should be (?villagers|werewolves|lovers|angel|white-werewolf|pied-piper|none) with the following players$/u, - function(this: CustomWorld, victoryType: GAME_VICTORY_TYPES, winnersDatable: DataTable): void { + function(this: CustomWorld, victoryType: GameVictoryTypes, winnersDatable: DataTable): void { const players = convertDatatableToPlayers(winnersDatable.rows(), this.game); const expectedWinners = players.length ? players : undefined; @@ -68,7 +68,7 @@ Then( playerName: string, shouldMiss: string | null, isActive: "active" | "inactive", - attributeName: PLAYER_ATTRIBUTE_NAMES, + attributeName: PlayerAttributeNames, attributeSource: GameSource, ): void { const player = getPlayerWithNameOrThrow(playerName, this.game, new Error("Player name not found")); @@ -87,7 +87,7 @@ Then( this: CustomWorld, playerCount: string, isActive: "active" | "inactive", - attributeName: PLAYER_ATTRIBUTE_NAMES, + attributeName: PlayerAttributeNames, attributeSource: GameSource, expectedPlayersDatatable: DataTable, ): void { @@ -104,7 +104,7 @@ Then( Then( /^nobody should have the (?active|inactive) (?\S+) from (?\S+) attribute$/u, - function(this: CustomWorld, isActive: "active" | "inactive", attributeName: PLAYER_ATTRIBUTE_NAMES, attributeSource: GameSource): void { + function(this: CustomWorld, isActive: "active" | "inactive", attributeName: PlayerAttributeNames, attributeSource: GameSource): void { const doSomePlayerHaveAttribute = this.game.players.some(player => { const attribute = getPlayerAttributeWithNameAndSource(player, attributeName, attributeSource); const isAttributeActive = !!attribute && isPlayerAttributeActive(attribute, this.game); @@ -123,7 +123,7 @@ Then(/^the player named (?.+?) should be alive$/u, function(this: CustomWo Then( /^the player named (?.+?) should be murdered by (?.+?) from (?.+?)$/u, - function(this: CustomWorld, playerName: string, deathSource: GameSource, deathCause: PLAYER_DEATH_CAUSES): void { + function(this: CustomWorld, playerName: string, deathSource: GameSource, deathCause: PlayerDeathCauses): void { const player = getPlayerWithNameOrThrow(playerName, this.game, new Error("Player name not found")); expect(player.isAlive).toBe(false); @@ -136,7 +136,7 @@ Then( Then( /^the player named (?.+?) should be currently a (?.+) and originally a (?.+)$/u, - function(this: CustomWorld, playerName: string, currentRole: ROLE_NAMES, originalRole: ROLE_NAMES): void { + function(this: CustomWorld, playerName: string, currentRole: RoleNames, originalRole: RoleNames): void { const player = getPlayerWithNameOrThrow(playerName, this.game, new Error("Player name not found")); expect(player.role.current).toBe(currentRole); @@ -146,7 +146,7 @@ Then( Then( /^the player named (?.+?) should be on (?villagers|werewolves) current side and originally be on (?villagers|werewolves) side$/u, - function(this: CustomWorld, playerName: string, currentSide: ROLE_SIDES, originalSide: ROLE_SIDES): void { + function(this: CustomWorld, playerName: string, currentSide: RoleSides, originalSide: RoleSides): void { const player = getPlayerWithNameOrThrow(playerName, this.game, new Error("Player name not found")); expect(player.side.current).toBe(currentSide); diff --git a/tests/acceptance/features/game/step-definitions/game.when-steps.ts b/tests/acceptance/features/game/step-definitions/game.when-steps.ts index e71826082..3fbac786f 100644 --- a/tests/acceptance/features/game/step-definitions/game.when-steps.ts +++ b/tests/acceptance/features/game/step-definitions/game.when-steps.ts @@ -2,10 +2,10 @@ import { When } from "@cucumber/cucumber"; import type { DataTable } from "@cucumber/cucumber"; import type { MakeGamePlayDto } from "@/modules/game/dto/make-game-play/make-game-play.dto"; -import type { WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; +import type { WitchPotions } from "@/modules/game/enums/game-play.enum"; import { getPlayerWithNameOrThrow } from "@/modules/game/helpers/game.helper"; import type { Game } from "@/modules/game/schemas/game.schema"; -import type { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import type { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import type { CustomWorld } from "@tests/acceptance/shared/types/world.types"; import { makeGamePlayRequest } from "@tests/acceptance/features/game/helpers/game-request.helper"; @@ -75,7 +75,7 @@ When(/^the big bad wolf eats the player named (?.+)$/u, async function(thi When( /^the witch uses (?life|death) potion on the player named (?.+?)(?: and (?(?!\k)(?:life|death)) potion on the player named (?.+?))?$/u, - async function(this: CustomWorld, firstPotion: WITCH_POTIONS, firstTargetName: string, secondPotion: WITCH_POTIONS | null, secondTargetName: string | null): Promise { + async function(this: CustomWorld, firstPotion: WitchPotions, firstTargetName: string, secondPotion: WitchPotions | null, secondTargetName: string | null): Promise { const firstTarget = getPlayerWithNameOrThrow(firstTargetName, this.game, new Error("Player name not found")); const targets = [{ playerId: firstTarget._id, drankPotion: firstPotion }]; if (secondTargetName !== null && secondPotion !== null) { @@ -165,7 +165,7 @@ When(/^the wild child chooses the player named (?.+) as a model$/u, async this.game = this.response.json(); }); -When(/^the dog wolf chooses the (?villagers|werewolves) side$/u, async function(this: CustomWorld, chosenSide: ROLE_SIDES): Promise { +When(/^the dog wolf chooses the (?villagers|werewolves) side$/u, async function(this: CustomWorld, chosenSide: RoleSides): Promise { const makeGamePlayDto: MakeGamePlayDto = { chosenSide }; this.response = await makeGamePlayRequest(makeGamePlayDto, this.game, this.app); @@ -177,7 +177,7 @@ When(/^the stuttering judge chooses his sign$/u, async function(this: CustomWorl this.game = this.response.json(); }); -When(/^the thief chooses card with role (?.+)$/u, async function(this: CustomWorld, cardRole: ROLE_NAMES): Promise { +When(/^the thief chooses card with role (?.+)$/u, async function(this: CustomWorld, cardRole: RoleNames): Promise { const chosenCard = this.game.additionalCards?.find(({ roleName }) => roleName === cardRole); this.response = await makeGamePlayRequest({ chosenCardId: chosenCard?._id }, this.game, this.app); this.game = this.response.json(); diff --git a/tests/e2e/helpers/nest-app.helper.ts b/tests/e2e/helpers/nest-app.helper.ts index 17adbcf55..60a71ee32 100644 --- a/tests/e2e/helpers/nest-app.helper.ts +++ b/tests/e2e/helpers/nest-app.helper.ts @@ -4,16 +4,16 @@ import { Test } from "@nestjs/testing"; import type { NestFastifyApplication } from "@nestjs/platform-fastify"; import type { TestingModule } from "@nestjs/testing"; -import { fastifyServerDefaultOptions } from "@/server/constants/server.constant"; +import { FASTIFY_SERVER_DEFAULT_OPTIONS } from "@/server/constants/server.constant"; -import { validationPipeDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { VALIDATION_PIPE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { AppModule } from "@/app.module"; async function initNestApp(): Promise<{ app: NestFastifyApplication; module: TestingModule }> { const module: TestingModule = await Test.createTestingModule({ imports: [AppModule] }).compile(); - const app = module.createNestApplication(new FastifyAdapter(fastifyServerDefaultOptions)); - app.useGlobalPipes(new ValidationPipe(validationPipeDefaultOptions)); + const app = module.createNestApplication(new FastifyAdapter(FASTIFY_SERVER_DEFAULT_OPTIONS)); + app.useGlobalPipes(new ValidationPipe(VALIDATION_PIPE_DEFAULT_OPTIONS)); await app.init(); await app.getHttpAdapter().getInstance().ready(); return { app, module }; diff --git a/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts b/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts index b8b4f5b56..d237d89ea 100644 --- a/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts +++ b/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts @@ -6,22 +6,22 @@ import type { NestFastifyApplication } from "@nestjs/platform-fastify"; import type { Model, Types } from "mongoose"; import { stringify } from "qs"; -import { gameAdditionalCardsThiefRoleNames } from "@/modules/game/constants/game-additional-card/game-additional-card.constant"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES } from "@/modules/game/constants/game-additional-cards/game-additional-cards.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import type { CreateGamePlayerDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player.dto"; import type { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; import type { GetGameRandomCompositionDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto"; import type { MakeGamePlayDto } from "@/modules/game/dto/make-game-play/make-game-play.dto"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from "@/modules/game/enums/game-play.enum"; -import { GAME_PHASES, GAME_STATUSES } from "@/modules/game/enums/game.enum"; -import { PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions, GamePlayCauses } from "@/modules/game/enums/game-play.enum"; +import { GamePhases, GameStatuses } from "@/modules/game/enums/game.enum"; +import { PlayerGroups } from "@/modules/game/enums/player.enum"; import type { GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; import { GameHistoryRecord } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; import type { GameOptions } from "@/modules/game/schemas/game-options/game-options.schema"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; import { Game } from "@/modules/game/schemas/game.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { initNestApp } from "@tests/e2e/helpers/nest-app.helper"; import { createFakeCreateGameAdditionalCardDto } from "@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory"; @@ -141,7 +141,7 @@ describe("Game Controller", () => { { query: { "players": bulkCreateFakeCreateGamePlayerDto(4), - "excluded-roles": [ROLE_NAMES.WEREWOLF, ROLE_NAMES.SEER], + "excluded-roles": [RoleNames.WEREWOLF, RoleNames.SEER], }, test: "werewolf is in excluded roles", errorMessage: "excludedRoles should not contain villager, werewolf values", @@ -149,7 +149,7 @@ describe("Game Controller", () => { { query: { players: bulkCreateFakeCreateGamePlayerDto(4), - excludedRoles: [ROLE_NAMES.VILLAGER, ROLE_NAMES.SEER], + excludedRoles: [RoleNames.VILLAGER, RoleNames.SEER], }, test: "villager is in excluded roles", errorMessage: "excludedRoles should not contain villager, werewolf values", @@ -157,7 +157,7 @@ describe("Game Controller", () => { { query: { players: bulkCreateFakeCreateGamePlayerDto(4), - excludedRoles: [ROLE_NAMES.SEER, ROLE_NAMES.SEER], + excludedRoles: [RoleNames.SEER, RoleNames.SEER], }, test: "there is twice the same excluded role", errorMessage: "excluded roles must be unique", @@ -304,7 +304,7 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { name: "John", role: { name: ROLE_NAMES.THREE_BROTHERS } }, + { name: "John", role: { name: RoleNames.THREE_BROTHERS } }, { name: "John" }, ]), }), @@ -314,10 +314,10 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.SEER } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.VILLAGER_VILLAGER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, ]), }), test: "there is only one brother in the same game", @@ -326,8 +326,8 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WITCH } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WITCH } }, ]), }), test: "there is two witches in the same game", @@ -336,10 +336,10 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WEREWOLF } }, ]), }), test: "there is no villager in game's composition", @@ -348,10 +348,10 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, + { role: { name: RoleNames.VILLAGER } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, ]), }), test: "there is no werewolf in game's composition", @@ -365,10 +365,10 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER }, position: 0 }, - { role: { name: ROLE_NAMES.PIED_PIPER }, position: 1 }, - { role: { name: ROLE_NAMES.WITCH }, position: 2 }, - { role: { name: ROLE_NAMES.SEER }, position: 666 }, + { role: { name: RoleNames.VILLAGER }, position: 0 }, + { role: { name: RoleNames.PIED_PIPER }, position: 1 }, + { role: { name: RoleNames.WITCH }, position: 2 }, + { role: { name: RoleNames.SEER }, position: 666 }, ]), }), test: "one of the player position is not consistent faced to others", @@ -377,10 +377,10 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.THIEF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.THIEF } }, ]), }), test: "thief is in the game but additional cards are not set", @@ -389,14 +389,14 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.VILLAGER } }, ]), additionalCards: [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), ], }), test: "thief is not in the game but additional cards are set", @@ -405,16 +405,16 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.THIEF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.THIEF } }, ]), additionalCards: [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), ], }), test: "thief additional cards are more than the expected default limit", @@ -423,14 +423,14 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.THIEF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.THIEF } }, ]), additionalCards: [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), ], options: createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 4 }) }) }), }), @@ -440,46 +440,46 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.THIEF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.THIEF } }, ]), additionalCards: [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.THIEF, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.THIEF, recipient: RoleNames.THIEF }), ], }), test: "one thief additional card is the thief himself", - errorMessage: `additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`, + errorMessage: `additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`, }, { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.THIEF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.THIEF } }, ]), additionalCards: [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.TWO_SISTERS, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.TWO_SISTERS, recipient: RoleNames.THIEF }), ], }), test: "one thief additional card is is not available for thief", - errorMessage: `additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`, + errorMessage: `additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`, }, { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.THIEF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.THIEF } }, ]), additionalCards: [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.DOG_WOLF, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.DOG_WOLF, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.DOG_WOLF, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.DOG_WOLF, recipient: RoleNames.THIEF }), ], }), test: "two thief additional role cards exceed the maximum occurrences in game possible", @@ -488,14 +488,14 @@ describe("Game Controller", () => { { payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.THIEF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.PIED_PIPER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.THIEF } }, ]), additionalCards: [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), ], }), test: "one thief additional role card exceeds the maximum occurrences in game possible because another player has it", @@ -518,12 +518,12 @@ describe("Game Controller", () => { it(`should create game when called.`, async() => { const payload = createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(6, [ - { role: { name: ROLE_NAMES.VILLAGER }, name: "Antoine" }, - { role: { name: ROLE_NAMES.WEREWOLF }, name: "Mathis" }, - { role: { name: ROLE_NAMES.VILLAGER_VILLAGER }, name: "Virgil" }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF }, name: "JB" }, - { role: { name: ROLE_NAMES.CUPID }, name: "Doudou" }, - { role: { name: ROLE_NAMES.SEER }, name: "Juju" }, + { role: { name: RoleNames.VILLAGER }, name: "Antoine" }, + { role: { name: RoleNames.WEREWOLF }, name: "Mathis" }, + { role: { name: RoleNames.VILLAGER_VILLAGER }, name: "Virgil" }, + { role: { name: RoleNames.WHITE_WEREWOLF }, name: "JB" }, + { role: { name: RoleNames.CUPID }, name: "Doudou" }, + { role: { name: RoleNames.SEER }, name: "Juju" }, ]), }, { options: undefined }); const response = await app.inject({ @@ -537,11 +537,11 @@ describe("Game Controller", () => { role: { current: player.role.name, original: player.role.name, - isRevealed: player.role.name === ROLE_NAMES.VILLAGER_VILLAGER, + isRevealed: player.role.name === RoleNames.VILLAGER_VILLAGER, }, side: { - current: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES, - original: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES, + current: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES, + original: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES, }, attributes: [], position: index, @@ -549,14 +549,14 @@ describe("Game Controller", () => { })); const expectedGame: Game = { _id: expect.any(String) as Types.ObjectId, - phase: GAME_PHASES.NIGHT, - status: GAME_STATUSES.PLAYING, + phase: GamePhases.NIGHT, + status: GameStatuses.PLAYING, turn: 1, tick: 1, players: expectedPlayers, currentPlay: { - action: GAME_PLAY_ACTIONS.ELECT_SHERIFF, - source: { name: PLAYER_GROUPS.ALL, players: expectedPlayers }, + action: GamePlayActions.ELECT_SHERIFF, + source: { name: PlayerGroups.ALL, players: expectedPlayers }, }, upcomingPlays: toJSON([ createFakeGamePlayCupidCharms(), @@ -565,7 +565,7 @@ describe("Game Controller", () => { createFakeGamePlayWerewolvesEat(), createFakeGamePlayWhiteWerewolfEats(), ]) as GamePlay[], - options: defaultGameOptions, + options: DEFAULT_GAME_OPTIONS, createdAt: expect.any(String) as Date, updatedAt: expect.any(String) as Date, }; @@ -577,16 +577,16 @@ describe("Game Controller", () => { it(`should create game with additional cards when thief is in the game.`, async() => { const payload = createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(6, [ - { role: { name: ROLE_NAMES.THIEF }, name: "Antoine" }, - { role: { name: ROLE_NAMES.WEREWOLF }, name: "Mathis" }, - { role: { name: ROLE_NAMES.VILLAGER_VILLAGER }, name: "Virgil" }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF }, name: "JB" }, - { role: { name: ROLE_NAMES.CUPID }, name: "Doudou" }, - { role: { name: ROLE_NAMES.SEER }, name: "Juju" }, + { role: { name: RoleNames.THIEF }, name: "Antoine" }, + { role: { name: RoleNames.WEREWOLF }, name: "Mathis" }, + { role: { name: RoleNames.VILLAGER_VILLAGER }, name: "Virgil" }, + { role: { name: RoleNames.WHITE_WEREWOLF }, name: "JB" }, + { role: { name: RoleNames.CUPID }, name: "Doudou" }, + { role: { name: RoleNames.SEER }, name: "Juju" }, ]), additionalCards: [ - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }), - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.VILE_FATHER_OF_WOLVES, recipient: ROLE_NAMES.THIEF }), + createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }), + createFakeGameAdditionalCard({ roleName: RoleNames.VILE_FATHER_OF_WOLVES, recipient: RoleNames.THIEF }), ], }, { options: undefined }); const response = await app.inject({ @@ -600,11 +600,11 @@ describe("Game Controller", () => { role: { current: player.role.name, original: player.role.name, - isRevealed: player.role.name === ROLE_NAMES.VILLAGER_VILLAGER, + isRevealed: player.role.name === RoleNames.VILLAGER_VILLAGER, }, side: { - current: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER, ROLE_NAMES.THIEF].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES, - original: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER, ROLE_NAMES.THIEF].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES, + current: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER, RoleNames.THIEF].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES, + original: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER, RoleNames.THIEF].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES, }, attributes: [], position: index, @@ -618,14 +618,14 @@ describe("Game Controller", () => { })); const expectedGame: Game = { _id: expect.any(String) as Types.ObjectId, - phase: GAME_PHASES.NIGHT, - status: GAME_STATUSES.PLAYING, + phase: GamePhases.NIGHT, + status: GameStatuses.PLAYING, turn: 1, tick: 1, players: expectedPlayers, currentPlay: { - action: GAME_PLAY_ACTIONS.ELECT_SHERIFF, - source: { name: PLAYER_GROUPS.ALL, players: expectedPlayers }, + action: GamePlayActions.ELECT_SHERIFF, + source: { name: PlayerGroups.ALL, players: expectedPlayers }, }, upcomingPlays: toJSON([ createFakeGamePlayThiefChoosesCard(), @@ -636,7 +636,7 @@ describe("Game Controller", () => { createFakeGamePlayWhiteWerewolfEats(), ]) as GamePlay[], additionalCards: expectedGameAdditionalCards, - options: defaultGameOptions, + options: DEFAULT_GAME_OPTIONS, createdAt: expect.any(String) as Date, updatedAt: expect.any(String) as Date, }; @@ -654,7 +654,7 @@ describe("Game Controller", () => { isEnabled: false, electedAt: { turn: 5, - phase: GAME_PHASES.DAY, + phase: GamePhases.DAY, }, hasDoubledVote: false, }, @@ -692,8 +692,8 @@ describe("Game Controller", () => { const payload = createFakeCreateGameWithPlayersDto({}, { options }); const expectedOptions = createFakeGameOptionsDto({ ...options, - composition: createFakeCompositionGameOptions({ isHidden: defaultGameOptions.composition.isHidden }), - votes: createFakeVotesGameOptions({ canBeSkipped: defaultGameOptions.votes.canBeSkipped }), + composition: createFakeCompositionGameOptions({ isHidden: DEFAULT_GAME_OPTIONS.composition.isHidden }), + votes: createFakeVotesGameOptions({ canBeSkipped: DEFAULT_GAME_OPTIONS.votes.canBeSkipped }), }); const response = await app.inject({ method: "POST", @@ -729,7 +729,7 @@ describe("Game Controller", () => { }); it("should get a bad request error when game doesn't have playing status.", async() => { - const game = createFakeGameWithCurrentPlay({ status: GAME_STATUSES.CANCELED }); + const game = createFakeGameWithCurrentPlay({ status: GameStatuses.CANCELED }); await models.game.create(game); const response = await app.inject({ method: "DELETE", @@ -745,7 +745,7 @@ describe("Game Controller", () => { }); it("should update game status to canceled when called.", async() => { - const game = createFakeGameWithCurrentPlay({ status: GAME_STATUSES.PLAYING }); + const game = createFakeGameWithCurrentPlay({ status: GameStatuses.PLAYING }); await models.game.create(game); const response = await app.inject({ method: "DELETE", @@ -755,7 +755,7 @@ describe("Game Controller", () => { expect(response.statusCode).toBe(HttpStatus.OK); expect(response.json()).toStrictEqual({ ...toJSON(game) as Game, - status: GAME_STATUSES.CANCELED, + status: GameStatuses.CANCELED, createdAt: expect.any(String) as Date, updatedAt: expect.any(String) as Date, }); @@ -822,7 +822,7 @@ describe("Game Controller", () => { createFakeWerewolfAlivePlayer(), ]); const game = createFakeGameWithCurrentPlay({ - status: GAME_STATUSES.PLAYING, + status: GameStatuses.PLAYING, upcomingPlays: [createFakeGamePlayAllVote()], players, }); @@ -852,7 +852,7 @@ describe("Game Controller", () => { ]); const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: false }) }); const game = createFakeGame({ - status: GAME_STATUSES.PLAYING, + status: GameStatuses.PLAYING, currentPlay: createFakeGamePlayAllVote(), players, options, @@ -881,8 +881,8 @@ describe("Game Controller", () => { createFakeWerewolfAlivePlayer(), ]); const game = createFakeGame({ - status: GAME_STATUSES.PLAYING, - currentPlay: createFakeGamePlayAllVote({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL, players }) }), + status: GameStatuses.PLAYING, + currentPlay: createFakeGamePlayAllVote({ source: createFakeGamePlaySource({ name: PlayerGroups.ALL, players }) }), upcomingPlays: [ createFakeGamePlaySeerLooks(), createFakeGamePlayWerewolvesEat(), @@ -897,8 +897,8 @@ describe("Game Controller", () => { ], }); const expectedCurrentPlay = createFakeGamePlayAllVote({ - cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES, - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL, players }), + cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES, + source: createFakeGamePlaySource({ name: PlayerGroups.ALL, players }), }); const expectedGame = createFakeGame({ ...game, @@ -927,9 +927,9 @@ describe("Game Controller", () => { createFakeWerewolfAlivePlayer(), ]); const game = createFakeGame({ - phase: GAME_PHASES.NIGHT, - status: GAME_STATUSES.PLAYING, - currentPlay: createFakeGamePlaySeerLooks({ source: createFakeGamePlaySource({ name: ROLE_NAMES.SEER, players: [players[1]] }) }), + phase: GamePhases.NIGHT, + status: GameStatuses.PLAYING, + currentPlay: createFakeGamePlaySeerLooks({ source: createFakeGamePlaySource({ name: RoleNames.SEER, players: [players[1]] }) }), upcomingPlays: [createFakeGamePlayWerewolvesEat()], players, }); @@ -937,7 +937,7 @@ describe("Game Controller", () => { const payload = createFakeMakeGamePlayDto({ targets: [{ playerId: players[0]._id }] }); const expectedCurrentPlay = createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ - name: PLAYER_GROUPS.WEREWOLVES, + name: PlayerGroups.WEREWOLVES, players: [createFakePlayer({ ...players[0], attributes: [createFakeSeenBySeerPlayerAttribute()] }), players[3]], }), }); diff --git a/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts b/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts index 75a22fef4..f10b8acbe 100644 --- a/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts +++ b/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts @@ -1,24 +1,24 @@ import { getModelToken } from "@nestjs/mongoose"; -import type { Model, Types } from "mongoose"; import type { NestFastifyApplication } from "@nestjs/platform-fastify"; +import type { Model, Types } from "mongoose"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; -import { GAME_PLAY_ACTIONS, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import type { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; +import { GamePlayActions, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { GameHistoryRecordRepository } from "@/modules/game/providers/repositories/game-history-record.repository"; import { GameHistoryRecord } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; import type { GameHistoryRecordToInsert } from "@/modules/game/types/game-history-record.type"; import type { GameSource } from "@/modules/game/types/game.type"; -import type { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import type { RoleSides } from "@/modules/role/enums/role.enum"; -import { toJSON } from "@tests/helpers/object/object.helper"; -import { createFakeObjectId } from "@tests/factories/shared/mongoose/mongoose.factory"; -import { createFakeGameHistoryRecordToInsert } from "@tests/factories/game/types/game-history-record/game-history-record.type.factory"; -import { bulkCreateFakePlayers, createFakePlayer } from "@tests/factories/game/schemas/player/player.schema.factory"; -import { createFakeAncientAlivePlayer, createFakeSeerAlivePlayer, createFakeWitchAlivePlayer } from "@tests/factories/game/schemas/player/player-with-role.schema.factory"; -import { createFakeGameHistoryRecord, createFakeGameHistoryRecordAllElectSheriffPlay, createFakeGameHistoryRecordAllVotePlay, createFakeGameHistoryRecordBigBadWolfEatPlay, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordPlayVoting, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from "@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory"; import { initNestApp } from "@tests/e2e/helpers/nest-app.helper"; +import { createFakeGameHistoryRecord, createFakeGameHistoryRecordAllElectSheriffPlay, createFakeGameHistoryRecordAllVotePlay, createFakeGameHistoryRecordBigBadWolfEatPlay, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordPlayVoting, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from "@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory"; +import { createFakeAncientAlivePlayer, createFakeSeerAlivePlayer, createFakeWitchAlivePlayer } from "@tests/factories/game/schemas/player/player-with-role.schema.factory"; +import { bulkCreateFakePlayers, createFakePlayer } from "@tests/factories/game/schemas/player/player.schema.factory"; +import { createFakeGameHistoryRecordToInsert } from "@tests/factories/game/types/game-history-record/game-history-record.type.factory"; +import { createFakeObjectId } from "@tests/factories/shared/mongoose/mongoose.factory"; +import { toJSON } from "@tests/helpers/object/object.helper"; describe("Game History Record Repository", () => { let app: NestFastifyApplication; @@ -78,12 +78,12 @@ describe("Game History Record Repository", () => { test: "tick is lower than 1", }, { - toInsert: createFakeGameHistoryRecord({ phase: "Noon" as GAME_PHASES }), + toInsert: createFakeGameHistoryRecord({ phase: "Noon" as GamePhases }), errorMessage: "GameHistoryRecord validation failed: phase: `Noon` is not a valid enum value for path `phase`.", test: "phase is not in enum", }, { - toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ source: { name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, players: [] } }) }), + toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ source: { name: PlayerAttributeNames.SHERIFF, players: [] } }) }), errorMessage: "GameHistoryRecord validation failed: play.source.players: Path `play.source.players` length is less than minimum allowed value (1).", test: "players in play's source is empty", }, @@ -93,17 +93,17 @@ describe("Game History Record Repository", () => { test: "source in play's source is not in enum", }, { - toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ targets: [{ player: createFakePlayer(), drankPotion: "Love Potion" as WITCH_POTIONS }] }) }), + toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ targets: [{ player: createFakePlayer(), drankPotion: "Love Potion" as WitchPotions }] }) }), errorMessage: "GameHistoryRecord validation failed: play.targets.0.drankPotion: `Love Potion` is not a valid enum value for path `drankPotion`.", test: "potion in play's target is not in enum", }, { - toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: createFakeGameHistoryRecordPlayVoting({ result: "President election" as GAME_HISTORY_RECORD_VOTING_RESULTS }) }) }), + toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: createFakeGameHistoryRecordPlayVoting({ result: "President election" as GameHistoryRecordVotingResults }) }) }), errorMessage: "GameHistoryRecord validation failed: play.voting.result: `President election` is not a valid enum value for path `result`.", test: "voting result is not in enum", }, { - toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ chosenSide: "Dark side" as ROLE_SIDES }) }), + toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ chosenSide: "Dark side" as RoleSides }) }), errorMessage: "GameHistoryRecord validation failed: play.chosenSide: `Dark side` is not a valid enum value for path `chosenSide`.", test: "chosen side is not in enum", }, @@ -171,35 +171,35 @@ describe("Game History Record Repository", () => { createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }), ]); - await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE)).resolves.toBeNull(); + await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE)).resolves.toBeNull(); }); it("should return no record when there is no tie in vote play in the history.", async() => { const gameId = createFakeObjectId(); - const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH }); + const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.DEATH }); await populate([ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), ]); - await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE)).resolves.toBeNull(); + await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE)).resolves.toBeNull(); }); it("should return no record when there gameId is not the good one.", async() => { const gameId = createFakeObjectId(); const otherGameId = createFakeObjectId(); - const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE }); + const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE }); await populate([ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }), ]); - await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(otherGameId, GAME_PLAY_ACTIONS.VOTE)).resolves.toBeNull(); + await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(otherGameId, GamePlayActions.VOTE)).resolves.toBeNull(); }); it("should return the last tie in vote game history play record when called.", async() => { const gameId = createFakeObjectId(); - const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE }); + const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE }); const gameHistoryRecords = [ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date("2020-01-01") }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date("2021-01-01") }), @@ -208,7 +208,7 @@ describe("Game History Record Repository", () => { createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllElectSheriffPlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date("2025-01-01") }), ]; await populate(gameHistoryRecords); - const record = await repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE); + const record = await repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE); expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[3]) as GameHistoryRecord); }); @@ -217,7 +217,7 @@ describe("Game History Record Repository", () => { describe("getGameHistoryWitchUsesSpecificPotionRecords", () => { it("should get no record when there are no witch play.", async() => { const gameId = createFakeObjectId(); - const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE }); + const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE }); const gameHistoryRecords = [ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }), @@ -225,7 +225,7 @@ describe("Game History Record Repository", () => { createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }), ]; await populate(gameHistoryRecords); - const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE); + const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE); expect(toJSON(records)).toStrictEqual([]); }); @@ -234,12 +234,12 @@ describe("Game History Record Repository", () => { const gameId = createFakeObjectId(); const gameHistoryRecords = [ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), - createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH })] }) }), + createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH })] }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), ]; await populate(gameHistoryRecords); - const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE); + const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE); expect(toJSON(records)).toStrictEqual([]); }); @@ -249,21 +249,21 @@ describe("Game History Record Repository", () => { const otherGameId = createFakeObjectId(); const gameHistoryRecords = [ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), - createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE })] }) }), + createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE })] }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [ - createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE }), - createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE }), + createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH }), ], }), }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }), - createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE })] }) }), + createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE })] }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), ]; await populate(gameHistoryRecords); - const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE); + const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE); const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[2]]; expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]); @@ -273,12 +273,12 @@ describe("Game History Record Repository", () => { const gameId = createFakeObjectId(); const gameHistoryRecords = [ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), - createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE })] }) }), + createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE })] }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), ]; await populate(gameHistoryRecords); - const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.DEATH); + const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.DEATH); expect(toJSON(records)).toStrictEqual([]); }); @@ -288,21 +288,21 @@ describe("Game History Record Repository", () => { const otherGameId = createFakeObjectId(); const gameHistoryRecords = [ createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), - createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH })] }) }), + createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH })] }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [ - createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE }), - createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE }), + createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH }), ], }), }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }), - createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH })] }) }), + createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH })] }) }), createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }), ]; await populate(gameHistoryRecords); - const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.DEATH); + const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.DEATH); const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[2]]; expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]); @@ -454,8 +454,8 @@ describe("Game History Record Repository", () => { gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [ - createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WITCH_POTIONS.LIFE }), - createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WITCH_POTIONS.DEATH }), + createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WitchPotions.LIFE }), + createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WitchPotions.DEATH }), ], }), }), @@ -463,8 +463,8 @@ describe("Game History Record Repository", () => { gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [ - createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WITCH_POTIONS.DEATH }), - createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WITCH_POTIONS.LIFE }), + createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WitchPotions.DEATH }), + createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WitchPotions.LIFE }), ], }), }), @@ -507,4 +507,24 @@ describe("Game History Record Repository", () => { expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[3]) as GameHistoryRecord); }); }); + + describe("getGameHistoryPhaseRecords", () => { + it("should get 3 records when called with gameId, turn and phase.", async() => { + const gameId = createFakeObjectId(); + const otherGameId = createFakeObjectId(); + const gameHistoryRecords = [ + createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.DAY }), + createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.NIGHT }), + createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.DAY }), + createFakeGameHistoryRecord({ gameId, turn: 2, phase: GamePhases.DAY }), + createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.DAY }), + createFakeGameHistoryRecord({ gameId: otherGameId, phase: GamePhases.DAY, turn: 1 }), + ]; + await populate(gameHistoryRecords); + const records = await repositories.gameHistoryRecord.getGameHistoryPhaseRecords(gameId, 1, GamePhases.DAY); + const expectedRecords = [gameHistoryRecords[0], gameHistoryRecords[2], gameHistoryRecords[4]]; + + expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]); + }); + }); }); \ No newline at end of file diff --git a/tests/e2e/specs/modules/role/controllers/role.controller.e2e-spec.ts b/tests/e2e/specs/modules/role/controllers/role.controller.e2e-spec.ts index ddfd3bf92..3612bdaec 100644 --- a/tests/e2e/specs/modules/role/controllers/role.controller.e2e-spec.ts +++ b/tests/e2e/specs/modules/role/controllers/role.controller.e2e-spec.ts @@ -1,6 +1,6 @@ import type { NestFastifyApplication } from "@nestjs/platform-fastify"; -import { roles } from "@/modules/role/constants/role.constant"; +import { ROLES } from "@/modules/role/constants/role.constant"; import type { Role } from "@/modules/role/types/role.type"; import { bulkCreateFakeRoles } from "@tests/factories/role/types/role.type.factory"; @@ -24,7 +24,7 @@ describe("Role Controller", () => { const respondedRoles = response.json(); expect(response.statusCode).toBe(200); - expect(bulkCreateFakeRoles(respondedRoles.length, respondedRoles)).toStrictEqual(roles); + expect(bulkCreateFakeRoles(respondedRoles.length, respondedRoles)).toStrictEqual(ROLES); }); }); }); \ No newline at end of file diff --git a/tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory.ts b/tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory.ts index 562fcd40d..fb7e7ae3a 100644 --- a/tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory.ts +++ b/tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory.ts @@ -2,19 +2,19 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; import { CreateGameAdditionalCardDto } from "@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeCreateGameAdditionalCardDto( createGameAdditionalCardDto: Partial = {}, override: Record = {}, ): CreateGameAdditionalCardDto { return plainToInstance(CreateGameAdditionalCardDto, { - roleName: createGameAdditionalCardDto.roleName ?? faker.helpers.arrayElement(Object.values(ROLE_NAMES)), - recipient: createGameAdditionalCardDto.recipient ?? ROLE_NAMES.THIEF, + roleName: createGameAdditionalCardDto.roleName ?? faker.helpers.arrayElement(Object.values(RoleNames)), + recipient: createGameAdditionalCardDto.recipient ?? RoleNames.THIEF, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeCreateGameAdditionalCardDto }; \ No newline at end of file diff --git a/tests/factories/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.factory.ts b/tests/factories/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.factory.ts index e3d0d788c..85b612898 100644 --- a/tests/factories/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.factory.ts +++ b/tests/factories/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.factory.ts @@ -3,7 +3,7 @@ import { plainToInstance } from "class-transformer"; import { CreateCompositionGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeCompositionGameOptionsDto( createCompositionGameOptionsDto: Partial = {}, @@ -12,7 +12,7 @@ function createFakeCompositionGameOptionsDto( return plainToInstance(CreateCompositionGameOptionsDto, { isHidden: createCompositionGameOptionsDto.isHidden ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeCompositionGameOptionsDto }; \ No newline at end of file diff --git a/tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory.ts b/tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory.ts index 7e2573f93..a42aa55ae 100644 --- a/tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory.ts +++ b/tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory.ts @@ -2,7 +2,7 @@ import { plainToInstance } from "class-transformer"; import { CreateGameOptionsDto } from "@/modules/game/dto/create-game/create-game-options/create-game-options.dto"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeCompositionGameOptionsDto } from "@tests/factories/game/dto/create-game/create-game-options/create-composition-game-options/create-composition-game-options.dto.factory"; import { createFakeRolesGameOptionsDto } from "@tests/factories/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.factory"; @@ -14,7 +14,7 @@ function createFakeGameOptionsDto(createGameOptionsDto: Partial = {}, override: object = {}): CreateRavenGameOptionsDto { return plainToInstance(CreateRavenGameOptionsDto, { markPenalty: ravenGameOptions.markPenalty ?? faker.number.int({ min: 1, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreatePiedPiperGameOptionsDto(piedPiperGameOptions: Partial = {}, override: object = {}): CreatePiedPiperGameOptionsDto { @@ -37,7 +37,7 @@ function createFakeCreatePiedPiperGameOptionsDto(piedPiperGameOptions: Partial = {}, override: object = {}): CreateThiefGameOptionsDto { @@ -45,21 +45,21 @@ function createFakeCreateThiefGameOptionsDto(thiefGameOptions: Partial = {}, override: object = {}): CreateDogWolfGameOptionsDto { return plainToInstance(CreateDogWolfGameOptionsDto, { isChosenSideRevealed: dogWolfGameOptions.isChosenSideRevealed ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateWildChildGameOptionsDto(wildChildGameOptions: Partial = {}, override: object = {}): CreateWildChildGameOptionsDto { return plainToInstance(CreateWildChildGameOptionsDto, { isTransformationRevealed: wildChildGameOptions.isTransformationRevealed ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateStutteringJudgeGameOptionsDto( @@ -69,21 +69,21 @@ function createFakeCreateStutteringJudgeGameOptionsDto( return plainToInstance(CreateStutteringJudgeGameOptionsDto, { voteRequestsCount: stutteringJudgeGameOptions.voteRequestsCount ?? faker.number.int({ min: 1, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateBearTamerGameOptionsDto(bearTamerGameOptions: Partial = {}, override: object = {}): CreateBearTamerGameOptionsDto { return plainToInstance(CreateBearTamerGameOptionsDto, { doesGrowlIfInfected: bearTamerGameOptions.doesGrowlIfInfected ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateFoxGameOptionsDto(foxGameOptions: Partial = {}, override: object = {}): CreateFoxGameOptionsDto { return plainToInstance(CreateFoxGameOptionsDto, { isPowerlessIfMissesWerewolf: foxGameOptions.isPowerlessIfMissesWerewolf ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateThreeBrothersGameOptionsDto( @@ -93,21 +93,21 @@ function createFakeCreateThreeBrothersGameOptionsDto( return plainToInstance(CreateThreeBrothersGameOptionsDto, { wakingUpInterval: threeBrothersGameOptions.wakingUpInterval ?? faker.number.int({ min: 0, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateTwoSistersGameOptionsDto(twoSistersGameOptions: Partial = {}, override: object = {}): CreateTwoSistersGameOptionsDto { return plainToInstance(CreateTwoSistersGameOptionsDto, { wakingUpInterval: twoSistersGameOptions.wakingUpInterval ?? faker.number.int({ min: 0, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateIdiotGameOptionsDto(idiotGameOptions: Partial = {}, override: object = {}): CreateIdiotGameOptionsDto { return plainToInstance(CreateIdiotGameOptionsDto, { doesDieOnAncientDeath: idiotGameOptions.doesDieOnAncientDeath ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateAncientGameOptionsDto(ancientGameOptions: Partial = {}, override: object = {}): CreateAncientGameOptionsDto { @@ -115,21 +115,21 @@ function createFakeCreateAncientGameOptionsDto(ancientGameOptions: Partial = {}, override: object = {}): CreateGuardGameOptionsDto { return plainToInstance(CreateGuardGameOptionsDto, { canProtectTwice: guardGameOptions.canProtectTwice ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateLittleGirlGameOptionsDto(littleGirlGameOptions: Partial = {}, override: object = {}): CreateLittleGirlGameOptionsDto { return plainToInstance(CreateLittleGirlGameOptionsDto, { isProtectedByGuard: littleGirlGameOptions.isProtectedByGuard ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateSeerGameOptionsDto(seerGameOptions: Partial = {}, override: object = {}): CreateSeerGameOptionsDto { @@ -137,7 +137,7 @@ function createFakeCreateSeerGameOptionsDto(seerGameOptions: Partial = {}, override: object = {}): CreateBigBadWolfGameOptionsDto { return plainToInstance(CreateBigBadWolfGameOptionsDto, { isPowerlessIfWerewolfDies: bigBadWolfOptions.isPowerlessIfWerewolfDies ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateSheriffElectionGameOptionsDto( @@ -163,9 +163,9 @@ function createFakeCreateSheriffElectionGameOptionsDto( ): CreateSheriffElectionGameOptionsDto { return plainToInstance(CreateSheriffElectionGameOptionsDto, { turn: sheriffElectionGameOptions.turn ?? faker.number.int({ min: 1 }), - phase: sheriffElectionGameOptions.phase ?? faker.helpers.arrayElement(Object.values(GAME_PHASES)), + phase: sheriffElectionGameOptions.phase ?? faker.helpers.arrayElement(Object.values(GamePhases)), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeCreateSheriffGameOptionsDto(sheriffGameOptions: Partial = {}, override: object = {}): CreateSheriffGameOptionsDto { @@ -174,7 +174,7 @@ function createFakeCreateSheriffGameOptionsDto(sheriffGameOptions: Partial = {}, override: object = {}): CreateRolesGameOptionsDto { @@ -200,7 +200,7 @@ function createFakeRolesGameOptionsDto(rolesGameOptions: Partial = {}, override: object = {}): CreateVotesGameOptionsDto { return plainToInstance(CreateVotesGameOptionsDto, { canBeSkipped: createVotesGameOptionsDto.canBeSkipped ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeVotesGameOptionsDto }; \ No newline at end of file diff --git a/tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory.ts b/tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory.ts index 305929c99..29804969b 100644 --- a/tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory.ts +++ b/tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory.ts @@ -2,19 +2,19 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; import { CreateGamePlayerDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player.dto"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; function createFakeCreateGamePlayerDto(createGamePlayerDto: Partial = {}, override: Partial = {}): CreateGamePlayerDto { return plainToInstance(CreateGamePlayerDto, { name: createGamePlayerDto.name ?? faker.person.firstName(), - role: { name: createGamePlayerDto.role?.name ?? faker.helpers.arrayElement(Object.values(ROLE_NAMES)) }, + role: { name: createGamePlayerDto.role?.name ?? faker.helpers.arrayElement(Object.values(RoleNames)) }, position: createGamePlayerDto.position ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function bulkCreateFakeCreateGamePlayerDto(length: number, createGamePlayersDto: Partial[] = [], overrides: object[] = []): CreateGamePlayerDto[] { diff --git a/tests/factories/game/dto/create-game/create-game.dto.factory.ts b/tests/factories/game/dto/create-game/create-game.dto.factory.ts index 61451d279..be40e9aa7 100644 --- a/tests/factories/game/dto/create-game/create-game.dto.factory.ts +++ b/tests/factories/game/dto/create-game/create-game.dto.factory.ts @@ -1,21 +1,21 @@ import { plainToInstance } from "class-transformer"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; import { CreateGameDto } from "@/modules/game/dto/create-game/create-game.dto"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; function createFakeCreateGameWithPlayersDto(createGameDto: Partial = {}, override: object = {}): CreateGameDto { return createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WITCH } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.SEER } }), - createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "Jérémy", role: { name: ROLE_NAMES.LITTLE_GIRL } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WITCH } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.SEER } }), + createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "Jérémy", role: { name: RoleNames.LITTLE_GIRL } }), ], ...createGameDto, }, override); @@ -24,14 +24,14 @@ function createFakeCreateGameWithPlayersDto(createGameDto: Partial = {}, override: object = {}): CreateGameDto { return plainToInstance(CreateGameDto, { turn: createGameDto.turn ?? 1, - phase: createGameDto.phase ?? GAME_PHASES.NIGHT, + phase: createGameDto.phase ?? GamePhases.NIGHT, players: createGameDto.players ?? [], upcomingPlays: createGameDto.upcomingPlays ?? [], currentPlay: createGameDto.currentPlay ?? null, additionalCards: createGameDto.additionalCards ?? undefined, - options: createGameDto.options ?? defaultGameOptions, + options: createGameDto.options ?? DEFAULT_GAME_OPTIONS, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { diff --git a/tests/factories/game/dto/get-game-random-composition/get-game-random-composition.dto.factory.ts b/tests/factories/game/dto/get-game-random-composition/get-game-random-composition.dto.factory.ts index 5eb648450..c8c138b21 100644 --- a/tests/factories/game/dto/get-game-random-composition/get-game-random-composition.dto.factory.ts +++ b/tests/factories/game/dto/get-game-random-composition/get-game-random-composition.dto.factory.ts @@ -2,7 +2,7 @@ import { plainToInstance } from "class-transformer"; import { GetGameRandomCompositionDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeGetGameRandomCompositionDto(getGameRandomCompositionDto: Partial = {}, override: object = {}): GetGameRandomCompositionDto { return plainToInstance(GetGameRandomCompositionDto, { @@ -12,7 +12,7 @@ function createFakeGetGameRandomCompositionDto(getGameRandomCompositionDto: Part arePowerfulVillagerRolesPrioritized: getGameRandomCompositionDto.arePowerfulVillagerRolesPrioritized ?? true, arePowerfulWerewolfRolesPrioritized: getGameRandomCompositionDto.arePowerfulWerewolfRolesPrioritized ?? false, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeGetGameRandomCompositionDto }; \ No newline at end of file diff --git a/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory.ts b/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory.ts index d29f81bb0..d413d93c5 100644 --- a/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory.ts +++ b/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory.ts @@ -2,7 +2,7 @@ import { plainToInstance } from "class-transformer"; import { MakeGamePlayTargetWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakePlayer } from "@tests/factories/game/schemas/player/player.schema.factory"; @@ -15,7 +15,7 @@ function createFakeMakeGamePlayTargetWithRelationsDto( isInfected: makeGamePlayTargetWithRelationsDto.isInfected ?? undefined, drankPotion: makeGamePlayTargetWithRelationsDto.drankPotion ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeMakeGamePlayTargetWithRelationsDto }; \ No newline at end of file diff --git a/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory.ts b/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory.ts index 0f86f3fbe..73accf090 100644 --- a/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory.ts +++ b/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory.ts @@ -2,7 +2,7 @@ import { plainToInstance } from "class-transformer"; import { MakeGamePlayVoteWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakePlayer } from "@tests/factories/game/schemas/player/player.schema.factory"; @@ -14,7 +14,7 @@ function createFakeMakeGamePlayVoteWithRelationsDto( source: makeGamePlayVoteWithRelationsDto.source ?? createFakePlayer(), target: makeGamePlayVoteWithRelationsDto.target ?? createFakePlayer(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeMakeGamePlayVoteWithRelationsDto }; \ No newline at end of file diff --git a/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory.ts b/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory.ts index 3db981861..b980c272b 100644 --- a/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory.ts +++ b/tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory.ts @@ -2,7 +2,7 @@ import { plainToInstance } from "class-transformer"; import { MakeGamePlayWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-with-relations.dto"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeMakeGamePlayWithRelationsDto(makeGamePlayWithRelationsDto: Partial = {}, override: object = {}): MakeGamePlayWithRelationsDto { return plainToInstance(MakeGamePlayWithRelationsDto, { @@ -12,7 +12,7 @@ function createFakeMakeGamePlayWithRelationsDto(makeGamePlayWithRelationsDto: Pa chosenCard: makeGamePlayWithRelationsDto.chosenCard ?? undefined, chosenSide: makeGamePlayWithRelationsDto.chosenSide ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeMakeGamePlayWithRelationsDto }; \ No newline at end of file diff --git a/tests/factories/game/dto/make-game-play/make-game-play.dto.factory.ts b/tests/factories/game/dto/make-game-play/make-game-play.dto.factory.ts index 7d0cab3c4..793bcaee6 100644 --- a/tests/factories/game/dto/make-game-play/make-game-play.dto.factory.ts +++ b/tests/factories/game/dto/make-game-play/make-game-play.dto.factory.ts @@ -2,7 +2,7 @@ import { plainToInstance } from "class-transformer"; import { MakeGamePlayDto } from "@/modules/game/dto/make-game-play/make-game-play.dto"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeMakeGamePlayDto(makeGamePlayDto: Partial = {}, override: object = {}): MakeGamePlayDto { return plainToInstance(MakeGamePlayDto, { @@ -12,7 +12,7 @@ function createFakeMakeGamePlayDto(makeGamePlayDto: Partial = { chosenCardId: makeGamePlayDto.chosenCardId ?? undefined, chosenSide: makeGamePlayDto.chosenSide ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeMakeGamePlayDto }; \ No newline at end of file diff --git a/tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory.ts b/tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory.ts index d787f7640..e940f147b 100644 --- a/tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory.ts +++ b/tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory.ts @@ -2,9 +2,9 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; import { GameAdditionalCard } from "@/modules/game/schemas/game-additional-card/game-additional-card.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeObjectId } from "@tests/factories/shared/mongoose/mongoose.factory"; import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; @@ -12,11 +12,11 @@ import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; function createFakeGameAdditionalCard(gameAdditionalCard: Partial = {}, override: object = {}): GameAdditionalCard { return plainToInstance(GameAdditionalCard, { _id: gameAdditionalCard._id ?? createFakeObjectId(), - roleName: gameAdditionalCard.roleName ?? faker.helpers.arrayElement(Object.values(ROLE_NAMES)), + roleName: gameAdditionalCard.roleName ?? faker.helpers.arrayElement(Object.values(RoleNames)), isUsed: gameAdditionalCard.isUsed ?? faker.datatype.boolean(), - recipient: gameAdditionalCard.recipient ?? faker.helpers.arrayElement(Object.values([ROLE_NAMES.THIEF])), + recipient: gameAdditionalCard.recipient ?? faker.helpers.arrayElement(Object.values([RoleNames.THIEF])), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function bulkCreateFakeGameAdditionalCards(length: number, gameAdditionalCards: Partial[] = [], overrides: object[] = []): GameAdditionalCard[] { diff --git a/tests/factories/game/schemas/game-history-record/game-history-record.schema.factory.ts b/tests/factories/game/schemas/game-history-record/game-history-record.schema.factory.ts index 504319834..580a211fc 100644 --- a/tests/factories/game/schemas/game-history-record/game-history-record.schema.factory.ts +++ b/tests/factories/game/schemas/game-history-record/game-history-record.schema.factory.ts @@ -1,20 +1,20 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { GameHistoryRecordPlaySource } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema"; import { GameHistoryRecordPlayTarget } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-target.schema"; import { GameHistoryRecordPlayVote } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-vote.schema"; import { GameHistoryRecordPlayVoting } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema"; import { GameHistoryRecordPlay } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema"; import { GameHistoryRecord } from "@/modules/game/schemas/game-history-record/game-history-record.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeObjectId } from "@tests/factories/shared/mongoose/mongoose.factory"; import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; @@ -24,9 +24,9 @@ import { createFakeCharmedByPiedPiperPlayerAttribute, createFakeSheriffByAllPlay function createFakeGameHistoryRecordWerewolvesEatPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.EAT, + action: GamePlayActions.EAT, source: { - name: PLAYER_GROUPS.WEREWOLVES, + name: PlayerGroups.WEREWOLVES, players: gameHistoryRecordPlay.source?.players ?? [createFakeWerewolfAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -35,9 +35,9 @@ function createFakeGameHistoryRecordWerewolvesEatPlay(gameHistoryRecordPlay: Par function createFakeGameHistoryRecordBigBadWolfEatPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.EAT, + action: GamePlayActions.EAT, source: { - name: ROLE_NAMES.BIG_BAD_WOLF, + name: RoleNames.BIG_BAD_WOLF, players: gameHistoryRecordPlay.source?.players ?? [createFakeBigBadWolfAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -46,9 +46,9 @@ function createFakeGameHistoryRecordBigBadWolfEatPlay(gameHistoryRecordPlay: Par function createFakeGameHistoryRecordWhiteWerewolfEatPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.EAT, + action: GamePlayActions.EAT, source: { - name: ROLE_NAMES.WHITE_WEREWOLF, + name: RoleNames.WHITE_WEREWOLF, players: gameHistoryRecordPlay.source?.players ?? [createFakeWhiteWerewolfAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -57,9 +57,9 @@ function createFakeGameHistoryRecordWhiteWerewolfEatPlay(gameHistoryRecordPlay: function createFakeGameHistoryRecordSeerLookPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.LOOK, + action: GamePlayActions.LOOK, source: { - name: ROLE_NAMES.SEER, + name: RoleNames.SEER, players: gameHistoryRecordPlay.source?.players ?? [createFakeSeerAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -68,9 +68,9 @@ function createFakeGameHistoryRecordSeerLookPlay(gameHistoryRecordPlay: Partial< function createFakeGameHistoryRecordCupidCharmPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.CHARM, + action: GamePlayActions.CHARM, source: { - name: ROLE_NAMES.CUPID, + name: RoleNames.CUPID, players: gameHistoryRecordPlay.source?.players ?? [createFakeCupidAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -79,9 +79,9 @@ function createFakeGameHistoryRecordCupidCharmPlay(gameHistoryRecordPlay: Partia function createFakeGameHistoryRecordPiedPiperCharmPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.CHARM, + action: GamePlayActions.CHARM, source: { - name: ROLE_NAMES.PIED_PIPER, + name: RoleNames.PIED_PIPER, players: gameHistoryRecordPlay.source?.players ?? [createFakePiedPiperAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -90,9 +90,9 @@ function createFakeGameHistoryRecordPiedPiperCharmPlay(gameHistoryRecordPlay: Pa function createFakeGameHistoryRecordWitchUsePotionsPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.USE_POTIONS, + action: GamePlayActions.USE_POTIONS, source: { - name: ROLE_NAMES.WITCH, + name: RoleNames.WITCH, players: gameHistoryRecordPlay.source?.players ?? [createFakeWitchAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -101,9 +101,9 @@ function createFakeGameHistoryRecordWitchUsePotionsPlay(gameHistoryRecordPlay: P function createFakeGameHistoryRecordHunterShootPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.SHOOT, + action: GamePlayActions.SHOOT, source: { - name: ROLE_NAMES.HUNTER, + name: RoleNames.HUNTER, players: gameHistoryRecordPlay.source?.players ?? [createFakeHunterAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -112,9 +112,9 @@ function createFakeGameHistoryRecordHunterShootPlay(gameHistoryRecordPlay: Parti function createFakeGameHistoryRecordGuardProtectPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.PROTECT, + action: GamePlayActions.PROTECT, source: { - name: ROLE_NAMES.GUARD, + name: RoleNames.GUARD, players: gameHistoryRecordPlay.source?.players ?? [createFakeGuardAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -123,9 +123,9 @@ function createFakeGameHistoryRecordGuardProtectPlay(gameHistoryRecordPlay: Part function createFakeGameHistoryRecordRavenMarkPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.MARK, + action: GamePlayActions.MARK, source: { - name: ROLE_NAMES.RAVEN, + name: RoleNames.RAVEN, players: gameHistoryRecordPlay.source?.players ?? [createFakeRavenAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -134,9 +134,9 @@ function createFakeGameHistoryRecordRavenMarkPlay(gameHistoryRecordPlay: Partial function createFakeGameHistoryRecordTwoSistersMeetEachOtherPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + action: GamePlayActions.MEET_EACH_OTHER, source: { - name: ROLE_NAMES.TWO_SISTERS, + name: RoleNames.TWO_SISTERS, players: gameHistoryRecordPlay.source?.players ?? [createFakeTwoSistersAlivePlayer(), createFakeTwoSistersAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -145,9 +145,9 @@ function createFakeGameHistoryRecordTwoSistersMeetEachOtherPlay(gameHistoryRecor function createFakeGameHistoryRecordThreeBrothersMeetEachOtherPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + action: GamePlayActions.MEET_EACH_OTHER, source: { - name: ROLE_NAMES.THREE_BROTHERS, + name: RoleNames.THREE_BROTHERS, players: gameHistoryRecordPlay.source?.players ?? [createFakeThreeBrothersAlivePlayer(), createFakeThreeBrothersAlivePlayer(), createFakeThreeBrothersAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -160,9 +160,9 @@ function createFakeGameHistoryRecordCharmedMeetEachOtherPlay(gameHistoryRecordPl createFakePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), ]; return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + action: GamePlayActions.MEET_EACH_OTHER, source: { - name: PLAYER_GROUPS.CHARMED, + name: PlayerGroups.CHARMED, players: gameHistoryRecordPlay.source?.players ?? sourcePlayers, }, ...gameHistoryRecordPlay, @@ -171,9 +171,9 @@ function createFakeGameHistoryRecordCharmedMeetEachOtherPlay(gameHistoryRecordPl function createFakeGameHistoryRecordFoxSniffPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.SNIFF, + action: GamePlayActions.SNIFF, source: { - name: ROLE_NAMES.FOX, + name: RoleNames.FOX, players: gameHistoryRecordPlay.source?.players ?? [createFakeFoxAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -182,9 +182,9 @@ function createFakeGameHistoryRecordFoxSniffPlay(gameHistoryRecordPlay: Partial< function createFakeGameHistoryRecordWildChildChooseModelPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, + action: GamePlayActions.CHOOSE_MODEL, source: { - name: ROLE_NAMES.WILD_CHILD, + name: RoleNames.WILD_CHILD, players: gameHistoryRecordPlay.source?.players ?? [createFakeWildChildAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -193,9 +193,9 @@ function createFakeGameHistoryRecordWildChildChooseModelPlay(gameHistoryRecordPl function createFakeGameHistoryRecordWildDogWolfChooseSidePlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.CHOOSE_SIDE, + action: GamePlayActions.CHOOSE_SIDE, source: { - name: ROLE_NAMES.DOG_WOLF, + name: RoleNames.DOG_WOLF, players: gameHistoryRecordPlay.source?.players ?? [createFakeDogWolfAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -204,9 +204,9 @@ function createFakeGameHistoryRecordWildDogWolfChooseSidePlay(gameHistoryRecordP function createFakeGameHistoryRecordScapegoatBanVotingPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.BAN_VOTING, + action: GamePlayActions.BAN_VOTING, source: { - name: ROLE_NAMES.SCAPEGOAT, + name: RoleNames.SCAPEGOAT, players: gameHistoryRecordPlay.source?.players ?? [createFakeScapegoatAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -215,9 +215,9 @@ function createFakeGameHistoryRecordScapegoatBanVotingPlay(gameHistoryRecordPlay function createFakeGameHistoryRecordStutteringJudgeChooseSignPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.CHOOSE_SIGN, + action: GamePlayActions.CHOOSE_SIGN, source: { - name: ROLE_NAMES.STUTTERING_JUDGE, + name: RoleNames.STUTTERING_JUDGE, players: gameHistoryRecordPlay.source?.players ?? [createFakeStutteringJudgeAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -226,9 +226,9 @@ function createFakeGameHistoryRecordStutteringJudgeChooseSignPlay(gameHistoryRec function createFakeGameHistoryRecordThiefChooseCardPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.CHOOSE_CARD, + action: GamePlayActions.CHOOSE_CARD, source: { - name: ROLE_NAMES.THIEF, + name: RoleNames.THIEF, players: gameHistoryRecordPlay.source?.players ?? [createFakeThiefAlivePlayer()], }, ...gameHistoryRecordPlay, @@ -237,9 +237,9 @@ function createFakeGameHistoryRecordThiefChooseCardPlay(gameHistoryRecordPlay: P function createFakeGameHistoryRecordAllElectSheriffPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.ELECT_SHERIFF, + action: GamePlayActions.ELECT_SHERIFF, source: { - name: PLAYER_GROUPS.ALL, + name: PlayerGroups.ALL, players: gameHistoryRecordPlay.source?.players ?? [createFakePlayer()], }, ...gameHistoryRecordPlay, @@ -248,9 +248,9 @@ function createFakeGameHistoryRecordAllElectSheriffPlay(gameHistoryRecordPlay: P function createFakeGameHistoryRecordAllVotePlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.VOTE, + action: GamePlayActions.VOTE, source: { - name: PLAYER_GROUPS.ALL, + name: PlayerGroups.ALL, players: gameHistoryRecordPlay.source?.players ?? [createFakePlayer()], }, ...gameHistoryRecordPlay, @@ -259,9 +259,9 @@ function createFakeGameHistoryRecordAllVotePlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.DELEGATE, + action: GamePlayActions.DELEGATE, source: { - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, players: gameHistoryRecordPlay.source?.players ?? [createFakePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] })], }, ...gameHistoryRecordPlay, @@ -270,9 +270,9 @@ function createFakeGameHistoryRecordSheriffDelegatePlay(gameHistoryRecordPlay: P function createFakeGameHistoryRecordSheriffSettleVotesPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return createFakeGameHistoryRecordPlay({ - action: GAME_PLAY_ACTIONS.SETTLE_VOTES, + action: GamePlayActions.SETTLE_VOTES, source: { - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, players: gameHistoryRecordPlay.source?.players ?? [createFakePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] })], }, ...gameHistoryRecordPlay, @@ -281,10 +281,10 @@ function createFakeGameHistoryRecordSheriffSettleVotesPlay(gameHistoryRecordPlay function createFakeGameHistoryRecordPlaySource(gameHistoryRecordPlaySource: Partial = {}, override: object = {}): GameHistoryRecordPlaySource { return plainToInstance(GameHistoryRecordPlaySource, { - name: gameHistoryRecordPlaySource.name ?? faker.helpers.arrayElement(gameSourceValues), + name: gameHistoryRecordPlaySource.name ?? faker.helpers.arrayElement(GAME_SOURCE_VALUES), players: gameHistoryRecordPlaySource.players ?? [createFakePlayer()], ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeGameHistoryRecordPlayVote(gameHistoryRecordPlayVote: Partial = {}, override: object = {}): GameHistoryRecordPlayVote { @@ -292,7 +292,7 @@ function createFakeGameHistoryRecordPlayVote(gameHistoryRecordPlayVote: Partial< source: gameHistoryRecordPlayVote.source ?? createFakePlayer(), target: gameHistoryRecordPlayVote.target ?? createFakePlayer(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeGameHistoryRecordPlayTarget(gameHistoryRecordPlayTarget: Partial = {}, override: object = {}): GameHistoryRecordPlayTarget { @@ -301,21 +301,21 @@ function createFakeGameHistoryRecordPlayTarget(gameHistoryRecordPlayTarget: Part isInfected: gameHistoryRecordPlayTarget.isInfected ?? undefined, drankPotion: gameHistoryRecordPlayTarget.drankPotion ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeGameHistoryRecordPlayVoting(gameHistoryRecordPlayVoting: Partial = {}, override: object = {}): GameHistoryRecordPlayVoting { return plainToInstance(GameHistoryRecordPlayVoting, { - result: gameHistoryRecordPlayVoting.result ?? faker.helpers.arrayElement(Object.values(GAME_HISTORY_RECORD_VOTING_RESULTS)), + result: gameHistoryRecordPlayVoting.result ?? faker.helpers.arrayElement(Object.values(GameHistoryRecordVotingResults)), nominatedPlayers: gameHistoryRecordPlayVoting.nominatedPlayers ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeGameHistoryRecordPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecordPlay { return plainToInstance(GameHistoryRecordPlay, { source: createFakeGameHistoryRecordPlaySource(gameHistoryRecordPlay.source), - action: gameHistoryRecordPlay.action ?? faker.helpers.arrayElement(Object.values(GAME_PLAY_ACTIONS)), + action: gameHistoryRecordPlay.action ?? faker.helpers.arrayElement(Object.values(GamePlayActions)), targets: gameHistoryRecordPlay.targets ?? undefined, votes: gameHistoryRecordPlay.votes ?? undefined, voting: gameHistoryRecordPlay.voting ? createFakeGameHistoryRecordPlayVoting(gameHistoryRecordPlay.voting, override) : undefined, @@ -323,7 +323,7 @@ function createFakeGameHistoryRecordPlay(gameHistoryRecordPlay: Partial = {}, override: object = {}): GameHistoryRecord { @@ -332,13 +332,13 @@ function createFakeGameHistoryRecord(gameHistoryRecord: Partial[] = [], overrides: object[] = []): GameHistoryRecord[] { diff --git a/tests/factories/game/schemas/game-options/composition-game-options.schema.factory.ts b/tests/factories/game/schemas/game-options/composition-game-options.schema.factory.ts index 2d873b722..5597db93b 100644 --- a/tests/factories/game/schemas/game-options/composition-game-options.schema.factory.ts +++ b/tests/factories/game/schemas/game-options/composition-game-options.schema.factory.ts @@ -3,13 +3,13 @@ import { plainToInstance } from "class-transformer"; import { CompositionGameOptions } from "@/modules/game/schemas/game-options/composition-game-options.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeCompositionGameOptions(compositionGameOptions: Partial = {}, override: object = {}): CompositionGameOptions { return plainToInstance(CompositionGameOptions, { isHidden: compositionGameOptions.isHidden ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeCompositionGameOptions }; \ No newline at end of file diff --git a/tests/factories/game/schemas/game-options/game-options.schema.factory.ts b/tests/factories/game/schemas/game-options/game-options.schema.factory.ts index 0e44c5950..6c549d8a3 100644 --- a/tests/factories/game/schemas/game-options/game-options.schema.factory.ts +++ b/tests/factories/game/schemas/game-options/game-options.schema.factory.ts @@ -2,7 +2,7 @@ import { plainToInstance } from "class-transformer"; import { GameOptions } from "@/modules/game/schemas/game-options/game-options.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeCompositionGameOptions } from "@tests/factories/game/schemas/game-options/composition-game-options.schema.factory"; import { createFakeRolesGameOptions } from "@tests/factories/game/schemas/game-options/game-roles-options.schema.factory"; @@ -14,7 +14,7 @@ function createFakeGameOptions(gameOptions: Partial = {}, override: votes: createFakeVotesGameOptions(gameOptions.votes), roles: createFakeRolesGameOptions(gameOptions.roles), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeGameOptions }; \ No newline at end of file diff --git a/tests/factories/game/schemas/game-options/game-roles-options.schema.factory.ts b/tests/factories/game/schemas/game-options/game-roles-options.schema.factory.ts index cc899d039..311169c7f 100644 --- a/tests/factories/game/schemas/game-options/game-roles-options.schema.factory.ts +++ b/tests/factories/game/schemas/game-options/game-roles-options.schema.factory.ts @@ -1,7 +1,7 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; import { AncientGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/ancient-game-options.schema"; import { BearTamerGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/bear-tamer-game-options.schema"; import { BigBadWolfGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/big-bad-wolf-game-options.schema"; @@ -23,13 +23,13 @@ import { TwoSistersGameOptions } from "@/modules/game/schemas/game-options/roles import { WhiteWerewolfGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/white-werewolf-game-options.schema"; import { WildChildGameOptions } from "@/modules/game/schemas/game-options/roles-game-options/wild-child-game-options.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeRavenGameOptions(ravenGameOptions: Partial = {}, override: object = {}): RavenGameOptions { return plainToInstance(RavenGameOptions, { markPenalty: ravenGameOptions.markPenalty ?? faker.number.int({ min: 1, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakePiedPiperGameOptions(piedPiperGameOptions: Partial = {}, override: object = {}): PiedPiperGameOptions { @@ -37,7 +37,7 @@ function createFakePiedPiperGameOptions(piedPiperGameOptions: Partial = {}, override: object = {}): ThiefGameOptions { @@ -45,63 +45,63 @@ function createFakeThiefGameOptions(thiefGameOptions: Partial mustChooseBetweenWerewolves: thiefGameOptions.mustChooseBetweenWerewolves ?? faker.datatype.boolean(), additionalCardsCount: thiefGameOptions.additionalCardsCount ?? faker.number.int({ min: 1, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeDogWolfGameOptions(dogWolfGameOptions: Partial = {}, override: object = {}): DogWolfGameOptions { return plainToInstance(DogWolfGameOptions, { isChosenSideRevealed: dogWolfGameOptions.isChosenSideRevealed ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeWildChildGameOptions(wildChildGameOptions: Partial = {}, override: object = {}): WildChildGameOptions { return plainToInstance(WildChildGameOptions, { isTransformationRevealed: wildChildGameOptions.isTransformationRevealed ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeStutteringJudgeGameOptions(stutteringJudgeGameOptions: Partial = {}, override: object = {}): StutteringJudgeGameOptions { return plainToInstance(StutteringJudgeGameOptions, { voteRequestsCount: stutteringJudgeGameOptions.voteRequestsCount ?? faker.number.int({ min: 1, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeBearTamerGameOptions(bearTamerGameOptions: Partial = {}, override: object = {}): BearTamerGameOptions { return plainToInstance(BearTamerGameOptions, { doesGrowlIfInfected: bearTamerGameOptions.doesGrowlIfInfected ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeFoxGameOptions(foxGameOptions: Partial = {}, override: object = {}): FoxGameOptions { return plainToInstance(FoxGameOptions, { isPowerlessIfMissesWerewolf: foxGameOptions.isPowerlessIfMissesWerewolf ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeThreeBrothersGameOptions(threeBrothersGameOptions: Partial = {}, override: object = {}): ThreeBrothersGameOptions { return plainToInstance(ThreeBrothersGameOptions, { wakingUpInterval: threeBrothersGameOptions.wakingUpInterval ?? faker.number.int({ min: 0, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeTwoSistersGameOptions(twoSistersGameOptions: Partial = {}, override: object = {}): TwoSistersGameOptions { return plainToInstance(TwoSistersGameOptions, { wakingUpInterval: twoSistersGameOptions.wakingUpInterval ?? faker.number.int({ min: 0, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeIdiotGameOptions(idiotGameOptions: Partial = {}, override: object = {}): IdiotGameOptions { return plainToInstance(IdiotGameOptions, { doesDieOnAncientDeath: idiotGameOptions.doesDieOnAncientDeath ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeAncientGameOptions(ancientGameOptions: Partial = {}, override: object = {}): AncientGameOptions { @@ -109,21 +109,21 @@ function createFakeAncientGameOptions(ancientGameOptions: Partial = {}, override: object = {}): GuardGameOptions { return plainToInstance(GuardGameOptions, { canProtectTwice: guardGameOptions.canProtectTwice ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeLittleGirlGameOptions(littleGirlGameOptions: Partial = {}, override: object = {}): LittleGirlGameOptions { return plainToInstance(LittleGirlGameOptions, { isProtectedByGuard: littleGirlGameOptions.isProtectedByGuard ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeSeerGameOptions(seerGameOptions: Partial = {}, override: object = {}): SeerGameOptions { @@ -131,29 +131,29 @@ function createFakeSeerGameOptions(seerGameOptions: Partial = { isTalkative: seerGameOptions.isTalkative ?? faker.datatype.boolean(), canSeeRoles: seerGameOptions.canSeeRoles ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeWhiteWerewolfGameOptions(whiteWerewolfOptions: Partial = {}, override: object = {}): WhiteWerewolfGameOptions { return plainToInstance(WhiteWerewolfGameOptions, { wakingUpInterval: whiteWerewolfOptions.wakingUpInterval ?? faker.number.int({ min: 1, max: 5 }), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeBigBadWolfGameOptions(bigBadWolfOptions: Partial = {}, override: object = {}): BigBadWolfGameOptions { return plainToInstance(BigBadWolfGameOptions, { isPowerlessIfWerewolfDies: bigBadWolfOptions.isPowerlessIfWerewolfDies ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeSheriffElectionGameOptions(sheriffElectionGameOptions: Partial = {}, override: object = {}): SheriffElectionGameOptions { return plainToInstance(SheriffElectionGameOptions, { turn: sheriffElectionGameOptions.turn ?? faker.number.int({ min: 1 }), - phase: sheriffElectionGameOptions.phase ?? faker.helpers.arrayElement(Object.values(GAME_PHASES)), + phase: sheriffElectionGameOptions.phase ?? faker.helpers.arrayElement(Object.values(GamePhases)), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeSheriffGameOptions(sheriffGameOptions: Partial = {}, override: object = {}): SheriffGameOptions { @@ -162,7 +162,7 @@ function createFakeSheriffGameOptions(sheriffGameOptions: Partial = {}, override: object = {}): RolesGameOptions { @@ -188,7 +188,7 @@ function createFakeRolesGameOptions(rolesGameOptions: Partial piedPiper: createFakePiedPiperGameOptions(rolesGameOptions.piedPiper), raven: createFakeRavenGameOptions(rolesGameOptions.raven), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { diff --git a/tests/factories/game/schemas/game-options/votes-game-options.schema.factory.ts b/tests/factories/game/schemas/game-options/votes-game-options.schema.factory.ts index 7a029c022..7107533bf 100644 --- a/tests/factories/game/schemas/game-options/votes-game-options.schema.factory.ts +++ b/tests/factories/game/schemas/game-options/votes-game-options.schema.factory.ts @@ -3,13 +3,13 @@ import { plainToInstance } from "class-transformer"; import { VotesGameOptions } from "@/modules/game/schemas/game-options/votes-game-options.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeVotesGameOptions(createVotesGameOptions: Partial = {}, override: object = {}): VotesGameOptions { return plainToInstance(VotesGameOptions, { canBeSkipped: createVotesGameOptions.canBeSkipped ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeVotesGameOptions }; \ No newline at end of file diff --git a/tests/factories/game/schemas/game-play/game-play-source.schema.factory.ts b/tests/factories/game/schemas/game-play/game-play-source.schema.factory.ts index e8d33554c..d5e10dbb2 100644 --- a/tests/factories/game/schemas/game-play/game-play-source.schema.factory.ts +++ b/tests/factories/game/schemas/game-play/game-play-source.schema.factory.ts @@ -1,17 +1,17 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; import { GamePlaySource } from "@/modules/game/schemas/game-play/game-play-source/game-play-source.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeGamePlaySource(gamePlaySource: Partial = {}, override: object = {}): GamePlaySource { return plainToInstance(GamePlaySource, { - name: gamePlaySource.name ?? faker.helpers.arrayElement(gameSourceValues), + name: gamePlaySource.name ?? faker.helpers.arrayElement(GAME_SOURCE_VALUES), players: gamePlaySource.players ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeGamePlaySource }; \ No newline at end of file diff --git a/tests/factories/game/schemas/game-play/game-play.schema.factory.ts b/tests/factories/game/schemas/game-play/game-play.schema.factory.ts index a1a64317b..c7f1fbb27 100644 --- a/tests/factories/game/schemas/game-play/game-play.schema.factory.ts +++ b/tests/factories/game/schemas/game-play/game-play.schema.factory.ts @@ -1,214 +1,214 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeGamePlaySource } from "@tests/factories/game/schemas/game-play/game-play-source.schema.factory"; function createFakeGamePlaySheriffSettlesVotes(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }), - action: GAME_PLAY_ACTIONS.SETTLE_VOTES, + source: createFakeGamePlaySource({ name: PlayerAttributeNames.SHERIFF }), + action: GamePlayActions.SETTLE_VOTES, ...gamePlay, }, override); } function createFakeGamePlaySheriffDelegates(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }), - action: GAME_PLAY_ACTIONS.DELEGATE, + source: createFakeGamePlaySource({ name: PlayerAttributeNames.SHERIFF }), + action: GamePlayActions.DELEGATE, ...gamePlay, }, override); } function createFakeGamePlayAllVote(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }), - action: GAME_PLAY_ACTIONS.VOTE, + source: createFakeGamePlaySource({ name: PlayerGroups.ALL }), + action: GamePlayActions.VOTE, ...gamePlay, }, override); } function createFakeGamePlayAllElectSheriff(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }), - action: GAME_PLAY_ACTIONS.ELECT_SHERIFF, + source: createFakeGamePlaySource({ name: PlayerGroups.ALL }), + action: GamePlayActions.ELECT_SHERIFF, ...gamePlay, }, override); } function createFakeGamePlayThiefChoosesCard(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.THIEF }), - action: GAME_PLAY_ACTIONS.CHOOSE_CARD, + source: createFakeGamePlaySource({ name: RoleNames.THIEF }), + action: GamePlayActions.CHOOSE_CARD, ...gamePlay, }, override); } function createFakeGamePlayStutteringJudgeChoosesSign(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.STUTTERING_JUDGE }), - action: GAME_PLAY_ACTIONS.CHOOSE_SIGN, + source: createFakeGamePlaySource({ name: RoleNames.STUTTERING_JUDGE }), + action: GamePlayActions.CHOOSE_SIGN, ...gamePlay, }, override); } function createFakeGamePlayScapegoatBansVoting(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.SCAPEGOAT }), - action: GAME_PLAY_ACTIONS.BAN_VOTING, + source: createFakeGamePlaySource({ name: RoleNames.SCAPEGOAT }), + action: GamePlayActions.BAN_VOTING, ...gamePlay, }, override); } function createFakeGamePlayDogWolfChoosesSide(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.DOG_WOLF }), - action: GAME_PLAY_ACTIONS.CHOOSE_SIDE, + source: createFakeGamePlaySource({ name: RoleNames.DOG_WOLF }), + action: GamePlayActions.CHOOSE_SIDE, ...gamePlay, }, override); } function createFakeGamePlayWildChildChoosesModel(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }), - action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, + source: createFakeGamePlaySource({ name: RoleNames.WILD_CHILD }), + action: GamePlayActions.CHOOSE_MODEL, ...gamePlay, }, override); } function createFakeGamePlayFoxSniffs(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.FOX }), - action: GAME_PLAY_ACTIONS.SNIFF, + source: createFakeGamePlaySource({ name: RoleNames.FOX }), + action: GamePlayActions.SNIFF, ...gamePlay, }, override); } function createFakeGamePlayCharmedMeetEachOther(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.CHARMED }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: PlayerGroups.CHARMED }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }, override); } function createFakeGamePlayLoversMeetEachOther(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.LOVERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: PlayerGroups.LOVERS }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }, override); } function createFakeGamePlayThreeBrothersMeetEachOther(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.THREE_BROTHERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: RoleNames.THREE_BROTHERS }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }, override); } function createFakeGamePlayTwoSistersMeetEachOther(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.TWO_SISTERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: RoleNames.TWO_SISTERS }), + action: GamePlayActions.MEET_EACH_OTHER, ...gamePlay, }, override); } function createFakeGamePlayRavenMarks(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.RAVEN }), - action: GAME_PLAY_ACTIONS.MARK, + source: createFakeGamePlaySource({ name: RoleNames.RAVEN }), + action: GamePlayActions.MARK, ...gamePlay, }, override); } function createFakeGamePlayGuardProtects(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.GUARD }), - action: GAME_PLAY_ACTIONS.PROTECT, + source: createFakeGamePlaySource({ name: RoleNames.GUARD }), + action: GamePlayActions.PROTECT, ...gamePlay, }, override); } function createFakeGamePlayHunterShoots(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.HUNTER }), - action: GAME_PLAY_ACTIONS.SHOOT, + source: createFakeGamePlaySource({ name: RoleNames.HUNTER }), + action: GamePlayActions.SHOOT, ...gamePlay, }, override); } function createFakeGamePlayWitchUsesPotions(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.WITCH }), - action: GAME_PLAY_ACTIONS.USE_POTIONS, + source: createFakeGamePlaySource({ name: RoleNames.WITCH }), + action: GamePlayActions.USE_POTIONS, ...gamePlay, }, override); } function createFakeGamePlayPiedPiperCharms(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.PIED_PIPER }), - action: GAME_PLAY_ACTIONS.CHARM, + source: createFakeGamePlaySource({ name: RoleNames.PIED_PIPER }), + action: GamePlayActions.CHARM, ...gamePlay, }, override); } function createFakeGamePlayCupidCharms(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.CUPID }), - action: GAME_PLAY_ACTIONS.CHARM, + source: createFakeGamePlaySource({ name: RoleNames.CUPID }), + action: GamePlayActions.CHARM, ...gamePlay, }, override); } function createFakeGamePlaySeerLooks(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.SEER }), - action: GAME_PLAY_ACTIONS.LOOK, + source: createFakeGamePlaySource({ name: RoleNames.SEER }), + action: GamePlayActions.LOOK, ...gamePlay, }, override); } function createFakeGamePlayWhiteWerewolfEats(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.WHITE_WEREWOLF }), - action: GAME_PLAY_ACTIONS.EAT, + source: createFakeGamePlaySource({ name: RoleNames.WHITE_WEREWOLF }), + action: GamePlayActions.EAT, ...gamePlay, }, override); } function createFakeGamePlayBigBadWolfEats(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.BIG_BAD_WOLF }), - action: GAME_PLAY_ACTIONS.EAT, + source: createFakeGamePlaySource({ name: RoleNames.BIG_BAD_WOLF }), + action: GamePlayActions.EAT, ...gamePlay, }, override); } function createFakeGamePlayWerewolvesEat(gamePlay: Partial = {}, override: object = {}): GamePlay { return createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.WEREWOLVES }), - action: GAME_PLAY_ACTIONS.EAT, + source: createFakeGamePlaySource({ name: PlayerGroups.WEREWOLVES }), + action: GamePlayActions.EAT, ...gamePlay, }, override); } function createFakeGamePlay(gamePlay: Partial = {}, override: object = {}): GamePlay { return plainToInstance(GamePlay, { - action: gamePlay.action ?? faker.helpers.arrayElement(Object.values(GAME_PLAY_ACTIONS)), + action: gamePlay.action ?? faker.helpers.arrayElement(Object.values(GamePlayActions)), source: createFakeGamePlaySource(gamePlay.source), cause: gamePlay.cause ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { diff --git a/tests/factories/game/schemas/game-victory/game-victory.schema.factory.ts b/tests/factories/game/schemas/game-victory/game-victory.schema.factory.ts index 578bafab3..425cccb0d 100644 --- a/tests/factories/game/schemas/game-victory/game-victory.schema.factory.ts +++ b/tests/factories/game/schemas/game-victory/game-victory.schema.factory.ts @@ -1,17 +1,17 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { GAME_VICTORY_TYPES } from "@/modules/game/enums/game-victory.enum"; +import { GameVictoryTypes } from "@/modules/game/enums/game-victory.enum"; import { GameVictory } from "@/modules/game/schemas/game-victory/game-victory.schema"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakeGameVictory(gameVictory: Partial = {}, override: object = {}): GameVictory { return plainToInstance(GameVictory, { - type: gameVictory.type ?? faker.helpers.arrayElement(Object.values(GAME_VICTORY_TYPES)), + type: gameVictory.type ?? faker.helpers.arrayElement(Object.values(GameVictoryTypes)), winners: gameVictory.winners ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { createFakeGameVictory }; \ No newline at end of file diff --git a/tests/factories/game/schemas/game.schema.factory.ts b/tests/factories/game/schemas/game.schema.factory.ts index 930e8827b..4df34b98e 100644 --- a/tests/factories/game/schemas/game.schema.factory.ts +++ b/tests/factories/game/schemas/game.schema.factory.ts @@ -1,11 +1,11 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { GAME_PHASES, GAME_STATUSES } from "@/modules/game/enums/game.enum"; +import { GamePhases, GameStatuses } from "@/modules/game/enums/game.enum"; import { Game } from "@/modules/game/schemas/game.schema"; import { GameWithCurrentPlay } from "@/modules/game/types/game-with-current-play"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeObjectId } from "@tests/factories/shared/mongoose/mongoose.factory"; import { createFakeGamePlay } from "@tests/factories/game/schemas/game-play/game-play.schema.factory"; @@ -16,7 +16,7 @@ function createFakeGameWithCurrentPlay(game: Partial = {}, ...createFakeGame(game, override), currentPlay: game.currentPlay ?? createFakeGamePlay(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakeGame(game: Partial = {}, override: object = {}): Game { @@ -25,8 +25,8 @@ function createFakeGame(game: Partial = {}, override: object = {}): Game { players: game.players ?? [], currentPlay: game.currentPlay ?? null, upcomingPlays: game.upcomingPlays ?? [], - phase: game.phase ?? faker.helpers.arrayElement(Object.values(GAME_PHASES)), - status: game.status ?? faker.helpers.arrayElement(Object.values(GAME_STATUSES)), + phase: game.phase ?? faker.helpers.arrayElement(Object.values(GamePhases)), + status: game.status ?? faker.helpers.arrayElement(Object.values(GameStatuses)), tick: game.tick ?? faker.number.int({ min: 1 }), turn: game.turn ?? faker.number.int({ min: 1 }), additionalCards: game.additionalCards ?? undefined, @@ -35,7 +35,7 @@ function createFakeGame(game: Partial = {}, override: object = {}): Game { createdAt: game.createdAt ?? faker.date.recent(), updatedAt: game.updatedAt ?? faker.date.recent(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { diff --git a/tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory.ts b/tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory.ts index f65ba35e8..bd6a84656 100644 --- a/tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory.ts +++ b/tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory.ts @@ -1,22 +1,22 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import type { Game } from "@/modules/game/schemas/game.schema"; import { PlayerAttributeActivation } from "@/modules/game/schemas/player/player-attribute/player-attribute-activation.schema"; import { PlayerAttribute } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; function createFakeSheriffBySheriffPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, - source: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, + source: PlayerAttributeNames.SHERIFF, doesRemainAfterDeath: true, ...attribute, }, override); @@ -24,8 +24,8 @@ function createFakeSheriffBySheriffPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, - source: PLAYER_GROUPS.ALL, + name: PlayerAttributeNames.SHERIFF, + source: PlayerGroups.ALL, doesRemainAfterDeath: true, ...attribute, }, override); @@ -33,8 +33,8 @@ function createFakeSheriffByAllPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SEEN, - source: ROLE_NAMES.SEER, + name: PlayerAttributeNames.SEEN, + source: RoleNames.SEER, remainingPhases: 1, ...attribute, }, override); @@ -42,8 +42,8 @@ function createFakeSeenBySeerPlayerAttribute(attribute: Partial function createFakeEatenByWerewolvesPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: PLAYER_GROUPS.WEREWOLVES, + name: PlayerAttributeNames.EATEN, + source: PlayerGroups.WEREWOLVES, remainingPhases: 1, ...attribute, }, override); @@ -51,8 +51,8 @@ function createFakeEatenByWerewolvesPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: ROLE_NAMES.WHITE_WEREWOLF, + name: PlayerAttributeNames.EATEN, + source: RoleNames.WHITE_WEREWOLF, remainingPhases: 1, ...attribute, }, override); @@ -60,8 +60,8 @@ function createFakeEatenByWhiteWerewolfPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: ROLE_NAMES.BIG_BAD_WOLF, + name: PlayerAttributeNames.EATEN, + source: RoleNames.BIG_BAD_WOLF, remainingPhases: 1, ...attribute, }, override); @@ -69,8 +69,8 @@ function createFakeEatenByBigBadWolfPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.DRANK_LIFE_POTION, - source: ROLE_NAMES.WITCH, + name: PlayerAttributeNames.DRANK_LIFE_POTION, + source: RoleNames.WITCH, remainingPhases: 1, ...attribute, }, override); @@ -78,8 +78,8 @@ function createFakeDrankLifePotionByWitchPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.DRANK_DEATH_POTION, - source: ROLE_NAMES.WITCH, + name: PlayerAttributeNames.DRANK_DEATH_POTION, + source: RoleNames.WITCH, remainingPhases: 1, ...attribute, }, override); @@ -87,8 +87,8 @@ function createFakeDrankDeathPotionByWitchPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.PROTECTED, - source: ROLE_NAMES.GUARD, + name: PlayerAttributeNames.PROTECTED, + source: RoleNames.GUARD, remainingPhases: 1, ...attribute, }, override); @@ -96,8 +96,8 @@ function createFakeProtectedByGuardPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.RAVEN_MARKED, - source: ROLE_NAMES.RAVEN, + name: PlayerAttributeNames.RAVEN_MARKED, + source: RoleNames.RAVEN, remainingPhases: 2, ...attribute, }, override); @@ -105,24 +105,24 @@ function createFakeRavenMarkedByRavenPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.IN_LOVE, - source: ROLE_NAMES.CUPID, + name: PlayerAttributeNames.IN_LOVE, + source: RoleNames.CUPID, ...attribute, }, override); } function createFakeWorshipedByWildChildPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.WORSHIPED, - source: ROLE_NAMES.WILD_CHILD, + name: PlayerAttributeNames.WORSHIPED, + source: RoleNames.WILD_CHILD, ...attribute, }, override); } function createFakePowerlessByFoxPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.POWERLESS, - source: ROLE_NAMES.FOX, + name: PlayerAttributeNames.POWERLESS, + source: RoleNames.FOX, doesRemainAfterDeath: true, ...attribute, }, override); @@ -130,8 +130,8 @@ function createFakePowerlessByFoxPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.POWERLESS, - source: ROLE_NAMES.ANCIENT, + name: PlayerAttributeNames.POWERLESS, + source: RoleNames.ANCIENT, doesRemainAfterDeath: true, ...attribute, }, override); @@ -139,20 +139,20 @@ function createFakePowerlessByAncientPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, - source: PLAYER_GROUPS.ALL, + name: PlayerAttributeNames.CANT_VOTE, + source: PlayerGroups.ALL, ...attribute, }, override); } function createFakeCantVoteByScapegoatPlayerAttribute(game: Game, attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, - source: ROLE_NAMES.SCAPEGOAT, + name: PlayerAttributeNames.CANT_VOTE, + source: RoleNames.SCAPEGOAT, remainingPhases: 1, activeAt: { - turn: game.phase === GAME_PHASES.DAY ? game.turn + 1 : game.turn, - phase: GAME_PHASES.DAY, + turn: game.phase === GamePhases.DAY ? game.turn + 1 : game.turn, + phase: GamePhases.DAY, }, ...attribute, }, override); @@ -160,16 +160,16 @@ function createFakeCantVoteByScapegoatPlayerAttribute(game: Game, attribute: Par function createFakeCharmedByPiedPiperPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CHARMED, - source: ROLE_NAMES.PIED_PIPER, + name: PlayerAttributeNames.CHARMED, + source: RoleNames.PIED_PIPER, ...attribute, }, override); } function createFakeGrowledByBearTamerPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.GROWLED, - source: ROLE_NAMES.BEAR_TAMER, + name: PlayerAttributeNames.GROWLED, + source: RoleNames.BEAR_TAMER, remainingPhases: 1, ...attribute, }, override); @@ -177,8 +177,8 @@ function createFakeGrowledByBearTamerPlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CONTAMINATED, - source: ROLE_NAMES.RUSTY_SWORD_KNIGHT, + name: PlayerAttributeNames.CONTAMINATED, + source: RoleNames.RUSTY_SWORD_KNIGHT, remainingPhases: 2, ...attribute, }, override); @@ -187,20 +187,20 @@ function createFakeContaminatedByRustySwordKnightPlayerAttribute(attribute: Part function createFakePlayerAttributeActivation(attributeActivation: Partial = {}, override: object = {}): PlayerAttributeActivation { return plainToInstance(PlayerAttributeActivation, { turn: attributeActivation.turn ?? faker.number.int({ min: 1 }), - phase: attributeActivation.phase ?? faker.helpers.arrayElement(Object.values(GAME_PHASES)), + phase: attributeActivation.phase ?? faker.helpers.arrayElement(Object.values(GamePhases)), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakePlayerAttribute(attribute: Partial = {}, override: object = {}): PlayerAttribute { return plainToInstance(PlayerAttribute, { - name: attribute.name ?? faker.helpers.arrayElement(Object.values(PLAYER_ATTRIBUTE_NAMES)), - source: attribute.source ?? faker.helpers.arrayElement(gameSourceValues), + name: attribute.name ?? faker.helpers.arrayElement(Object.values(PlayerAttributeNames)), + source: attribute.source ?? faker.helpers.arrayElement(GAME_SOURCE_VALUES), remainingPhases: attribute.remainingPhases ?? undefined, activeAt: attribute.activeAt ?? undefined, doesRemainAfterDeath: attribute.doesRemainAfterDeath ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function bulkCreateFakePlayerAttributes(length: number, attributes: Partial[] = [], overrides: object[] = []): PlayerAttribute[] { diff --git a/tests/factories/game/schemas/player/player-death/player-death.schema.factory.ts b/tests/factories/game/schemas/player/player-death/player-death.schema.factory.ts index 89d7df7bc..2d1310784 100644 --- a/tests/factories/game/schemas/player/player-death/player-death.schema.factory.ts +++ b/tests/factories/game/schemas/player/player-death/player-death.schema.factory.ts @@ -1,107 +1,107 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { gameSourceValues } from "@/modules/game/constants/game.constant"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GAME_SOURCE_VALUES } from "@/modules/game/constants/game.constant"; +import { PlayerAttributeNames, PlayerDeathCauses, PlayerGroups } from "@/modules/game/enums/player.enum"; import { PlayerDeath } from "@/modules/game/schemas/player/player-death.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; function createFakePlayerDiseaseByRustySwordKnightDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.DISEASE, - source: ROLE_NAMES.RUSTY_SWORD_KNIGHT, + cause: PlayerDeathCauses.DISEASE, + source: RoleNames.RUSTY_SWORD_KNIGHT, ...playerDeath, }, override); } function createFakePlayerBrokenHeartByCupidDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.BROKEN_HEART, - source: ROLE_NAMES.CUPID, + cause: PlayerDeathCauses.BROKEN_HEART, + source: RoleNames.CUPID, ...playerDeath, }, override); } function createFakePlayerReconsiderPardonByAllDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.RECONSIDER_PARDON, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.RECONSIDER_PARDON, + source: PlayerGroups.ALL, ...playerDeath, }, override); } function createFakePlayerVoteScapegoatedByAllDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.VOTE_SCAPEGOATED, + source: PlayerGroups.ALL, ...playerDeath, }, override); } function createFakePlayerVoteBySheriffDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE, - source: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + cause: PlayerDeathCauses.VOTE, + source: PlayerAttributeNames.SHERIFF, ...playerDeath, }, override); } function createFakePlayerVoteByAllDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.VOTE, + source: PlayerGroups.ALL, ...playerDeath, }, override); } function createFakePlayerShotByHunterDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.SHOT, - source: ROLE_NAMES.HUNTER, + cause: PlayerDeathCauses.SHOT, + source: RoleNames.HUNTER, ...playerDeath, }, override); } function createFakePlayerEatenByWhiteWerewolfDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: ROLE_NAMES.WHITE_WEREWOLF, + cause: PlayerDeathCauses.EATEN, + source: RoleNames.WHITE_WEREWOLF, ...playerDeath, }, override); } function createFakePlayerEatenByBigBadWolfDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: ROLE_NAMES.BIG_BAD_WOLF, + cause: PlayerDeathCauses.EATEN, + source: RoleNames.BIG_BAD_WOLF, ...playerDeath, }, override); } function createFakePlayerEatenByWerewolvesDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: PLAYER_GROUPS.WEREWOLVES, + cause: PlayerDeathCauses.EATEN, + source: PlayerGroups.WEREWOLVES, ...playerDeath, }, override); } function createFakePlayerDeathPotionByWitchDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.DEATH_POTION, - source: ROLE_NAMES.WITCH, + cause: PlayerDeathCauses.DEATH_POTION, + source: RoleNames.WITCH, ...playerDeath, }, override); } function createFakePlayerDeath(playerDeath: Partial = {}, override: object = {}): PlayerDeath { return plainToInstance(PlayerDeath, { - source: playerDeath.source ?? faker.helpers.arrayElement(Object.values(gameSourceValues)), - cause: playerDeath.cause ?? faker.helpers.arrayElement(Object.values(PLAYER_DEATH_CAUSES)), + source: playerDeath.source ?? faker.helpers.arrayElement(Object.values(GAME_SOURCE_VALUES)), + cause: playerDeath.cause ?? faker.helpers.arrayElement(Object.values(PlayerDeathCauses)), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } export { diff --git a/tests/factories/game/schemas/player/player-with-role.schema.factory.ts b/tests/factories/game/schemas/player/player-with-role.schema.factory.ts index 0b7cb9405..24b54b0d0 100644 --- a/tests/factories/game/schemas/player/player-with-role.schema.factory.ts +++ b/tests/factories/game/schemas/player/player-with-role.schema.factory.ts @@ -1,128 +1,128 @@ import type { PlayerRole } from "@/modules/game/schemas/player/player-role.schema"; import type { PlayerSide } from "@/modules/game/schemas/player/player-side.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -import { villagerRoles } from "@/modules/role/constants/role.constant"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { VILLAGER_ROLES } from "@/modules/role/constants/role.constant"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { createFakePlayer } from "@tests/factories/game/schemas/player/player.schema.factory"; function createFakeWerewolfAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.WEREWOLF, player, override); + return createFakeAlivePlayerWithRole(RoleNames.WEREWOLF, player, override); } function createFakeBigBadWolfAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.BIG_BAD_WOLF, player, override); + return createFakeAlivePlayerWithRole(RoleNames.BIG_BAD_WOLF, player, override); } function createFakeVileFatherOfWolvesAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.VILE_FATHER_OF_WOLVES, player, override); + return createFakeAlivePlayerWithRole(RoleNames.VILE_FATHER_OF_WOLVES, player, override); } function createFakeWhiteWerewolfAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.WHITE_WEREWOLF, player, override); + return createFakeAlivePlayerWithRole(RoleNames.WHITE_WEREWOLF, player, override); } function createFakeVillagerAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.VILLAGER, player, override); + return createFakeAlivePlayerWithRole(RoleNames.VILLAGER, player, override); } function createFakeVillagerVillagerAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.VILLAGER_VILLAGER, player, override); + return createFakeAlivePlayerWithRole(RoleNames.VILLAGER_VILLAGER, player, override); } function createFakeSeerAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.SEER, player, override); + return createFakeAlivePlayerWithRole(RoleNames.SEER, player, override); } function createFakeCupidAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.CUPID, player, override); + return createFakeAlivePlayerWithRole(RoleNames.CUPID, player, override); } function createFakeWitchAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.WITCH, player, override); + return createFakeAlivePlayerWithRole(RoleNames.WITCH, player, override); } function createFakeHunterAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.HUNTER, player, override); + return createFakeAlivePlayerWithRole(RoleNames.HUNTER, player, override); } function createFakeLittleGirlAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.LITTLE_GIRL, player, override); + return createFakeAlivePlayerWithRole(RoleNames.LITTLE_GIRL, player, override); } function createFakeGuardAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.GUARD, player, override); + return createFakeAlivePlayerWithRole(RoleNames.GUARD, player, override); } function createFakeAncientAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.ANCIENT, player, override); + return createFakeAlivePlayerWithRole(RoleNames.ANCIENT, player, override); } function createFakeScapegoatAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.SCAPEGOAT, player, override); + return createFakeAlivePlayerWithRole(RoleNames.SCAPEGOAT, player, override); } function createFakeIdiotAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.IDIOT, player, override); + return createFakeAlivePlayerWithRole(RoleNames.IDIOT, player, override); } function createFakeTwoSistersAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.TWO_SISTERS, player, override); + return createFakeAlivePlayerWithRole(RoleNames.TWO_SISTERS, player, override); } function createFakeThreeBrothersAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.THREE_BROTHERS, player, override); + return createFakeAlivePlayerWithRole(RoleNames.THREE_BROTHERS, player, override); } function createFakeFoxAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.FOX, player, override); + return createFakeAlivePlayerWithRole(RoleNames.FOX, player, override); } function createFakeBearTamerAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.BEAR_TAMER, player, override); + return createFakeAlivePlayerWithRole(RoleNames.BEAR_TAMER, player, override); } function createFakeStutteringJudgeAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.STUTTERING_JUDGE, player, override); + return createFakeAlivePlayerWithRole(RoleNames.STUTTERING_JUDGE, player, override); } function createFakeRustySwordKnightAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.RUSTY_SWORD_KNIGHT, player, override); + return createFakeAlivePlayerWithRole(RoleNames.RUSTY_SWORD_KNIGHT, player, override); } function createFakeWildChildAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.WILD_CHILD, player, override); + return createFakeAlivePlayerWithRole(RoleNames.WILD_CHILD, player, override); } function createFakeDogWolfAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.DOG_WOLF, player, override); + return createFakeAlivePlayerWithRole(RoleNames.DOG_WOLF, player, override); } function createFakeThiefAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.THIEF, player, override); + return createFakeAlivePlayerWithRole(RoleNames.THIEF, player, override); } function createFakeAngelAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.ANGEL, player, override); + return createFakeAlivePlayerWithRole(RoleNames.ANGEL, player, override); } function createFakePiedPiperAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.PIED_PIPER, player, override); + return createFakeAlivePlayerWithRole(RoleNames.PIED_PIPER, player, override); } function createFakeRavenAlivePlayer(player: Partial = {}, override: object = {}): Player { - return createFakeAlivePlayerWithRole(ROLE_NAMES.RAVEN, player, override); + return createFakeAlivePlayerWithRole(RoleNames.RAVEN, player, override); } -function createFakeAlivePlayerWithRole(role: ROLE_NAMES, player: Partial = {}, override: object = {}): Player { +function createFakeAlivePlayerWithRole(role: RoleNames, player: Partial = {}, override: object = {}): Player { const playerRole: PlayerRole = { current: role, original: role, - isRevealed: role === ROLE_NAMES.VILLAGER_VILLAGER, + isRevealed: role === RoleNames.VILLAGER_VILLAGER, }; const playerSide: PlayerSide = { - current: villagerRoles.find(({ name }) => name === role) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES, - original: villagerRoles.find(({ name }) => name === role) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES, + current: VILLAGER_ROLES.find(({ name }) => name === role) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES, + original: VILLAGER_ROLES.find(({ name }) => name === role) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES, }; return createFakePlayer({ role: playerRole, diff --git a/tests/factories/game/schemas/player/player.schema.factory.ts b/tests/factories/game/schemas/player/player.schema.factory.ts index bca2a1809..53399cd11 100644 --- a/tests/factories/game/schemas/player/player.schema.factory.ts +++ b/tests/factories/game/schemas/player/player.schema.factory.ts @@ -4,9 +4,9 @@ import { plainToInstance } from "class-transformer"; import { PlayerRole } from "@/modules/game/schemas/player/player-role.schema"; import { PlayerSide } from "@/modules/game/schemas/player/player-side.schema"; import { Player } from "@/modules/game/schemas/player/player.schema"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeObjectId } from "@tests/factories/shared/mongoose/mongoose.factory"; import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; @@ -14,19 +14,19 @@ import { createFakePlayerDeath } from "@tests/factories/game/schemas/player/play function createFakePlayerSide(playerSide: Partial = {}, override: object = {}): PlayerSide { return plainToInstance(PlayerSide, { - current: playerSide.current ?? faker.helpers.arrayElement(Object.values(ROLE_SIDES)), - original: playerSide.original ?? faker.helpers.arrayElement(Object.values(ROLE_SIDES)), + current: playerSide.current ?? faker.helpers.arrayElement(Object.values(RoleSides)), + original: playerSide.original ?? faker.helpers.arrayElement(Object.values(RoleSides)), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakePlayerRole(playerRole: Partial = {}, override: object = {}): PlayerRole { return plainToInstance(PlayerRole, { - current: playerRole.current ?? faker.helpers.arrayElement(Object.values(ROLE_NAMES)), - original: playerRole.original ?? faker.helpers.arrayElement(Object.values(ROLE_NAMES)), + current: playerRole.current ?? faker.helpers.arrayElement(Object.values(RoleNames)), + original: playerRole.original ?? faker.helpers.arrayElement(Object.values(RoleNames)), isRevealed: playerRole.isRevealed ?? faker.datatype.boolean(), ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function createFakePlayer(player: Partial = {}, override: object = {}): Player { @@ -40,7 +40,7 @@ function createFakePlayer(player: Partial = {}, override: object = {}): position: player.position ?? faker.number.int({ min: 0 }), death: player.death ? createFakePlayerDeath(player.death) : undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function bulkCreateFakePlayers(length: number, players: Partial[] = [], overrides: object[] = []): Player[] { diff --git a/tests/factories/game/types/game-history-record/game-history-record.type.factory.ts b/tests/factories/game/types/game-history-record/game-history-record.type.factory.ts index e9214c285..dcda37204 100644 --- a/tests/factories/game/types/game-history-record/game-history-record.type.factory.ts +++ b/tests/factories/game/types/game-history-record/game-history-record.type.factory.ts @@ -1,11 +1,11 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { gameHistoryRecordFieldsSpecs } from "@/modules/game/constants/game-history-record/game-history-record.constant"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { GAME_HISTORY_RECORD_FIELDS_SPECS } from "@/modules/game/constants/game-history-record/game-history-record.constant"; +import { GamePhases } from "@/modules/game/enums/game.enum"; import { GameHistoryRecordToInsert } from "@/modules/game/types/game-history-record.type"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { createFakeObjectId } from "@tests/factories/shared/mongoose/mongoose.factory"; import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; @@ -14,14 +14,14 @@ import { createFakeGameHistoryRecordPlay } from "@tests/factories/game/schemas/g function createFakeGameHistoryRecordToInsert(gameHistoryRecordToInsert: Partial = {}, override: object = {}): GameHistoryRecordToInsert { return plainToInstance(GameHistoryRecordToInsert, { gameId: gameHistoryRecordToInsert.gameId ?? createFakeObjectId(), - tick: gameHistoryRecordToInsert.tick ?? faker.number.int({ min: gameHistoryRecordFieldsSpecs.tick.minimum }), - turn: gameHistoryRecordToInsert.turn ?? faker.number.int({ min: gameHistoryRecordFieldsSpecs.turn.minimum }), - phase: gameHistoryRecordToInsert.phase ?? faker.helpers.arrayElement(Object.values(GAME_PHASES)), + tick: gameHistoryRecordToInsert.tick ?? faker.number.int({ min: GAME_HISTORY_RECORD_FIELDS_SPECS.tick.minimum }), + turn: gameHistoryRecordToInsert.turn ?? faker.number.int({ min: GAME_HISTORY_RECORD_FIELDS_SPECS.turn.minimum }), + phase: gameHistoryRecordToInsert.phase ?? faker.helpers.arrayElement(Object.values(GamePhases)), play: createFakeGameHistoryRecordPlay(gameHistoryRecordToInsert.play), revealedPlayers: gameHistoryRecordToInsert.revealedPlayers ?? undefined, deadPlayers: gameHistoryRecordToInsert.deadPlayers ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function bulkCreateFakeGameHistoryRecordsToInsert( diff --git a/tests/factories/role/types/role.type.factory.ts b/tests/factories/role/types/role.type.factory.ts index 65075b078..9bdca99a9 100644 --- a/tests/factories/role/types/role.type.factory.ts +++ b/tests/factories/role/types/role.type.factory.ts @@ -1,23 +1,23 @@ import { faker } from "@faker-js/faker"; import { plainToInstance } from "class-transformer"; -import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides, RoleTypes } from "@/modules/role/enums/role.enum"; import { Role } from "@/modules/role/types/role.type"; -import { plainToInstanceDefaultOptions } from "@/shared/validation/constants/validation.constant"; +import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; import { bulkCreate } from "@tests/factories/shared/bulk-create.factory"; function createFakeRole(role: Partial = {}, override: object = {}): Role { return plainToInstance(Role, { - name: role.name ?? faker.helpers.arrayElement(Object.values(ROLE_NAMES)), - side: role.side ?? faker.helpers.arrayElement(Object.values(ROLE_SIDES)), - type: role.type ?? faker.helpers.arrayElement(Object.values(ROLE_TYPES)), + name: role.name ?? faker.helpers.arrayElement(Object.values(RoleNames)), + side: role.side ?? faker.helpers.arrayElement(Object.values(RoleSides)), + type: role.type ?? faker.helpers.arrayElement(Object.values(RoleTypes)), minInGame: role.minInGame ?? undefined, maxInGame: role.maxInGame ?? undefined, recommendedMinPlayers: role.recommendedMinPlayers ?? undefined, ...override, - }, plainToInstanceDefaultOptions); + }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); } function bulkCreateFakeRoles(length: number, roles: Partial[] = [], overrides: object[] = []): Role[] { diff --git a/tests/stryker/incremental.json b/tests/stryker/incremental.json index ea9fa603d..f582e8d3c 100644 --- a/tests/stryker/incremental.json +++ b/tests/stryker/incremental.json @@ -12,7 +12,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -34,10 +34,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -59,10 +59,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -84,10 +84,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -109,10 +109,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -134,10 +134,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -159,10 +159,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -184,10 +184,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -209,10 +209,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "992" + "993" ], "coveredBy": [ - "992" + "993" ], "location": { "end": { @@ -240,8 +240,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "998", - "999" + "999", + "1000" ], "location": { "end": { @@ -263,8 +263,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "998", - "999" + "999", + "1000" ], "location": { "end": { @@ -286,8 +286,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "998", - "999" + "999", + "1000" ], "location": { "end": { @@ -309,8 +309,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "998", - "999" + "999", + "1000" ], "location": { "end": { @@ -332,11 +332,11 @@ "testsCompleted": 2, "static": true, "killedBy": [ - "999" + "1000" ], "coveredBy": [ - "998", - "999" + "999", + "1000" ], "location": { "end": { @@ -358,8 +358,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "998", - "999" + "999", + "1000" ], "location": { "end": { @@ -381,8 +381,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "998", - "999" + "999", + "1000" ], "location": { "end": { @@ -404,10 +404,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "999" + "1000" ], "coveredBy": [ - "999" + "1000" ], "location": { "end": { @@ -429,9 +429,9 @@ "static": true, "killedBy": [], "coveredBy": [ - "1000", "1001", - "1002" + "1002", + "1003" ], "location": { "end": { @@ -453,9 +453,9 @@ "static": true, "killedBy": [], "coveredBy": [ - "1000", "1001", - "1002" + "1002", + "1003" ], "location": { "end": { @@ -477,12 +477,12 @@ "testsCompleted": 3, "static": true, "killedBy": [ - "1000" + "1001" ], "coveredBy": [ - "1000", "1001", - "1002" + "1002", + "1003" ], "location": { "end": { @@ -504,10 +504,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "1000" + "1001" ], "coveredBy": [ - "1000" + "1001" ], "location": { "end": { @@ -529,9 +529,9 @@ "static": true, "killedBy": [], "coveredBy": [ - "1000", "1001", - "1002" + "1002", + "1003" ], "location": { "end": { @@ -553,7 +553,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "1002" + "1003" ], "location": { "end": { @@ -575,7 +575,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "1002" + "1003" ], "location": { "end": { @@ -597,10 +597,10 @@ "testsCompleted": 1, "static": true, "killedBy": [ - "1002" + "1003" ], "coveredBy": [ - "1002" + "1003" ], "location": { "end": { @@ -628,8 +628,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "1020", - "1021" + "1021", + "1022" ], "location": { "end": { @@ -651,8 +651,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "1020", - "1021" + "1021", + "1022" ], "location": { "end": { @@ -674,11 +674,11 @@ "testsCompleted": 2, "static": true, "killedBy": [ - "1020" + "1021" ], "coveredBy": [ - "1020", - "1021" + "1021", + "1022" ], "location": { "end": { @@ -700,11 +700,11 @@ "testsCompleted": 2, "static": true, "killedBy": [ - "1020" + "1021" ], "coveredBy": [ - "1020", - "1021" + "1021", + "1022" ], "location": { "end": { @@ -726,11 +726,11 @@ "testsCompleted": 2, "static": true, "killedBy": [ - "1020" + "1021" ], "coveredBy": [ - "1020", - "1021" + "1021", + "1022" ], "location": { "end": { @@ -752,8 +752,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "1020", - "1021" + "1021", + "1022" ], "location": { "end": { @@ -781,8 +781,8 @@ "static": true, "killedBy": [], "coveredBy": [ - "1018", - "1019" + "1019", + "1020" ], "location": { "end": { @@ -804,11 +804,11 @@ "testsCompleted": 2, "static": true, "killedBy": [ - "1018" + "1019" ], "coveredBy": [ - "1018", - "1019" + "1019", + "1020" ], "location": { "end": { @@ -830,11 +830,11 @@ "testsCompleted": 2, "static": true, "killedBy": [ - "1018" + "1019" ], "coveredBy": [ - "1018", - "1019" + "1019", + "1020" ], "location": { "end": { @@ -856,11 +856,11 @@ "testsCompleted": 2, "static": true, "killedBy": [ - "1018" + "1019" ], "coveredBy": [ - "1018", - "1019" + "1019", + "1020" ], "location": { "end": { @@ -1042,7 +1042,7 @@ } } ], - "source": "import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query } from \"@nestjs/common\";\nimport { ApiOperation, ApiResponse, ApiTags } from \"@nestjs/swagger\";\n\nimport { ApiGameIdParam } from \"@/modules/game/controllers/decorators/api-game-id-param.decorator\";\nimport { ApiGameNotFoundResponse } from \"@/modules/game/controllers/decorators/api-game-not-found-response.decorator\";\nimport { GetGameByIdPipe } from \"@/modules/game/controllers/pipes/get-game-by-id.pipe\";\nimport { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { GetGameRandomCompositionPlayerResponseDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition-player-response/get-game-random-composition-player-response.dto\";\nimport { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { GAME_STATUSES } from \"@/modules/game/enums/game.enum\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GameRandomCompositionService } from \"@/modules/game/providers/services/game-random-composition.service\";\nimport { GameService } from \"@/modules/game/providers/services/game.service\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\n\n@ApiTags(\"🎲 Games\")\n@Controller(API_RESOURCES.GAMES)\nexport class GameController {\n public constructor(\n private readonly gameService: GameService,\n private readonly gameRandomCompositionService: GameRandomCompositionService,\n private readonly gameHistoryRecordService: GameHistoryRecordService,\n ) {}\n\n @Get()\n @ApiOperation({ summary: \"Get games\" })\n @ApiResponse({ status: HttpStatus.OK, type: Game, isArray: true })\n private async getGames(): Promise {\n return this.gameService.getGames();\n }\n\n @Get(\"random-composition\")\n @ApiOperation({ summary: \"Get game random composition for given players\" })\n @ApiResponse({ status: HttpStatus.OK, type: GetGameRandomCompositionPlayerResponseDto, isArray: true })\n private getGameRandomComposition(@Query() getGameRandomCompositionDto: GetGameRandomCompositionDto): GetGameRandomCompositionPlayerResponseDto[] {\n return this.gameRandomCompositionService.getGameRandomComposition(getGameRandomCompositionDto);\n }\n\n @Get(\":id\")\n @ApiOperation({ summary: \"Get a game by id\" })\n @ApiGameIdParam()\n @ApiResponse({ status: HttpStatus.OK, type: Game })\n @ApiGameNotFoundResponse()\n private getGame(@Param(\"id\", GetGameByIdPipe) game: Game): Game {\n return game;\n }\n\n @Post()\n @ApiOperation({ summary: \"Create a new game\" })\n private async createGame(@Body() createGameDto: CreateGameDto): Promise {\n return this.gameService.createGame(createGameDto);\n }\n\n @Delete(\":id\")\n @ApiOperation({ summary: \"Cancel a playing game\", description: `This endpoint won't delete the game, but set its status to ${GAME_STATUSES.CANCELED}. In this status, the game can't be mutated anymore.` })\n @ApiGameIdParam()\n @ApiResponse({ status: HttpStatus.OK, type: Game, description: `Game's status will be set to ${GAME_STATUSES.CANCELED}` })\n @ApiGameNotFoundResponse()\n private async cancelGame(@Param(\"id\", GetGameByIdPipe) game: Game): Promise {\n return this.gameService.cancelGame(game);\n }\n\n @Post(\":id/play\")\n @HttpCode(HttpStatus.OK)\n @ApiOperation({ summary: \"Make a game play\", description: `Make a play for a game with the \\`${GAME_STATUSES.PLAYING}\\` status. Body parameters fields are required or optional based on the upcoming game play.` })\n private async makeGamePlay(@Param(\"id\", GetGameByIdPipe) game: Game, @Body() makeGamePlayDto: MakeGamePlayDto): Promise {\n return this.gameService.makeGamePlay(game, makeGamePlayDto);\n }\n\n @Get(\":id/history\")\n @ApiOperation({ summary: \"Get a game full history by id\" })\n @ApiGameIdParam()\n @ApiResponse({ status: HttpStatus.OK, type: [GameHistoryRecord] })\n @ApiGameNotFoundResponse()\n private async getGameHistory(@Param(\"id\", GetGameByIdPipe) game: Game): Promise {\n return this.gameHistoryRecordService.getGameHistory(game._id);\n }\n}" + "source": "import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query } from \"@nestjs/common\";\nimport { ApiOperation, ApiResponse, ApiTags } from \"@nestjs/swagger\";\n\nimport { ApiGameIdParam } from \"@/modules/game/controllers/decorators/api-game-id-param.decorator\";\nimport { ApiGameNotFoundResponse } from \"@/modules/game/controllers/decorators/api-game-not-found-response.decorator\";\nimport { GetGameByIdPipe } from \"@/modules/game/controllers/pipes/get-game-by-id.pipe\";\nimport { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { GetGameRandomCompositionPlayerResponseDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition-player-response/get-game-random-composition-player-response.dto\";\nimport { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { GameStatuses } from \"@/modules/game/enums/game.enum\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GameRandomCompositionService } from \"@/modules/game/providers/services/game-random-composition.service\";\nimport { GameService } from \"@/modules/game/providers/services/game.service\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\n\n@ApiTags(\"🎲 Games\")\n@Controller(ApiResources.GAMES)\nexport class GameController {\n public constructor(\n private readonly gameService: GameService,\n private readonly gameRandomCompositionService: GameRandomCompositionService,\n private readonly gameHistoryRecordService: GameHistoryRecordService,\n ) {}\n\n @Get()\n @ApiOperation({ summary: \"Get games\" })\n @ApiResponse({ status: HttpStatus.OK, type: Game, isArray: true })\n private async getGames(): Promise {\n return this.gameService.getGames();\n }\n\n @Get(\"random-composition\")\n @ApiOperation({ summary: \"Get game random composition for given players\" })\n @ApiResponse({ status: HttpStatus.OK, type: GetGameRandomCompositionPlayerResponseDto, isArray: true })\n private getGameRandomComposition(@Query() getGameRandomCompositionDto: GetGameRandomCompositionDto): GetGameRandomCompositionPlayerResponseDto[] {\n return this.gameRandomCompositionService.getGameRandomComposition(getGameRandomCompositionDto);\n }\n\n @Get(\":id\")\n @ApiOperation({ summary: \"Get a game by id\" })\n @ApiGameIdParam()\n @ApiResponse({ status: HttpStatus.OK, type: Game })\n @ApiGameNotFoundResponse()\n private getGame(@Param(\"id\", GetGameByIdPipe) game: Game): Game {\n return game;\n }\n\n @Post()\n @ApiOperation({ summary: \"Create a new game\" })\n private async createGame(@Body() createGameDto: CreateGameDto): Promise {\n return this.gameService.createGame(createGameDto);\n }\n\n @Delete(\":id\")\n @ApiOperation({ summary: \"Cancel a playing game\", description: `This endpoint won't delete the game, but set its status to ${GameStatuses.CANCELED}. In this status, the game can't be mutated anymore.` })\n @ApiGameIdParam()\n @ApiResponse({ status: HttpStatus.OK, type: Game, description: `Game's status will be set to ${GameStatuses.CANCELED}` })\n @ApiGameNotFoundResponse()\n private async cancelGame(@Param(\"id\", GetGameByIdPipe) game: Game): Promise {\n return this.gameService.cancelGame(game);\n }\n\n @Post(\":id/play\")\n @HttpCode(HttpStatus.OK)\n @ApiOperation({ summary: \"Make a game play\", description: `Make a play for a game with the \\`${GameStatuses.PLAYING}\\` status. Body parameters fields are required or optional based on the upcoming game play.` })\n private async makeGamePlay(@Param(\"id\", GetGameByIdPipe) game: Game, @Body() makeGamePlayDto: MakeGamePlayDto): Promise {\n return this.gameService.makeGamePlay(game, makeGamePlayDto);\n }\n\n @Get(\":id/history\")\n @ApiOperation({ summary: \"Get a game full history by id\" })\n @ApiGameIdParam()\n @ApiResponse({ status: HttpStatus.OK, type: [GameHistoryRecord] })\n @ApiGameNotFoundResponse()\n private async getGameHistory(@Param(\"id\", GetGameByIdPipe) game: Game): Promise {\n return this.gameHistoryRecordService.getGameHistory(game._id);\n }\n}" }, "src/modules/game/controllers/pipes/get-game-by-id.pipe.ts": { "language": "typescript", @@ -1075,9 +1075,9 @@ "533", "534", "535", - "985", "986", - "987" + "987", + "988" ], "location": { "end": { @@ -1099,7 +1099,7 @@ "testsCompleted": 17, "static": false, "killedBy": [ - "987" + "988" ], "coveredBy": [ "495", @@ -1117,8 +1117,8 @@ "533", "534", "535", - "986", - "987" + "987", + "988" ], "location": { "end": { @@ -1145,7 +1145,6 @@ "521", "522", "523", - "525", "526", "527", "528", @@ -1155,8 +1154,8 @@ "533", "534", "535", - "986", - "987" + "987", + "988" ], "location": { "end": { @@ -1183,7 +1182,6 @@ "521", "522", "523", - "525", "526", "527", "528", @@ -1193,8 +1191,8 @@ "533", "534", "535", - "986", - "987" + "987", + "988" ], "location": { "end": { @@ -1221,7 +1219,6 @@ "521", "522", "523", - "525", "526", "527", "528", @@ -1231,8 +1228,8 @@ "533", "534", "535", - "986", - "987" + "987", + "988" ], "location": { "end": { @@ -1256,11 +1253,10 @@ "coveredBy": [ "495", "521", - "525", "526", "527", "533", - "986" + "987" ], "location": { "end": { @@ -1274,7 +1270,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport type { PipeTransform } from \"@nestjs/common\";\n\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { ValidateMongoId } from \"@/shared/api/pipes/validate-mongo-id.pipe\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\n@Injectable()\nexport class GetGameByIdPipe implements PipeTransform {\n public constructor(private readonly gameRepository: GameRepository) {}\n public async transform(value: unknown): Promise {\n const validateMongoIdPipe = new ValidateMongoId();\n const objectId = validateMongoIdPipe.transform(value);\n const game = await this.gameRepository.findOne({ _id: objectId });\n if (game === null) {\n throw new ResourceNotFoundException(API_RESOURCES.GAMES, objectId.toString());\n }\n return game;\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport type { PipeTransform } from \"@nestjs/common\";\n\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { ValidateMongoId } from \"@/shared/api/pipes/validate-mongo-id.pipe\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\n@Injectable()\nexport class GetGameByIdPipe implements PipeTransform {\n public constructor(private readonly gameRepository: GameRepository) {}\n public async transform(value: unknown): Promise {\n const validateMongoIdPipe = new ValidateMongoId();\n const objectId = validateMongoIdPipe.transform(value);\n const game = await this.gameRepository.findOne({ _id: objectId });\n if (game === null) {\n throw new ResourceNotFoundException(ApiResources.GAMES, objectId.toString());\n }\n return game;\n }\n}" }, "src/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.ts": { "language": "typescript", @@ -1311,9 +1307,9 @@ "517", "518", "519", - "988", "989", - "990" + "990", + "991" ], "location": { "end": { @@ -1330,13 +1326,9 @@ "id": "49", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.spec.ts:23:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 26, + "status": "Timeout", "static": false, - "killedBy": [ - "989" - ], + "killedBy": [], "coveredBy": [ "497", "498", @@ -1361,9 +1353,9 @@ "517", "518", "519", - "988", "989", - "990" + "990", + "991" ], "location": { "end": { @@ -1411,9 +1403,9 @@ "517", "518", "519", - "988", "989", - "990" + "990", + "991" ], "location": { "end": { @@ -1458,9 +1450,9 @@ "517", "518", "519", - "988", "989", - "990" + "990", + "991" ], "location": { "end": { @@ -1482,7 +1474,7 @@ "testsCompleted": 16, "static": false, "killedBy": [ - "988" + "989" ], "coveredBy": [ "497", @@ -1500,7 +1492,7 @@ "509", "517", "519", - "988" + "989" ], "location": { "end": { @@ -1522,7 +1514,7 @@ "testsCompleted": 16, "static": false, "killedBy": [ - "988" + "989" ], "coveredBy": [ "497", @@ -1540,7 +1532,7 @@ "509", "517", "519", - "988" + "989" ], "location": { "end": { @@ -1556,8 +1548,8 @@ { "id": "54", "mutatorName": "MethodExpression", - "replacement": "thiefAdditionalCards.some(({\n roleName\n}) => gameAdditionalCardsThiefRoleNames.includes(roleName))", - "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"additionalCards.roleName must be one of the following values: werewolf,big-bad-wolf,vile-father-of-wolves,white-werewolf,villager,villager-villager,seer,cupid,witch,hunter,little-girl,guard,ancient,scapegoat,idiot,fox,bear-tamer,stuttering-judge,rusty-sword-knight,wild-child,dog-wolf,angel,pied-piper,raven\"\nReceived array: [\"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "thiefAdditionalCards.some(({\n roleName\n}) => GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.includes(roleName))", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"additionalCards.roleName must be one of the following values: werewolf,big-bad-wolf,vile-father-of-wolves,white-werewolf,villager,villager-villager,seer,cupid,witch,hunter,little-girl,guard,ancient,scapegoat,idiot,fox,bear-tamer,stuttering-judge,rusty-sword-knight,wild-child,dog-wolf,angel,pied-piper,raven\"\nReceived array: [\"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 10, "static": false, @@ -1573,12 +1565,12 @@ "515", "516", "518", - "989", - "990" + "990", + "991" ], "location": { "end": { - "column": 108, + "column": 113, "line": 12 }, "start": { @@ -1591,7 +1583,7 @@ "id": "55", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 10, "static": false, @@ -1607,12 +1599,12 @@ "515", "516", "518", - "989", - "990" + "990", + "991" ], "location": { "end": { - "column": 107, + "column": 112, "line": 12 }, "start": { @@ -1632,7 +1624,7 @@ "coveredBy": [ "513", "514", - "991" + "992" ], "location": { "end": { @@ -1649,21 +1641,21 @@ "id": "57", "mutatorName": "StringLiteral", "replacement": "``", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"additionalCards.roleName must be one of the following values: werewolf,big-bad-wolf,vile-father-of-wolves,white-werewolf,villager,villager-villager,seer,cupid,witch,hunter,little-girl,guard,ancient,scapegoat,idiot,fox,bear-tamer,stuttering-judge,rusty-sword-knight,wild-child,dog-wolf,angel,pied-piper,raven\"\nReceived: \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.spec.ts:38:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"additionalCards.roleName must be one of the following values: werewolf,big-bad-wolf,vile-father-of-wolves,white-werewolf,villager,villager-villager,seer,cupid,witch,hunter,little-girl,guard,ancient,scapegoat,idiot,fox,bear-tamer,stuttering-judge,rusty-sword-knight,wild-child,dog-wolf,angel,pied-piper,raven\"\nReceived array: [\"\", \"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "991" + "513" ], "coveredBy": [ "513", "514", - "991" + "992" ], "location": { "end": { - "column": 121, + "column": 126, "line": 16 }, "start": { @@ -1768,7 +1760,7 @@ } } ], - "source": "import { registerDecorator } from \"class-validator\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { gameAdditionalCardsThiefRoleNames } from \"@/modules/game/constants/game-additional-card/game-additional-card.constant\";\nimport type { CreateGameAdditionalCardDto } from \"@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto\";\n\nfunction areAdditionalCardsForThiefRolesRespected(value: unknown): boolean {\n if (value === undefined) {\n return true;\n }\n const thiefAdditionalCards = value as CreateGameAdditionalCardDto[];\n return thiefAdditionalCards.every(({ roleName }) => gameAdditionalCardsThiefRoleNames.includes(roleName));\n}\n\nfunction getAdditionalCardsForThiefRolesDefaultMessage(): string {\n return `additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`;\n}\n\nfunction AdditionalCardsForThiefRoles(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"AdditionalCardsForThiefRoles\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areAdditionalCardsForThiefRolesRespected,\n defaultMessage: getAdditionalCardsForThiefRolesDefaultMessage,\n },\n });\n };\n}\n\nexport {\n AdditionalCardsForThiefRoles,\n getAdditionalCardsForThiefRolesDefaultMessage,\n areAdditionalCardsForThiefRolesRespected,\n};" + "source": "import { registerDecorator } from \"class-validator\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES } from \"@/modules/game/constants/game-additional-cards/game-additional-cards.constant\";\nimport type { CreateGameAdditionalCardDto } from \"@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto\";\n\nfunction areAdditionalCardsForThiefRolesRespected(value: unknown): boolean {\n if (value === undefined) {\n return true;\n }\n const thiefAdditionalCards = value as CreateGameAdditionalCardDto[];\n return thiefAdditionalCards.every(({ roleName }) => GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.includes(roleName));\n}\n\nfunction getAdditionalCardsForThiefRolesDefaultMessage(): string {\n return `additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`;\n}\n\nfunction AdditionalCardsForThiefRoles(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"AdditionalCardsForThiefRoles\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areAdditionalCardsForThiefRolesRespected,\n defaultMessage: getAdditionalCardsForThiefRolesDefaultMessage,\n },\n });\n };\n}\n\nexport {\n AdditionalCardsForThiefRoles,\n getAdditionalCardsForThiefRolesDefaultMessage,\n areAdditionalCardsForThiefRolesRespected,\n};" }, "src/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator.ts": { "language": "typescript", @@ -1805,10 +1797,10 @@ "517", "518", "519", - "910", "911", "912", - "913" + "913", + "914" ], "location": { "end": { @@ -1853,10 +1845,10 @@ "517", "518", "519", - "910", "911", "912", - "913" + "913", + "914" ], "location": { "end": { @@ -1873,7 +1865,7 @@ "id": "65", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 27, "static": false, @@ -1904,10 +1896,10 @@ "517", "518", "519", - "910", "911", "912", - "913" + "913", + "914" ], "location": { "end": { @@ -1952,10 +1944,10 @@ "517", "518", "519", - "910", "911", "912", - "913" + "913", + "914" ], "location": { "end": { @@ -1972,7 +1964,7 @@ "id": "67", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 16, "static": false, @@ -1995,7 +1987,7 @@ "509", "517", "519", - "910" + "911" ], "location": { "end": { @@ -2012,13 +2004,9 @@ "id": "68", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 16, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "497", "498", @@ -2035,7 +2023,7 @@ "509", "517", "519", - "910" + "911" ], "location": { "end": { @@ -2065,9 +2053,9 @@ "515", "516", "518", - "911", "912", - "913" + "913", + "914" ], "location": { "end": { @@ -2097,9 +2085,9 @@ "515", "516", "518", - "911", "912", - "913" + "913", + "914" ], "location": { "end": { @@ -2129,9 +2117,9 @@ "515", "516", "518", - "911", "912", - "913" + "913", + "914" ], "location": { "end": { @@ -2153,7 +2141,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "911" + "912" ], "location": { "end": { @@ -2175,10 +2163,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "911" + "912" ], "coveredBy": [ - "911" + "912" ], "location": { "end": { @@ -2211,8 +2199,8 @@ "515", "516", "518", - "912", - "913" + "913", + "914" ], "location": { "end": { @@ -2229,9 +2217,13 @@ "id": "75", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 10, "static": false, - "killedBy": [], + "killedBy": [ + "518" + ], "coveredBy": [ "510", "511", @@ -2241,8 +2233,8 @@ "515", "516", "518", - "912", - "913" + "913", + "914" ], "location": { "end": { @@ -2259,12 +2251,12 @@ "id": "76", "mutatorName": "EqualityOperator", "replacement": "options.roles.thief.additionalCardsCount !== value.length", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator.spec.ts:61:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "912" + "511" ], "coveredBy": [ "510", @@ -2275,8 +2267,8 @@ "515", "516", "518", - "912", - "913" + "913", + "914" ], "location": { "end": { @@ -2300,7 +2292,7 @@ "coveredBy": [ "511", "512", - "914" + "915" ], "location": { "end": { @@ -2327,7 +2319,7 @@ "coveredBy": [ "511", "512", - "914" + "915" ], "location": { "end": { @@ -2473,11 +2465,11 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { @@ -2494,7 +2486,7 @@ "id": "85", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 28, "static": false, @@ -2525,15 +2517,15 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { - "column": 115, + "column": 114, "line": 9 }, "start": { @@ -2546,7 +2538,7 @@ "id": "86", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 28, "static": false, @@ -2577,15 +2569,15 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { - "column": 115, + "column": 114, "line": 9 }, "start": { @@ -2597,8 +2589,8 @@ { "id": "87", "mutatorName": "EqualityOperator", - "replacement": "players?.some(player => player.role.name === ROLE_NAMES.THIEF) !== true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "players?.some(player => player.role.name === RoleNames.THIEF) !== true", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 28, "static": false, @@ -2629,15 +2621,15 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { - "column": 115, + "column": 114, "line": 9 }, "start": { @@ -2649,7 +2641,7 @@ { "id": "88", "mutatorName": "MethodExpression", - "replacement": "players?.every(player => player.role.name === ROLE_NAMES.THIEF)", + "replacement": "players?.every(player => player.role.name === RoleNames.THIEF)", "status": "Timeout", "static": false, "killedBy": [], @@ -2677,15 +2669,15 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { - "column": 106, + "column": 105, "line": 9 }, "start": { @@ -2726,11 +2718,11 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { @@ -2747,7 +2739,7 @@ "id": "90", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 27, "static": false, @@ -2777,15 +2769,15 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { - "column": 105, + "column": 104, "line": 9 }, "start": { @@ -2798,109 +2790,7 @@ "id": "91", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts:34:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 27, - "static": false, - "killedBy": [ - "873" - ], - "coveredBy": [ - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", - "519", - "873", - "874", - "875", - "876", - "877" - ], - "location": { - "end": { - "column": 105, - "line": 9 - }, - "start": { - "column": 68, - "line": 9 - } - } - }, - { - "id": "92", - "mutatorName": "ConditionalExpression", - "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts:53:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 27, - "static": false, - "killedBy": [ - "874" - ], - "coveredBy": [ - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", - "519", - "873", - "874", - "875", - "876", - "877" - ], - "location": { - "end": { - "column": 105, - "line": 9 - }, - "start": { - "column": 68, - "line": 9 - } - } - }, - { - "id": "93", - "mutatorName": "EqualityOperator", - "replacement": "player.role.name !== ROLE_NAMES.THIEF", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 27, "static": false, @@ -2930,15 +2820,117 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { - "column": 105, + "column": 104, + "line": 9 + }, + "start": { + "column": 68, + "line": 9 + } + } + }, + { + "id": "92", + "mutatorName": "ConditionalExpression", + "replacement": "false", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 27, + "static": false, + "killedBy": [ + "509" + ], + "coveredBy": [ + "498", + "499", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "509", + "510", + "511", + "512", + "513", + "514", + "515", + "516", + "517", + "518", + "519", + "874", + "875", + "876", + "877", + "878" + ], + "location": { + "end": { + "column": 104, + "line": 9 + }, + "start": { + "column": 68, + "line": 9 + } + } + }, + { + "id": "93", + "mutatorName": "EqualityOperator", + "replacement": "player.role.name !== RoleNames.THIEF", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 27, + "static": false, + "killedBy": [ + "510" + ], + "coveredBy": [ + "498", + "499", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "509", + "510", + "511", + "512", + "513", + "514", + "515", + "516", + "517", + "518", + "519", + "874", + "875", + "876", + "877", + "878" + ], + "location": { + "end": { + "column": 104, "line": 9 }, "start": { @@ -2982,52 +2974,48 @@ "517", "518", "519", - "873", "874", "875", "876", - "877" + "877", + "878" ], "location": { "end": { - "column": 115, + "column": 114, "line": 9 }, "start": { - "column": 111, + "column": 110, "line": 9 } } }, { - "id": "96", + "id": "95", "mutatorName": "ConditionalExpression", - "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts:114:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "true", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "877" + "510" ], "coveredBy": [ "497", "498", - "499", "500", - "501", - "502", "503", "504", "505", "506", - "507", "508", "510", "517", "519", - "873", - "877" + "874", + "878" ], "location": { "end": { @@ -3041,34 +3029,30 @@ } }, { - "id": "97", - "mutatorName": "EqualityOperator", - "replacement": "value !== undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts:34:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "id": "96", + "mutatorName": "ConditionalExpression", + "replacement": "false", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "873" + "517" ], "coveredBy": [ "497", "498", - "499", "500", - "501", - "502", "503", "504", "505", "506", - "507", "508", "510", "517", "519", - "873", - "877" + "874", + "878" ], "location": { "end": { @@ -3082,27 +3066,39 @@ } }, { - "id": "98", - "mutatorName": "BlockStatement", - "replacement": "{}", - "statusReason": "src/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.ts(13,94): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", - "status": "CompileError", + "id": "97", + "mutatorName": "EqualityOperator", + "replacement": "value !== undefined", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 15, "static": false, - "killedBy": [], + "killedBy": [ + "510" + ], "coveredBy": [ - "509", + "497", + "498", + "500", + "503", + "504", + "505", + "506", + "508", "510", - "878", - "879" + "517", + "519", + "874", + "878" ], "location": { "end": { - "column": 2, - "line": 18 + "column": 87, + "line": 10 }, "start": { - "column": 101, - "line": 13 + "column": 68, + "line": 10 } } }, @@ -3118,10 +3114,14 @@ "509" ], "coveredBy": [ + "499", + "501", + "502", + "507", "509", "510", - "878", - "879" + "879", + "880" ], "location": { "end": { @@ -3138,18 +3138,22 @@ "id": "100", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"additionalCards can't be set if there is no player with role `thief`\"\nReceived: \"additionalCards must be set if there is a player with role `thief`\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts:159:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"additionalCards can't be set if there is no player with role `thief`\"\nReceived array: [\"additionalCards must be set if there is a player with role `thief`\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "879" + "510" ], "coveredBy": [ + "499", + "501", + "502", + "507", "509", "510", - "878", - "879" + "879", + "880" ], "location": { "end": { @@ -3174,10 +3178,14 @@ "509" ], "coveredBy": [ + "499", + "501", + "502", + "507", "509", "510", - "878", - "879" + "879", + "880" ], "location": { "end": { @@ -3202,8 +3210,12 @@ "509" ], "coveredBy": [ + "499", + "501", + "502", + "507", "509", - "878" + "879" ], "location": { "end": { @@ -3228,8 +3240,12 @@ "509" ], "coveredBy": [ + "499", + "501", + "502", + "507", "509", - "878" + "879" ], "location": { "end": { @@ -3246,12 +3262,16 @@ "id": "104", "mutatorName": "StringLiteral", "replacement": "\"\"", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"additionalCards can't be set if there is no player with role `thief`\"\nReceived: \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts:159:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "880" + ], "coveredBy": [ "510", - "879" + "880" ], "location": { "end": { @@ -3360,43 +3380,35 @@ } }, { - "id": "95", - "mutatorName": "ConditionalExpression", - "replacement": "true", - "status": "Timeout", + "id": "98", + "mutatorName": "BlockStatement", + "replacement": "{}", + "statusReason": "src/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.ts(13,94): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "status": "CompileError", "static": false, "coveredBy": [ - "497", - "498", "499", - "500", "501", "502", - "503", - "504", - "505", - "506", "507", - "508", + "509", "510", - "517", - "519", - "873", - "877" + "879", + "880" ], "location": { "end": { - "column": 87, - "line": 10 + "column": 2, + "line": 18 }, "start": { - "column": 68, - "line": 10 + "column": 101, + "line": 13 } } } ], - "source": "import { registerDecorator } from \"class-validator\";\nimport type { ValidationArguments, ValidationOptions } from \"class-validator\";\n\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nfunction isAdditionalCardsPresenceRespected(value: unknown, validationArguments: ValidationArguments): boolean {\n const { players } = validationArguments.object as Partial;\n const doSomePlayersNeedAdditionalCards = players?.some(player => player.role.name === ROLE_NAMES.THIEF) === true;\n return doSomePlayersNeedAdditionalCards ? Array.isArray(value) : value === undefined;\n}\n\nfunction getAdditionalCardsPresenceDefaultMessage(validationArguments: ValidationArguments): string {\n if (!Array.isArray(validationArguments.value)) {\n return \"additionalCards must be set if there is a player with role `thief`\";\n }\n return \"additionalCards can't be set if there is no player with role `thief`\";\n}\n\nfunction AdditionalCardsPresence(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"AdditionalCardsForThiefSize\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: isAdditionalCardsPresenceRespected,\n defaultMessage: getAdditionalCardsPresenceDefaultMessage,\n },\n });\n };\n}\n\nexport {\n isAdditionalCardsPresenceRespected,\n getAdditionalCardsPresenceDefaultMessage,\n AdditionalCardsPresence,\n};" + "source": "import { registerDecorator } from \"class-validator\";\nimport type { ValidationArguments, ValidationOptions } from \"class-validator\";\n\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nfunction isAdditionalCardsPresenceRespected(value: unknown, validationArguments: ValidationArguments): boolean {\n const { players } = validationArguments.object as Partial;\n const doSomePlayersNeedAdditionalCards = players?.some(player => player.role.name === RoleNames.THIEF) === true;\n return doSomePlayersNeedAdditionalCards ? Array.isArray(value) : value === undefined;\n}\n\nfunction getAdditionalCardsPresenceDefaultMessage(validationArguments: ValidationArguments): string {\n if (!Array.isArray(validationArguments.value)) {\n return \"additionalCards must be set if there is a player with role `thief`\";\n }\n return \"additionalCards can't be set if there is no player with role `thief`\";\n}\n\nfunction AdditionalCardsPresence(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"AdditionalCardsForThiefSize\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: isAdditionalCardsPresenceRespected,\n defaultMessage: getAdditionalCardsPresenceDefaultMessage,\n },\n });\n };\n}\n\nexport {\n isAdditionalCardsPresenceRespected,\n getAdditionalCardsPresenceDefaultMessage,\n AdditionalCardsPresence,\n};" }, "src/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.ts": { "language": "typescript", @@ -3433,11 +3445,11 @@ "517", "518", "519", - "880", "881", "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3482,11 +3494,11 @@ "517", "518", "519", - "880", "881", "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3534,11 +3546,11 @@ "517", "518", "519", - "880", "881", "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3583,11 +3595,11 @@ "517", "518", "519", - "880", "881", "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3627,7 +3639,7 @@ "509", "517", "519", - "880" + "881" ], "location": { "end": { @@ -3644,7 +3656,7 @@ "id": "115", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 16, "static": false, @@ -3667,7 +3679,7 @@ "509", "517", "519", - "880" + "881" ], "location": { "end": { @@ -3697,10 +3709,10 @@ "515", "516", "518", - "881", "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3730,10 +3742,10 @@ "515", "516", "518", - "881", "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3763,10 +3775,10 @@ "515", "516", "518", - "881", "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3788,7 +3800,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "881" + "882" ], "location": { "end": { @@ -3805,15 +3817,15 @@ "id": "120", "mutatorName": "BooleanLiteral", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:47:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:47:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "881" + "882" ], "coveredBy": [ - "881" + "882" ], "location": { "end": { @@ -3829,8 +3841,8 @@ { "id": "121", "mutatorName": "MethodExpression", - "replacement": "roles.some(role => {\n const playersRoleCount = players.filter(player => player.role.name === role.name).length;\n const additionalCardsRoleCount = additionalCards.filter(additionalCard => additionalCard.roleName === role.name).length;\n return playersRoleCount + additionalCardsRoleCount <= role.maxInGame;\n})", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "ROLES.some(role => {\n const playersRoleCount = players.filter(player => player.role.name === role.name).length;\n const additionalCardsRoleCount = additionalCards.filter(additionalCard => additionalCard.roleName === role.name).length;\n return playersRoleCount + additionalCardsRoleCount <= role.maxInGame;\n})", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -3846,9 +3858,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3865,12 +3877,12 @@ "id": "122", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:116:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "518" + "885" ], "coveredBy": [ "510", @@ -3881,9 +3893,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3900,7 +3912,7 @@ "id": "123", "mutatorName": "MethodExpression", "replacement": "players", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -3916,9 +3928,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3951,9 +3963,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -3970,9 +3982,13 @@ "id": "125", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "518" + ], "coveredBy": [ "510", "511", @@ -3982,9 +3998,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4001,12 +4017,12 @@ "id": "126", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:93:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "883" + "516" ], "coveredBy": [ "510", @@ -4017,9 +4033,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4036,9 +4052,13 @@ "id": "127", "mutatorName": "EqualityOperator", "replacement": "player.role.name !== role.name", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "518" + ], "coveredBy": [ "510", "511", @@ -4048,9 +4068,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4067,12 +4087,12 @@ "id": "128", "mutatorName": "MethodExpression", "replacement": "additionalCards", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:116:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:116:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "884" + "885" ], "coveredBy": [ "510", @@ -4083,9 +4103,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4118,9 +4138,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4137,7 +4157,7 @@ "id": "130", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -4153,9 +4173,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4188,9 +4208,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4207,7 +4227,7 @@ "id": "132", "mutatorName": "EqualityOperator", "replacement": "additionalCard.roleName !== role.name", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -4223,9 +4243,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4258,9 +4278,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4277,12 +4297,12 @@ "id": "134", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:116:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "518" + "885" ], "coveredBy": [ "510", @@ -4293,9 +4313,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4312,13 +4332,9 @@ "id": "135", "mutatorName": "EqualityOperator", "replacement": "playersRoleCount + additionalCardsRoleCount < role.maxInGame", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 11, + "status": "Timeout", "static": false, - "killedBy": [ - "518" - ], + "killedBy": [], "coveredBy": [ "510", "511", @@ -4328,9 +4344,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4347,7 +4363,7 @@ "id": "136", "mutatorName": "EqualityOperator", "replacement": "playersRoleCount + additionalCardsRoleCount > role.maxInGame", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:645:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -4363,9 +4379,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4382,12 +4398,12 @@ "id": "137", "mutatorName": "ArithmeticOperator", "replacement": "playersRoleCount - additionalCardsRoleCount", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:70:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts:70:95)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "882" + "883" ], "coveredBy": [ "510", @@ -4398,9 +4414,9 @@ "515", "516", "518", - "882", "883", - "884" + "884", + "885" ], "location": { "end": { @@ -4425,7 +4441,7 @@ "513", "515", "516", - "885" + "886" ], "location": { "end": { @@ -4453,7 +4469,7 @@ "513", "515", "516", - "885" + "886" ], "location": { "end": { @@ -4562,7 +4578,7 @@ } } ], - "source": "import { registerDecorator } from \"class-validator\";\nimport type { ValidationArguments, ValidationOptions } from \"class-validator\";\n\nimport type { CreateGameAdditionalCardDto } from \"@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto\";\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { roles } from \"@/modules/role/constants/role.constant\";\n\nfunction areAdditionalCardsRolesMaxInGameRespected(value: unknown, validationArguments: ValidationArguments): boolean {\n if (value === undefined) {\n return true;\n }\n const { players } = validationArguments.object as Partial;\n if (players === undefined) {\n return false;\n }\n const additionalCards = value as CreateGameAdditionalCardDto[];\n return roles.every(role => {\n const playersRoleCount = players.filter(player => player.role.name === role.name).length;\n const additionalCardsRoleCount = additionalCards.filter(additionalCard => additionalCard.roleName === role.name).length;\n return playersRoleCount + additionalCardsRoleCount <= role.maxInGame;\n });\n}\n\nfunction getAdditionalCardsRolesMaxInGameDefaultMessage(): string {\n return \"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\";\n}\n\nfunction AdditionalCardsRolesMaxInGame(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"AdditionalCardsRolesMaxInGame\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areAdditionalCardsRolesMaxInGameRespected,\n defaultMessage: getAdditionalCardsRolesMaxInGameDefaultMessage,\n },\n });\n };\n}\n\nexport {\n AdditionalCardsRolesMaxInGame,\n areAdditionalCardsRolesMaxInGameRespected,\n getAdditionalCardsRolesMaxInGameDefaultMessage,\n};" + "source": "import { registerDecorator } from \"class-validator\";\nimport type { ValidationArguments, ValidationOptions } from \"class-validator\";\n\nimport type { CreateGameAdditionalCardDto } from \"@/modules/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto\";\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\n\nfunction areAdditionalCardsRolesMaxInGameRespected(value: unknown, validationArguments: ValidationArguments): boolean {\n if (value === undefined) {\n return true;\n }\n const { players } = validationArguments.object as Partial;\n if (players === undefined) {\n return false;\n }\n const additionalCards = value as CreateGameAdditionalCardDto[];\n return ROLES.every(role => {\n const playersRoleCount = players.filter(player => player.role.name === role.name).length;\n const additionalCardsRoleCount = additionalCards.filter(additionalCard => additionalCard.roleName === role.name).length;\n return playersRoleCount + additionalCardsRoleCount <= role.maxInGame;\n });\n}\n\nfunction getAdditionalCardsRolesMaxInGameDefaultMessage(): string {\n return \"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\";\n}\n\nfunction AdditionalCardsRolesMaxInGame(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"AdditionalCardsRolesMaxInGame\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areAdditionalCardsRolesMaxInGameRespected,\n defaultMessage: getAdditionalCardsRolesMaxInGameDefaultMessage,\n },\n });\n };\n}\n\nexport {\n AdditionalCardsRolesMaxInGame,\n areAdditionalCardsRolesMaxInGameRespected,\n getAdditionalCardsRolesMaxInGameDefaultMessage,\n};" }, "src/modules/game/dto/base/decorators/composition/composition-bounds.decorator.ts": { "language": "typescript", @@ -4587,7 +4603,7 @@ } } ], - "source": "import { applyDecorators } from \"@nestjs/common\";\nimport { ArrayMaxSize, ArrayMinSize } from \"class-validator\";\n\nimport { gameFieldsSpecs } from \"@/modules/game/schemas/game.schema.constant\";\n\nfunction CompositionBounds(): void, Y>(target: (TFunction | object), propertyKey?: (string | symbol), descriptor?: TypedPropertyDescriptor) => void {\n return applyDecorators(\n ArrayMinSize(gameFieldsSpecs.players.minItems),\n ArrayMaxSize(gameFieldsSpecs.players.maxItems),\n );\n}\n\nexport { CompositionBounds };" + "source": "import { applyDecorators } from \"@nestjs/common\";\nimport { ArrayMaxSize, ArrayMinSize } from \"class-validator\";\n\nimport { GAME_FIELDS_SPECS } from \"@/modules/game/schemas/game.schema.constant\";\n\nfunction CompositionBounds(): void, Y>(target: (TFunction | object), propertyKey?: (string | symbol), descriptor?: TypedPropertyDescriptor) => void {\n return applyDecorators(\n ArrayMinSize(GAME_FIELDS_SPECS.players.minItems),\n ArrayMaxSize(GAME_FIELDS_SPECS.players.maxItems),\n );\n}\n\nexport { CompositionBounds };" }, "src/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.ts": { "language": "typescript", @@ -4624,18 +4640,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "955", + "732", "956", "957", "958", "959", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -4652,13 +4668,9 @@ "id": "147", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 35, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "497", "498", @@ -4683,18 +4695,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "955", + "732", "956", "957", "958", "959", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -4716,7 +4728,7 @@ "testsCompleted": 35, "static": false, "killedBy": [ - "955" + "956" ], "coveredBy": [ "497", @@ -4742,18 +4754,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "955", + "732", "956", "957", "958", "959", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -4798,18 +4810,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "955", + "732", "956", "957", "958", "959", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -4854,18 +4866,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "955", + "732", "956", "957", "958", "959", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -4882,12 +4894,12 @@ "id": "151", "mutatorName": "MethodExpression", "replacement": "value.every(player => !isObject(player) || !has(player, [\"role\", \"name\"]))", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:29:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:28:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 32, "static": false, "killedBy": [ - "957" + "958" ], "coveredBy": [ "498", @@ -4912,16 +4924,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -4964,16 +4976,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -4990,9 +5002,13 @@ "id": "153", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 31, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -5016,15 +5032,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", - "961" + "960", + "962" ], "location": { "end": { @@ -5041,12 +5057,12 @@ "id": "154", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:29:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:28:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "957" + "958" ], "coveredBy": [ "498", @@ -5071,15 +5087,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", - "961" + "960", + "962" ], "location": { "end": { @@ -5096,13 +5112,9 @@ "id": "155", "mutatorName": "LogicalOperator", "replacement": "!isObject(player) && !has(player, [\"role\", \"name\"])", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:40:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 31, + "status": "Timeout", "static": false, - "killedBy": [ - "958" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -5126,15 +5138,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", - "961" + "960", + "962" ], "location": { "end": { @@ -5156,7 +5168,7 @@ "testsCompleted": 31, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "498", @@ -5181,15 +5193,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", - "961" + "960", + "962" ], "location": { "end": { @@ -5211,7 +5223,7 @@ "testsCompleted": 31, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "498", @@ -5236,15 +5248,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", - "961" + "960", + "962" ], "location": { "end": { @@ -5261,58 +5273,7 @@ "id": "158", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "status": "Timeout", - "static": false, - "killedBy": [], - "coveredBy": [ - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", - "519", - "727", - "728", - "729", - "730", - "731", - "957", - "958", - "959", - "961" - ], - "location": { - "end": { - "column": 103, - "line": 11 - }, - "start": { - "column": 87, - "line": 11 - } - } - }, - { - "id": "159", - "mutatorName": "StringLiteral", - "replacement": "\"\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -5342,15 +5303,66 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", - "961" + "960", + "962" + ], + "location": { + "end": { + "column": 103, + "line": 11 + }, + "start": { + "column": 87, + "line": 11 + } + } + }, + { + "id": "159", + "mutatorName": "StringLiteral", + "replacement": "\"\"", + "status": "Timeout", + "static": false, + "killedBy": [], + "coveredBy": [ + "498", + "499", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "509", + "510", + "511", + "512", + "513", + "514", + "515", + "516", + "517", + "518", + "519", + "728", + "729", + "730", + "731", + "732", + "958", + "959", + "960", + "962" ], "location": { "end": { @@ -5367,7 +5379,7 @@ "id": "160", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -5397,15 +5409,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "957", + "732", "958", "959", - "961" + "960", + "962" ], "location": { "end": { @@ -5431,10 +5443,10 @@ ], "coveredBy": [ "497", - "955", "956", "957", - "958" + "958", + "959" ], "location": { "end": { @@ -5456,14 +5468,14 @@ "testsCompleted": 5, "static": false, "killedBy": [ - "955" + "956" ], "coveredBy": [ "497", - "955", "956", "957", - "958" + "958", + "959" ], "location": { "end": { @@ -5479,13 +5491,13 @@ { "id": "163", "mutatorName": "MethodExpression", - "replacement": "roles", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "ROLES", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, "killedBy": [ - "959" + "505" ], "coveredBy": [ "498", @@ -5510,18 +5522,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", + "732", "960", - "961" + "961", + "962" ], "location": { "end": { - "column": 81, + "column": 80, "line": 15 }, "start": { @@ -5534,9 +5546,13 @@ "id": "164", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -5560,18 +5576,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", + "732", "960", - "961" + "961", + "962" ], "location": { "end": { - "column": 80, + "column": 79, "line": 15 }, "start": { @@ -5584,7 +5600,7 @@ "id": "165", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -5614,18 +5630,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", + "732", "960", - "961" + "961", + "962" ], "location": { "end": { - "column": 80, + "column": 79, "line": 15 }, "start": { @@ -5638,13 +5654,9 @@ "id": "166", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 30, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -5668,18 +5680,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", + "732", "960", - "961" + "961", + "962" ], "location": { "end": { - "column": 80, + "column": 79, "line": 15 }, "start": { @@ -5691,10 +5703,14 @@ { "id": "167", "mutatorName": "EqualityOperator", - "replacement": "role.side !== ROLE_SIDES.VILLAGERS", - "status": "Timeout", + "replacement": "role.side !== RoleSides.VILLAGERS", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "505" + ], "coveredBy": [ "498", "499", @@ -5718,18 +5734,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", + "732", "960", - "961" + "961", + "962" ], "location": { "end": { - "column": 80, + "column": 79, "line": 15 }, "start": { @@ -5747,7 +5763,7 @@ "testsCompleted": 30, "static": false, "killedBy": [ - "960" + "961" ], "coveredBy": [ "498", @@ -5772,14 +5788,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", + "732", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -5796,9 +5812,13 @@ "id": "169", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -5822,14 +5842,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", + "732", "960", - "961" + "961", + "962" ], "location": { "end": { @@ -5846,12 +5866,12 @@ "id": "170", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:65:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 29, "static": false, "killedBy": [ - "517" + "962" ], "coveredBy": [ "498", @@ -5876,13 +5896,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", - "961" + "732", + "960", + "962" ], "location": { "end": { @@ -5899,12 +5919,12 @@ "id": "171", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 29, "static": false, "killedBy": [ - "959" + "505" ], "coveredBy": [ "498", @@ -5929,13 +5949,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", - "961" + "732", + "960", + "962" ], "location": { "end": { @@ -5978,13 +5998,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", - "961" + "732", + "960", + "962" ], "location": { "end": { @@ -6001,12 +6021,12 @@ "id": "173", "mutatorName": "EqualityOperator", "replacement": "role.name !== werewolfRole.name", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 29, "static": false, "killedBy": [ - "959" + "505" ], "coveredBy": [ "498", @@ -6031,13 +6051,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "959", - "961" + "732", + "960", + "962" ], "location": { "end": { @@ -6061,7 +6081,7 @@ "coveredBy": [ "497", "505", - "962" + "963" ], "location": { "end": { @@ -6088,7 +6108,7 @@ "coveredBy": [ "497", "505", - "962" + "963" ], "location": { "end": { @@ -6197,7 +6217,7 @@ } } ], - "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport type { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\nimport { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nfunction doesCompositionHaveAtLeastOneVillager(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: ROLE_NAMES } }[];\n const werewolfRoles = roles.filter(role => role.side === ROLE_SIDES.VILLAGERS);\n return players.some(({ role }) => werewolfRoles.find(werewolfRole => role.name === werewolfRole.name));\n}\n\nfunction getCompositionHasVillagerDefaultMessage(): string {\n return \"one of the players.role must have at least one role from `villagers` side\";\n}\n\nfunction CompositionHasVillager(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionHasVillager\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: doesCompositionHaveAtLeastOneVillager,\n defaultMessage: getCompositionHasVillagerDefaultMessage,\n },\n });\n };\n}\n\nexport {\n CompositionHasVillager,\n doesCompositionHaveAtLeastOneVillager,\n getCompositionHasVillagerDefaultMessage,\n};" + "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport type { RoleNames } from \"@/modules/role/enums/role.enum\";\nimport { RoleSides } from \"@/modules/role/enums/role.enum\";\n\nfunction doesCompositionHaveAtLeastOneVillager(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: RoleNames } }[];\n const werewolfRoles = ROLES.filter(role => role.side === RoleSides.VILLAGERS);\n return players.some(({ role }) => werewolfRoles.find(werewolfRole => role.name === werewolfRole.name));\n}\n\nfunction getCompositionHasVillagerDefaultMessage(): string {\n return \"one of the players.role must have at least one role from `villagers` side\";\n}\n\nfunction CompositionHasVillager(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionHasVillager\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: doesCompositionHaveAtLeastOneVillager,\n defaultMessage: getCompositionHasVillagerDefaultMessage,\n },\n });\n };\n}\n\nexport {\n CompositionHasVillager,\n doesCompositionHaveAtLeastOneVillager,\n getCompositionHasVillagerDefaultMessage,\n};" }, "src/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.ts": { "language": "typescript", @@ -6234,18 +6254,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "963", + "732", "964", "965", "966", "967", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -6262,7 +6282,7 @@ "id": "182", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 35, "static": false, @@ -6293,18 +6313,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "963", + "732", "964", "965", "966", "967", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -6326,7 +6346,7 @@ "testsCompleted": 35, "static": false, "killedBy": [ - "963" + "964" ], "coveredBy": [ "497", @@ -6352,18 +6372,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "963", + "732", "964", "965", "966", "967", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -6408,74 +6428,74 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "963", - "964", - "965", - "966", - "967", - "968", - "969" - ], - "location": { - "end": { - "column": 105, - "line": 11 - }, - "start": { - "column": 7, - "line": 11 - } - } - }, - { - "id": "185", - "mutatorName": "BooleanLiteral", - "replacement": "Array.isArray(value)", - "statusReason": "src/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.ts(11,31): error TS18046: 'value' is of type 'unknown'.\n", - "status": "CompileError", - "static": false, - "killedBy": [], - "coveredBy": [ - "497", - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", - "519", - "727", - "728", - "729", - "730", - "731", - "963", + "732", + "964", + "965", + "966", + "967", + "968", + "969", + "970" + ], + "location": { + "end": { + "column": 105, + "line": 11 + }, + "start": { + "column": 7, + "line": 11 + } + } + }, + { + "id": "185", + "mutatorName": "BooleanLiteral", + "replacement": "Array.isArray(value)", + "statusReason": "src/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.ts(11,31): error TS18046: 'value' is of type 'unknown'.\n", + "status": "CompileError", + "static": false, + "killedBy": [], + "coveredBy": [ + "497", + "498", + "499", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "509", + "510", + "511", + "512", + "513", + "514", + "515", + "516", + "517", + "518", + "519", + "728", + "729", + "730", + "731", + "732", "964", "965", "966", "967", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -6492,9 +6512,13 @@ "id": "186", "mutatorName": "MethodExpression", "replacement": "value.every(player => !isObject(player) || !has(player, [\"role\", \"name\"]))", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:28:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 32, "static": false, - "killedBy": [], + "killedBy": [ + "966" + ], "coveredBy": [ "498", "499", @@ -6518,16 +6542,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -6544,9 +6568,13 @@ "id": "187", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:28:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 32, "static": false, - "killedBy": [], + "killedBy": [ + "966" + ], "coveredBy": [ "498", "499", @@ -6570,16 +6598,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -6596,9 +6624,13 @@ "id": "188", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:65:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 31, "static": false, - "killedBy": [], + "killedBy": [ + "970" + ], "coveredBy": [ "498", "499", @@ -6622,15 +6654,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -6647,12 +6679,12 @@ "id": "189", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:29:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:28:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "965" + "966" ], "coveredBy": [ "498", @@ -6677,15 +6709,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -6702,13 +6734,9 @@ "id": "190", "mutatorName": "LogicalOperator", "replacement": "!isObject(player) && !has(player, [\"role\", \"name\"])", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:40:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 31, + "status": "Timeout", "static": false, - "killedBy": [ - "966" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -6732,15 +6760,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -6757,7 +6785,7 @@ "id": "191", "mutatorName": "BooleanLiteral", "replacement": "isObject(player)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -6787,15 +6815,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -6817,7 +6845,7 @@ "testsCompleted": 31, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "498", @@ -6842,15 +6870,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -6872,7 +6900,7 @@ "testsCompleted": 31, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "498", @@ -6897,15 +6925,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -6922,13 +6950,9 @@ "id": "194", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 31, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -6952,15 +6976,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -6977,7 +7001,7 @@ "id": "195", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -7007,15 +7031,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "965", + "732", "966", "967", - "969" + "968", + "970" ], "location": { "end": { @@ -7041,10 +7065,10 @@ ], "coveredBy": [ "497", - "963", "964", "965", - "966" + "966", + "967" ], "location": { "end": { @@ -7066,14 +7090,14 @@ "testsCompleted": 5, "static": false, "killedBy": [ - "963" + "964" ], "coveredBy": [ "497", - "963", "964", "965", - "966" + "966", + "967" ], "location": { "end": { @@ -7089,13 +7113,13 @@ { "id": "198", "mutatorName": "MethodExpression", - "replacement": "roles", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "ROLES", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, "killedBy": [ - "967" + "506" ], "coveredBy": [ "498", @@ -7120,18 +7144,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", + "732", "968", - "969" + "969", + "970" ], "location": { "end": { - "column": 82, + "column": 81, "line": 15 }, "start": { @@ -7144,9 +7168,13 @@ "id": "199", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -7170,18 +7198,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", + "732", "968", - "969" + "969", + "970" ], "location": { "end": { - "column": 81, + "column": 80, "line": 15 }, "start": { @@ -7194,7 +7222,7 @@ "id": "200", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -7224,18 +7252,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", + "732", "968", - "969" + "969", + "970" ], "location": { "end": { - "column": 81, + "column": 80, "line": 15 }, "start": { @@ -7248,13 +7276,9 @@ "id": "201", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 30, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -7278,18 +7302,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", + "732", "968", - "969" + "969", + "970" ], "location": { "end": { - "column": 81, + "column": 80, "line": 15 }, "start": { @@ -7301,10 +7325,14 @@ { "id": "202", "mutatorName": "EqualityOperator", - "replacement": "role.side !== ROLE_SIDES.WEREWOLVES", - "status": "Timeout", + "replacement": "role.side !== RoleSides.WEREWOLVES", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "506" + ], "coveredBy": [ "498", "499", @@ -7328,18 +7356,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", + "732", "968", - "969" + "969", + "970" ], "location": { "end": { - "column": 81, + "column": 80, "line": 15 }, "start": { @@ -7357,7 +7385,7 @@ "testsCompleted": 30, "static": false, "killedBy": [ - "968" + "969" ], "coveredBy": [ "498", @@ -7382,14 +7410,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", + "732", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -7406,9 +7434,13 @@ "id": "204", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -7432,14 +7464,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", + "732", "968", - "969" + "969", + "970" ], "location": { "end": { @@ -7456,7 +7488,7 @@ "id": "205", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 29, "static": false, @@ -7486,13 +7518,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", - "969" + "732", + "968", + "970" ], "location": { "end": { @@ -7509,13 +7541,9 @@ "id": "206", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 29, + "status": "Timeout", "static": false, - "killedBy": [ - "967" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -7539,13 +7567,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", - "969" + "732", + "968", + "970" ], "location": { "end": { @@ -7562,7 +7590,7 @@ "id": "207", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 29, "static": false, @@ -7592,13 +7620,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", - "969" + "732", + "968", + "970" ], "location": { "end": { @@ -7615,9 +7643,13 @@ "id": "208", "mutatorName": "EqualityOperator", "replacement": "role.name !== werewolfRole.name", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 29, "static": false, - "killedBy": [], + "killedBy": [ + "506" + ], "coveredBy": [ "498", "499", @@ -7641,13 +7673,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "967", - "969" + "732", + "968", + "970" ], "location": { "end": { @@ -7669,17 +7701,18 @@ "testsCompleted": 8, "static": false, "killedBy": [ - "970" + "971" ], "coveredBy": [ "497", + "498", "500", "501", "504", "506", "507", "508", - "970" + "971" ], "location": { "end": { @@ -7796,13 +7829,14 @@ "static": false, "coveredBy": [ "497", + "498", "500", "501", "504", "506", "507", "508", - "970" + "971" ], "location": { "end": { @@ -7816,7 +7850,7 @@ } } ], - "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport type { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\nimport { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nfunction doesCompositionHaveAtLeastOneWerewolf(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: ROLE_NAMES } }[];\n const werewolfRoles = roles.filter(role => role.side === ROLE_SIDES.WEREWOLVES);\n return players.some(({ role }) => werewolfRoles.find(werewolfRole => role.name === werewolfRole.name));\n}\n\nfunction getCompositionHasWerewolfDefaultMessage(): string {\n return \"one of the players.role must have at least one role from `werewolves` side\";\n}\n\nfunction CompositionHasWerewolf(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionHasWerewolf\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: doesCompositionHaveAtLeastOneWerewolf,\n defaultMessage: getCompositionHasWerewolfDefaultMessage,\n },\n });\n };\n}\n\nexport { CompositionHasWerewolf, doesCompositionHaveAtLeastOneWerewolf, getCompositionHasWerewolfDefaultMessage };" + "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport type { RoleNames } from \"@/modules/role/enums/role.enum\";\nimport { RoleSides } from \"@/modules/role/enums/role.enum\";\n\nfunction doesCompositionHaveAtLeastOneWerewolf(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: RoleNames } }[];\n const werewolfRoles = ROLES.filter(role => role.side === RoleSides.WEREWOLVES);\n return players.some(({ role }) => werewolfRoles.find(werewolfRole => role.name === werewolfRole.name));\n}\n\nfunction getCompositionHasWerewolfDefaultMessage(): string {\n return \"one of the players.role must have at least one role from `werewolves` side\";\n}\n\nfunction CompositionHasWerewolf(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionHasWerewolf\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: doesCompositionHaveAtLeastOneWerewolf,\n defaultMessage: getCompositionHasWerewolfDefaultMessage,\n },\n });\n };\n}\n\nexport { CompositionHasWerewolf, doesCompositionHaveAtLeastOneWerewolf, getCompositionHasWerewolfDefaultMessage };" }, "src/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.ts": { "language": "typescript", @@ -7853,7 +7887,6 @@ "517", "518", "519", - "915", "916", "917", "918", @@ -7861,7 +7894,8 @@ "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -7878,9 +7912,13 @@ "id": "217", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 32, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "497", "498", @@ -7905,7 +7943,6 @@ "517", "518", "519", - "915", "916", "917", "918", @@ -7913,7 +7950,8 @@ "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -7961,7 +7999,6 @@ "517", "518", "519", - "915", "916", "917", "918", @@ -7969,7 +8006,8 @@ "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8014,7 +8052,6 @@ "517", "518", "519", - "915", "916", "917", "918", @@ -8022,7 +8059,8 @@ "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8067,7 +8105,6 @@ "517", "518", "519", - "915", "916", "917", "918", @@ -8075,7 +8112,8 @@ "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8092,9 +8130,13 @@ "id": "221", "mutatorName": "MethodExpression", "replacement": "value.every(player => !isObject(player))", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:28:76)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 29, "static": false, - "killedBy": [], + "killedBy": [ + "918" + ], "coveredBy": [ "498", "499", @@ -8118,13 +8160,13 @@ "517", "518", "519", - "917", "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8141,9 +8183,13 @@ "id": "222", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:28:76)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 29, "static": false, - "killedBy": [], + "killedBy": [ + "918" + ], "coveredBy": [ "498", "499", @@ -8167,13 +8213,13 @@ "517", "518", "519", - "917", "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8190,9 +8236,13 @@ "id": "223", "mutatorName": "BooleanLiteral", "replacement": "isObject(player)", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:39:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 29, "static": false, - "killedBy": [], + "killedBy": [ + "919" + ], "coveredBy": [ "498", "499", @@ -8216,13 +8266,13 @@ "517", "518", "519", - "917", "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8248,9 +8298,9 @@ ], "coveredBy": [ "497", - "915", "916", - "917" + "917", + "918" ], "location": { "end": { @@ -8272,13 +8322,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "915" + "916" ], "coveredBy": [ "497", - "915", "916", - "917" + "917", + "918" ], "location": { "end": { @@ -8322,12 +8372,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8371,12 +8421,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8420,12 +8470,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8469,12 +8519,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8518,12 +8568,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8567,12 +8617,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8616,12 +8666,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8665,12 +8715,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8687,9 +8737,13 @@ "id": "234", "mutatorName": "BooleanLiteral", "replacement": "acc.includes(position)", - "status": "Timeout", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"players.position must be all set or all undefined. Please check that every player has unique position, from 0 to players.length - 1\"\nReceived array: [\"one of the players.role must have at least one role from `werewolves` side\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 27, "static": false, - "killedBy": [], + "killedBy": [ + "508" + ], "coveredBy": [ "498", "499", @@ -8713,11 +8767,11 @@ "517", "518", "519", - "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8764,11 +8818,11 @@ "517", "518", "519", - "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8785,12 +8839,12 @@ "id": "236", "mutatorName": "EqualityOperator", "replacement": "position <= players.length", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:73:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:72:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 27, "static": false, "killedBy": [ - "921" + "922" ], "coveredBy": [ "498", @@ -8815,11 +8869,11 @@ "517", "518", "519", - "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8836,12 +8890,12 @@ "id": "237", "mutatorName": "EqualityOperator", "replacement": "position >= players.length", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:51:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:50:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 27, "static": false, "killedBy": [ - "919" + "920" ], "coveredBy": [ "498", @@ -8866,11 +8920,11 @@ "517", "518", "519", - "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8917,11 +8971,11 @@ "517", "518", "519", - "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -8965,12 +9019,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9017,12 +9071,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9039,12 +9093,12 @@ "id": "241", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:40:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 28, "static": false, "killedBy": [ - "918" + "517" ], "coveredBy": [ "498", @@ -9069,12 +9123,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9091,7 +9145,7 @@ "id": "242", "mutatorName": "LogicalOperator", "replacement": "uniquePositions.length === 0 && uniquePositions.length === players.length", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 28, "static": false, @@ -9121,12 +9175,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9143,13 +9197,9 @@ "id": "243", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts:40:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 28, + "status": "Timeout", "static": false, - "killedBy": [ - "918" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -9173,12 +9223,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9225,12 +9275,12 @@ "517", "518", "519", - "918", "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9247,7 +9297,7 @@ "id": "245", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 27, "static": false, @@ -9277,11 +9327,11 @@ "517", "518", "519", - "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9328,11 +9378,11 @@ "517", "518", "519", - "919", "920", "921", "922", - "923" + "923", + "924" ], "location": { "end": { @@ -9357,7 +9407,7 @@ "497", "507", "508", - "924" + "925" ], "location": { "end": { @@ -9385,7 +9435,7 @@ "497", "507", "508", - "924" + "925" ], "location": { "end": { @@ -9531,18 +9581,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "947", + "732", "948", "949", "950", "951", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -9559,7 +9609,7 @@ "id": "255", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 35, "static": false, @@ -9590,18 +9640,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "947", + "732", "948", "949", "950", "951", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -9649,18 +9699,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "947", + "732", "948", "949", "950", "951", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -9705,18 +9755,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "947", + "732", "948", "949", "950", "951", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -9761,18 +9811,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "947", + "732", "948", "949", "950", "951", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -9789,13 +9839,9 @@ "id": "259", "mutatorName": "MethodExpression", "replacement": "value.every(player => !isObject(player) || !has(player, [\"role\", \"name\"]))", - "statusReason": "TypeError: Cannot read properties of undefined (reading 'name')\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:360\n at Array.filter ()\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:101\n at Array.every ()\n at areCompositionRolesMaxInGameRespected (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:75:39)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:29:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 32, + "status": "Timeout", "static": false, - "killedBy": [ - "949" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -9819,16 +9865,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -9845,9 +9891,13 @@ "id": "260", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'name')\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:360\n at Array.filter ()\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:101\n at Array.every ()\n at areCompositionRolesMaxInGameRespected (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:75:39)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:28:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 32, "static": false, - "killedBy": [], + "killedBy": [ + "950" + ], "coveredBy": [ "498", "499", @@ -9871,16 +9921,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -9923,70 +9973,70 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", - "950", - "951", - "953" - ], - "location": { - "end": { - "column": 104, - "line": 10 - }, - "start": { - "column": 53, - "line": 10 - } - } - }, - { - "id": "262", - "mutatorName": "ConditionalExpression", - "replacement": "false", - "statusReason": "TypeError: Cannot read properties of undefined (reading 'name')\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:360\n at Array.filter ()\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:101\n at Array.every ()\n at areCompositionRolesMaxInGameRespected (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:75:39)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:29:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 31, - "static": false, - "killedBy": [ - "949" - ], - "coveredBy": [ - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", - "519", - "727", - "728", - "729", - "730", - "731", - "949", + "732", + "950", + "951", + "952", + "954" + ], + "location": { + "end": { + "column": 104, + "line": 10 + }, + "start": { + "column": 53, + "line": 10 + } + } + }, + { + "id": "262", + "mutatorName": "ConditionalExpression", + "replacement": "false", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'name')\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:360\n at Array.filter ()\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:80:101\n at Array.every ()\n at areCompositionRolesMaxInGameRespected (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts:75:39)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:28:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 31, + "static": false, + "killedBy": [ + "950" + ], + "coveredBy": [ + "498", + "499", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "509", + "510", + "511", + "512", + "513", + "514", + "515", + "516", + "517", + "518", + "519", + "728", + "729", + "730", + "731", + "732", "950", "951", - "953" + "952", + "954" ], "location": { "end": { @@ -10003,12 +10053,12 @@ "id": "263", "mutatorName": "LogicalOperator", "replacement": "!isObject(player) && !has(player, [\"role\", \"name\"])", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:40:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:39:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "950" + "951" ], "coveredBy": [ "498", @@ -10033,15 +10083,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", - "953" + "952", + "954" ], "location": { "end": { @@ -10058,12 +10108,12 @@ "id": "264", "mutatorName": "BooleanLiteral", "replacement": "isObject(player)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:69:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "517" + "954" ], "coveredBy": [ "498", @@ -10088,15 +10138,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", - "953" + "952", + "954" ], "location": { "end": { @@ -10113,7 +10163,7 @@ "id": "265", "mutatorName": "BooleanLiteral", "replacement": "has(player, [\"role\", \"name\"])", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -10143,15 +10193,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", - "953" + "952", + "954" ], "location": { "end": { @@ -10168,7 +10218,7 @@ "id": "266", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -10198,15 +10248,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", - "953" + "952", + "954" ], "location": { "end": { @@ -10223,7 +10273,7 @@ "id": "267", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -10253,15 +10303,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", - "953" + "952", + "954" ], "location": { "end": { @@ -10278,7 +10328,7 @@ "id": "268", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -10308,15 +10358,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "949", + "732", "950", "951", - "953" + "952", + "954" ], "location": { "end": { @@ -10342,10 +10392,10 @@ ], "coveredBy": [ "497", - "947", "948", "949", - "950" + "950", + "951" ], "location": { "end": { @@ -10362,15 +10412,19 @@ "id": "270", "mutatorName": "BooleanLiteral", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:13:64)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "948" + ], "coveredBy": [ "497", - "947", "948", "949", - "950" + "950", + "951" ], "location": { "end": { @@ -10386,13 +10440,13 @@ { "id": "271", "mutatorName": "MethodExpression", - "replacement": "roles.some(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount <= role.maxInGame;\n})", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "ROLES.some(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount <= role.maxInGame;\n})", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:50:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 30, "static": false, "killedBy": [ - "951" + "952" ], "coveredBy": [ "498", @@ -10417,14 +10471,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10441,7 +10495,7 @@ "id": "272", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -10471,14 +10525,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10495,7 +10549,7 @@ "id": "273", "mutatorName": "MethodExpression", "replacement": "players", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -10525,14 +10579,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10579,14 +10633,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10603,7 +10657,7 @@ "id": "275", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 29, "static": false, @@ -10633,13 +10687,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", - "953" + "732", + "952", + "954" ], "location": { "end": { @@ -10656,12 +10710,12 @@ "id": "276", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\"\nReceived array: [\"one of the players.role must have at least one role from `werewolves` side\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 29, "static": false, "killedBy": [ - "951" + "504" ], "coveredBy": [ "498", @@ -10686,13 +10740,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", - "953" + "732", + "952", + "954" ], "location": { "end": { @@ -10709,9 +10763,13 @@ "id": "277", "mutatorName": "EqualityOperator", "replacement": "player.role.name !== role.name", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:42:61\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 29, "static": false, - "killedBy": [], + "killedBy": [ + "728" + ], "coveredBy": [ "498", "499", @@ -10735,13 +10793,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", - "953" + "732", + "952", + "954" ], "location": { "end": { @@ -10784,14 +10842,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10813,7 +10871,7 @@ "testsCompleted": 30, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "498", @@ -10838,14 +10896,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10862,7 +10920,7 @@ "id": "280", "mutatorName": "EqualityOperator", "replacement": "roleCount < role.maxInGame", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -10892,14 +10950,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10916,7 +10974,7 @@ "id": "281", "mutatorName": "EqualityOperator", "replacement": "roleCount > role.maxInGame", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -10946,14 +11004,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "951", + "732", "952", - "953" + "953", + "954" ], "location": { "end": { @@ -10966,31 +11024,6 @@ } } }, - { - "id": "282", - "mutatorName": "BlockStatement", - "replacement": "{}", - "statusReason": "src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts(20,56): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", - "status": "CompileError", - "static": false, - "killedBy": [], - "coveredBy": [ - "497", - "499", - "504", - "954" - ], - "location": { - "end": { - "column": 2, - "line": 22 - }, - "start": { - "column": 63, - "line": 20 - } - } - }, { "id": "283", "mutatorName": "StringLiteral", @@ -11004,9 +11037,10 @@ ], "coveredBy": [ "497", + "498", "499", "504", - "954" + "955" ], "location": { "end": { @@ -11113,9 +11147,34 @@ "line": 31 } } + }, + { + "id": "282", + "mutatorName": "BlockStatement", + "replacement": "{}", + "statusReason": "src/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.ts(20,56): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "status": "CompileError", + "static": false, + "coveredBy": [ + "497", + "498", + "499", + "504", + "955" + ], + "location": { + "end": { + "column": 2, + "line": 22 + }, + "start": { + "column": 63, + "line": 20 + } + } } ], - "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport type { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nfunction areCompositionRolesMaxInGameRespected(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: ROLE_NAMES } }[];\n return roles.every(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount <= role.maxInGame;\n });\n}\n\nfunction getCompositionRolesMaxInGameDefaultMessage(): string {\n return \"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\";\n}\n\nfunction CompositionRolesMaxInGame(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionRolesMaxInGame\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areCompositionRolesMaxInGameRespected,\n defaultMessage: getCompositionRolesMaxInGameDefaultMessage,\n },\n });\n };\n}\n\nexport { CompositionRolesMaxInGame, areCompositionRolesMaxInGameRespected, getCompositionRolesMaxInGameDefaultMessage };" + "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport type { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nfunction areCompositionRolesMaxInGameRespected(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: RoleNames } }[];\n return ROLES.every(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount <= role.maxInGame;\n });\n}\n\nfunction getCompositionRolesMaxInGameDefaultMessage(): string {\n return \"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\";\n}\n\nfunction CompositionRolesMaxInGame(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionRolesMaxInGame\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areCompositionRolesMaxInGameRespected,\n defaultMessage: getCompositionRolesMaxInGameDefaultMessage,\n },\n });\n };\n}\n\nexport { CompositionRolesMaxInGame, areCompositionRolesMaxInGameRespected, getCompositionRolesMaxInGameDefaultMessage };" }, "src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts": { "language": "typescript", @@ -11152,18 +11211,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "939", + "732", "940", "941", "942", "943", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -11180,9 +11239,13 @@ "id": "290", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 35, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "497", "498", @@ -11207,18 +11270,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "939", + "732", "940", "941", "942", "943", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -11266,18 +11329,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "939", + "732", "940", "941", "942", "943", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -11322,18 +11385,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "939", + "732", "940", "941", "942", "943", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -11378,18 +11441,18 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "939", + "732", "940", "941", "942", "943", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -11432,16 +11495,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -11484,16 +11547,16 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -11536,15 +11599,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11561,12 +11624,12 @@ "id": "297", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "TypeError: Cannot read properties of undefined (reading 'name')\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts:88:360\n at Array.filter ()\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts:88:101\n at Array.every ()\n at areCompositionRolesMinInGameRespected (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts:83:203)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:29:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'name')\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts:88:360\n at Array.filter ()\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts:88:101\n at Array.every ()\n at areCompositionRolesMinInGameRespected (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts:83:203)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:28:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "941" + "942" ], "coveredBy": [ "498", @@ -11591,15 +11654,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11616,13 +11679,9 @@ "id": "298", "mutatorName": "LogicalOperator", "replacement": "!isObject(player) && !has(player, [\"role\", \"name\"])", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:40:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 31, + "status": "Timeout", "static": false, - "killedBy": [ - "942" - ], + "killedBy": [], "coveredBy": [ "498", "499", @@ -11646,15 +11705,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11671,12 +11730,12 @@ "id": "299", "mutatorName": "BooleanLiteral", "replacement": "isObject(player)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:70:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "517" + "946" ], "coveredBy": [ "498", @@ -11701,15 +11760,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11726,9 +11785,13 @@ "id": "300", "mutatorName": "BooleanLiteral", "replacement": "has(player, [\"role\", \"name\"])", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 31, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -11752,15 +11815,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11777,9 +11840,13 @@ "id": "301", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 31, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -11803,15 +11870,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11828,9 +11895,13 @@ "id": "302", "mutatorName": "StringLiteral", "replacement": "\"\"", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 31, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -11854,15 +11925,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11879,7 +11950,7 @@ "id": "303", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -11909,15 +11980,15 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "941", + "732", "942", "943", - "945" + "944", + "946" ], "location": { "end": { @@ -11943,10 +12014,10 @@ ], "coveredBy": [ "497", - "939", "940", "941", - "942" + "942", + "943" ], "location": { "end": { @@ -11963,15 +12034,19 @@ "id": "305", "mutatorName": "BooleanLiteral", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:13:64)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "940" + ], "coveredBy": [ "497", - "939", "940", "941", - "942" + "942", + "943" ], "location": { "end": { @@ -11987,10 +12062,14 @@ { "id": "306", "mutatorName": "MethodExpression", - "replacement": "roles.filter((role): role is Role & {\n minInGame: number;\n} => role.minInGame !== undefined).some(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount === 0 || roleCount >= role.minInGame;\n})", - "status": "Timeout", + "replacement": "ROLES.filter((role): role is Role & {\n minInGame: number;\n} => role.minInGame !== undefined).some(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount === 0 || roleCount >= role.minInGame;\n})", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:50:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "944" + ], "coveredBy": [ "498", "499", @@ -12014,14 +12093,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12037,7 +12116,7 @@ { "id": "307", "mutatorName": "MethodExpression", - "replacement": "roles", + "replacement": "ROLES", "statusReason": "src/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.ts(18,46): error TS18048: 'role.minInGame' is possibly 'undefined'.\n", "status": "CompileError", "static": false, @@ -12065,14 +12144,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12116,14 +12195,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12140,9 +12219,13 @@ "id": "309", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 30, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "498", "499", @@ -12166,14 +12249,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12220,14 +12303,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12270,14 +12353,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12294,7 +12377,7 @@ "id": "312", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -12324,14 +12407,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12374,14 +12457,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12428,14 +12511,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12452,12 +12535,12 @@ "id": "315", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:51:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 29, "static": false, "killedBy": [ - "943" + "503" ], "coveredBy": [ "498", @@ -12482,13 +12565,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", - "945" + "732", + "944", + "946" ], "location": { "end": { @@ -12505,9 +12588,13 @@ "id": "316", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 201\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:515:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 29, "static": false, - "killedBy": [], + "killedBy": [ + "503" + ], "coveredBy": [ "498", "499", @@ -12531,13 +12618,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", - "945" + "732", + "944", + "946" ], "location": { "end": { @@ -12580,13 +12667,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", - "945" + "732", + "944", + "946" ], "location": { "end": { @@ -12633,14 +12720,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12657,57 +12744,7 @@ "id": "319", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", - "static": false, - "killedBy": [], - "coveredBy": [ - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", - "519", - "727", - "728", - "729", - "730", - "731", - "943", - "944", - "945" - ], - "location": { - "end": { - "column": 60, - "line": 19 - }, - "start": { - "column": 14, - "line": 19 - } - } - }, - { - "id": "320", - "mutatorName": "LogicalOperator", - "replacement": "roleCount === 0 && roleCount >= role.minInGame", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -12737,14 +12774,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12758,10 +12795,10 @@ } }, { - "id": "321", - "mutatorName": "ConditionalExpression", - "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "id": "320", + "mutatorName": "LogicalOperator", + "replacement": "roleCount === 0 && roleCount >= role.minInGame", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 30, "static": false, @@ -12791,14 +12828,64 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" + ], + "location": { + "end": { + "column": 60, + "line": 19 + }, + "start": { + "column": 14, + "line": 19 + } + } + }, + { + "id": "321", + "mutatorName": "ConditionalExpression", + "replacement": "false", + "status": "Timeout", + "static": false, + "killedBy": [], + "coveredBy": [ + "498", + "499", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "509", + "510", + "511", + "512", + "513", + "514", + "515", + "516", + "517", + "518", + "519", + "728", + "729", + "730", + "731", + "732", + "944", + "945", + "946" ], "location": { "end": { @@ -12815,12 +12902,12 @@ "id": "322", "mutatorName": "EqualityOperator", "replacement": "roleCount !== 0", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:54:57)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 30, "static": false, "killedBy": [ - "517" + "945" ], "coveredBy": [ "498", @@ -12845,14 +12932,14 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "943", + "732", "944", - "945" + "945", + "946" ], "location": { "end": { @@ -12874,20 +12961,55 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "728" + "729" + ], + "coveredBy": [ + "499", + "502", + "503", + "504", + "507", + "729", + "730", + "731", + "732", + "944", + "946" + ], + "location": { + "end": { + "column": 60, + "line": 19 + }, + "start": { + "column": 33, + "line": 19 + } + } + }, + { + "id": "324", + "mutatorName": "EqualityOperator", + "replacement": "roleCount > role.minInGame", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts:70:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, + "static": false, + "killedBy": [ + "946" ], "coveredBy": [ "499", - "501", "502", "503", + "504", "507", - "728", "729", "730", "731", - "943", - "945" + "732", + "944", + "946" ], "location": { "end": { @@ -12913,16 +13035,16 @@ ], "coveredBy": [ "499", - "501", "502", "503", + "504", "507", - "728", "729", "730", "731", - "943", - "945" + "732", + "944", + "946" ], "location": { "end": { @@ -12944,15 +13066,15 @@ "testsCompleted": 7, "static": false, "killedBy": [ - "946" + "947" ], "coveredBy": [ "497", - "501", "502", "503", + "504", "507", - "946" + "947" ], "location": { "end": { @@ -13069,11 +13191,11 @@ "static": false, "coveredBy": [ "497", - "501", "502", "503", + "504", "507", - "946" + "947" ], "location": { "end": { @@ -13085,39 +13207,9 @@ "line": 23 } } - }, - { - "id": "324", - "mutatorName": "EqualityOperator", - "replacement": "roleCount > role.minInGame", - "status": "Timeout", - "static": false, - "coveredBy": [ - "499", - "501", - "502", - "503", - "507", - "728", - "729", - "730", - "731", - "943", - "945" - ], - "location": { - "end": { - "column": 60, - "line": 19 - }, - "start": { - "column": 33, - "line": 19 - } - } } ], - "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport type { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nfunction areCompositionRolesMinInGameRespected(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: ROLE_NAMES } }[];\n return roles\n .filter((role): role is Role & { minInGame: number } => role.minInGame !== undefined)\n .every(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount === 0 || roleCount >= role.minInGame;\n });\n}\n\nfunction getCompositionRolesMinInGameDefaultMessage(): string {\n return \"players.role minimum occurrences in game must be reached. Please check `minInGame` property of roles\";\n}\n\nfunction CompositionRolesMinInGame(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionRolesMinInGame\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areCompositionRolesMinInGameRespected,\n defaultMessage: getCompositionRolesMinInGameDefaultMessage,\n },\n });\n };\n}\n\nexport { CompositionRolesMinInGame, areCompositionRolesMinInGameRespected, getCompositionRolesMinInGameDefaultMessage };" + "source": "import { registerDecorator } from \"class-validator\";\nimport isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { ValidationOptions } from \"class-validator\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport type { RoleNames } from \"@/modules/role/enums/role.enum\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nfunction areCompositionRolesMinInGameRespected(value?: unknown): boolean {\n if (!Array.isArray(value) || value.some(player => !isObject(player) || !has(player, [\"role\", \"name\"]))) {\n return false;\n }\n const players = value as { role: { name: RoleNames } }[];\n return ROLES\n .filter((role): role is Role & { minInGame: number } => role.minInGame !== undefined)\n .every(role => {\n const roleCount = players.filter(player => player.role.name === role.name).length;\n return roleCount === 0 || roleCount >= role.minInGame;\n });\n}\n\nfunction getCompositionRolesMinInGameDefaultMessage(): string {\n return \"players.role minimum occurrences in game must be reached. Please check `minInGame` property of roles\";\n}\n\nfunction CompositionRolesMinInGame(validationOptions?: ValidationOptions) {\n return (object: object, propertyName: string): void => {\n registerDecorator({\n name: \"CompositionRolesMinInGame\",\n target: object.constructor,\n propertyName,\n options: validationOptions,\n validator: {\n validate: areCompositionRolesMinInGameRespected,\n defaultMessage: getCompositionRolesMinInGameDefaultMessage,\n },\n });\n };\n}\n\nexport { CompositionRolesMinInGame, areCompositionRolesMinInGameRespected, getCompositionRolesMinInGameDefaultMessage };" }, "src/modules/game/dto/base/decorators/composition/composition-unique-names.decorator.ts": { "language": "typescript", @@ -13162,10 +13254,10 @@ "517", "518", "519", - "1044", "1045", "1046", - "1047" + "1047", + "1048" ], "location": { "end": { @@ -13182,9 +13274,13 @@ "id": "334", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 200\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:176:35\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 35, "static": false, - "killedBy": [], + "killedBy": [ + "489" + ], "coveredBy": [ "485", "486", @@ -13217,10 +13313,10 @@ "517", "518", "519", - "1044", "1045", "1046", - "1047" + "1047", + "1048" ], "location": { "end": { @@ -13242,7 +13338,7 @@ "testsCompleted": 35, "static": false, "killedBy": [ - "1044" + "1045" ], "coveredBy": [ "485", @@ -13276,10 +13372,10 @@ "517", "518", "519", - "1044", "1045", "1046", - "1047" + "1047", + "1048" ], "location": { "end": { @@ -13301,7 +13397,7 @@ "testsCompleted": 35, "static": false, "killedBy": [ - "1046" + "1047" ], "coveredBy": [ "485", @@ -13335,10 +13431,10 @@ "517", "518", "519", - "1044", "1045", "1046", - "1047" + "1047", + "1048" ], "location": { "end": { @@ -13360,7 +13456,7 @@ "testsCompleted": 35, "static": false, "killedBy": [ - "1047" + "1048" ], "coveredBy": [ "485", @@ -13394,10 +13490,10 @@ "517", "518", "519", - "1044", "1045", "1046", - "1047" + "1047", + "1048" ], "location": { "end": { @@ -13419,7 +13515,7 @@ "testsCompleted": 33, "static": false, "killedBy": [ - "1046" + "1047" ], "coveredBy": [ "485", @@ -13453,8 +13549,8 @@ "517", "518", "519", - "1046", - "1047" + "1047", + "1048" ], "location": { "end": { @@ -13476,7 +13572,7 @@ "testsCompleted": 33, "static": false, "killedBy": [ - "1047" + "1048" ], "coveredBy": [ "485", @@ -13510,8 +13606,8 @@ "517", "518", "519", - "1046", - "1047" + "1047", + "1048" ], "location": { "end": { @@ -13533,12 +13629,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "1044" + "1045" ], "coveredBy": [ - "1044", "1045", - "1046" + "1046", + "1047" ], "location": { "end": { @@ -13667,14 +13763,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -13682,33 +13777,33 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "971", + "968", + "970", "972", "973", "974", @@ -13717,12 +13812,13 @@ "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -13739,9 +13835,13 @@ "id": "345", "mutatorName": "BooleanLiteral", "replacement": "has((params.value as object), \"name\")", - "status": "Timeout", + "statusReason": "Error: expect(received).toSatisfyAll(expected)\n\nExpected array to satisfy predicate for all values:\n [Function anonymous]\nReceived:\n [{\"name\": \"1\", \"role\": {\"name\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"2\", \"role\": {\"name\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"3\", \"role\": {\"name\": \"bear-tamer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"4\", \"role\": {\"name\": \"dog-wolf\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"5\", \"role\": {\"name\": \"fox\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"6\", \"role\": {\"name\": \"three-brothers\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"7\", \"role\": {\"name\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"name\": \"8\", \"role\": {\"name\": \"three-brothers\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"9\", \"role\": {\"name\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"10\", \"role\": {\"name\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:233:23)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 100, "static": true, - "killedBy": [], + "killedBy": [ + "493" + ], "coveredBy": [ "164", "165", @@ -13787,14 +13887,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -13802,33 +13901,33 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "971", + "968", + "970", "972", "973", "974", @@ -13837,12 +13936,13 @@ "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -13908,14 +14008,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -13923,33 +14022,33 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "971", + "968", + "970", "972", "973", "974", @@ -13958,12 +14057,13 @@ "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -13980,9 +14080,13 @@ "id": "347", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "TypeError: Cannot read properties of null (reading 'name')\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/game-player/transformers/player-role.transformer.ts:73:178\n at Array.find ()\n at playerRoleTransformer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/game-player/transformers/player-role.transformer.ts:71:24)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-role.transformer.spec.ts:11:35)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 100, "static": true, - "killedBy": [], + "killedBy": [ + "972" + ], "coveredBy": [ "164", "165", @@ -14028,14 +14132,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14043,33 +14146,33 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "971", + "968", + "970", "972", "973", "974", @@ -14078,12 +14181,13 @@ "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -14148,14 +14252,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14163,33 +14266,33 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "971", + "968", + "970", "972", "973", "974", @@ -14198,12 +14301,13 @@ "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -14225,12 +14329,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "971" + "972" ], "coveredBy": [ - "971", "972", - "973" + "973", + "974" ], "location": { "end": { @@ -14299,14 +14403,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14314,44 +14417,45 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "974", + "968", + "970", "975", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -14368,13 +14472,9 @@ "id": "351", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 28\n+ Received + 28\n\n@@ -5,27 +5,27 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea35fc41b1feb7528c0b0e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea35fc41b1feb7528c0b0f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,67 +37,67 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea35fc41b1feb7528c0b10\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n- \"current\": \"villager-villager\",\n- \"isRevealed\": true,\n- \"original\": \"villager-villager\",\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea35fc41b1feb7528c0b11\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n- \"current\": \"white-werewolf\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea35fc41b1feb7528c0b12\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n- \"current\": \"cupid\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"cupid\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea35fc41b1feb7528c0b13\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n- \"current\": \"seer\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n@@ -187,13 +187,13 @@\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n@@ -219,13 +219,13 @@\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n- \"current\": \"villager-villager\",\n- \"isRevealed\": true,\n- \"original\": \"villager-villager\",\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n@@ -235,13 +235,13 @@\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n- \"current\": \"white-werewolf\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n@@ -251,13 +251,13 @@\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n- \"current\": \"cupid\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"cupid\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n@@ -267,13 +267,13 @@\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n- \"current\": \"seer\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 97, + "status": "Timeout", "static": true, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -14420,14 +14520,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14435,44 +14534,45 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "974", + "968", + "970", "975", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -14489,9 +14589,13 @@ "id": "352", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toSatisfyAll(expected)\n\nExpected array to satisfy predicate for all values:\n [Function anonymous]\nReceived:\n [{\"name\": \"1\", \"role\": {\"name\": \"three-brothers\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"2\", \"role\": {\"name\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"3\", \"role\": {\"name\": \"pied-piper\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"4\", \"role\": {\"name\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"5\", \"role\": {\"name\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"6\", \"role\": {\"name\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"7\", \"role\": {\"name\": \"angel\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"8\", \"role\": {\"name\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"name\": \"9\", \"role\": {\"name\": \"fox\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"name\": \"10\", \"role\": {\"name\": \"stuttering-judge\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:233:23)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 97, "static": true, - "killedBy": [], + "killedBy": [ + "493" + ], "coveredBy": [ "164", "165", @@ -14537,14 +14641,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14552,44 +14655,45 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "974", + "968", + "970", "975", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -14611,7 +14715,7 @@ "testsCompleted": 97, "static": true, "killedBy": [ - "974" + "975" ], "coveredBy": [ "164", @@ -14658,14 +14762,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14673,44 +14776,45 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "974", + "968", + "970", "975", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -14776,14 +14880,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14791,44 +14894,45 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "974", + "968", + "970", "975", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -14894,14 +14998,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -14909,44 +15012,45 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "974", + "968", + "970", "975", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -15012,14 +15116,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -15027,44 +15130,45 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "974", + "968", + "970", "975", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -15086,7 +15190,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "974" + "975" ], "location": { "end": { @@ -15103,12 +15207,12 @@ "id": "358", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n \"current\": \"seer\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"name\": \"seer\",\n \"original\": \"seer\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-role.transformer.spec.ts:30:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 16\n+ Received + 16\n\n@@ -5,43 +5,43 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd123aacbfcd1b7dc9496\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n \"current\": \"villager\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd123aacbfcd1b7dc9497\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n \"current\": \"werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd123aacbfcd1b7dc9498\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,50 +53,50 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd123aacbfcd1b7dc9499\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"white-werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd123aacbfcd1b7dc949a\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n \"current\": \"cupid\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"cupid\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd123aacbfcd1b7dc949b\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n \"current\": \"seer\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"seer\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n@@ -188,11 +188,11 @@\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n \"current\": \"villager\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n@@ -204,11 +204,11 @@\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n \"current\": \"werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n@@ -236,11 +236,11 @@\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"white-werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n@@ -252,11 +252,11 @@\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n \"current\": \"cupid\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"cupid\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n@@ -268,11 +268,11 @@\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n \"current\": \"seer\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"seer\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 96, "static": true, "killedBy": [ - "975" + "517" ], "coveredBy": [ "164", @@ -15155,14 +15259,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -15170,47 +15273,48 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "975", + "968", + "970", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { - "column": 64, + "column": 63, "line": 23 }, "start": { @@ -15271,14 +15375,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -15286,47 +15389,48 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "975", + "968", + "970", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { - "column": 64, + "column": 63, "line": 23 }, "start": { @@ -15338,14 +15442,10 @@ { "id": "360", "mutatorName": "EqualityOperator", - "replacement": "role.name !== ROLE_NAMES.VILLAGER_VILLAGER", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 18\n\n@@ -5,98 +5,98 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7be4ac3ebfec741c78\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n \"current\": \"villager\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7be4ac3ebfec741c79\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n \"current\": \"werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7be4ac3ebfec741c7a\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n \"current\": \"villager-villager\",\n- \"isRevealed\": true,\n+ \"isRevealed\": false,\n \"original\": \"villager-villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7be4ac3ebfec741c7b\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"white-werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7be4ac3ebfec741c7c\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n \"current\": \"cupid\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"cupid\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7be4ac3ebfec741c7d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n \"current\": \"seer\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"seer\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n@@ -188,11 +188,11 @@\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n \"current\": \"villager\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n@@ -204,11 +204,11 @@\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n \"current\": \"werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n@@ -220,11 +220,11 @@\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n \"current\": \"villager-villager\",\n- \"isRevealed\": true,\n+ \"isRevealed\": false,\n \"original\": \"villager-villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n@@ -236,11 +236,11 @@\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"white-werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n@@ -252,11 +252,11 @@\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n \"current\": \"cupid\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"cupid\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n@@ -268,11 +268,11 @@\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n \"current\": \"seer\",\n- \"isRevealed\": false,\n+ \"isRevealed\": true,\n \"original\": \"seer\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 96, + "replacement": "role.name !== RoleNames.VILLAGER_VILLAGER", + "status": "Timeout", "static": true, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -15391,14 +15491,13 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "750", + "732", "751", - "873", + "752", "874", "875", "876", @@ -15406,47 +15505,48 @@ "878", "879", "880", - "882", + "881", "883", "884", - "917", + "885", "918", "919", "920", "921", "922", "923", - "941", + "924", "942", "943", - "945", - "949", + "944", + "946", "950", "951", - "953", - "957", + "952", + "954", "958", "959", - "961", - "965", + "960", + "962", "966", "967", - "969", - "975", + "968", + "970", "976", "977", "978", "979", - "983", + "980", "984", - "994", + "985", "995", "996", - "997" + "997", + "998" ], "location": { "end": { - "column": 64, + "column": 63, "line": 23 }, "start": { @@ -15456,7 +15556,7 @@ } } ], - "source": "import { has } from \"lodash\";\nimport type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nfunction playerRoleTransformer(params: TransformFnParams): unknown {\n if (!has(params.value as object, \"name\")) {\n return params.value;\n }\n const value = params.value as {\n name: string;\n current: ROLE_NAMES;\n original: ROLE_NAMES;\n isRevealed: boolean;\n };\n const role = roles.find(({ name }) => name === value.name);\n if (role === undefined) {\n return value;\n }\n value.current = role.name;\n value.original = role.name;\n value.isRevealed = role.name === ROLE_NAMES.VILLAGER_VILLAGER;\n return value;\n}\n\nexport { playerRoleTransformer };" + "source": "import { has } from \"lodash\";\nimport type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nfunction playerRoleTransformer(params: TransformFnParams): unknown {\n if (!has(params.value as object, \"name\")) {\n return params.value;\n }\n const value = params.value as {\n name: string;\n current: RoleNames;\n original: RoleNames;\n isRevealed: boolean;\n };\n const role = ROLES.find(({ name }) => name === value.name);\n if (role === undefined) {\n return value;\n }\n value.current = role.name;\n value.original = role.name;\n value.isRevealed = role.name === RoleNames.VILLAGER_VILLAGER;\n return value;\n}\n\nexport { playerRoleTransformer };" }, "src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts": { "language": "typescript", @@ -15514,12 +15614,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -15527,16 +15626,17 @@ "878", "879", "880", - "882", + "881", "883", "884", - "978", + "885", "979", "980", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -15602,12 +15702,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -15615,16 +15714,17 @@ "878", "879", "880", - "882", + "881", "883", "884", - "978", + "885", "979", "980", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -15641,12 +15741,12 @@ "id": "363", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "TypeError: Cannot set properties of null (setting 'current')\n at playerSideTransformer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts:86:18)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts:15:35)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "TypeError: Cannot set properties of null (setting 'current')\n at playerSideTransformer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts:86:18)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts:15:35)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 67, "static": true, "killedBy": [ - "978" + "979" ], "coveredBy": [ "164", @@ -15693,12 +15793,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -15706,16 +15805,17 @@ "878", "879", "880", - "882", + "881", "883", "884", - "978", + "885", "979", "980", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -15732,9 +15832,13 @@ "id": "364", "mutatorName": "LogicalOperator", "replacement": "(!isObject(params.value) || !isObject(params.obj)) && !has((params.obj as object), [\"role\", \"name\"])", - "status": "Timeout", + "statusReason": "TypeError: Cannot set properties of null (setting 'current')\n at playerSideTransformer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts:86:18)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts:15:35)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 67, "static": true, - "killedBy": [], + "killedBy": [ + "979" + ], "coveredBy": [ "164", "165", @@ -15780,12 +15884,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -15793,16 +15896,17 @@ "878", "879", "880", - "882", + "881", "883", "884", - "978", + "885", "979", "980", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -15867,12 +15971,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -15880,16 +15983,17 @@ "878", "879", "880", - "882", + "881", "883", "884", - "978", + "885", "979", "980", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -15906,13 +16010,9 @@ "id": "366", "mutatorName": "LogicalOperator", "replacement": "!isObject(params.value) && !isObject(params.obj)", - "statusReason": "TypeError: Cannot set properties of null (setting 'current')\n at playerSideTransformer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts:86:18)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts:15:35)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 67, + "status": "Timeout", "static": true, - "killedBy": [ - "978" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -15958,12 +16058,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -15971,16 +16070,17 @@ "878", "879", "880", - "882", + "881", "883", "884", - "978", + "885", "979", "980", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16049,12 +16149,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16062,16 +16161,17 @@ "878", "879", "880", - "882", + "881", "883", "884", - "978", + "885", "979", "980", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16140,12 +16240,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16153,14 +16252,15 @@ "878", "879", "880", - "882", + "881", "883", "884", - "980", + "885", "981", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16225,12 +16325,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16238,13 +16337,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "981", + "885", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16261,9 +16361,13 @@ "id": "370", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 4\n+ Received + 1\n\n- Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- }\n+ Object {}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts:39:86)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 64, "static": true, - "killedBy": [], + "killedBy": [ + "984" + ], "coveredBy": [ "164", "165", @@ -16309,12 +16413,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16322,13 +16425,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "981", + "885", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16397,12 +16501,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16410,13 +16513,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "981", + "885", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16485,12 +16589,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16498,13 +16601,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "981", + "885", "982", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16521,14 +16625,18 @@ "id": "373", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "TypeError: Cannot set properties of null (setting 'current')\n at playerSideTransformer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/game-player/transformers/player-side.transformer.ts:86:18)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts:15:35)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "979" + ], "coveredBy": [ - "978", "979", "980", - "981" + "981", + "982" ], "location": { "end": { @@ -16593,12 +16701,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16606,12 +16713,13 @@ "878", "879", "880", - "882", + "881", "883", "884", - "982", + "885", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16676,12 +16784,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16689,12 +16796,13 @@ "878", "879", "880", - "882", + "881", "883", "884", - "982", + "885", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16763,12 +16871,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16776,12 +16883,13 @@ "878", "879", "880", - "882", + "881", "883", "884", - "982", + "885", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16798,13 +16906,9 @@ "id": "377", "mutatorName": "EqualityOperator", "replacement": "name !== obj.role.name", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 22\n+ Received + 22\n\n@@ -5,27 +5,27 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7e07f838e8427a0f6f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n \"current\": \"villager\",\n \"isRevealed\": false,\n \"original\": \"villager\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7e07f838e8427a0f70\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,27 +37,27 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7e07f838e8427a0f71\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n \"current\": \"villager-villager\",\n \"isRevealed\": true,\n \"original\": \"villager-villager\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7e07f838e8427a0f72\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,39 +69,39 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7e07f838e8427a0f73\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n \"current\": \"cupid\",\n \"isRevealed\": false,\n \"original\": \"cupid\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea3b7e07f838e8427a0f74\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n \"current\": \"seer\",\n \"isRevealed\": false,\n \"original\": \"seer\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ],\n },\n },\n@@ -192,12 +192,12 @@\n \"current\": \"villager\",\n \"isRevealed\": false,\n \"original\": \"villager\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Object {\n \"_id\": Any,\n \"attributes\": Array [],\n@@ -224,12 +224,12 @@\n \"current\": \"villager-villager\",\n \"isRevealed\": true,\n \"original\": \"villager-villager\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Object {\n \"_id\": Any,\n \"attributes\": Array [],\n@@ -256,12 +256,12 @@\n \"current\": \"cupid\",\n \"isRevealed\": false,\n \"original\": \"cupid\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Object {\n \"_id\": Any,\n \"attributes\": Array [],\n@@ -272,12 +272,12 @@\n \"current\": \"seer\",\n \"isRevealed\": false,\n \"original\": \"seer\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 63, + "status": "Timeout", "static": true, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -16850,12 +16954,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16863,12 +16966,13 @@ "878", "879", "880", - "882", + "881", "883", "884", - "982", + "885", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -16934,12 +17038,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -16947,12 +17050,13 @@ "878", "879", "880", - "882", + "881", "883", "884", - "982", + "885", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -17018,12 +17122,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -17031,12 +17134,13 @@ "878", "879", "880", - "882", + "881", "883", "884", - "982", + "885", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -17102,12 +17206,11 @@ "517", "518", "519", - "727", "728", "729", "730", "731", - "873", + "732", "874", "875", "876", @@ -17115,12 +17218,13 @@ "878", "879", "880", - "882", + "881", "883", "884", - "982", + "885", "983", - "984" + "984", + "985" ], "location": { "end": { @@ -17142,7 +17246,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "982" + "983" ], "location": { "end": { @@ -17156,7 +17260,7 @@ } } ], - "source": "import isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport type { ROLE_SIDES, ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nfunction playerSideTransformer(params: TransformFnParams): unknown {\n if (!isObject(params.value) || !isObject(params.obj) || !has(params.obj as object, [\"role\", \"name\"])) {\n return params.value;\n }\n const obj = params.obj as { role: { name: ROLE_NAMES } };\n const value = params.value as {\n current: ROLE_SIDES;\n original: ROLE_SIDES;\n };\n const role = roles.find(({ name }) => name === obj.role.name);\n if (role === undefined) {\n return value;\n }\n value.current = role.side;\n value.original = role.side;\n return params.value;\n}\n\nexport { playerSideTransformer };" + "source": "import isObject from \"isobject\";\nimport { has } from \"lodash\";\nimport type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport type { RoleSides, RoleNames } from \"@/modules/role/enums/role.enum\";\n\nfunction playerSideTransformer(params: TransformFnParams): unknown {\n if (!isObject(params.value) || !isObject(params.obj) || !has(params.obj as object, [\"role\", \"name\"])) {\n return params.value;\n }\n const obj = params.obj as { role: { name: RoleNames } };\n const value = params.value as {\n current: RoleSides;\n original: RoleSides;\n };\n const role = ROLES.find(({ name }) => name === obj.role.name);\n if (role === undefined) {\n return value;\n }\n value.current = role.side;\n value.original = role.side;\n return params.value;\n}\n\nexport { playerSideTransformer };" }, "src/modules/game/dto/base/transformers/game-players-position.transformer.ts": { "language": "typescript", @@ -17217,10 +17321,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17228,18 +17331,19 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "993", + "914", "994", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17256,9 +17360,13 @@ "id": "383", "mutatorName": "BooleanLiteral", "replacement": "Array.isArray(params.value)", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 70, "static": true, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "164", "165", @@ -17307,10 +17415,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17318,18 +17425,19 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "993", + "914", "994", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17346,12 +17454,12 @@ "id": "384", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 0\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/transformers/game-players-position.transformer.spec.ts:37:64)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 70, "static": true, "killedBy": [ - "517" + "998" ], "coveredBy": [ "164", @@ -17401,10 +17509,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17412,18 +17519,19 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "993", + "914", "994", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17445,7 +17553,7 @@ "testsCompleted": 70, "static": true, "killedBy": [ - "993" + "994" ], "coveredBy": [ "164", @@ -17495,10 +17603,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17506,18 +17613,19 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "993", + "914", "994", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17539,10 +17647,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "993" + "994" ], "coveredBy": [ - "993" + "994" ], "location": { "end": { @@ -17559,13 +17667,9 @@ "id": "387", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 69, + "status": "Timeout", "static": true, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -17614,10 +17718,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17625,17 +17728,18 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "994", + "914", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17707,10 +17811,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17718,17 +17821,18 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "994", + "914", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17800,10 +17904,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17811,17 +17914,18 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "994", + "914", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17838,9 +17942,13 @@ "id": "390", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "TypeError: Cannot create property 'position' on string 'toto'\n at gamePlayersPositionTransformer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/transformers/game-players-position.transformer.spec.ts:17:44)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 69, "static": true, - "killedBy": [], + "killedBy": [ + "995" + ], "coveredBy": [ "164", "165", @@ -17889,10 +17997,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -17900,17 +18007,18 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "994", + "914", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -17927,9 +18035,13 @@ "id": "391", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 0\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/transformers/game-players-position.transformer.spec.ts:37:64)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 58, "static": true, - "killedBy": [], + "killedBy": [ + "998" + ], "coveredBy": [ "164", "165", @@ -17974,7 +18086,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -17982,13 +18093,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18056,7 +18168,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18064,13 +18175,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18087,9 +18199,13 @@ "id": "393", "mutatorName": "LogicalOperator", "replacement": "typeof player !== \"object\" && has(player, \"position\") && (player as {\n position: number | undefined;\n}).position !== undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"players.0.position must not be less than 0\"\nReceived array: [\"one of the players.role must have at least one role from `werewolves` side\", \"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 58, "static": true, - "killedBy": [], + "killedBy": [ + "507" + ], "coveredBy": [ "164", "165", @@ -18134,7 +18250,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18142,13 +18257,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18170,7 +18286,7 @@ "testsCompleted": 58, "static": true, "killedBy": [ - "994" + "995" ], "coveredBy": [ "164", @@ -18216,7 +18332,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18224,13 +18339,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18247,12 +18363,12 @@ "id": "395", "mutatorName": "EqualityOperator", "replacement": "typeof player === \"object\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 0\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/dto/base/transformers/game-players-position.transformer.spec.ts:37:64)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 58, "static": true, "killedBy": [ - "517" + "998" ], "coveredBy": [ "164", @@ -18298,7 +18414,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18306,13 +18421,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18377,7 +18493,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18385,13 +18500,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18459,7 +18575,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18467,13 +18582,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18490,13 +18606,9 @@ "id": "398", "mutatorName": "LogicalOperator", "replacement": "has(player, \"position\") || (player as {\n position: number | undefined;\n}).position !== undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 58, + "status": "Timeout", "static": true, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -18541,7 +18653,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18549,13 +18660,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18572,9 +18684,13 @@ "id": "399", "mutatorName": "StringLiteral", "replacement": "\"\"", - "status": "Timeout", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"players.0.position must not be less than 0\"\nReceived array: [\"one of the players.role must have at least one role from `werewolves` side\", \"players.role minimum occurrences in game must be reached. Please check `minInGame` property of roles\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 58, "static": true, - "killedBy": [], + "killedBy": [ + "507" + ], "coveredBy": [ "164", "165", @@ -18619,7 +18735,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18627,13 +18742,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18697,7 +18813,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18705,13 +18820,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18779,7 +18895,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -18787,13 +18902,14 @@ "878", "879", "880", - "882", + "881", "883", "884", - "994", + "885", "995", "996", - "997" + "997", + "998" ], "location": { "end": { @@ -18810,9 +18926,13 @@ "id": "402", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toContainEqual(expected) // deep equality\n\nExpected value: \"players.0.position must not be less than 0\"\nReceived array: [\"one of the players.role must have at least one role from `werewolves` side\"]\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:516:60\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 25, "static": true, - "killedBy": [], + "killedBy": [ + "507" + ], "coveredBy": [ "498", "499", @@ -18836,9 +18956,9 @@ "517", "518", "519", - "994", "995", - "996" + "996", + "997" ], "location": { "end": { @@ -18855,13 +18975,9 @@ "id": "403", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 47, + "status": "Timeout", "static": true, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -18891,10 +19007,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -18902,14 +19017,15 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "997" + "914", + "998" ], "location": { "end": { @@ -18926,7 +19042,7 @@ "id": "404", "mutatorName": "EqualityOperator", "replacement": "i <= value.length", - "statusReason": "undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:43:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:34:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:23:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34), undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:286:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:278:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:50:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:286:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:278:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:50:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34), undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:43:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:34:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:23:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "RuntimeError", "static": true, "killedBy": [], @@ -18959,10 +19075,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -18970,14 +19085,15 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "997" + "914", + "998" ], "location": { "end": { @@ -19026,10 +19142,9 @@ "517", "518", "519", - "692", "693", "694", - "873", + "695", "874", "875", "876", @@ -19037,14 +19152,15 @@ "878", "879", "880", - "882", + "881", "883", "884", - "910", + "885", "911", "912", "913", - "997" + "914", + "998" ], "location": { "end": { @@ -19061,7 +19177,7 @@ "id": "406", "mutatorName": "UpdateOperator", "replacement": "i--", - "statusReason": "undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:286:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:278:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:50:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34), undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:43:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:34:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:23:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:286:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:278:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:50:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34), undefinedCannot set properties of undefined (setting 'position') TypeError: Cannot set properties of undefined (setting 'position')\n at Object.gamePlayersPositionTransformer [as transformFn] (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/dto/base/transformers/game-players-position.transformer.ts:90:28)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:412:24\n at Array.forEach ()\n at TransformOperationExecutor.applyCustomTransformations (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:411:15)\n at TransformOperationExecutor.transform (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/TransformOperationExecutor.ts:334:33)\n at ClassTransformer.plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/ClassTransformer.ts:77:21)\n at plainToInstance (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/src/index.ts:84:27)\n at createFakeCreateGameDto (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/factories/game/dto/create-game/create-game.dto.factory.ts:26:25)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:43:41\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:34:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:23:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "RuntimeError", "static": true, "killedBy": [], @@ -19090,7 +19206,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -19098,10 +19213,11 @@ "878", "879", "880", - "882", + "881", "883", "884", - "997" + "885", + "998" ], "location": { "end": { @@ -19118,13 +19234,9 @@ "id": "407", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 36, + "status": "Timeout", "static": true, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -19150,7 +19262,6 @@ "517", "518", "519", - "873", "874", "875", "876", @@ -19158,10 +19269,11 @@ "878", "879", "880", - "882", + "881", "883", "884", - "997" + "885", + "998" ], "location": { "end": { @@ -19191,8 +19303,8 @@ "coveredBy": [ "530", "531", - "1049", - "1050" + "1050", + "1051" ], "location": { "end": { @@ -19216,8 +19328,8 @@ "coveredBy": [ "530", "531", - "1049", - "1050" + "1050", + "1051" ], "location": { "end": { @@ -19246,7 +19358,7 @@ "killedBy": [], "coveredBy": [ "296", - "752" + "753" ], "location": { "end": { @@ -19269,7 +19381,7 @@ "killedBy": [], "coveredBy": [ "296", - "752" + "753" ], "location": { "end": { @@ -19292,11 +19404,11 @@ "killedBy": [], "coveredBy": [ "296", - "752" + "753" ], "location": { "end": { - "column": 74, + "column": 72, "line": 13 }, "start": { @@ -19316,7 +19428,7 @@ "coveredBy": [ "403", "404", - "753" + "754" ], "location": { "end": { @@ -19340,7 +19452,7 @@ "coveredBy": [ "403", "404", - "753" + "754" ], "location": { "end": { @@ -19364,11 +19476,11 @@ "coveredBy": [ "403", "404", - "753" + "754" ], "location": { "end": { - "column": 74, + "column": 72, "line": 21 }, "start": { @@ -19396,7 +19508,7 @@ "298", "303", "530", - "754" + "755" ], "location": { "end": { @@ -19428,7 +19540,7 @@ "298", "303", "530", - "754" + "755" ], "location": { "end": { @@ -19460,11 +19572,11 @@ "298", "303", "530", - "754" + "755" ], "location": { "end": { - "column": 61, + "column": 60, "line": 29 }, "start": { @@ -19487,7 +19599,7 @@ "471", "517", "518", - "755" + "756" ], "location": { "end": { @@ -19514,7 +19626,7 @@ "471", "517", "518", - "755" + "756" ], "location": { "end": { @@ -19541,11 +19653,11 @@ "471", "517", "518", - "755" + "756" ], "location": { "end": { - "column": 61, + "column": 60, "line": 37 }, "start": { @@ -19563,7 +19675,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "756" + "757" ], "location": { "end": { @@ -19585,7 +19697,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "756" + "757" ], "location": { "end": { @@ -19607,11 +19719,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "756" + "757" ], "location": { "end": { - "column": 60, + "column": 59, "line": 45 }, "start": { @@ -19629,7 +19741,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "757" + "758" ], "location": { "end": { @@ -19651,7 +19763,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "757" + "758" ], "location": { "end": { @@ -19673,11 +19785,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "757" + "758" ], "location": { "end": { - "column": 71, + "column": 70, "line": 53 }, "start": { @@ -19696,7 +19808,7 @@ "killedBy": [], "coveredBy": [ "415", - "758" + "759" ], "location": { "end": { @@ -19719,7 +19831,7 @@ "killedBy": [], "coveredBy": [ "415", - "758" + "759" ], "location": { "end": { @@ -19742,11 +19854,11 @@ "killedBy": [], "coveredBy": [ "415", - "758" + "759" ], "location": { "end": { - "column": 64, + "column": 63, "line": 61 }, "start": { @@ -19764,7 +19876,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "759" + "760" ], "location": { "end": { @@ -19786,7 +19898,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "759" + "760" ], "location": { "end": { @@ -19808,11 +19920,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "759" + "760" ], "location": { "end": { - "column": 63, + "column": 62, "line": 69 }, "start": { @@ -19830,7 +19942,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "760" + "761" ], "location": { "end": { @@ -19852,7 +19964,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "760" + "761" ], "location": { "end": { @@ -19874,11 +19986,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "760" + "761" ], "location": { "end": { - "column": 65, + "column": 64, "line": 77 }, "start": { @@ -19896,7 +20008,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "761" + "762" ], "location": { "end": { @@ -19918,7 +20030,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "761" + "762" ], "location": { "end": { @@ -19940,11 +20052,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "761" + "762" ], "location": { "end": { - "column": 58, + "column": 57, "line": 85 }, "start": { @@ -19962,7 +20074,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "762" + "763" ], "location": { "end": { @@ -19984,7 +20096,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "762" + "763" ], "location": { "end": { @@ -20006,11 +20118,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "762" + "763" ], "location": { "end": { - "column": 65, + "column": 64, "line": 93 }, "start": { @@ -20028,7 +20140,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "763" + "764" ], "location": { "end": { @@ -20050,7 +20162,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "763" + "764" ], "location": { "end": { @@ -20072,11 +20184,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "763" + "764" ], "location": { "end": { - "column": 64, + "column": 63, "line": 101 }, "start": { @@ -20094,7 +20206,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "764" + "765" ], "location": { "end": { @@ -20116,7 +20228,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "764" + "765" ], "location": { "end": { @@ -20138,11 +20250,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "764" + "765" ], "location": { "end": { - "column": 69, + "column": 68, "line": 109 }, "start": { @@ -20160,7 +20272,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "765" + "766" ], "location": { "end": { @@ -20182,7 +20294,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "765" + "766" ], "location": { "end": { @@ -20204,11 +20316,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "765" + "766" ], "location": { "end": { - "column": 66, + "column": 65, "line": 117 }, "start": { @@ -20226,7 +20338,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "766" + "767" ], "location": { "end": { @@ -20248,7 +20360,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "766" + "767" ], "location": { "end": { @@ -20270,11 +20382,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "766" + "767" ], "location": { "end": { - "column": 60, + "column": 59, "line": 125 }, "start": { @@ -20292,7 +20404,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "767" + "768" ], "location": { "end": { @@ -20314,7 +20426,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "767" + "768" ], "location": { "end": { @@ -20336,11 +20448,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "767" + "768" ], "location": { "end": { - "column": 60, + "column": 59, "line": 133 }, "start": { @@ -20359,7 +20471,7 @@ "killedBy": [], "coveredBy": [ "425", - "768" + "769" ], "location": { "end": { @@ -20382,7 +20494,7 @@ "killedBy": [], "coveredBy": [ "425", - "768" + "769" ], "location": { "end": { @@ -20405,11 +20517,11 @@ "killedBy": [], "coveredBy": [ "425", - "768" + "769" ], "location": { "end": { - "column": 61, + "column": 60, "line": 141 }, "start": { @@ -20427,7 +20539,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "769" + "770" ], "location": { "end": { @@ -20449,7 +20561,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "769" + "770" ], "location": { "end": { @@ -20471,11 +20583,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "769" + "770" ], "location": { "end": { - "column": 60, + "column": 59, "line": 149 }, "start": { @@ -20493,7 +20605,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "770" + "771" ], "location": { "end": { @@ -20515,7 +20627,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "770" + "771" ], "location": { "end": { @@ -20537,11 +20649,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "770" + "771" ], "location": { "end": { - "column": 65, + "column": 64, "line": 157 }, "start": { @@ -20559,7 +20671,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "771" + "772" ], "location": { "end": { @@ -20581,7 +20693,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "771" + "772" ], "location": { "end": { @@ -20603,11 +20715,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "771" + "772" ], "location": { "end": { - "column": 60, + "column": 59, "line": 165 }, "start": { @@ -20625,7 +20737,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "772" + "773" ], "location": { "end": { @@ -20647,7 +20759,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "772" + "773" ], "location": { "end": { @@ -20669,11 +20781,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "772" + "773" ], "location": { "end": { - "column": 59, + "column": 58, "line": 173 }, "start": { @@ -20691,7 +20803,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "773" + "774" ], "location": { "end": { @@ -20713,7 +20825,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "773" + "774" ], "location": { "end": { @@ -20735,11 +20847,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "773" + "774" ], "location": { "end": { - "column": 69, + "column": 68, "line": 181 }, "start": { @@ -20757,7 +20869,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "774" + "775" ], "location": { "end": { @@ -20779,7 +20891,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "774" + "775" ], "location": { "end": { @@ -20801,11 +20913,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "774" + "775" ], "location": { "end": { - "column": 67, + "column": 66, "line": 189 }, "start": { @@ -20823,7 +20935,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "775" + "776" ], "location": { "end": { @@ -20845,7 +20957,7 @@ "static": true, "killedBy": [], "coveredBy": [ - "775" + "776" ], "location": { "end": { @@ -20867,11 +20979,11 @@ "static": true, "killedBy": [], "coveredBy": [ - "775" + "776" ], "location": { "end": { - "column": 68, + "column": 67, "line": 197 }, "start": { @@ -20909,7 +21021,6 @@ "517", "518", "530", - "752", "753", "754", "755", @@ -20934,7 +21045,8 @@ "774", "775", "776", - "777" + "777", + "778" ], "location": { "end": { @@ -20951,12 +21063,12 @@ "id": "483", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -17,6 +17,7 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n+ \"tata\": \"toto\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts:288:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -17,6 +17,7 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n ],\n+ \"tata\": \"toto\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts:288:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 46, "static": true, "killedBy": [ - "776" + "777" ], "coveredBy": [ "143", @@ -20979,7 +21091,6 @@ "517", "518", "530", - "752", "753", "754", "755", @@ -21004,11 +21115,12 @@ "774", "775", "776", - "777" + "777", + "778" ], "location": { "end": { - "column": 125, + "column": 129, "line": 204 }, "start": { @@ -21021,9 +21133,13 @@ "id": "484", "mutatorName": "BooleanLiteral", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -17,6 +17,7 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n+ \"tata\": \"toto\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts:288:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 46, "static": true, - "killedBy": [], + "killedBy": [ + "777" + ], "coveredBy": [ "143", "144", @@ -21045,7 +21161,6 @@ "517", "518", "530", - "752", "753", "754", "755", @@ -21070,15 +21185,16 @@ "774", "775", "776", - "777" + "777", + "778" ], "location": { "end": { - "column": 123, + "column": 127, "line": 204 }, "start": { - "column": 119, + "column": 123, "line": 204 } } @@ -21116,7 +21232,6 @@ "519", "530", "531", - "752", "753", "754", "755", @@ -21140,7 +21255,8 @@ "773", "774", "775", - "777" + "776", + "778" ], "location": { "end": { @@ -21157,13 +21273,9 @@ "id": "486", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:705:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 49, + "status": "Timeout", "static": true, - "killedBy": [ - "519" - ], + "killedBy": [], "coveredBy": [ "143", "144", @@ -21189,7 +21301,6 @@ "519", "530", "531", - "752", "753", "754", "755", @@ -21213,11 +21324,12 @@ "773", "774", "775", - "777" + "776", + "778" ], "location": { "end": { - "column": 113, + "column": 117, "line": 208 }, "start": { @@ -21262,7 +21374,6 @@ "519", "530", "531", - "752", "753", "754", "755", @@ -21286,21 +21397,22 @@ "773", "774", "775", - "777" + "776", + "778" ], "location": { "end": { - "column": 111, + "column": 115, "line": 208 }, "start": { - "column": 107, + "column": 111, "line": 208 } } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GAME_PLAY_ACTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { GamePlaySource } from \"@/modules/game/schemas/game-play/game-play-source/game-play-source.schema\";\nimport { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nfunction createGamePlaySheriffSettlesVotes(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }),\n action: GAME_PLAY_ACTIONS.SETTLE_VOTES,\n ...gamePlay,\n });\n}\n\nfunction createGamePlaySheriffDelegates(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }),\n action: GAME_PLAY_ACTIONS.DELEGATE,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayAllVote(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PLAYER_GROUPS.ALL }),\n action: GAME_PLAY_ACTIONS.VOTE,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayAllElectSheriff(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PLAYER_GROUPS.ALL }),\n action: GAME_PLAY_ACTIONS.ELECT_SHERIFF,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayThiefChoosesCard(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.THIEF }),\n action: GAME_PLAY_ACTIONS.CHOOSE_CARD,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayStutteringJudgeChoosesSign(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.STUTTERING_JUDGE }),\n action: GAME_PLAY_ACTIONS.CHOOSE_SIGN,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayScapegoatBansVoting(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.SCAPEGOAT }),\n action: GAME_PLAY_ACTIONS.BAN_VOTING,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayDogWolfChoosesSide(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.DOG_WOLF }),\n action: GAME_PLAY_ACTIONS.CHOOSE_SIDE,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWildChildChoosesModel(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }),\n action: GAME_PLAY_ACTIONS.CHOOSE_MODEL,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayFoxSniffs(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.FOX }),\n action: GAME_PLAY_ACTIONS.SNIFF,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayCharmedMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PLAYER_GROUPS.CHARMED }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayLoversMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PLAYER_GROUPS.LOVERS }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayThreeBrothersMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.THREE_BROTHERS }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayTwoSistersMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.TWO_SISTERS }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayRavenMarks(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.RAVEN }),\n action: GAME_PLAY_ACTIONS.MARK,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayGuardProtects(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.GUARD }),\n action: GAME_PLAY_ACTIONS.PROTECT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayHunterShoots(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.HUNTER }),\n action: GAME_PLAY_ACTIONS.SHOOT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWitchUsesPotions(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.WITCH }),\n action: GAME_PLAY_ACTIONS.USE_POTIONS,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayPiedPiperCharms(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.PIED_PIPER }),\n action: GAME_PLAY_ACTIONS.CHARM,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayCupidCharms(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.CUPID }),\n action: GAME_PLAY_ACTIONS.CHARM,\n ...gamePlay,\n });\n}\n\nfunction createGamePlaySeerLooks(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.SEER }),\n action: GAME_PLAY_ACTIONS.LOOK,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWhiteWerewolfEats(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.WHITE_WEREWOLF }),\n action: GAME_PLAY_ACTIONS.EAT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayBigBadWolfEats(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: ROLE_NAMES.BIG_BAD_WOLF }),\n action: GAME_PLAY_ACTIONS.EAT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWerewolvesEat(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PLAYER_GROUPS.WEREWOLVES }),\n action: GAME_PLAY_ACTIONS.EAT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlaySource(gamePlaySource: GamePlaySource): GamePlaySource {\n return plainToInstance(GamePlaySource, gamePlaySource, { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true });\n}\n\nfunction createGamePlay(gamePlay: GamePlay): GamePlay {\n return plainToInstance(GamePlay, gamePlay, { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true });\n}\n\nexport {\n createGamePlaySheriffSettlesVotes,\n createGamePlaySheriffDelegates,\n createGamePlayAllVote,\n createGamePlayAllElectSheriff,\n createGamePlayThiefChoosesCard,\n createGamePlayStutteringJudgeChoosesSign,\n createGamePlayScapegoatBansVoting,\n createGamePlayDogWolfChoosesSide,\n createGamePlayWildChildChoosesModel,\n createGamePlayFoxSniffs,\n createGamePlayCharmedMeetEachOther,\n createGamePlayLoversMeetEachOther,\n createGamePlayThreeBrothersMeetEachOther,\n createGamePlayTwoSistersMeetEachOther,\n createGamePlayRavenMarks,\n createGamePlayGuardProtects,\n createGamePlayHunterShoots,\n createGamePlayWitchUsesPotions,\n createGamePlayPiedPiperCharms,\n createGamePlayCupidCharms,\n createGamePlaySeerLooks,\n createGamePlayWhiteWerewolfEats,\n createGamePlayBigBadWolfEats,\n createGamePlayWerewolvesEat,\n createGamePlaySource,\n createGamePlay,\n};" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GamePlayActions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { GamePlaySource } from \"@/modules/game/schemas/game-play/game-play-source/game-play-source.schema\";\nimport { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nfunction createGamePlaySheriffSettlesVotes(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PlayerAttributeNames.SHERIFF }),\n action: GamePlayActions.SETTLE_VOTES,\n ...gamePlay,\n });\n}\n\nfunction createGamePlaySheriffDelegates(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PlayerAttributeNames.SHERIFF }),\n action: GamePlayActions.DELEGATE,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayAllVote(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PlayerGroups.ALL }),\n action: GamePlayActions.VOTE,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayAllElectSheriff(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PlayerGroups.ALL }),\n action: GamePlayActions.ELECT_SHERIFF,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayThiefChoosesCard(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.THIEF }),\n action: GamePlayActions.CHOOSE_CARD,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayStutteringJudgeChoosesSign(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.STUTTERING_JUDGE }),\n action: GamePlayActions.CHOOSE_SIGN,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayScapegoatBansVoting(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.SCAPEGOAT }),\n action: GamePlayActions.BAN_VOTING,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayDogWolfChoosesSide(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.DOG_WOLF }),\n action: GamePlayActions.CHOOSE_SIDE,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWildChildChoosesModel(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.WILD_CHILD }),\n action: GamePlayActions.CHOOSE_MODEL,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayFoxSniffs(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.FOX }),\n action: GamePlayActions.SNIFF,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayCharmedMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PlayerGroups.CHARMED }),\n action: GamePlayActions.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayLoversMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PlayerGroups.LOVERS }),\n action: GamePlayActions.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayThreeBrothersMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.THREE_BROTHERS }),\n action: GamePlayActions.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayTwoSistersMeetEachOther(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.TWO_SISTERS }),\n action: GamePlayActions.MEET_EACH_OTHER,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayRavenMarks(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.RAVEN }),\n action: GamePlayActions.MARK,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayGuardProtects(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.GUARD }),\n action: GamePlayActions.PROTECT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayHunterShoots(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.HUNTER }),\n action: GamePlayActions.SHOOT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWitchUsesPotions(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.WITCH }),\n action: GamePlayActions.USE_POTIONS,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayPiedPiperCharms(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.PIED_PIPER }),\n action: GamePlayActions.CHARM,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayCupidCharms(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.CUPID }),\n action: GamePlayActions.CHARM,\n ...gamePlay,\n });\n}\n\nfunction createGamePlaySeerLooks(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.SEER }),\n action: GamePlayActions.LOOK,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWhiteWerewolfEats(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.WHITE_WEREWOLF }),\n action: GamePlayActions.EAT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayBigBadWolfEats(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: RoleNames.BIG_BAD_WOLF }),\n action: GamePlayActions.EAT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlayWerewolvesEat(gamePlay: Partial = {}): GamePlay {\n return createGamePlay({\n source: createGamePlaySource({ name: PlayerGroups.WEREWOLVES }),\n action: GamePlayActions.EAT,\n ...gamePlay,\n });\n}\n\nfunction createGamePlaySource(gamePlaySource: GamePlaySource): GamePlaySource {\n return plainToInstance(GamePlaySource, gamePlaySource, { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true });\n}\n\nfunction createGamePlay(gamePlay: GamePlay): GamePlay {\n return plainToInstance(GamePlay, gamePlay, { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true });\n}\n\nexport {\n createGamePlaySheriffSettlesVotes,\n createGamePlaySheriffDelegates,\n createGamePlayAllVote,\n createGamePlayAllElectSheriff,\n createGamePlayThiefChoosesCard,\n createGamePlayStutteringJudgeChoosesSign,\n createGamePlayScapegoatBansVoting,\n createGamePlayDogWolfChoosesSide,\n createGamePlayWildChildChoosesModel,\n createGamePlayFoxSniffs,\n createGamePlayCharmedMeetEachOther,\n createGamePlayLoversMeetEachOther,\n createGamePlayThreeBrothersMeetEachOther,\n createGamePlayTwoSistersMeetEachOther,\n createGamePlayRavenMarks,\n createGamePlayGuardProtects,\n createGamePlayHunterShoots,\n createGamePlayWitchUsesPotions,\n createGamePlayPiedPiperCharms,\n createGamePlayCupidCharms,\n createGamePlaySeerLooks,\n createGamePlayWhiteWerewolfEats,\n createGamePlayBigBadWolfEats,\n createGamePlayWerewolvesEat,\n createGamePlaySource,\n createGamePlay,\n};" }, "src/modules/game/helpers/game-play/game-play.helper.ts": { "language": "typescript", @@ -21317,11 +21429,11 @@ "529", "530", "531", - "778", "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21346,11 +21458,11 @@ "529", "530", "531", - "778", "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21375,11 +21487,11 @@ "529", "530", "531", - "778", "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21404,11 +21516,11 @@ "529", "530", "531", - "778", "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21432,7 +21544,7 @@ "coveredBy": [ "529", "531", - "778" + "779" ], "location": { "end": { @@ -21455,10 +21567,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21481,10 +21593,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21507,10 +21619,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21533,10 +21645,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21558,7 +21670,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "779" + "780" ], "location": { "end": { @@ -21581,10 +21693,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21607,10 +21719,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21633,10 +21745,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21658,7 +21770,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "780" + "781" ], "location": { "end": { @@ -21680,14 +21792,14 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { - "column": 103, + "column": 107, "line": 31 }, "start": { @@ -21705,22 +21817,22 @@ "testsCompleted": 5, "static": false, "killedBy": [ - "781" + "782" ], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { - "column": 101, + "column": 105, "line": 31 }, "start": { - "column": 97, + "column": 101, "line": 31 } } @@ -21729,19 +21841,19 @@ "id": "504", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 74\n+ Received + 1\n\n- Array [\n- MakeGamePlayVoteWithRelationsDto {\n- \"source\": Player {\n- \"_id\": \"6d4e3ed4cb99f6e63adfb2a1\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Bernadine\",\n- \"position\": 6763792432103424,\n- \"role\": PlayerRole {\n- \"current\": \"dog-wolf\",\n- \"isRevealed\": true,\n- \"original\": \"stuttering-judge\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- \"target\": Player {\n- \"_id\": \"f99ab4de58c0cbe5a7c4cd6d\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Burdette\",\n- \"position\": 7204206230372352,\n- \"role\": PlayerRole {\n- \"current\": \"raven\",\n- \"isRevealed\": false,\n- \"original\": \"villager-villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"villagers\",\n- },\n- },\n- },\n- MakeGamePlayVoteWithRelationsDto {\n- \"source\": Player {\n- \"_id\": \"f99ab4de58c0cbe5a7c4cd6d\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Burdette\",\n- \"position\": 7204206230372352,\n- \"role\": PlayerRole {\n- \"current\": \"raven\",\n- \"isRevealed\": false,\n- \"original\": \"villager-villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"villagers\",\n- },\n- },\n- \"target\": Player {\n- \"_id\": \"6d4e3ed4cb99f6e63adfb2a1\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Bernadine\",\n- \"position\": 6763792432103424,\n- \"role\": PlayerRole {\n- \"current\": \"dog-wolf\",\n- \"isRevealed\": true,\n- \"original\": \"stuttering-judge\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:76:21)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "530" + "782" ], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21764,10 +21876,10 @@ "killedBy": [], "coveredBy": [ "530", - "779", "780", "781", - "788" + "782", + "789" ], "location": { "end": { @@ -21793,10 +21905,10 @@ "529", "530", "531", - "782", "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -21822,10 +21934,10 @@ "529", "530", "531", - "782", "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -21851,10 +21963,10 @@ "529", "530", "531", - "782", "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -21880,10 +21992,10 @@ "529", "530", "531", - "782", "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -21907,7 +22019,7 @@ "coveredBy": [ "529", "530", - "782" + "783" ], "location": { "end": { @@ -21931,9 +22043,9 @@ "coveredBy": [ "528", "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -21957,9 +22069,9 @@ "coveredBy": [ "528", "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -21983,9 +22095,9 @@ "coveredBy": [ "528", "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -22009,9 +22121,9 @@ "coveredBy": [ "528", "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -22034,7 +22146,7 @@ "killedBy": [], "coveredBy": [ "528", - "783" + "784" ], "location": { "end": { @@ -22051,22 +22163,22 @@ "id": "516", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 7\n\n@@ -1,7 +1,8 @@\n Array [\n MakeGamePlayTargetWithRelationsDto {\n+ \"drankPotion\": undefined,\n \"isInfected\": true,\n \"player\": Player {\n \"_id\": \"8a4e47106cafd0fccc41b453\",\n \"attributes\": Array [],\n \"death\": undefined,\n@@ -16,12 +17,15 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"8a4e47106cafd0fccc41b453\",\n },\n MakeGamePlayTargetWithRelationsDto {\n+ \"drankPotion\": undefined,\n+ \"isInfected\": undefined,\n \"player\": Player {\n \"_id\": \"a256aa83e7beeb8afafad185\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": false,\n@@ -35,13 +39,15 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n+ \"playerId\": \"a256aa83e7beeb8afafad185\",\n },\n MakeGamePlayTargetWithRelationsDto {\n \"drankPotion\": \"death\",\n+ \"isInfected\": undefined,\n \"player\": Player {\n \"_id\": \"6e6907cce6e46e0d36baeeb2\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": false,\n@@ -55,7 +61,8 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"6e6907cce6e46e0d36baeeb2\",\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:118:81)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 7\n\n@@ -1,7 +1,8 @@\n Array [\n MakeGamePlayTargetWithRelationsDto {\n+ \"drankPotion\": undefined,\n \"isInfected\": true,\n \"player\": Player {\n \"_id\": \"5eb769640a3ae4205e5f9c3f\",\n \"attributes\": Array [],\n \"death\": undefined,\n@@ -16,12 +17,15 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"5eb769640a3ae4205e5f9c3f\",\n },\n MakeGamePlayTargetWithRelationsDto {\n+ \"drankPotion\": undefined,\n+ \"isInfected\": undefined,\n \"player\": Player {\n \"_id\": \"5c577cae40db628a3eafc04f\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": false,\n@@ -35,13 +39,15 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"5c577cae40db628a3eafc04f\",\n },\n MakeGamePlayTargetWithRelationsDto {\n \"drankPotion\": \"death\",\n+ \"isInfected\": undefined,\n \"player\": Player {\n \"_id\": \"5e103cf04bc80c293d1bcf1e\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n@@ -55,7 +61,8 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"5e103cf04bc80c293d1bcf1e\",\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:118:81)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "784" + "785" ], "coveredBy": [ "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { - "column": 103, + "column": 107, "line": 48 }, "start": { @@ -22079,26 +22191,26 @@ "id": "517", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 3\n\n@@ -16,10 +16,11 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n+ \"playerId\": \"18902fba8eabda84f328afc2\",\n },\n MakeGamePlayTargetWithRelationsDto {\n \"player\": Player {\n \"_id\": \"3e9af4f37b5d733441f5150f\",\n \"attributes\": Array [],\n@@ -35,10 +36,11 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n+ \"playerId\": \"3e9af4f37b5d733441f5150f\",\n },\n MakeGamePlayTargetWithRelationsDto {\n \"drankPotion\": \"death\",\n \"player\": Player {\n \"_id\": \"285fccc1ff9b0b03083bef86\",\n@@ -55,7 +57,8 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"285fccc1ff9b0b03083bef86\",\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:118:81)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 3\n\n@@ -16,10 +16,11 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"ea8af9b3919414f7b1856e17\",\n },\n MakeGamePlayTargetWithRelationsDto {\n \"player\": Player {\n \"_id\": \"0edb421eeaaf2f5aaffde01e\",\n \"attributes\": Array [],\n@@ -35,10 +36,11 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n+ \"playerId\": \"0edb421eeaaf2f5aaffde01e\",\n },\n MakeGamePlayTargetWithRelationsDto {\n \"drankPotion\": \"death\",\n \"player\": Player {\n \"_id\": \"daf9f1face9ace65db9a9dea\",\n@@ -55,7 +57,8 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ \"playerId\": \"daf9f1face9ace65db9a9dea\",\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:118:81)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "784" + "785" ], "coveredBy": [ "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { - "column": 101, + "column": 105, "line": 48 }, "start": { - "column": 97, + "column": 101, "line": 48 } } @@ -22107,18 +22219,14 @@ "id": "518", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 61\n+ Received + 1\n\n- Array [\n- MakeGamePlayTargetWithRelationsDto {\n- \"isInfected\": true,\n- \"player\": Player {\n- \"_id\": \"56bcafdf1ddfd69de6c4ab5f\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Alexandra\",\n- \"position\": 1795170280407040,\n- \"role\": PlayerRole {\n- \"current\": \"raven\",\n- \"isRevealed\": true,\n- \"original\": \"hunter\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"werewolves\",\n- },\n- },\n- },\n- MakeGamePlayTargetWithRelationsDto {\n- \"player\": Player {\n- \"_id\": \"eb872fe14aa6ffd112b5edb3\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Mayra\",\n- \"position\": 521106173722624,\n- \"role\": PlayerRole {\n- \"current\": \"fox\",\n- \"isRevealed\": true,\n- \"original\": \"angel\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"werewolves\",\n- },\n- },\n- },\n- MakeGamePlayTargetWithRelationsDto {\n- \"drankPotion\": \"death\",\n- \"player\": Player {\n- \"_id\": \"b034ccddba1c00aeadbaedab\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Aditya\",\n- \"position\": 2698096775528448,\n- \"role\": PlayerRole {\n- \"current\": \"cupid\",\n- \"isRevealed\": true,\n- \"original\": \"stuttering-judge\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"villagers\",\n- },\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:118:81)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "784" - ], + "killedBy": [], "coveredBy": [ "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -22142,9 +22250,9 @@ "coveredBy": [ "528", "531", - "783", "784", - "788" + "785", + "789" ], "location": { "end": { @@ -22170,10 +22278,10 @@ "529", "530", "531", - "785", "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -22190,7 +22298,7 @@ "id": "521", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(59,68): error TS2345: Argument of type 'ObjectId | undefined' is not assignable to parameter of type 'ObjectId'.\n Type 'undefined' is not assignable to type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(61,78): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(59,68): error TS2345: Argument of type 'ObjectId | undefined' is not assignable to parameter of type 'ObjectId'.\n Type 'undefined' is not assignable to type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(61,77): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -22199,10 +22307,10 @@ "529", "530", "531", - "785", "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -22219,7 +22327,7 @@ "id": "522", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(59,68): error TS2345: Argument of type 'ObjectId | undefined' is not assignable to parameter of type 'ObjectId'.\n Type 'undefined' is not assignable to type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(61,78): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(59,68): error TS2345: Argument of type 'ObjectId | undefined' is not assignable to parameter of type 'ObjectId'.\n Type 'undefined' is not assignable to type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(61,77): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -22228,10 +22336,10 @@ "529", "530", "531", - "785", "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -22248,7 +22356,7 @@ "id": "523", "mutatorName": "EqualityOperator", "replacement": "makeGamePlayDto.chosenCardId !== undefined", - "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(59,68): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(61,78): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(59,68): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(61,77): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -22257,10 +22365,10 @@ "529", "530", "531", - "785", "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -22277,7 +22385,7 @@ "id": "524", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(57,68): error TS2345: Argument of type 'ObjectId | undefined' is not assignable to parameter of type 'ObjectId'.\n Type 'undefined' is not assignable to type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(59,78): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(57,68): error TS2345: Argument of type 'ObjectId | undefined' is not assignable to parameter of type 'ObjectId'.\n Type 'undefined' is not assignable to type 'ObjectId'.\nsrc/modules/game/helpers/game-play/game-play.helper.ts(59,77): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -22286,7 +22394,7 @@ "529", "530", "531", - "785" + "786" ], "location": { "end": { @@ -22308,12 +22416,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "787" + "788" ], "coveredBy": [ - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -22330,14 +22438,14 @@ "id": "526", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(61,78): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-play/game-play.helper.ts(61,77): error TS18048: 'makeGamePlayDto.chosenCardId' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -22354,17 +22462,17 @@ "id": "527", "mutatorName": "EqualityOperator", "replacement": "chosenCard !== undefined", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:135:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:135:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "786" + "787" ], "coveredBy": [ - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -22381,15 +22489,11 @@ "id": "528", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:135:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "786" - ], + "killedBy": [], "coveredBy": [ - "786" + "787" ], "location": { "end": { @@ -22415,7 +22519,7 @@ "529", "530", "531", - "788" + "789" ], "location": { "end": { @@ -22432,22 +22536,22 @@ "id": "530", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -3,10 +3,11 @@\n \"_id\": \"e85ef6eca05bd4d3c863b745\",\n \"isUsed\": false,\n \"recipient\": \"thief\",\n \"roleName\": \"dog-wolf\",\n },\n+ \"chosenCardId\": \"e85ef6eca05bd4d3c863b745\",\n \"chosenSide\": \"werewolves\",\n \"doesJudgeRequestAnotherVote\": true,\n \"targets\": Array [\n MakeGamePlayTargetWithRelationsDto {\n \"isInfected\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:179:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -3,10 +3,11 @@\n \"_id\": \"bc2c856bb8865f75eca2063c\",\n \"isUsed\": false,\n \"recipient\": \"thief\",\n \"roleName\": \"thief\",\n },\n+ \"chosenCardId\": \"bc2c856bb8865f75eca2063c\",\n \"chosenSide\": \"werewolves\",\n \"doesJudgeRequestAnotherVote\": true,\n \"targets\": Array [\n MakeGamePlayTargetWithRelationsDto {\n \"isInfected\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:179:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "788" + "789" ], "coveredBy": [ "529", "530", "531", - "788" + "789" ], "location": { "end": { - "column": 170, + "column": 174, "line": 70 }, "start": { @@ -22460,26 +22564,26 @@ "id": "531", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -3,10 +3,11 @@\n \"_id\": \"fdbe25ceacc610ec4b8cba8a\",\n \"isUsed\": false,\n \"recipient\": \"thief\",\n \"roleName\": \"pied-piper\",\n },\n+ \"chosenCardId\": \"fdbe25ceacc610ec4b8cba8a\",\n \"chosenSide\": \"werewolves\",\n \"doesJudgeRequestAnotherVote\": true,\n \"targets\": Array [\n MakeGamePlayTargetWithRelationsDto {\n \"isInfected\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:179:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -3,10 +3,11 @@\n \"_id\": \"dfcec0acc70c8caafe89707a\",\n \"isUsed\": true,\n \"recipient\": \"thief\",\n \"roleName\": \"scapegoat\",\n },\n+ \"chosenCardId\": \"dfcec0acc70c8caafe89707a\",\n \"chosenSide\": \"werewolves\",\n \"doesJudgeRequestAnotherVote\": true,\n \"targets\": Array [\n MakeGamePlayTargetWithRelationsDto {\n \"isInfected\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:179:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "788" + "789" ], "coveredBy": [ "529", "530", "531", - "788" + "789" ], "location": { "end": { - "column": 168, + "column": 172, "line": 70 }, "start": { - "column": 164, + "column": 168, "line": 70 } } @@ -22498,8 +22602,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22516,12 +22620,12 @@ "id": "533", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 0\nReceived: -1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:193:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "790" + "530" ], "coveredBy": [ "156", @@ -22529,8 +22633,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22538,7 +22642,7 @@ "line": 81 }, "start": { - "column": 64, + "column": 67, "line": 78 } } @@ -22547,12 +22651,12 @@ "id": "534", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "789" + "790" ], "coveredBy": [ "156", @@ -22560,8 +22664,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22578,12 +22682,12 @@ "id": "535", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 0\nReceived: -1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:193:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 0\nReceived: -1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:193:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "790" + "791" ], "coveredBy": [ "156", @@ -22591,8 +22695,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22609,17 +22713,21 @@ "id": "536", "mutatorName": "LogicalOperator", "replacement": "source.name === play.source.name && action === play.action || cause === play.cause", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "790" + ], "coveredBy": [ "156", "157", "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22636,7 +22744,7 @@ "id": "537", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 55\n+ Received + 7\n\n@@ -1,78 +1,29 @@\n Object {\n \"_id\": \"cbfe7accbbec6cffc0afdcbc\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"04c18b23fecbf73e5d6f5dc8\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Lera\",\n- \"position\": 1435715749543936,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"3690caecd183e8bbf6cedba3\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Martine\",\n \"position\": 3365021255991296,\n \"role\": Object {\n \"current\": \"seer\",\n \"isRevealed\": false,\n \"original\": \"seer\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"cdf17c1a25b8b45cc3dd41be\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Tom\",\n- \"position\": 3670919021068288,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"063ebc6cc9dad5e3fc75a045\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Levi\",\n- \"position\": 6050767821602816,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -219,19 +170,20 @@\n \"status\": \"playing\",\n \"tick\": 3366136164909057,\n \"turn\": 7899601602347008,\n \"upcomingPlays\": Array [\n Object {\n- \"action\": \"look\",\n+ \"action\": \"eat\",\n \"source\": Object {\n- \"name\": \"seer\",\n+ \"name\": \"werewolves\",\n },\n },\n Object {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"all\",\n },\n },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 55\n+ Received + 7\n\n@@ -1,78 +1,29 @@\n Object {\n \"_id\": \"ebba1b7d70dcb6c1d1d9360e\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"a572de152c4a197f2b81b2c7\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Verdie\",\n- \"position\": 3153276027535360,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"889ec6d5ba50dbf95e4bfcea\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Gregoria\",\n \"position\": 6546819960012800,\n \"role\": Object {\n \"current\": \"seer\",\n \"isRevealed\": false,\n \"original\": \"seer\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"8ac7cfa780dab8a4ce15e125\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Frida\",\n- \"position\": 5535472145137664,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"acbba79affcf5e0fe0d4a137\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Flavio\",\n- \"position\": 5237958128959488,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -219,19 +170,20 @@\n \"status\": \"playing\",\n \"tick\": 848008723824641,\n \"turn\": 4380959661096960,\n \"upcomingPlays\": Array [\n Object {\n- \"action\": \"look\",\n+ \"action\": \"eat\",\n \"source\": Object {\n- \"name\": \"seer\",\n+ \"name\": \"werewolves\",\n },\n },\n Object {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"all\",\n },\n },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -22649,8 +22757,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22667,12 +22775,12 @@ "id": "538", "mutatorName": "LogicalOperator", "replacement": "source.name === play.source.name || action === play.action", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "789" + "790" ], "coveredBy": [ "156", @@ -22680,8 +22788,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22698,12 +22806,12 @@ "id": "539", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 22\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -49,19 +49,19 @@\n },\n GamePlay {\n \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n+ \"name\": \"big-bad-wolf\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"big-bad-wolf\",\n+ \"name\": \"werewolves\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"use-potions\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:468:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "789" + "159" ], "coveredBy": [ "156", @@ -22711,8 +22819,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22729,12 +22837,12 @@ "id": "540", "mutatorName": "EqualityOperator", "replacement": "source.name !== play.source.name", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 22\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nThrown value: undefined\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:424:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "789" + "156" ], "coveredBy": [ "156", @@ -22742,8 +22850,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22760,12 +22868,12 @@ "id": "541", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 6\n+ Received + 6\n\n@@ -6,36 +6,36 @@\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"elect-sheriff\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"stuttering-judge-request\",\n+ \"action\": \"elect-sheriff\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"vote\",\n- \"cause\": undefined,\n+ \"cause\": \"stuttering-judge-request\",\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:468:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "789" + "159" ], "coveredBy": [ "156", @@ -22773,8 +22881,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22791,12 +22899,12 @@ "id": "542", "mutatorName": "EqualityOperator", "replacement": "action !== play.action", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: -1\nReceived: 13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:187:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nThrown value: undefined\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:424:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "789" + "156" ], "coveredBy": [ "156", @@ -22804,8 +22912,8 @@ "159", "530", "531", - "789", - "790" + "790", + "791" ], "location": { "end": { @@ -22822,7 +22930,7 @@ "id": "543", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -22835,7 +22943,7 @@ "159", "530", "531", - "790" + "791" ], "location": { "end": { @@ -22852,12 +22960,12 @@ "id": "544", "mutatorName": "EqualityOperator", "replacement": "cause !== play.cause", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 0\nReceived: -1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:193:47)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nThrown value: undefined\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:424:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "790" + "156" ], "coveredBy": [ "156", @@ -22865,7 +22973,7 @@ "159", "530", "531", - "790" + "791" ], "location": { "end": { @@ -22893,10 +23001,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -22918,7 +23026,7 @@ "testsCompleted": 10, "static": false, "killedBy": [ - "792" + "793" ], "coveredBy": [ "149", @@ -22927,10 +23035,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -22952,7 +23060,7 @@ "testsCompleted": 10, "static": false, "killedBy": [ - "791" + "792" ], "coveredBy": [ "149", @@ -22961,10 +23069,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -22986,7 +23094,7 @@ "testsCompleted": 10, "static": false, "killedBy": [ - "792" + "793" ], "coveredBy": [ "149", @@ -22995,10 +23103,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -23029,10 +23137,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -23049,9 +23157,13 @@ "id": "550", "mutatorName": "LogicalOperator", "replacement": "playA.action === playB.action || playA.cause === playB.cause", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:361:109)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 10, "static": false, - "killedBy": [], + "killedBy": [ + "152" + ], "coveredBy": [ "149", "150", @@ -23059,10 +23171,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -23093,10 +23205,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -23113,9 +23225,13 @@ "id": "552", "mutatorName": "EqualityOperator", "replacement": "playA.action !== playB.action", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:313:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 10, "static": false, - "killedBy": [], + "killedBy": [ + "149" + ], "coveredBy": [ "149", "150", @@ -23123,10 +23239,10 @@ "152", "530", "531", - "791", "792", "793", - "794" + "794", + "795" ], "location": { "end": { @@ -23148,7 +23264,7 @@ "testsCompleted": 8, "static": false, "killedBy": [ - "794" + "795" ], "coveredBy": [ "149", @@ -23156,9 +23272,9 @@ "151", "530", "531", - "791", "792", - "794" + "793", + "795" ], "location": { "end": { @@ -23175,12 +23291,12 @@ "id": "554", "mutatorName": "EqualityOperator", "replacement": "playA.cause !== playB.cause", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 32\n+ Received + 23\n\n@@ -1,49 +1,27 @@\n Object {\n \"_id\": \"a50827f1dcafbabd0ab4ab67\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"eat\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"8a4a3f78de9f724ebefadcd2\",\n- \"attributes\": Array [\n- Object {\n- \"name\": \"seen\",\n- \"remainingPhases\": 1,\n- \"source\": \"seer\",\n- },\n- ],\n- \"isAlive\": true,\n- \"name\": \"Helmer\",\n- \"position\": 1209201848221696,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n- \"_id\": \"c9c4b75ebd30435a6bdeed1c\",\n+ \"_id\": \"f8da50a11cbcdbebea13a211\",\n \"attributes\": Array [],\n \"isAlive\": true,\n- \"name\": \"Laurel\",\n- \"position\": 5675058630492160,\n+ \"name\": \"Laverna\",\n+ \"position\": 6217065264316416,\n \"role\": Object {\n- \"current\": \"werewolf\",\n+ \"current\": \"seer\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"seer\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ],\n },\n },\n@@ -196,8 +174,21 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 5553730181136385,\n \"turn\": 2472167224639488,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:313:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "531" + "149" ], "coveredBy": [ "149", @@ -23188,9 +23304,9 @@ "151", "530", "531", - "791", "792", - "794" + "793", + "795" ], "location": { "end": { @@ -23212,7 +23328,7 @@ "testsCompleted": 7, "static": false, "killedBy": [ - "792" + "793" ], "coveredBy": [ "149", @@ -23220,8 +23336,8 @@ "151", "530", "531", - "791", - "792" + "792", + "793" ], "location": { "end": { @@ -23251,8 +23367,8 @@ "151", "530", "531", - "791", - "792" + "792", + "793" ], "location": { "end": { @@ -23266,7 +23382,7 @@ } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { gamePlaysPriorityList } from \"@/modules/game/constants/game-play/game-play.constant\";\nimport { MakeGamePlayTargetWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto\";\nimport { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport type { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { getAdditionalCardWithId, getPlayerWithId } from \"@/modules/game/helpers/game.helper\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { RESOURCE_NOT_FOUND_REASONS } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nfunction getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game: Game): MakeGamePlayVoteWithRelationsDto[] | undefined {\n if (makeGamePlayDto.votes === undefined) {\n return;\n }\n return makeGamePlayDto.votes.reduce((acc, vote) => {\n const source = getPlayerWithId(game, vote.sourceId);\n const target = getPlayerWithId(game, vote.targetId);\n if (source === undefined) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, vote.sourceId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE);\n }\n if (target === undefined) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, vote.targetId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET);\n }\n const plainToInstanceOptions = { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true };\n const voteWithRelations = plainToInstance(MakeGamePlayVoteWithRelationsDto, vote, plainToInstanceOptions);\n voteWithRelations.source = source;\n voteWithRelations.target = target;\n return [...acc, voteWithRelations];\n }, []);\n}\n\nfunction getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game: Game): MakeGamePlayTargetWithRelationsDto[] | undefined {\n if (makeGamePlayDto.targets === undefined) {\n return;\n }\n return makeGamePlayDto.targets.reduce((acc, target) => {\n const player = getPlayerWithId(game, target.playerId);\n if (player === undefined) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, target.playerId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_TARGET);\n }\n const plainToInstanceOptions = { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true };\n const targetWithRelations = plainToInstance(MakeGamePlayTargetWithRelationsDto, target, plainToInstanceOptions);\n targetWithRelations.player = player;\n return [...acc, targetWithRelations];\n }, []);\n}\n\nfunction getChosenCardFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game: Game): GameAdditionalCard | undefined {\n if (makeGamePlayDto.chosenCardId === undefined) {\n return;\n }\n const chosenCard = getAdditionalCardWithId(game.additionalCards, makeGamePlayDto.chosenCardId);\n if (chosenCard === undefined) {\n throw new ResourceNotFoundException(API_RESOURCES.GAME_ADDITIONAL_CARDS, makeGamePlayDto.chosenCardId.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_CHOSEN_CARD);\n }\n return chosenCard;\n}\n\nfunction createMakeGamePlayDtoWithRelations(makeGamePlayDto: MakeGamePlayDto, game: Game): MakeGamePlayWithRelationsDto {\n const chosenCard = getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game);\n const targets = getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game);\n const votes = getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game);\n const makeGamePlayWithRelationsDto = plainToInstance(MakeGamePlayWithRelationsDto, makeGamePlayDto, { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true });\n makeGamePlayWithRelationsDto.chosenCard = chosenCard;\n makeGamePlayWithRelationsDto.targets = targets;\n makeGamePlayWithRelationsDto.votes = votes;\n return makeGamePlayWithRelationsDto;\n}\n\nfunction findPlayPriorityIndex(play: GamePlay): number {\n return gamePlaysPriorityList.findIndex(playInPriorityList => {\n const { source, action, cause } = playInPriorityList;\n return source.name === play.source.name && action === play.action && cause === play.cause;\n });\n}\n\nfunction areGamePlaysEqual(playA: GamePlay, playB: GamePlay): boolean {\n return playA.action === playB.action && playA.cause === playB.cause && playA.source.name === playB.source.name;\n}\n\nexport {\n getVotesWithRelationsFromMakeGamePlayDto,\n getTargetsWithRelationsFromMakeGamePlayDto,\n getChosenCardFromMakeGamePlayDto,\n createMakeGamePlayDtoWithRelations,\n findPlayPriorityIndex,\n areGamePlaysEqual,\n};" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GAME_PLAYS_PRIORITY_LIST } from \"@/modules/game/constants/game-play/game-play.constant\";\nimport { MakeGamePlayTargetWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto\";\nimport { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport type { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { getAdditionalCardWithId, getPlayerWithId } from \"@/modules/game/helpers/game.helper\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { ResourceNotFoundReasons } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nfunction getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game: Game): MakeGamePlayVoteWithRelationsDto[] | undefined {\n if (makeGamePlayDto.votes === undefined) {\n return;\n }\n return makeGamePlayDto.votes.reduce((acc, vote) => {\n const source = getPlayerWithId(game, vote.sourceId);\n const target = getPlayerWithId(game, vote.targetId);\n if (source === undefined) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, vote.sourceId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE);\n }\n if (target === undefined) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, vote.targetId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET);\n }\n const plainToInstanceOptions = { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true };\n const voteWithRelations = plainToInstance(MakeGamePlayVoteWithRelationsDto, vote, plainToInstanceOptions);\n voteWithRelations.source = source;\n voteWithRelations.target = target;\n return [...acc, voteWithRelations];\n }, []);\n}\n\nfunction getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game: Game): MakeGamePlayTargetWithRelationsDto[] | undefined {\n if (makeGamePlayDto.targets === undefined) {\n return;\n }\n return makeGamePlayDto.targets.reduce((acc, target) => {\n const player = getPlayerWithId(game, target.playerId);\n if (player === undefined) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, target.playerId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_TARGET);\n }\n const plainToInstanceOptions = { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true };\n const targetWithRelations = plainToInstance(MakeGamePlayTargetWithRelationsDto, target, plainToInstanceOptions);\n targetWithRelations.player = player;\n return [...acc, targetWithRelations];\n }, []);\n}\n\nfunction getChosenCardFromMakeGamePlayDto(makeGamePlayDto: MakeGamePlayDto, game: Game): GameAdditionalCard | undefined {\n if (makeGamePlayDto.chosenCardId === undefined) {\n return;\n }\n const chosenCard = getAdditionalCardWithId(game.additionalCards, makeGamePlayDto.chosenCardId);\n if (chosenCard === undefined) {\n throw new ResourceNotFoundException(ApiResources.GAME_ADDITIONAL_CARDS, makeGamePlayDto.chosenCardId.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_CHOSEN_CARD);\n }\n return chosenCard;\n}\n\nfunction createMakeGamePlayDtoWithRelations(makeGamePlayDto: MakeGamePlayDto, game: Game): MakeGamePlayWithRelationsDto {\n const chosenCard = getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game);\n const targets = getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game);\n const votes = getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game);\n const makeGamePlayWithRelationsDto = plainToInstance(MakeGamePlayWithRelationsDto, makeGamePlayDto, { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true });\n makeGamePlayWithRelationsDto.chosenCard = chosenCard;\n makeGamePlayWithRelationsDto.targets = targets;\n makeGamePlayWithRelationsDto.votes = votes;\n return makeGamePlayWithRelationsDto;\n}\n\nfunction findPlayPriorityIndex(play: GamePlay): number {\n return GAME_PLAYS_PRIORITY_LIST.findIndex(playInPriorityList => {\n const { source, action, cause } = playInPriorityList;\n return source.name === play.source.name && action === play.action && cause === play.cause;\n });\n}\n\nfunction areGamePlaysEqual(playA: GamePlay, playB: GamePlay): boolean {\n return playA.action === playB.action && playA.cause === playB.cause && playA.source.name === playB.source.name;\n}\n\nexport {\n getVotesWithRelationsFromMakeGamePlayDto,\n getTargetsWithRelationsFromMakeGamePlayDto,\n getChosenCardFromMakeGamePlayDto,\n createMakeGamePlayDtoWithRelations,\n findPlayPriorityIndex,\n areGamePlaysEqual,\n};" }, "src/modules/game/helpers/game-victory/game-victory.helper.ts": { "language": "typescript", @@ -23282,19 +23398,19 @@ "coveredBy": [ "530", "531", - "638", "639", "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -23311,33 +23427,33 @@ "id": "558", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:36:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 1624213955805185,\n \"turn\": 2828385927561216,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"410cebb214dedc4d9d1e0dd8\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Dolores\",\n+ \"position\": 7218647338582016,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"0e63a124a3dea790dfd3ccea\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Earl\",\n+ \"position\": 4747357023371264,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "638" + "530" ], "coveredBy": [ "530", "531", - "638", "639", "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 18 }, "start": { @@ -23350,33 +23466,33 @@ "id": "559", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "641" + "642" ], "coveredBy": [ "530", "531", - "638", "639", "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 18 }, "start": { @@ -23388,34 +23504,34 @@ { "id": "560", "mutatorName": "LogicalOperator", - "replacement": "werewolvesSidedPlayers.length > 0 || !game.players.some(({\n side,\n isAlive\n}) => side.current === ROLE_SIDES.VILLAGERS && isAlive)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 6242541227737089,\n \"turn\": 1595350366289920,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"30fb9becf99d3cc4b98a03e3\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Myriam\",\n+ \"position\": 4520201225764864,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"9d7abb9cf2afecc9ed05f2aa\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Verdie\",\n+ \"position\": 2986876195569664,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "werewolvesSidedPlayers.length > 0 || !game.players.some(({\n side,\n isAlive\n}) => side.current === RoleSides.VILLAGERS && isAlive)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:36:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "530" + "639" ], "coveredBy": [ "530", "531", - "638", "639", "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 18 }, "start": { @@ -23433,24 +23549,24 @@ "testsCompleted": 15, "static": false, "killedBy": [ - "638" + "639" ], "coveredBy": [ "530", "531", - "638", "639", "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -23472,24 +23588,24 @@ "testsCompleted": 15, "static": false, "killedBy": [ - "638" + "639" ], "coveredBy": [ "530", "531", - "638", "639", "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -23511,24 +23627,24 @@ "testsCompleted": 15, "static": false, "killedBy": [ - "638" + "639" ], "coveredBy": [ "530", "531", - "638", "639", "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -23544,32 +23660,32 @@ { "id": "564", "mutatorName": "BooleanLiteral", - "replacement": "game.players.some(({\n side,\n isAlive\n}) => side.current === ROLE_SIDES.VILLAGERS && isAlive)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:58:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.players.some(({\n side,\n isAlive\n}) => side.current === RoleSides.VILLAGERS && isAlive)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 1999907856580609,\n \"turn\": 5089924562812928,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"1de10d08b39a32b80ef6db4b\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Herman\",\n+ \"position\": 3442108283224064,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"5b15fd9d685fb91c6e293a03\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jewell\",\n+ \"position\": 7237897765781504,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "640" + "530" ], "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 18 }, "start": { @@ -23581,32 +23697,32 @@ { "id": "565", "mutatorName": "MethodExpression", - "replacement": "game.players.every(({\n side,\n isAlive\n}) => side.current === ROLE_SIDES.VILLAGERS && isAlive)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:58:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.players.every(({\n side,\n isAlive\n}) => side.current === RoleSides.VILLAGERS && isAlive)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 3147360448282625,\n \"turn\": 2000821017378816,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"4debb1bdbfcce7afa76fbbbb\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Rusty\",\n+ \"position\": 793160078852096,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"dd5dcfdbb904865d9df75c65\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Darwin\",\n+ \"position\": 6513340014657536,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "640" + "530" ], "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 18 }, "start": { @@ -23619,31 +23735,31 @@ "id": "566", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:58:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 6677777814126593,\n \"turn\": 6396379001782272,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"f6d1f1f1d90f9150284282fc\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Maynard\",\n+ \"position\": 3230340128702464,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"b60ff02aa998bfef37dd6557\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jake\",\n+ \"position\": 8450377082994688,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "640" + "530" ], "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 18 }, "start": { @@ -23656,31 +23772,31 @@ "id": "567", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "641" + "642" ], "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 18 }, "start": { @@ -23693,7 +23809,7 @@ "id": "568", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 3171918205157377,\n \"turn\": 7656146332549120,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"1deeaed4873f40c84cdff3da\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Alicia\",\n+ \"position\": 2235370127228928,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"2c3eeea17c7fe70dcc4ac899\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Sheridan\",\n+ \"position\": 3836541591879680,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 6906215332315137,\n \"turn\": 8286902931161088,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"7ada8f6e4fdf00281f9176b4\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Shanie\",\n+ \"position\": 7218882230091776,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"3c00f8659f4f2a1250dc51e2\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Ottis\",\n+ \"position\": 6473032428158976,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 13, "static": false, @@ -23703,21 +23819,21 @@ "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 18 }, "start": { @@ -23729,32 +23845,32 @@ { "id": "569", "mutatorName": "LogicalOperator", - "replacement": "side.current === ROLE_SIDES.VILLAGERS || isAlive", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "side.current === RoleSides.VILLAGERS || isAlive", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "641" + "642" ], "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 18 }, "start": { @@ -23767,31 +23883,31 @@ "id": "570", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "641" + "642" ], "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 126, + "column": 125, "line": 18 }, "start": { @@ -23803,32 +23919,32 @@ { "id": "571", "mutatorName": "EqualityOperator", - "replacement": "side.current !== ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "side.current !== RoleSides.VILLAGERS", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:70:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "641" + "642" ], "coveredBy": [ "530", "531", - "640", "641", - "677", + "642", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 126, + "column": 125, "line": 18 }, "start": { @@ -23848,15 +23964,15 @@ "coveredBy": [ "530", "531", - "642", "643", "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { @@ -23873,29 +23989,29 @@ "id": "573", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:77:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:77:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "642" + "643" ], "coveredBy": [ "530", "531", - "642", "643", "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 23 }, "start": { @@ -23908,29 +24024,29 @@ "id": "574", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "645" + "646" ], "coveredBy": [ "530", "531", - "642", "643", "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 23 }, "start": { @@ -23942,26 +24058,30 @@ { "id": "575", "mutatorName": "LogicalOperator", - "replacement": "villagersSidedPlayers.length > 0 || !game.players.some(({\n side,\n isAlive\n}) => side.current === ROLE_SIDES.WEREWOLVES && isAlive)", - "status": "Timeout", + "replacement": "villagersSidedPlayers.length > 0 || !game.players.some(({\n side,\n isAlive\n}) => side.current === RoleSides.WEREWOLVES && isAlive)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:77:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "643" + ], "coveredBy": [ "530", "531", - "642", "643", "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 23 }, "start": { @@ -23974,21 +24094,25 @@ "id": "576", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:77:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "643" + ], "coveredBy": [ "530", "531", - "642", "643", "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { @@ -24010,20 +24134,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "642" + "643" ], "coveredBy": [ "530", "531", - "642", "643", "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { @@ -24045,20 +24169,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "642" + "643" ], "coveredBy": [ "530", "531", - "642", "643", "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { @@ -24074,28 +24198,28 @@ { "id": "579", "mutatorName": "BooleanLiteral", - "replacement": "game.players.some(({\n side,\n isAlive\n}) => side.current === ROLE_SIDES.WEREWOLVES && isAlive)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:99:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.players.some(({\n side,\n isAlive\n}) => side.current === RoleSides.WEREWOLVES && isAlive)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 8898469852872705,\n \"turn\": 5412728229330944,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"villagers\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"b4cca76fb61812d82ef4e82b\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Juana\",\n+ \"position\": 1648876958253056,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"cadb2955cca80cfa2bcbdcff\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jena\",\n+ \"position\": 5323672550113280,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "644" + "530" ], "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 23 }, "start": { @@ -24107,28 +24231,28 @@ { "id": "580", "mutatorName": "MethodExpression", - "replacement": "game.players.every(({\n side,\n isAlive\n}) => side.current === ROLE_SIDES.WEREWOLVES && isAlive)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:99:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.players.every(({\n side,\n isAlive\n}) => side.current === RoleSides.WEREWOLVES && isAlive)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:99:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "644" + "645" ], "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 138, + "column": 137, "line": 23 }, "start": { @@ -24141,7 +24265,7 @@ "id": "581", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 2208557093093377,\n \"turn\": 3362750203953152,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"villagers\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"aeea2fc0ce85cbf8cf0b3c8d\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Sofia\",\n+ \"position\": 3810741356331008,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"7477eefabf7c3df0e9d82ffe\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Herminia\",\n+ \"position\": 1031589528076288,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 38\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 8379208258551809,\n \"turn\": 2575751861764096,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,43 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"villagers\",\n+ \"winners\": Array [\n+ Object {\n+ \"_id\": \"ad82318dd4323eacce8baffc\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Darryl\",\n+ \"position\": 4234293169618944,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"1de3d94bfefe6378bd7dbfd1\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Brice\",\n+ \"position\": 5926561089847296,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -24151,17 +24275,17 @@ "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 23 }, "start": { @@ -24174,27 +24298,27 @@ "id": "582", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "645" + "646" ], "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 23 }, "start": { @@ -24207,27 +24331,27 @@ "id": "583", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:99:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "644" + "530" ], "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 23 }, "start": { @@ -24239,28 +24363,28 @@ { "id": "584", "mutatorName": "LogicalOperator", - "replacement": "side.current === ROLE_SIDES.WEREWOLVES || isAlive", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "side.current === RoleSides.WEREWOLVES || isAlive", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "645" + "646" ], "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 137, + "column": 136, "line": 23 }, "start": { @@ -24273,27 +24397,27 @@ "id": "585", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "645" + "646" ], "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 126, + "column": 125, "line": 23 }, "start": { @@ -24305,28 +24429,28 @@ { "id": "586", "mutatorName": "EqualityOperator", - "replacement": "side.current !== ROLE_SIDES.WEREWOLVES", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "side.current !== RoleSides.WEREWOLVES", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:111:36)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "645" + "646" ], "coveredBy": [ "530", "531", - "644", "645", - "678", - "681", + "646", + "679", "682", - "689", - "690" + "683", + "690", + "691" ], "location": { "end": { - "column": 126, + "column": 125, "line": 23 }, "start": { @@ -24346,19 +24470,19 @@ "coveredBy": [ "530", "531", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24375,29 +24499,29 @@ "id": "588", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:119:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: thrown: \"Exceeded timeout of 5000 ms for a test.\nAdd a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout.\"\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:877:5\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:766:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:50:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "646" + "530" ], "coveredBy": [ "530", "531", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24414,29 +24538,29 @@ "id": "589", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:167:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:167:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ "530", "531", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24452,26 +24576,30 @@ { "id": "590", "mutatorName": "LogicalOperator", - "replacement": "lovers.length > 0 || game.players.every(player => {\n const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game);\n return isPlayerInLove && player.isAlive || !isPlayerInLove && !player.isAlive;\n})", - "status": "Timeout", + "replacement": "lovers.length > 0 || game.players.every(player => {\n const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game);\n return isPlayerInLove && player.isAlive || !isPlayerInLove && !player.isAlive;\n})", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:119:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 15, "static": false, - "killedBy": [], + "killedBy": [ + "647" + ], "coveredBy": [ "530", "531", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24493,24 +24621,24 @@ "testsCompleted": 15, "static": false, "killedBy": [ - "646" + "647" ], "coveredBy": [ "530", "531", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24532,24 +24660,24 @@ "testsCompleted": 15, "static": false, "killedBy": [ - "646" + "647" ], "coveredBy": [ "530", "531", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24571,24 +24699,24 @@ "testsCompleted": 15, "static": false, "killedBy": [ - "646" + "647" ], "coveredBy": [ "530", "531", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24604,19 +24732,19 @@ { "id": "594", "mutatorName": "MethodExpression", - "replacement": "game.players.some(player => {\n const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game);\n return isPlayerInLove && player.isAlive || !isPlayerInLove && !player.isAlive;\n})", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:143:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.players.some(player => {\n const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game);\n return isPlayerInLove && player.isAlive || !isPlayerInLove && !player.isAlive;\n})", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:143:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "648" + "649" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24633,18 +24761,18 @@ "id": "595", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:167:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:167:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24666,13 +24794,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "648" + "649" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24694,13 +24822,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24722,13 +24850,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24750,13 +24878,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24778,13 +24906,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "648" + "649" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24806,13 +24934,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24834,13 +24962,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "648" + "649" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24862,13 +24990,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24890,13 +25018,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "650" + "651" ], "coveredBy": [ - "648", "649", "650", - "685" + "651", + "686" ], "location": { "end": { @@ -24920,17 +25048,17 @@ "coveredBy": [ "530", "531", - "651", "652", "653", "654", "655", - "681", + "656", "682", - "687", + "683", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -24947,31 +25075,27 @@ "id": "606", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:175:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 13, + "status": "Timeout", "static": false, - "killedBy": [ - "651" - ], + "killedBy": [], "coveredBy": [ "530", "531", - "651", "652", "653", "654", "655", - "681", + "656", "682", - "687", + "683", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 117, + "column": 115, "line": 37 }, "start": { @@ -24984,31 +25108,31 @@ "id": "607", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ "530", "531", - "651", "652", "653", "654", "655", - "681", + "656", "682", - "687", + "683", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 117, + "column": 115, "line": 37 }, "start": { @@ -25020,32 +25144,32 @@ { "id": "608", "mutatorName": "LogicalOperator", - "replacement": "!!whiteWerewolfPlayer || game.players.every(({\n role,\n isAlive\n}) => role.current === ROLE_NAMES.WHITE_WEREWOLF && isAlive || role.current !== ROLE_NAMES.WHITE_WEREWOLF && !isAlive)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:175:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!!whiteWerewolfPlayer || game.players.every(({\n role,\n isAlive\n}) => role.current === RoleNames.WHITE_WEREWOLF && isAlive || role.current !== RoleNames.WHITE_WEREWOLF && !isAlive)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:175:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "651" + "652" ], "coveredBy": [ "530", "531", - "651", "652", "653", "654", "655", - "681", + "656", "682", - "687", + "683", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 117, + "column": 115, "line": 37 }, "start": { @@ -25063,22 +25187,22 @@ "testsCompleted": 13, "static": false, "killedBy": [ - "651" + "652" ], "coveredBy": [ "530", "531", - "651", "652", "653", "654", "655", - "681", + "656", "682", - "687", + "683", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25100,22 +25224,22 @@ "testsCompleted": 13, "static": false, "killedBy": [ - "651" + "652" ], "coveredBy": [ "530", "531", - "651", "652", "653", "654", "655", - "681", + "656", "682", - "687", + "683", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25131,23 +25255,23 @@ { "id": "611", "mutatorName": "MethodExpression", - "replacement": "game.players.some(({\n role,\n isAlive\n}) => role.current === ROLE_NAMES.WHITE_WEREWOLF && isAlive || role.current !== ROLE_NAMES.WHITE_WEREWOLF && !isAlive)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.players.some(({\n role,\n isAlive\n}) => role.current === RoleNames.WHITE_WEREWOLF && isAlive || role.current !== RoleNames.WHITE_WEREWOLF && !isAlive)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "653" + "654" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 117, + "column": 115, "line": 37 }, "start": { @@ -25160,22 +25284,22 @@ "id": "612", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 37 }, "start": { @@ -25188,22 +25312,22 @@ "id": "613", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "653" + "654" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 37 }, "start": { @@ -25216,22 +25340,22 @@ "id": "614", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 37 }, "start": { @@ -25243,23 +25367,23 @@ { "id": "615", "mutatorName": "LogicalOperator", - "replacement": "role.current === ROLE_NAMES.WHITE_WEREWOLF && isAlive && role.current !== ROLE_NAMES.WHITE_WEREWOLF && !isAlive", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "role.current === RoleNames.WHITE_WEREWOLF && isAlive && role.current !== RoleNames.WHITE_WEREWOLF && !isAlive", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 37 }, "start": { @@ -25272,18 +25396,22 @@ "id": "616", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "656" + ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 58, + "column": 57, "line": 37 }, "start": { @@ -25295,20 +25423,20 @@ { "id": "617", "mutatorName": "LogicalOperator", - "replacement": "role.current === ROLE_NAMES.WHITE_WEREWOLF || isAlive", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(37,62): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.WEREWOLF | ROLE_NAMES.BIG_BAD_WOLF | ROLE_NAMES.VILE_FATHER_OF_WOLVES | ROLE_NAMES.VILLAGER | ROLE_NAMES.VILLAGER_VILLAGER | ROLE_NAMES.SEER | ROLE_NAMES.CUPID | ... 18 more ... | ROLE_NAMES.RAVEN' and 'ROLE_NAMES.WHITE_WEREWOLF' have no overlap.\n", + "replacement": "role.current === RoleNames.WHITE_WEREWOLF || isAlive", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(37,61): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.WEREWOLF | RoleNames.BIG_BAD_WOLF | RoleNames.VILE_FATHER_OF_WOLVES | RoleNames.VILLAGER | RoleNames.VILLAGER_VILLAGER | RoleNames.SEER | RoleNames.CUPID | RoleNames.WITCH | ... 17 more ... | RoleNames.RAVEN' and 'RoleNames.WHITE_WEREWOLF' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 58, + "column": 57, "line": 37 }, "start": { @@ -25321,22 +25449,22 @@ "id": "618", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "653" + "654" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 47, + "column": 46, "line": 37 }, "start": { @@ -25348,23 +25476,23 @@ { "id": "619", "mutatorName": "EqualityOperator", - "replacement": "role.current !== ROLE_NAMES.WHITE_WEREWOLF", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "role.current !== RoleNames.WHITE_WEREWOLF", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 47, + "column": 46, "line": 37 }, "start": { @@ -25377,26 +25505,26 @@ "id": "620", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 37 }, "start": { - "column": 62, + "column": 61, "line": 37 } } @@ -25404,27 +25532,27 @@ { "id": "621", "mutatorName": "LogicalOperator", - "replacement": "role.current !== ROLE_NAMES.WHITE_WEREWOLF || !isAlive", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "role.current !== RoleNames.WHITE_WEREWOLF || !isAlive", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:196:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "653" + "654" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 37 }, "start": { - "column": 62, + "column": 61, "line": 37 } } @@ -25433,26 +25561,26 @@ "id": "622", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:207:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:207:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "654" + "655" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 104, + "column": 102, "line": 37 }, "start": { - "column": 62, + "column": 61, "line": 37 } } @@ -25460,27 +25588,27 @@ { "id": "623", "mutatorName": "EqualityOperator", - "replacement": "role.current === ROLE_NAMES.WHITE_WEREWOLF", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "role.current === RoleNames.WHITE_WEREWOLF", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:218:42)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 104, + "column": 102, "line": 37 }, "start": { - "column": 62, + "column": 61, "line": 37 } } @@ -25494,21 +25622,21 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "655" + "656" ], "coveredBy": [ - "653", "654", "655", - "687" + "656", + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 37 }, "start": { - "column": 108, + "column": 106, "line": 37 } } @@ -25524,7 +25652,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25532,13 +25659,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25555,17 +25683,16 @@ "id": "626", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:226:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:226:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 17, "static": false, "killedBy": [ - "656" + "657" ], "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25573,17 +25700,18 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 86, + "column": 85, "line": 45 }, "start": { @@ -25596,17 +25724,16 @@ "id": "627", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 17, "static": false, "killedBy": [ - "662" + "663" ], "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25614,17 +25741,18 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 86, + "column": 85, "line": 45 }, "start": { @@ -25636,7 +25764,7 @@ { "id": "628", "mutatorName": "LogicalOperator", - "replacement": "!!piedPiperPlayer && isPlayerAliveAndPowerful(piedPiperPlayer, game) && !leftToCharmPlayers.length || !isPowerlessIfInfected || piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS", + "replacement": "!!piedPiperPlayer && isPlayerAliveAndPowerful(piedPiperPlayer, game) && !leftToCharmPlayers.length || !isPowerlessIfInfected || piedPiperPlayer.side.current === RoleSides.VILLAGERS", "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(44,138): error TS18048: 'piedPiperPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, @@ -25644,7 +25772,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25652,17 +25779,18 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 86, + "column": 85, "line": 45 }, "start": { @@ -25682,7 +25810,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25690,13 +25817,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25720,7 +25848,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25728,13 +25855,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25758,7 +25886,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25766,13 +25893,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25796,7 +25924,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25804,13 +25931,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25834,7 +25962,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25842,13 +25969,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25872,7 +26000,6 @@ "coveredBy": [ "530", "531", - "656", "657", "658", "659", @@ -25880,13 +26007,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -25908,11 +26036,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "661", "662", "663", - "681", - "686" + "664", + "682", + "687" ], "location": { "end": { @@ -25929,23 +26057,23 @@ "id": "636", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:286:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:286:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "661" + "662" ], "coveredBy": [ - "661", "662", "663", - "681", - "686" + "664", + "682", + "687" ], "location": { "end": { - "column": 85, + "column": 84, "line": 45 }, "start": { @@ -25957,24 +26085,20 @@ { "id": "637", "mutatorName": "LogicalOperator", - "replacement": "!isPowerlessIfInfected && piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "!isPowerlessIfInfected && piedPiperPlayer.side.current === RoleSides.VILLAGERS", + "status": "Timeout", "static": false, - "killedBy": [ - "662" - ], + "killedBy": [], "coveredBy": [ - "661", "662", "663", - "681", - "686" + "664", + "682", + "687" ], "location": { "end": { - "column": 85, + "column": 84, "line": 45 }, "start": { @@ -25987,19 +26111,19 @@ "id": "638", "mutatorName": "BooleanLiteral", "replacement": "isPowerlessIfInfected", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:286:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:286:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "661" + "662" ], "coveredBy": [ - "661", "662", "663", - "681", - "686" + "664", + "682", + "687" ], "location": { "end": { @@ -26016,20 +26140,20 @@ "id": "639", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:312:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:312:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "663" + "664" ], "coveredBy": [ - "661", - "663" + "662", + "664" ], "location": { "end": { - "column": 85, + "column": 84, "line": 45 }, "start": { @@ -26041,21 +26165,21 @@ { "id": "640", "mutatorName": "EqualityOperator", - "replacement": "piedPiperPlayer.side.current !== ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:286:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "piedPiperPlayer.side.current !== RoleSides.VILLAGERS", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:286:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "661" + "662" ], "coveredBy": [ - "661", - "663" + "662", + "664" ], "location": { "end": { - "column": 85, + "column": 84, "line": 45 }, "start": { @@ -26075,7 +26199,6 @@ "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26084,14 +26207,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26108,14 +26232,13 @@ "id": "642", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26124,14 +26247,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26148,14 +26272,13 @@ "id": "643", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26164,14 +26287,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26188,14 +26312,13 @@ "id": "644", "mutatorName": "LogicalOperator", "replacement": "(!angelPlayer?.death || angelPlayer.isAlive || !isPlayerPowerful(angelPlayer, game)) && game.turn > 1", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26204,14 +26327,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26228,14 +26352,13 @@ "id": "645", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26244,14 +26367,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26268,14 +26392,13 @@ "id": "646", "mutatorName": "LogicalOperator", "replacement": "(!angelPlayer?.death || angelPlayer.isAlive) && !isPlayerPowerful(angelPlayer, game)", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,73): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,73): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26284,14 +26407,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26308,14 +26432,13 @@ "id": "647", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,34): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,34): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26324,14 +26447,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26348,14 +26472,13 @@ "id": "648", "mutatorName": "LogicalOperator", "replacement": "!angelPlayer?.death && angelPlayer.isAlive", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,30): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,71): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,30): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,71): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26364,14 +26487,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26388,14 +26512,13 @@ "id": "649", "mutatorName": "BooleanLiteral", "replacement": "angelPlayer?.death", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,29): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,70): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,29): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,70): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26404,14 +26527,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26428,14 +26552,13 @@ "id": "650", "mutatorName": "OptionalChaining", "replacement": "angelPlayer.death", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,8): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,29): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,70): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(50,8): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,29): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(50,70): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(53,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", @@ -26444,14 +26567,15 @@ "670", "671", "672", - "682", - "684", + "673", + "683", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26473,16 +26597,16 @@ "testsCompleted": 7, "static": false, "killedBy": [ - "671" + "672" ], "coveredBy": [ - "668", "669", "670", "671", "672", - "682", - "684" + "673", + "683", + "685" ], "location": { "end": { @@ -26504,15 +26628,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "669" + "670" ], "coveredBy": [ - "669", "670", "671", "672", - "682", - "684" + "673", + "683", + "685" ], "location": { "end": { @@ -26534,15 +26658,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "671" + "672" ], "coveredBy": [ - "669", "670", "671", "672", - "682", - "684" + "673", + "683", + "685" ], "location": { "end": { @@ -26564,15 +26688,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "669" + "670" ], "coveredBy": [ - "669", "670", "671", "672", - "682", - "684" + "673", + "683", + "685" ], "location": { "end": { @@ -26589,25 +26713,25 @@ "id": "655", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(51,73): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(51,73): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(51,69): error TS18048: 'angelPlayer' is possibly 'undefined'.\nsrc/modules/game/helpers/game-victory/game-victory.helper.ts(51,69): error TS18048: 'angelPlayer.death' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", "531", - "664", "665", "666", "667", "668", "669", - "685", + "670", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26629,23 +26753,23 @@ "testsCompleted": 14, "static": false, "killedBy": [ - "664" + "665" ], "coveredBy": [ "530", "531", - "664", "665", "666", "667", "668", "669", - "685", + "670", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -26662,20 +26786,20 @@ "id": "657", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,22): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/player.enum\").PLAYER_DEATH_CAUSES' is not assignable to parameter of type 'never'.\n", + "statusReason": "src/modules/game/helpers/game-victory/game-victory.helper.ts(53,22): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/player.enum\").PlayerDeathCauses' is not assignable to parameter of type 'never'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "670", "671", "672", - "682", - "684" + "673", + "683", + "685" ], "location": { "end": { - "column": 63, + "column": 59, "line": 53 }, "start": { @@ -26695,7 +26819,6 @@ "coveredBy": [ "530", "531", - "673", "674", "675", "676", @@ -26704,7 +26827,8 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -26728,7 +26852,6 @@ "coveredBy": [ "530", "531", - "673", "674", "675", "676", @@ -26737,7 +26860,8 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -26761,7 +26885,6 @@ "coveredBy": [ "530", "531", - "673", "674", "675", "676", @@ -26770,7 +26893,8 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -26794,7 +26918,6 @@ "coveredBy": [ "530", "531", - "673", "674", "675", "676", @@ -26803,7 +26926,8 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -26825,7 +26949,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "673" + "674" ], "location": { "end": { @@ -26847,10 +26971,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "673" + "674" ], "coveredBy": [ - "673" + "674" ], "location": { "end": { @@ -26872,7 +26996,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "673" + "674" ], "location": { "end": { @@ -26888,18 +27012,17 @@ { "id": "665", "mutatorName": "BooleanLiteral", - "replacement": "!upcomingPlays.find(({\n action,\n source\n}) => action === GAME_PLAY_ACTIONS.SHOOT && source.name === ROLE_NAMES.HUNTER)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!upcomingPlays.find(({\n action,\n source\n}) => action === GamePlayActions.SHOOT && source.name === RoleNames.HUNTER)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", "531", - "674", "675", "676", "677", @@ -26907,11 +27030,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 148, + "column": 145, "line": 61 }, "start": { @@ -26923,18 +27047,17 @@ { "id": "666", "mutatorName": "BooleanLiteral", - "replacement": "upcomingPlays.find(({\n action,\n source\n}) => action === GAME_PLAY_ACTIONS.SHOOT && source.name === ROLE_NAMES.HUNTER)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "upcomingPlays.find(({\n action,\n source\n}) => action === GamePlayActions.SHOOT && source.name === RoleNames.HUNTER)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", "531", - "674", "675", "676", "677", @@ -26942,11 +27065,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 148, + "column": 145, "line": 61 }, "start": { @@ -26959,17 +27083,16 @@ "id": "667", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", "531", - "674", "675", "676", "677", @@ -26977,11 +27100,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 147, + "column": 144, "line": 61 }, "start": { @@ -26994,16 +27118,15 @@ "id": "668", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", - "674", "675", "676", "677", @@ -27011,11 +27134,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 147, + "column": 144, "line": 61 }, "start": { @@ -27028,16 +27152,15 @@ "id": "669", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", - "674", "675", "676", "677", @@ -27045,11 +27168,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 147, + "column": 144, "line": 61 }, "start": { @@ -27061,17 +27185,16 @@ { "id": "670", "mutatorName": "LogicalOperator", - "replacement": "action === GAME_PLAY_ACTIONS.SHOOT || source.name === ROLE_NAMES.HUNTER", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "action === GamePlayActions.SHOOT || source.name === RoleNames.HUNTER", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", - "674", "675", "676", "677", @@ -27079,11 +27202,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 147, + "column": 144, "line": 61 }, "start": { @@ -27096,16 +27220,15 @@ "id": "671", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", - "674", "675", "676", "677", @@ -27113,11 +27236,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 110, + "column": 108, "line": 61 }, "start": { @@ -27129,17 +27253,16 @@ { "id": "672", "mutatorName": "EqualityOperator", - "replacement": "action !== GAME_PLAY_ACTIONS.SHOOT", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "action !== GamePlayActions.SHOOT", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", - "674", "675", "676", "677", @@ -27147,11 +27270,12 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 110, + "column": 108, "line": 61 }, "start": { @@ -27164,25 +27288,25 @@ "id": "673", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:505:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:505:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "678" + "679" ], "coveredBy": [ - "674", "675", - "678" + "676", + "679" ], "location": { "end": { - "column": 147, + "column": 144, "line": 61 }, "start": { - "column": 114, + "column": 112, "line": 61 } } @@ -27190,22 +27314,26 @@ { "id": "674", "mutatorName": "EqualityOperator", - "replacement": "source.name !== ROLE_NAMES.HUNTER", - "status": "Timeout", + "replacement": "source.name !== RoleNames.HUNTER", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "676" + ], "coveredBy": [ - "674", "675", - "678" + "676", + "679" ], "location": { "end": { - "column": 147, + "column": 144, "line": 61 }, "start": { - "column": 114, + "column": 112, "line": 61 } } @@ -27214,17 +27342,16 @@ "id": "675", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", "531", - "674", "675", "676", "677", @@ -27232,7 +27359,8 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27249,17 +27377,16 @@ "id": "676", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:440:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:440:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "674" + "675" ], "coveredBy": [ "530", "531", - "674", "675", "676", "677", @@ -27267,7 +27394,8 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27283,18 +27411,17 @@ { "id": "677", "mutatorName": "LogicalOperator", - "replacement": "areAllPlayersDead(game) && currentPlay.action !== GAME_PLAY_ACTIONS.SHOOT && !isShootPlayIncoming && (doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game) || doesAngelWin(game))", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:440:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "areAllPlayersDead(game) && currentPlay.action !== GamePlayActions.SHOOT && !isShootPlayIncoming && (doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game) || doesAngelWin(game))", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:440:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "674" + "675" ], "coveredBy": [ "530", "531", - "674", "675", "676", "677", @@ -27302,7 +27429,8 @@ "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27319,24 +27447,24 @@ "id": "678", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", "531", - "675", "676", "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27352,25 +27480,25 @@ { "id": "679", "mutatorName": "LogicalOperator", - "replacement": "currentPlay.action !== GAME_PLAY_ACTIONS.SHOOT && !isShootPlayIncoming || doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game) || doesAngelWin(game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlay.action !== GamePlayActions.SHOOT && !isShootPlayIncoming || doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game) || doesAngelWin(game)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", "531", - "675", "676", "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27387,28 +27515,28 @@ "id": "680", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", "531", - "675", "676", "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 107, + "column": 105, "line": 62 }, "start": { @@ -27420,29 +27548,29 @@ { "id": "681", "mutatorName": "LogicalOperator", - "replacement": "currentPlay.action !== GAME_PLAY_ACTIONS.SHOOT || !isShootPlayIncoming", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlay.action !== GamePlayActions.SHOOT || !isShootPlayIncoming", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "675" + "676" ], "coveredBy": [ "530", "531", - "675", "676", "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 107, + "column": 105, "line": 62 }, "start": { @@ -27455,28 +27583,28 @@ "id": "682", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:470:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:470:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "676" + "677" ], "coveredBy": [ "530", "531", - "675", "676", "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 83, + "column": 81, "line": 62 }, "start": { @@ -27488,29 +27616,29 @@ { "id": "683", "mutatorName": "EqualityOperator", - "replacement": "currentPlay.action === GAME_PLAY_ACTIONS.SHOOT", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:470:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlay.action === GamePlayActions.SHOOT", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:470:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "676" + "677" ], "coveredBy": [ "530", "531", - "675", "676", "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 83, + "column": 81, "line": 62 }, "start": { @@ -27523,31 +27651,31 @@ "id": "684", "mutatorName": "BooleanLiteral", "replacement": "isShootPlayIncoming", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:455:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "530" + "676" ], "coveredBy": [ "530", "531", - "675", - "677", + "676", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { - "column": 107, + "column": 105, "line": 62 }, "start": { - "column": 87, + "column": 85, "line": 62 } } @@ -27556,7 +27684,7 @@ "id": "685", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 2440438434758657,\n \"turn\": 3158424076419072,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -27566,12 +27694,12 @@ "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27588,22 +27716,22 @@ "id": "686", "mutatorName": "LogicalOperator", "replacement": "(doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game)) && doesAngelWin(game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "531" + "678" ], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27620,22 +27748,22 @@ "id": "687", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27652,18 +27780,22 @@ "id": "688", "mutatorName": "LogicalOperator", "replacement": "(doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game)) && doesPiedPiperWin(game)", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "678" + ], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27680,22 +27812,22 @@ "id": "689", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27712,22 +27844,22 @@ "id": "690", "mutatorName": "LogicalOperator", "replacement": "(doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game)) && doesWhiteWerewolfWin(game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27744,22 +27876,22 @@ "id": "691", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "677" + "678" ], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27776,18 +27908,22 @@ "id": "692", "mutatorName": "LogicalOperator", "replacement": "(doWerewolvesWin(game) || doVillagersWin(game)) && doLoversWin(game)", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "678" + ], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27804,22 +27940,18 @@ "id": "693", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 8, + "status": "Timeout", "static": false, - "killedBy": [ - "677" - ], + "killedBy": [], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27836,22 +27968,18 @@ "id": "694", "mutatorName": "LogicalOperator", "replacement": "doWerewolvesWin(game) && doVillagersWin(game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:487:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 8, + "status": "Timeout", "static": false, - "killedBy": [ - "677" - ], + "killedBy": [], "coveredBy": [ "530", "531", - "677", "678", "679", "680", "681", - "682" + "682", + "683" ], "location": { "end": { @@ -27873,14 +28001,14 @@ "static": false, "killedBy": [], "coveredBy": [ - "683", "684", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -27897,22 +28025,22 @@ "id": "696", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 23\n+ Received + 2\n\n GameVictory {\n- \"type\": \"angel\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"addef313f9e46de6a3fdad8f\",\n- \"attributes\": Array [],\n- \"death\": PlayerDeath {\n- \"cause\": \"vote\",\n- \"source\": \"all\",\n- },\n- \"isAlive\": false,\n- \"name\": \"Zachary\",\n- \"position\": 6502475081187328,\n- \"role\": PlayerRole {\n- \"current\": \"angel\",\n- \"isRevealed\": false,\n- \"original\": \"angel\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"type\": \"none\",\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 23\n+ Received + 2\n\n GameVictory {\n- \"type\": \"angel\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"b927aba2d1aece124bbc1ab5\",\n- \"attributes\": Array [],\n- \"death\": PlayerDeath {\n- \"cause\": \"vote\",\n- \"source\": \"all\",\n- },\n- \"isAlive\": false,\n- \"name\": \"Tomas\",\n- \"position\": 1625469376004096,\n- \"role\": PlayerRole {\n- \"current\": \"angel\",\n- \"isRevealed\": false,\n- \"original\": \"angel\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"type\": \"none\",\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "684" + "685" ], "coveredBy": [ - "683", "684", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -27929,18 +28057,22 @@ "id": "697", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 20\n\n GameVictory {\n- \"type\": \"none\",\n- \"winners\": undefined,\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Player {\n+ \"_id\": \"db8ffa22bacbbc7c81c80bfd\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Lillie\",\n+ \"position\": 2545806506721280,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:591:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "684" + ], "coveredBy": [ - "683", "684", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -27957,15 +28089,15 @@ "id": "698", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 20\n\n GameVictory {\n- \"type\": \"none\",\n- \"winners\": undefined,\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Player {\n+ \"_id\": \"2c2a7ba803efcc78a13bca7c\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Lorenz\",\n+ \"position\": 8612475314372608,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:591:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 20\n\n GameVictory {\n- \"type\": \"none\",\n- \"winners\": undefined,\n+ \"type\": \"werewolves\",\n+ \"winners\": Array [\n+ Player {\n+ \"_id\": \"bcfc7cdac96ce0c99bfa3b7d\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Adaline\",\n+ \"position\": 2130511916957696,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:591:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "683" + "684" ], "coveredBy": [ - "683" + "684" ], "location": { "end": { @@ -27982,19 +28114,19 @@ "id": "699", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n GameVictory {\n- \"type\": \"none\",\n+ \"type\": undefined,\n \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:591:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n GameVictory {\n- \"type\": \"none\",\n+ \"type\": undefined,\n \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:591:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "683" + "684" ], "coveredBy": [ - "683" + "684" ], "location": { "end": { - "column": 74, + "column": 72, "line": 68 }, "start": { @@ -28007,21 +28139,17 @@ "id": "700", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 51\n+ Received + 2\n\n GameVictory {\n- \"type\": \"lovers\",\n+ \"type\": \"angel\",\n \"winners\": Array [\n- Player {\n- \"_id\": \"571cb14c22d6afaef3a56efc\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n- \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Berenice\",\n- \"position\": 2985155471867904,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"ee2fcb5c382d5a0abb6ebbbf\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n- \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Eleazar\",\n- \"position\": 8475726552498176,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n+ undefined,\n ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:618:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "685" - ], + "killedBy": [], "coveredBy": [ - "684", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28038,21 +28166,17 @@ "id": "701", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"angel\", \"winners\": [{\"_id\": \"46dfca8d440be44ff3bb1ffe\", \"attributes\": [], \"death\": {\"cause\": \"vote\", \"source\": \"all\"}, \"isAlive\": false, \"name\": \"Lenora\", \"position\": 6246583945396224, \"role\": {\"current\": \"angel\", \"isRevealed\": false, \"original\": \"angel\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "684" - ], + "killedBy": [], "coveredBy": [ - "684", "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28069,15 +28193,15 @@ "id": "702", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"angel\", \"winners\": [{\"_id\": \"d97f6af224f3e5a794fde721\", \"attributes\": [], \"death\": {\"cause\": \"vote\", \"source\": \"all\"}, \"isAlive\": false, \"name\": \"Giovanny\", \"position\": 7680867394650112, \"role\": {\"current\": \"angel\", \"isRevealed\": false, \"original\": \"angel\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"angel\", \"winners\": [{\"_id\": \"cfc4e6f492d72f993ffbcffa\", \"attributes\": [], \"death\": {\"cause\": \"vote\", \"source\": \"all\"}, \"isAlive\": false, \"name\": \"Margie\", \"position\": 3738007259578368, \"role\": {\"current\": \"angel\", \"isRevealed\": false, \"original\": \"angel\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "684" + "685" ], "coveredBy": [ - "684" + "685" ], "location": { "end": { @@ -28094,19 +28218,19 @@ "id": "703", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 23\n+ Received + 2\n\n GameVictory {\n- \"type\": \"angel\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"300b7b7facd9e963efc3578d\",\n- \"attributes\": Array [],\n- \"death\": PlayerDeath {\n- \"cause\": \"vote\",\n- \"source\": \"all\",\n- },\n- \"isAlive\": false,\n- \"name\": \"Jettie\",\n- \"position\": 1572312753111040,\n- \"role\": PlayerRole {\n- \"current\": \"angel\",\n- \"isRevealed\": false,\n- \"original\": \"angel\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 23\n+ Received + 2\n\n GameVictory {\n- \"type\": \"angel\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"dc8089aa19ab0fd7d2ddc9ee\",\n- \"attributes\": Array [],\n- \"death\": PlayerDeath {\n- \"cause\": \"vote\",\n- \"source\": \"all\",\n- },\n- \"isAlive\": false,\n- \"name\": \"Kevon\",\n- \"position\": 5122638879916032,\n- \"role\": PlayerRole {\n- \"current\": \"angel\",\n- \"isRevealed\": false,\n- \"original\": \"angel\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "684" + "685" ], "coveredBy": [ - "684" + "685" ], "location": { "end": { - "column": 99, + "column": 97, "line": 72 }, "start": { @@ -28119,23 +28243,23 @@ "id": "704", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 22\n+ Received + 1\n\n GameVictory {\n \"type\": \"angel\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"bea1103e996eaae875c0f1fb\",\n- \"attributes\": Array [],\n- \"death\": PlayerDeath {\n- \"cause\": \"vote\",\n- \"source\": \"all\",\n- },\n- \"isAlive\": false,\n- \"name\": \"Melyna\",\n- \"position\": 3920996901847040,\n- \"role\": PlayerRole {\n- \"current\": \"angel\",\n- \"isRevealed\": false,\n- \"original\": \"angel\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 22\n+ Received + 1\n\n GameVictory {\n \"type\": \"angel\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"ac1e1b7d3d624b4fccf6acff\",\n- \"attributes\": Array [],\n- \"death\": PlayerDeath {\n- \"cause\": \"vote\",\n- \"source\": \"all\",\n- },\n- \"isAlive\": false,\n- \"name\": \"Ottilie\",\n- \"position\": 3804560181166080,\n- \"role\": PlayerRole {\n- \"current\": \"angel\",\n- \"isRevealed\": false,\n- \"original\": \"angel\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:605:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "684" + "685" ], "coveredBy": [ - "684" + "685" ], "location": { "end": { - "column": 97, + "column": 95, "line": 72 }, "start": { - "column": 84, + "column": 82, "line": 72 } } @@ -28144,20 +28268,20 @@ "id": "705", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 2\n\n GameVictory {\n- \"type\": \"pied-piper\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"b34a88eaba18db3e7df64857\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Makayla\",\n- \"position\": 6971784293253120,\n- \"role\": PlayerRole {\n- \"current\": \"pied-piper\",\n- \"isRevealed\": false,\n- \"original\": \"pied-piper\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": \"lovers\",\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 2\n\n GameVictory {\n- \"type\": \"pied-piper\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"08d76bdca18ba9e54ebc45e6\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Helene\",\n- \"position\": 8473121128448000,\n- \"role\": PlayerRole {\n- \"current\": \"pied-piper\",\n- \"isRevealed\": false,\n- \"original\": \"pied-piper\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": \"lovers\",\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "686" + "687" ], "coveredBy": [ - "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28174,16 +28298,20 @@ "id": "706", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -1,7 +1,7 @@\n GameVictory {\n- \"type\": \"lovers\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n Player {\n \"_id\": \"fe1fca890fbbfbf540abec4c\",\n \"attributes\": Array [\n PlayerAttribute {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:618:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, "static": false, - "killedBy": [], + "killedBy": [ + "686" + ], "coveredBy": [ - "685", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28200,15 +28328,11 @@ "id": "707", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -1,7 +1,7 @@\n GameVictory {\n- \"type\": \"lovers\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n Player {\n \"_id\": \"7083ebfba9fb036355af0d53\",\n \"attributes\": Array [\n PlayerAttribute {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:618:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "685" - ], + "killedBy": [], "coveredBy": [ - "685" + "686" ], "location": { "end": { @@ -28225,19 +28349,19 @@ "id": "708", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 53\n+ Received + 2\n\n GameVictory {\n- \"type\": \"lovers\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"4f6262eaec5ac7aa8734efbe\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n- \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Olin\",\n- \"position\": 5076935359070208,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"1360ceaed93ddad0a4cb8ccd\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n- \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Ines\",\n- \"position\": 3157880014372864,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:618:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 53\n+ Received + 2\n\n GameVictory {\n- \"type\": \"lovers\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"91e6debd13e55599ec6b43df\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n- \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Roma\",\n- \"position\": 5570297338003456,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"a80fd516f82ceb0ab9596353\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n- \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Blanche\",\n- \"position\": 8891632711630848,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:618:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "685" + "686" ], "coveredBy": [ - "685" + "686" ], "location": { "end": { - "column": 100, + "column": 98, "line": 76 }, "start": { @@ -28250,19 +28374,19 @@ "id": "709", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 2\n\n GameVictory {\n- \"type\": \"white-werewolf\",\n+ \"type\": \"pied-piper\",\n \"winners\": Array [\n- Player {\n- \"_id\": \"b253c42582cfe9d1d89dcba0\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Anderson\",\n- \"position\": 5976725582249984,\n- \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n+ undefined,\n ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 2\n\n GameVictory {\n- \"type\": \"white-werewolf\",\n+ \"type\": \"pied-piper\",\n \"winners\": Array [\n- Player {\n- \"_id\": \"e6c99f2c71aea8afadcd8dad\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Korbin\",\n- \"position\": 7377952387891200,\n- \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n+ undefined,\n ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "687" + "688" ], "coveredBy": [ - "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28279,19 +28403,19 @@ "id": "710", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"pied-piper\", \"winners\": [{\"_id\": \"2cada28c0d960b6fecba12d7\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Fanny\", \"position\": 1122071249682432, \"role\": {\"current\": \"pied-piper\", \"isRevealed\": false, \"original\": \"pied-piper\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"pied-piper\", \"winners\": [{\"_id\": \"e68dc9cc3f6dfccee44f572b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Buddy\", \"position\": 8811134675058688, \"role\": {\"current\": \"pied-piper\", \"isRevealed\": false, \"original\": \"pied-piper\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "686" + "687" ], "coveredBy": [ - "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28308,15 +28432,11 @@ "id": "711", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"pied-piper\", \"winners\": [{\"_id\": \"5f8cd63f6eeef8c3ed3115fb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Audra\", \"position\": 121613611696128, \"role\": {\"current\": \"pied-piper\", \"isRevealed\": false, \"original\": \"pied-piper\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "686" - ], + "killedBy": [], "coveredBy": [ - "686" + "687" ], "location": { "end": { @@ -28333,19 +28453,15 @@ "id": "712", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 2\n\n GameVictory {\n- \"type\": \"pied-piper\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"3cfdfbdfbaf7adbb58ba8c0e\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Elva\",\n- \"position\": 5601631085264896,\n- \"role\": PlayerRole {\n- \"current\": \"pied-piper\",\n- \"isRevealed\": false,\n- \"original\": \"pied-piper\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "686" - ], + "killedBy": [], "coveredBy": [ - "686" + "687" ], "location": { "end": { - "column": 108, + "column": 106, "line": 80 }, "start": { @@ -28358,23 +28474,23 @@ "id": "713", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n GameVictory {\n \"type\": \"pied-piper\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"4b46ae89241bc9ace4e9abce\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Shaylee\",\n- \"position\": 6463521743175680,\n- \"role\": PlayerRole {\n- \"current\": \"pied-piper\",\n- \"isRevealed\": false,\n- \"original\": \"pied-piper\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n GameVictory {\n \"type\": \"pied-piper\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"a148f2c26efd4bcfa8a78f03\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Ephraim\",\n- \"position\": 2710727500496896,\n- \"role\": PlayerRole {\n- \"current\": \"pied-piper\",\n- \"isRevealed\": false,\n- \"original\": \"pied-piper\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:632:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "686" + "687" ], "coveredBy": [ - "686" + "687" ], "location": { "end": { - "column": 106, + "column": 104, "line": 80 }, "start": { - "column": 89, + "column": 87, "line": 80 } } @@ -28383,18 +28499,18 @@ "id": "714", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 35\n+ Received + 2\n\n GameVictory {\n- \"type\": \"werewolves\",\n+ \"type\": \"white-werewolf\",\n \"winners\": Array [\n- Player {\n- \"_id\": \"bdf1dcc2ad3473d8709aee80\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Kiara\",\n- \"position\": 1319714871574528,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"f726cd266e2dc83c44166880\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Sylvan\",\n- \"position\": 2884326087720960,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n+ undefined,\n ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 35\n+ Received + 2\n\n GameVictory {\n- \"type\": \"werewolves\",\n+ \"type\": \"white-werewolf\",\n \"winners\": Array [\n- Player {\n- \"_id\": \"61e2dc4a237eeb63f8ad3f3d\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Bessie\",\n- \"position\": 8233831301644288,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"93f6cf8d4da1b0b9fdfe1da8\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Imogene\",\n- \"position\": 2649181470588928,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n+ undefined,\n ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "688" + "689" ], "coveredBy": [ - "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28411,18 +28527,18 @@ "id": "715", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 18\n\n@@ -1,8 +1,25 @@\n GameVictory {\n- \"type\": \"white-werewolf\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n+ Player {\n+ \"_id\": \"86cf388daeb6bfacbef85610\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Donnie\",\n+ \"position\": 2287973999575040,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n Player {\n \"_id\": \"a9ed6e56ecaad770ce426ff5\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 18\n\n@@ -1,8 +1,25 @@\n GameVictory {\n- \"type\": \"white-werewolf\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n+ Player {\n+ \"_id\": \"e3ab251bc459aa7e5f2e3fad\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Dallas\",\n+ \"position\": 4155103502139392,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n Player {\n \"_id\": \"b670f357c99ce422308f30ce\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "687" + "688" ], "coveredBy": [ - "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28439,15 +28555,15 @@ "id": "716", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 18\n\n@@ -1,8 +1,25 @@\n GameVictory {\n- \"type\": \"white-werewolf\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n+ Player {\n+ \"_id\": \"11fed77f4b98b0ab2b2cefb5\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Adrien\",\n+ \"position\": 6761552621338624,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n Player {\n \"_id\": \"fc0dff9e60c3a9c1196e2a4e\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 18\n\n@@ -1,8 +1,25 @@\n GameVictory {\n- \"type\": \"white-werewolf\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n+ Player {\n+ \"_id\": \"e2aff0942e57c2aeeb47c95d\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Jensen\",\n+ \"position\": 1928644607868928,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n Player {\n \"_id\": \"1deec4efa2f3bccfe922d831\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "687" + "688" ], "coveredBy": [ - "687" + "688" ], "location": { "end": { @@ -28464,19 +28580,19 @@ "id": "717", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 2\n\n GameVictory {\n- \"type\": \"white-werewolf\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"7d1de1c96d0c4eea1d912e4c\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Roscoe\",\n- \"position\": 1080351199854592,\n- \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 2\n\n GameVictory {\n- \"type\": \"white-werewolf\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"aebce1a92c2f6cad63c4c63d\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Creola\",\n- \"position\": 579067774500864,\n- \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "687" + "688" ], "coveredBy": [ - "687" + "688" ], "location": { "end": { - "column": 116, + "column": 114, "line": 84 }, "start": { @@ -28489,23 +28605,23 @@ "id": "718", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n GameVictory {\n \"type\": \"white-werewolf\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"406e5946c41de2edfd297aee\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Friedrich\",\n- \"position\": 6659213275168768,\n- \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n GameVictory {\n \"type\": \"white-werewolf\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"c1de3f6e3eb1b0acce2f31dc\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Allan\",\n- \"position\": 56232612200448,\n- \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"winners\": Array [],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:644:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "687" + "688" ], "coveredBy": [ - "687" + "688" ], "location": { "end": { - "column": 114, + "column": 112, "line": 84 }, "start": { - "column": 93, + "column": 91, "line": 84 } } @@ -28514,17 +28630,17 @@ "id": "719", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 16\n+ Received + 16\n\n GameVictory {\n- \"type\": \"villagers\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n Player {\n- \"_id\": \"86e5dd63bcbdf7d222ed20a6\",\n+ \"_id\": \"44ee4ced9192ada3c3840fbe\",\n \"attributes\": Array [],\n \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Bret\",\n- \"position\": 177277713252352,\n+ \"isAlive\": false,\n+ \"name\": \"Telly\",\n+ \"position\": 7780695000743936,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"ddacd9ddffec19f38cd7ad8a\",\n+ \"_id\": \"8430f59af8c6b85a00eeebe1\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": false,\n- \"name\": \"Francisco\",\n- \"position\": 5052069616549888,\n+ \"name\": \"Orville\",\n+ \"position\": 8541011540180992,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:670:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 16\n+ Received + 16\n\n GameVictory {\n- \"type\": \"villagers\",\n+ \"type\": \"werewolves\",\n \"winners\": Array [\n Player {\n- \"_id\": \"73bec7b3accf955b76fdf1cb\",\n+ \"_id\": \"fbd3b2d0bded81f94dc1fa42\",\n \"attributes\": Array [],\n \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Ocie\",\n- \"position\": 7043789862469632,\n+ \"isAlive\": false,\n+ \"name\": \"Cyril\",\n+ \"position\": 1995781642911744,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"d8bc2bd917c3fdd0829aae88\",\n+ \"_id\": \"959a937d7a33d583ae974d57\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": false,\n- \"name\": \"Jerald\",\n- \"position\": 8818795736989696,\n+ \"name\": \"Berry\",\n+ \"position\": 5422729914220544,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ],\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:670:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "689" + "690" ], "coveredBy": [ - "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28541,17 +28657,17 @@ "id": "720", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"werewolves\", \"winners\": [{\"_id\": \"b33bca6b224de4dd1e0c6cfb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Favian\", \"position\": 4228819858751488, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"eacf1d41ea5f79ab9cbf2e72\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Andreane\", \"position\": 4178475420221440, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"werewolves\", \"winners\": [{\"_id\": \"1ece6ae97aeae4fcbeaae53b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Jeramy\", \"position\": 6990949987123200, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a2cf8aed3c1ea6aaa9730ef5\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Stella\", \"position\": 5754718087282688, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "688" + "689" ], "coveredBy": [ - "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28568,15 +28684,15 @@ "id": "721", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"werewolves\", \"winners\": [{\"_id\": \"3456eee6ba09ff9eeddb4fc1\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Lavina\", \"position\": 8923461598576640, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"fb0309febcf7b13a30c4380b\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Ignacio\", \"position\": 6899457857683456, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"werewolves\", \"winners\": [{\"_id\": \"964f5c66baddd2bcabee8ab3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Lilian\", \"position\": 785006190395392, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"8b1dbbf978b63b86f4b81b5a\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Jayde\", \"position\": 3312601245155328, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "688" + "689" ], "coveredBy": [ - "688" + "689" ], "location": { "end": { @@ -28593,19 +28709,19 @@ "id": "722", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 37\n+ Received + 2\n\n GameVictory {\n- \"type\": \"werewolves\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"146ff7d3bec8d8cbcd70ec82\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Alec\",\n- \"position\": 3635780654202880,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"9cc26ae7efb2daca5b3d97dc\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Precious\",\n- \"position\": 809088229310464,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 37\n+ Received + 2\n\n GameVictory {\n- \"type\": \"werewolves\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"1db5ef8df7778be0dbdbebc0\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Estefania\",\n- \"position\": 2835626879614976,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"1974f45be2ffd96fc8afcf6f\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Osborne\",\n- \"position\": 1896530896224256,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:657:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "688" + "689" ], "coveredBy": [ - "688" + "689" ], "location": { "end": { - "column": 112, + "column": 110, "line": 88 }, "start": { @@ -28623,11 +28739,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "690" + "691" ], "coveredBy": [ - "689", - "690" + "690", + "691" ], "location": { "end": { @@ -28644,13 +28760,17 @@ "id": "724", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"villagers\", \"winners\": [{\"_id\": \"5dc480af95fe4308d9ea1bee\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Rosalind\", \"position\": 3824803479814144, \"role\": {\"current\": \"villager\", \"isRevealed\": false, \"original\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"346909eb1f17de299f5bd054\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Hallie\", \"position\": 3051034624655360, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:670:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], - "coveredBy": [ - "689", + "killedBy": [ "690" ], + "coveredBy": [ + "690", + "691" + ], "location": { "end": { "column": 27, @@ -28666,15 +28786,15 @@ "id": "725", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"villagers\", \"winners\": [{\"_id\": \"5b7efe1117760fff5ac9bd0b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Eulah\", \"position\": 3462102373105664, \"role\": {\"current\": \"villager\", \"isRevealed\": false, \"original\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"070fdb4cfbbde905e0dc9d84\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Trystan\", \"position\": 7905090616688640, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:670:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"type\": \"villagers\", \"winners\": [{\"_id\": \"11ac9eeb1e83cc50f536b04d\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Monserrat\", \"position\": 7549449893052416, \"role\": {\"current\": \"villager\", \"isRevealed\": false, \"original\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"54f36e6c27682dcbf6f8dbee\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Jordy\", \"position\": 7903556141056000, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:670:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "689" + "690" ], "coveredBy": [ - "689" + "690" ], "location": { "end": { @@ -28691,19 +28811,19 @@ "id": "726", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 37\n+ Received + 2\n\n GameVictory {\n- \"type\": \"villagers\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"bdd6ee875963a44ca9fa1ee6\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Robert\",\n- \"position\": 543561860775936,\n- \"role\": PlayerRole {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Player {\n- \"_id\": \"09de6eb8ccc40dcaa7ccdcf8\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Domenick\",\n- \"position\": 8512849150214144,\n- \"role\": PlayerRole {\n- \"current\": \"seer\",\n- \"isRevealed\": false,\n- \"original\": \"seer\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:670:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 37\n+ Received + 2\n\n GameVictory {\n- \"type\": \"villagers\",\n- \"winners\": Array [\n- Player {\n- \"_id\": \"6eefef7e8df235a97dceaaae\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Jimmy\",\n- \"position\": 8090209468022784,\n- \"role\": PlayerRole {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Player {\n- \"_id\": \"c5badbd9fe9eb14ec50fac5c\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Easton\",\n- \"position\": 2090054067421184,\n- \"role\": PlayerRole {\n- \"current\": \"seer\",\n- \"isRevealed\": false,\n- \"original\": \"seer\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n+ \"type\": undefined,\n+ \"winners\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:670:45)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "689" + "690" ], "coveredBy": [ - "689" + "690" ], "location": { "end": { - "column": 110, + "column": 108, "line": 92 }, "start": { @@ -28713,7 +28833,7 @@ } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GAME_PLAY_ACTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { GAME_VICTORY_TYPES } from \"@/modules/game/enums/game-victory.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES } from \"@/modules/game/enums/player.enum\";\nimport { areAllPlayersDead, getLeftToCharmByPiedPiperPlayers, getPlayersWithActiveAttributeName, getPlayersWithCurrentSide, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { isPlayerAliveAndPowerful, isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameVictory } from \"@/modules/game/schemas/game-victory/game-victory.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nfunction doWerewolvesWin(game: Game): boolean {\n const werewolvesSidedPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES);\n return werewolvesSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === ROLE_SIDES.VILLAGERS && isAlive);\n}\n\nfunction doVillagersWin(game: Game): boolean {\n const villagersSidedPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS);\n return villagersSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === ROLE_SIDES.WEREWOLVES && isAlive);\n}\n\nfunction doLoversWin(game: Game): boolean {\n const lovers = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE);\n return lovers.length > 0 && game.players.every(player => {\n const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game);\n return isPlayerInLove && player.isAlive || !isPlayerInLove && !player.isAlive;\n });\n}\n\nfunction doesWhiteWerewolfWin(game: Game): boolean {\n const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WHITE_WEREWOLF);\n return !!whiteWerewolfPlayer && game.players.every(({ role, isAlive }) =>\n role.current === ROLE_NAMES.WHITE_WEREWOLF && isAlive || role.current !== ROLE_NAMES.WHITE_WEREWOLF && !isAlive);\n}\n\nfunction doesPiedPiperWin(game: Game): boolean {\n const { isPowerlessIfInfected } = game.options.roles.piedPiper;\n const piedPiperPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.PIED_PIPER);\n const leftToCharmPlayers = getLeftToCharmByPiedPiperPlayers(game);\n return !!piedPiperPlayer && isPlayerAliveAndPowerful(piedPiperPlayer, game) && !leftToCharmPlayers.length &&\n (!isPowerlessIfInfected || piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS);\n}\n\nfunction doesAngelWin(game: Game): boolean {\n const angelPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.ANGEL);\n if (!angelPlayer?.death || angelPlayer.isAlive || !isPlayerPowerful(angelPlayer, game) || game.turn > 1) {\n return false;\n }\n return [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.EATEN].includes(angelPlayer.death.cause);\n}\n\nfunction isGameOver(game: Game): boolean {\n const { upcomingPlays, currentPlay } = game;\n if (!currentPlay) {\n throw createNoCurrentGamePlayUnexpectedException(\"isGameOver\", { gameId: game._id });\n }\n const isShootPlayIncoming = !!upcomingPlays.find(({ action, source }) => action === GAME_PLAY_ACTIONS.SHOOT && source.name === ROLE_NAMES.HUNTER);\n return areAllPlayersDead(game) || currentPlay.action !== GAME_PLAY_ACTIONS.SHOOT && !isShootPlayIncoming &&\n (doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game) || doesAngelWin(game));\n}\n\nfunction generateGameVictoryData(game: Game): GameVictory | undefined {\n if (areAllPlayersDead(game)) {\n return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.NONE }, plainToInstanceDefaultOptions);\n }\n if (doesAngelWin(game)) {\n const angelPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.ANGEL);\n return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.ANGEL, winners: [angelPlayer] }, plainToInstanceDefaultOptions);\n }\n if (doLoversWin(game)) {\n const inLovePlayers = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE);\n return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.LOVERS, winners: inLovePlayers }, plainToInstanceDefaultOptions);\n }\n if (doesPiedPiperWin(game)) {\n const piedPiperPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.PIED_PIPER);\n return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.PIED_PIPER, winners: [piedPiperPlayer] }, plainToInstanceDefaultOptions);\n }\n if (doesWhiteWerewolfWin(game)) {\n const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WHITE_WEREWOLF);\n return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.WHITE_WEREWOLF, winners: [whiteWerewolfPlayer] }, plainToInstanceDefaultOptions);\n }\n if (doWerewolvesWin(game)) {\n const werewolvesSidePlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES);\n return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.WEREWOLVES, winners: werewolvesSidePlayers }, plainToInstanceDefaultOptions);\n }\n if (doVillagersWin(game)) {\n const villagersSidePlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS);\n return plainToInstance(GameVictory, { type: GAME_VICTORY_TYPES.VILLAGERS, winners: villagersSidePlayers }, plainToInstanceDefaultOptions);\n }\n}\n\nexport {\n doWerewolvesWin,\n doVillagersWin,\n doLoversWin,\n doesWhiteWerewolfWin,\n doesPiedPiperWin,\n doesAngelWin,\n isGameOver,\n generateGameVictoryData,\n};" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GamePlayActions } from \"@/modules/game/enums/game-play.enum\";\nimport { GameVictoryTypes } from \"@/modules/game/enums/game-victory.enum\";\nimport { PlayerAttributeNames, PlayerDeathCauses } from \"@/modules/game/enums/player.enum\";\nimport { areAllPlayersDead, getLeftToCharmByPiedPiperPlayers, getPlayersWithActiveAttributeName, getPlayersWithCurrentSide, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { isPlayerAliveAndPowerful, isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameVictory } from \"@/modules/game/schemas/game-victory/game-victory.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nfunction doWerewolvesWin(game: Game): boolean {\n const werewolvesSidedPlayers = getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES);\n return werewolvesSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === RoleSides.VILLAGERS && isAlive);\n}\n\nfunction doVillagersWin(game: Game): boolean {\n const villagersSidedPlayers = getPlayersWithCurrentSide(game, RoleSides.VILLAGERS);\n return villagersSidedPlayers.length > 0 && !game.players.some(({ side, isAlive }) => side.current === RoleSides.WEREWOLVES && isAlive);\n}\n\nfunction doLoversWin(game: Game): boolean {\n const lovers = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE);\n return lovers.length > 0 && game.players.every(player => {\n const isPlayerInLove = doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game);\n return isPlayerInLove && player.isAlive || !isPlayerInLove && !player.isAlive;\n });\n}\n\nfunction doesWhiteWerewolfWin(game: Game): boolean {\n const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, RoleNames.WHITE_WEREWOLF);\n return !!whiteWerewolfPlayer && game.players.every(({ role, isAlive }) =>\n role.current === RoleNames.WHITE_WEREWOLF && isAlive || role.current !== RoleNames.WHITE_WEREWOLF && !isAlive);\n}\n\nfunction doesPiedPiperWin(game: Game): boolean {\n const { isPowerlessIfInfected } = game.options.roles.piedPiper;\n const piedPiperPlayer = getPlayerWithCurrentRole(game, RoleNames.PIED_PIPER);\n const leftToCharmPlayers = getLeftToCharmByPiedPiperPlayers(game);\n return !!piedPiperPlayer && isPlayerAliveAndPowerful(piedPiperPlayer, game) && !leftToCharmPlayers.length &&\n (!isPowerlessIfInfected || piedPiperPlayer.side.current === RoleSides.VILLAGERS);\n}\n\nfunction doesAngelWin(game: Game): boolean {\n const angelPlayer = getPlayerWithCurrentRole(game, RoleNames.ANGEL);\n if (!angelPlayer?.death || angelPlayer.isAlive || !isPlayerPowerful(angelPlayer, game) || game.turn > 1) {\n return false;\n }\n return [PlayerDeathCauses.VOTE, PlayerDeathCauses.EATEN].includes(angelPlayer.death.cause);\n}\n\nfunction isGameOver(game: Game): boolean {\n const { upcomingPlays, currentPlay } = game;\n if (!currentPlay) {\n throw createNoCurrentGamePlayUnexpectedException(\"isGameOver\", { gameId: game._id });\n }\n const isShootPlayIncoming = !!upcomingPlays.find(({ action, source }) => action === GamePlayActions.SHOOT && source.name === RoleNames.HUNTER);\n return areAllPlayersDead(game) || currentPlay.action !== GamePlayActions.SHOOT && !isShootPlayIncoming &&\n (doWerewolvesWin(game) || doVillagersWin(game) || doLoversWin(game) || doesWhiteWerewolfWin(game) || doesPiedPiperWin(game) || doesAngelWin(game));\n}\n\nfunction generateGameVictoryData(game: Game): GameVictory | undefined {\n if (areAllPlayersDead(game)) {\n return plainToInstance(GameVictory, { type: GameVictoryTypes.NONE }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n if (doesAngelWin(game)) {\n const angelPlayer = getPlayerWithCurrentRole(game, RoleNames.ANGEL);\n return plainToInstance(GameVictory, { type: GameVictoryTypes.ANGEL, winners: [angelPlayer] }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n if (doLoversWin(game)) {\n const inLovePlayers = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE);\n return plainToInstance(GameVictory, { type: GameVictoryTypes.LOVERS, winners: inLovePlayers }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n if (doesPiedPiperWin(game)) {\n const piedPiperPlayer = getPlayerWithCurrentRole(game, RoleNames.PIED_PIPER);\n return plainToInstance(GameVictory, { type: GameVictoryTypes.PIED_PIPER, winners: [piedPiperPlayer] }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n if (doesWhiteWerewolfWin(game)) {\n const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, RoleNames.WHITE_WEREWOLF);\n return plainToInstance(GameVictory, { type: GameVictoryTypes.WHITE_WEREWOLF, winners: [whiteWerewolfPlayer] }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n if (doWerewolvesWin(game)) {\n const werewolvesSidePlayers = getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES);\n return plainToInstance(GameVictory, { type: GameVictoryTypes.WEREWOLVES, winners: werewolvesSidePlayers }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n if (doVillagersWin(game)) {\n const villagersSidePlayers = getPlayersWithCurrentSide(game, RoleSides.VILLAGERS);\n return plainToInstance(GameVictory, { type: GameVictoryTypes.VILLAGERS, winners: villagersSidePlayers }, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n}\n\nexport {\n doWerewolvesWin,\n doVillagersWin,\n doLoversWin,\n doesWhiteWerewolfWin,\n doesPiedPiperWin,\n doesAngelWin,\n isGameOver,\n generateGameVictoryData,\n};" }, "src/modules/game/helpers/game.factory.ts": { "language": "typescript", @@ -28879,7 +28999,6 @@ "529", "530", "531", - "697", "698", "699", "700", @@ -28893,9 +29012,9 @@ "708", "709", "710", - "713", + "711", "714", - "719", + "715", "720", "721", "722", @@ -28903,7 +29022,7 @@ "724", "725", "726", - "839", + "727", "840", "841", "842", @@ -28928,8 +29047,9 @@ "861", "862", "863", - "872", - "1011" + "864", + "873", + "1012" ], "location": { "end": { @@ -28943,7 +29063,7 @@ } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createGame(game: Game): Game {\n return plainToInstance(Game, toJSON(game), plainToInstanceDefaultOptions);\n}\n\nexport { createGame };" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createGame(game: Game): Game {\n return plainToInstance(Game, toJSON(game), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n}\n\nexport { createGame };" }, "src/modules/game/helpers/game.helper.ts": { "language": "typescript", @@ -28952,7 +29072,7 @@ "id": "728", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(18,71): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(17,70): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -28987,7 +29107,7 @@ "line": 19 }, "start": { - "column": 103, + "column": 102, "line": 17 } } @@ -29039,9 +29159,13 @@ "id": "730", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:508:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 23, "static": false, - "killedBy": [], + "killedBy": [ + "164" + ], "coveredBy": [ "164", "165", @@ -29082,13 +29206,9 @@ "id": "731", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 30\n+ Received + 6\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea438b82a8096798d81814\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea438b82a8096798d81815\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea438b82a8096798d81816\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea438b82a8096798d81817\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea438b82a8096798d81818\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea438b82a8096798d81819\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -281,38 +281,14 @@\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"charm\",\n- \"source\": Object {\n- \"name\": \"cupid\",\n- },\n- },\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n- \"action\": \"meet-each-other\",\n- \"source\": Object {\n- \"name\": \"lovers\",\n- },\n- },\n- Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"white-werewolf\",\n },\n },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 23, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -29129,9 +29249,13 @@ "id": "732", "mutatorName": "EqualityOperator", "replacement": "player.role.name !== role", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 6\n+ Received + 91\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd8443831e8f160931a4a\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd8443831e8f160931a4b\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd8443831e8f160931a4c\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd8443831e8f160931a4d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd8443831e8f160931a4e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecd8443831e8f160931a4f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -281,11 +281,30 @@\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"vote\",\n+ \"cause\": \"angel-presence\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"choose-card\",\n+ \"source\": Object {\n+ \"name\": \"thief\",\n+ },\n+ },\n Object {\n+ \"action\": \"choose-side\",\n+ \"source\": Object {\n+ \"name\": \"dog-wolf\",\n+ },\n+ },\n+ Object {\n \"action\": \"charm\",\n \"source\": Object {\n \"name\": \"cupid\",\n },\n },\n@@ -294,25 +313,91 @@\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n Object {\n+ \"action\": \"sniff\",\n+ \"source\": Object {\n+ \"name\": \"fox\",\n+ },\n+ },\n+ Object {\n \"action\": \"meet-each-other\",\n \"source\": Object {\n \"name\": \"lovers\",\n },\n },\n Object {\n+ \"action\": \"choose-sign\",\n+ \"source\": Object {\n+ \"name\": \"stuttering-judge\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"meet-each-other\",\n+ \"source\": Object {\n+ \"name\": \"two-sisters\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"meet-each-other\",\n+ \"source\": Object {\n+ \"name\": \"three-brothers\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"choose-model\",\n+ \"source\": Object {\n+ \"name\": \"wild-child\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"mark\",\n+ \"source\": Object {\n+ \"name\": \"raven\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ },\n+ },\n+ Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"white-werewolf\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"big-bad-wolf\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"charm\",\n+ \"source\": Object {\n+ \"name\": \"pied-piper\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"meet-each-other\",\n+ \"source\": Object {\n+ \"name\": \"charmed\",\n },\n },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 23, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "164", "165", @@ -29172,7 +29296,7 @@ "id": "733", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(22,66): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(21,65): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -29284,7 +29408,6 @@ "531", "538", "539", - "651", "652", "653", "654", @@ -29306,24 +29429,25 @@ "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", - "719", + "691", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -29331,7 +29455,7 @@ "line": 23 }, "start": { - "column": 85, + "column": 84, "line": 21 } } @@ -29340,13 +29464,9 @@ "id": "734", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 6\n+ Received + 0\n\n@@ -219,16 +219,10 @@\n \"status\": \"playing\",\n \"tick\": 5685467225784321,\n \"turn\": 3932427837767680,\n \"upcomingPlays\": Array [\n Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n- Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 147, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "27", "28", @@ -29455,7 +29575,6 @@ "531", "538", "539", - "651", "652", "653", "654", @@ -29477,24 +29596,25 @@ "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", - "719", + "691", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -29620,18 +29740,17 @@ "531", "538", "539", - "652", "653", "654", "655", - "657", + "656", "658", "659", "660", "661", "662", "663", - "665", + "664", "666", "667", "668", @@ -29639,24 +29758,25 @@ "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", - "719", + "691", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -29673,12 +29793,12 @@ "id": "736", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -150,11 +150,11 @@\n \"current\": \"wild-child\",\n \"isRevealed\": false,\n \"original\": \"wild-child\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n ],\n \"status\": \"canceled\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:613:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:537:126)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 138, "static": false, "killedBy": [ - "396" + "31" ], "coveredBy": [ "27", @@ -29782,18 +29902,17 @@ "531", "538", "539", - "652", "653", "654", "655", - "657", + "656", "658", "659", "660", "661", "662", "663", - "665", + "664", "666", "667", "668", @@ -29801,24 +29920,25 @@ "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", - "719", + "691", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -29944,18 +30064,17 @@ "531", "538", "539", - "652", "653", "654", "655", - "657", + "656", "658", "659", "660", "661", "662", "663", - "665", + "664", "666", "667", "668", @@ -29963,24 +30082,25 @@ "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", - "719", + "691", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -29997,7 +30117,7 @@ "id": "738", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(26,67): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(25,66): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -30027,7 +30147,7 @@ "line": 27 }, "start": { - "column": 76, + "column": 75, "line": 25 } } @@ -30196,9 +30316,13 @@ "id": "743", "mutatorName": "EqualityOperator", "replacement": "player.role.current !== role", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1289:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 18, "static": false, - "killedBy": [], + "killedBy": [ + "224" + ], "coveredBy": [ "145", "224", @@ -30234,7 +30358,7 @@ "id": "744", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(30,67): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(29,66): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -30264,7 +30388,6 @@ "577", "578", "600", - "638", "639", "640", "641", @@ -30272,15 +30395,16 @@ "643", "644", "645", - "677", + "646", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -30288,7 +30412,7 @@ "line": 31 }, "start": { - "column": 76, + "column": 75, "line": 29 } } @@ -30326,7 +30450,6 @@ "577", "578", "600", - "638", "639", "640", "641", @@ -30334,15 +30457,16 @@ "643", "644", "645", - "677", + "646", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -30359,9 +30483,13 @@ "id": "746", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 6\n+ Received + 0\n\n@@ -224,14 +224,8 @@\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"werewolves\",\n- },\n- },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 42, "static": false, - "killedBy": [], + "killedBy": [ + "530" + ], "coveredBy": [ "144", "145", @@ -30388,7 +30516,6 @@ "577", "578", "600", - "638", "639", "640", "641", @@ -30396,15 +30523,16 @@ "643", "644", "645", - "677", + "646", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -30421,12 +30549,12 @@ "id": "747", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 34\n\n@@ -32,10 +32,44 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Player {\n+ \"_id\": \"95172bacfdb881288d1eeeee\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Moriah\",\n+ \"position\": 3694561289306112,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"d2cbef85513dfd6ffcf4da72\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Jordi\",\n+ \"position\": 2698446593064960,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"c465bac00156ee86bbc3fc1d\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Adonis\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:106:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 32\n\n@@ -27,10 +27,42 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n+ \"_id\": \"8bee51e8cfcdb5a193bfecef\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Dena\",\n+ \"position\": 5410996709490688,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"cee1b7400bbe08cdcbc3c23f\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Angelica\",\n+ \"position\": 7025257550446592,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n \"_id\": \"e6bfaa93a33ee5215d2e8ddb\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Keyshawn\",\n \"position\": 1265115053686784,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 38, "static": false, "killedBy": [ - "542" + "531" ], "coveredBy": [ "144", @@ -30452,21 +30580,21 @@ "577", "578", "600", - "639", "640", "641", - "643", + "642", "644", "645", - "677", + "646", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -30483,13 +30611,9 @@ "id": "748", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 70\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"6fd3adae74a5bfe1d58d6db6\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Brianne\",\n- \"position\": 630535565082624,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"06faacadebdfdad5fab3dfe7\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Nico\",\n- \"position\": 5078192022880256,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"2a7e3cddf0d33bbd181e1f31\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Hector\",\n- \"position\": 5882475819565056,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"d0adc808cbc32feeea194ceb\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Aglae\",\n- \"position\": 6580732262612992,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:106:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 38, + "status": "Timeout", "static": false, - "killedBy": [ - "542" - ], + "killedBy": [], "coveredBy": [ "144", "145", @@ -30514,21 +30638,21 @@ "577", "578", "600", - "639", "640", "641", - "643", + "642", "644", "645", - "677", + "646", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -30572,21 +30696,21 @@ "577", "578", "600", - "639", "640", "641", - "643", + "642", "644", "645", - "677", + "646", "678", "679", "680", "681", "682", - "688", + "683", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -30603,7 +30727,7 @@ "id": "750", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(34,59): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(33,59): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -30671,18 +30795,18 @@ "596", "597", "598", - "779", "780", "781", - "783", + "782", "784", - "788", - "851", + "785", + "789", "852", "853", - "857", + "854", "858", - "859" + "859", + "860" ], "location": { "end": { @@ -30770,18 +30894,18 @@ "596", "597", "598", - "779", "780", "781", - "783", + "782", "784", - "788", - "851", + "785", + "789", "852", "853", - "857", + "854", "858", - "859" + "859", + "860" ], "location": { "end": { @@ -30798,13 +30922,9 @@ "id": "752", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in revealPlayerRole\"\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:245:84)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 72, + "status": "Timeout", "static": false, - "killedBy": [ - "365" - ], + "killedBy": [], "coveredBy": [ "286", "306", @@ -30867,17 +30987,17 @@ "596", "597", "598", - "779", "780", "781", - "783", + "782", "784", - "788", - "851", + "785", + "789", "852", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -30959,17 +31079,17 @@ "596", "597", "598", - "779", "780", "781", - "783", + "782", "784", - "788", - "851", + "785", + "789", "852", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -30991,7 +31111,7 @@ "testsCompleted": 72, "static": false, "killedBy": [ - "851" + "852" ], "coveredBy": [ "286", @@ -31055,17 +31175,17 @@ "596", "597", "598", - "779", "780", "781", - "783", + "782", "784", - "788", - "851", + "785", + "789", "852", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -31082,7 +31202,7 @@ "id": "755", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(38,90): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(37,90): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31131,7 +31251,7 @@ "id": "756", "mutatorName": "BooleanLiteral", "replacement": "player", - "statusReason": "src/modules/game/helpers/game.helper.ts(43,3): error TS2322: Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(42,3): error TS2322: Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31180,7 +31300,7 @@ "id": "757", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game.helper.ts(43,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(42,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31229,7 +31349,7 @@ "id": "758", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.helper.ts(43,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(42,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31278,7 +31398,7 @@ "id": "759", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(41,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(40,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31303,7 +31423,7 @@ "id": "760", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(46,61): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(45,61): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31412,9 +31532,13 @@ "id": "764", "mutatorName": "EqualityOperator", "replacement": "name.toString() !== playerName.toString()", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 7\n+ Received + 7\n\n Player {\n- \"_id\": \"f622d3acaead2de2de34a74b\",\n+ \"_id\": \"d185892fa6d5dfeaca9e107e\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Columbus\",\n- \"position\": 8224067804987392,\n+ \"name\": \"Ferne\",\n+ \"position\": 1725488605167616,\n \"role\": PlayerRole {\n- \"current\": \"dog-wolf\",\n- \"isRevealed\": false,\n- \"original\": \"pied-piper\",\n+ \"current\": \"witch\",\n+ \"isRevealed\": true,\n+ \"original\": \"two-sisters\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:156:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "548" + ], "coveredBy": [ "548", "549", @@ -31436,7 +31560,7 @@ "id": "765", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(50,86): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(49,86): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31459,7 +31583,7 @@ "id": "766", "mutatorName": "BooleanLiteral", "replacement": "player", - "statusReason": "src/modules/game/helpers/game.helper.ts(55,3): error TS2322: Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(54,3): error TS2322: Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31482,7 +31606,7 @@ "id": "767", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game.helper.ts(55,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(54,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31505,7 +31629,7 @@ "id": "768", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.helper.ts(55,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(54,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31528,7 +31652,7 @@ "id": "769", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(53,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(52,3): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31550,7 +31674,7 @@ "id": "770", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(58,96): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(57,96): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31560,9 +31684,9 @@ "552", "553", "554", - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -31579,7 +31703,7 @@ "id": "771", "mutatorName": "OptionalChaining", "replacement": "cards.find", - "statusReason": "src/modules/game/helpers/game.helper.ts(59,10): error TS18048: 'cards' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(58,10): error TS18048: 'cards' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -31589,9 +31713,9 @@ "552", "553", "554", - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -31608,17 +31732,21 @@ "id": "772", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: thrown: ResourceNotFoundException {\n \"getResponse\": [Function getResponse],\n \"getStatus\": [Function getStatus],\n \"initCause\": [Function initCause],\n \"initMessage\": [Function initMessage],\n \"initName\": [Function initName],\n \"toString\": [Function toString],\n}\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:139:5\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:122:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:25:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "788" + ], "coveredBy": [ "476", "477", "552", "554", - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -31635,21 +31763,17 @@ "id": "773", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:135:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "786" - ], + "killedBy": [], "coveredBy": [ "476", "477", "552", "554", - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -31674,9 +31798,9 @@ "477", "552", "554", - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -31693,17 +31817,21 @@ "id": "775", "mutatorName": "EqualityOperator", "replacement": "_id.toString() !== id.toString()", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts:135:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "787" + ], "coveredBy": [ "476", "477", "552", "554", - "786", "787", - "788" + "788", + "789" ], "location": { "end": { @@ -31720,7 +31848,7 @@ "id": "776", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(62,45): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(61,45): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -32004,7 +32132,7 @@ "id": "785", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(67,44): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(66,44): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -32222,7 +32350,7 @@ "id": "794", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(72,41): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(71,41): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -32232,7 +32360,6 @@ "561", "562", "563", - "674", "675", "676", "677", @@ -32248,7 +32375,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32265,20 +32393,15 @@ "id": "795", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 4\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 8291898686963713,\n \"turn\": 7445534818172928,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,9 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"none\",\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 22, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "530", "531", "561", "562", "563", - "674", "675", "676", "677", @@ -32294,7 +32417,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32324,7 +32448,6 @@ "561", "562", "563", - "674", "675", "676", "677", @@ -32340,7 +32463,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32357,7 +32481,7 @@ "id": "797", "mutatorName": "LogicalOperator", "replacement": "game.players.length > 0 || game.players.every(({\n isAlive\n}) => !isAlive)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 4\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 1016323358326785,\n \"turn\": 1339604898676736,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,9 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"none\",\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 4\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 655011625304065,\n \"turn\": 705820356509696,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n@@ -232,6 +232,9 @@\n \"name\": \"werewolves\",\n },\n },\n ],\n \"updatedAt\": Any,\n+ \"victory\": Object {\n+ \"type\": \"none\",\n+ },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 22, "static": false, @@ -32370,7 +32494,6 @@ "561", "562", "563", - "674", "675", "676", "677", @@ -32386,7 +32509,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32416,7 +32540,6 @@ "561", "562", "563", - "674", "675", "676", "677", @@ -32432,7 +32555,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32449,16 +32573,19 @@ "id": "799", "mutatorName": "EqualityOperator", "replacement": "game.players.length >= 0", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:270:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 22, "static": false, - "killedBy": [], + "killedBy": [ + "561" + ], "coveredBy": [ "530", "531", "561", "562", "563", - "674", "675", "676", "677", @@ -32474,7 +32601,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32491,16 +32619,19 @@ "id": "800", "mutatorName": "EqualityOperator", "replacement": "game.players.length <= 0", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:270:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 22, "static": false, - "killedBy": [], + "killedBy": [ + "561" + ], "coveredBy": [ "530", "531", "561", "562", "563", - "674", "675", "676", "677", @@ -32516,7 +32647,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32545,7 +32677,6 @@ "531", "562", "563", - "674", "675", "676", "677", @@ -32561,7 +32692,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32586,7 +32718,6 @@ "531", "562", "563", - "674", "675", "676", "677", @@ -32602,7 +32733,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32619,15 +32751,18 @@ "id": "803", "mutatorName": "BooleanLiteral", "replacement": "isAlive", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:440:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 21, "static": false, - "killedBy": [], + "killedBy": [ + "675" + ], "coveredBy": [ "530", "531", "562", "563", - "674", "675", "676", "677", @@ -32643,7 +32778,8 @@ "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32660,7 +32796,7 @@ "id": "804", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(76,95): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(75,93): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -32688,7 +32824,6 @@ "530", "564", "565", - "714", "715", "716", "717", @@ -32700,7 +32835,8 @@ "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -32708,7 +32844,7 @@ "line": 77 }, "start": { - "column": 114, + "column": 112, "line": 75 } } @@ -32717,7 +32853,7 @@ "id": "805", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"sheriff-election\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:486:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"sheriff-election\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:486:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 37, "static": false, @@ -32748,7 +32884,6 @@ "530", "564", "565", - "714", "715", "716", "717", @@ -32760,7 +32895,8 @@ "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -32777,7 +32913,7 @@ "id": "806", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(80,92): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(79,90): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -32796,19 +32932,19 @@ "576", "602", "603", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32816,7 +32952,7 @@ "line": 81 }, "start": { - "column": 101, + "column": 99, "line": 79 } } @@ -32847,19 +32983,19 @@ "576", "602", "603", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32894,19 +33030,19 @@ "576", "602", "603", - "646", "647", "648", "649", "650", - "681", + "651", "682", - "685", + "683", "686", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -32923,7 +33059,7 @@ "id": "809", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(84,39): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(83,39): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -32964,9 +33100,13 @@ "id": "810", "mutatorName": "MethodExpression", "replacement": "game.players", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 17\n\n@@ -32,10 +32,27 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n+ \"_id\": \"8ea86f8fb7c26e7fb05fe19c\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Kenyon\",\n+ \"position\": 3398343413727232,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"ff6e6bc7b8d47ebcc896ecea\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Meda\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:338:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 20, "static": false, - "killedBy": [], + "killedBy": [ + "568" + ], "coveredBy": [ "328", "329", @@ -33044,7 +33184,7 @@ "id": "812", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(88,52): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(87,52): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -33067,20 +33207,16 @@ "id": "813", "mutatorName": "MethodExpression", "replacement": "game.players", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 27\n\n@@ -80,11 +80,19 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"ad630d6ea884feccd6faefcf\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": false,\n \"name\": \"Cecil\",\n \"position\": 5554301153837056,\n \"role\": PlayerRole {\n@@ -122,11 +130,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"dd2fd8befaebffbd157ada84\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Lenora\",\n \"position\": 7876744759476224,\n \"role\": PlayerRole {\n@@ -164,11 +180,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"e1a85cad4f0edd6fde0efbc0\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": false,\n \"name\": \"Breanne\",\n \"position\": 8721976348639232,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "420" - ], + "killedBy": [], "coveredBy": [ "420", "569" ], "location": { "end": { - "column": 103, + "column": 102, "line": 88 }, "start": { @@ -33093,16 +33229,20 @@ "id": "814", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 2\n\n@@ -97,19 +97,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"fe3838bd8e6d9eecbe11bc2b\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Mortimer\",\n \"position\": 6864852450541568,\n \"role\": PlayerRole {\n@@ -139,19 +131,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"504acb857cd930ff277ae5de\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Ervin\",\n \"position\": 7935891102236672,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "420" + ], "coveredBy": [ "420", "569" ], "location": { "end": { - "column": 102, + "column": 101, "line": 88 }, "start": { @@ -33115,12 +33255,12 @@ "id": "815", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 27\n\n@@ -80,11 +80,19 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"a9568c7cecdc64b0fcd9906c\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": false,\n \"name\": \"Sierra\",\n \"position\": 6007700177551360,\n \"role\": PlayerRole {\n@@ -122,11 +130,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"b1372f6bf684ede5ad03cd84\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Claudine\",\n \"position\": 2277084000944128,\n \"role\": PlayerRole {\n@@ -164,11 +180,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"e069baa5e732d15528b4dfe0\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": false,\n \"name\": \"Antonette\",\n \"position\": 4727991988912128,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 51\n\n@@ -1,7 +1,24 @@\n Array [\n Player {\n+ \"_id\": \"7feae7fe715abdace2ce9baf\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Rachael\",\n+ \"position\": 8704263867858944,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n \"_id\": \"b7bb52cde7ae8f13bbbccbc7\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Alvena\",\n@@ -12,8 +29,42 @@\n \"original\": \"villager\",\n },\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"dc5d9c112ff3d5d28fcf0d1f\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Tillman\",\n+ \"position\": 1463257952944128,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"da60e4c3a5bbd337b2be98b7\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Edwardo\",\n+ \"position\": 7477609814294528,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:352:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "420" + "569" ], "coveredBy": [ "420", @@ -33128,7 +33268,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 88 }, "start": { @@ -33141,7 +33281,7 @@ "id": "816", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 2\n\n@@ -97,19 +97,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"a57b826cc3c418e602ebd1c3\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Minerva\",\n \"position\": 1963194088161280,\n \"role\": PlayerRole {\n@@ -139,19 +131,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"f0ededbbfc23d32523dadcd1\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Rebekah\",\n \"position\": 7527191545905152,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 2\n\n@@ -97,19 +97,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"dd53461ed653c4ef4637df25\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Reagan\",\n \"position\": 7223725306937344,\n \"role\": PlayerRole {\n@@ -139,19 +131,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"edd6478ba51b6b5fc5bffb11\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Lily\",\n \"position\": 6826936932237312,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -33154,7 +33294,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 88 }, "start": { @@ -33166,21 +33306,17 @@ { "id": "817", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive || player.side.current === ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 51\n\n@@ -1,7 +1,24 @@\n Array [\n Player {\n+ \"_id\": \"5bc636a14f8a8efa1acde64e\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Daija\",\n+ \"position\": 7009888077086720,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n \"_id\": \"0a42cfeefb0d592015895429\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Brianne\",\n@@ -12,8 +29,42 @@\n \"original\": \"villager\",\n },\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"aecd056fdf55e5c88ceb4dfb\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Emmett\",\n+ \"position\": 7687906072199168,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"c33bcb7d3accf6ca17a57bde\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Deion\",\n+ \"position\": 3514076063858688,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:352:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "replacement": "player.isAlive || player.side.current === RoleSides.VILLAGERS", + "status": "Timeout", "static": false, - "killedBy": [ - "569" - ], + "killedBy": [], "coveredBy": [ "420", "569" ], "location": { "end": { - "column": 102, + "column": 101, "line": 88 }, "start": { @@ -33202,7 +33338,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 88 }, "start": { @@ -33214,13 +33350,13 @@ { "id": "819", "mutatorName": "EqualityOperator", - "replacement": "player.side.current !== ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 7\n+ Received + 24\n\n Array [\n Player {\n- \"_id\": \"fab42f0fd5fcc7a9b0aa051b\",\n+ \"_id\": \"dfdff9ee217c43e436acd85f\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Elsie\",\n+ \"position\": 6732452171087872,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"df491ba55c4580467fd802d2\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Cody\",\n- \"position\": 4533416286486528,\n+ \"name\": \"Casandra\",\n+ \"position\": 7406477027311616,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:352:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.side.current !== RoleSides.VILLAGERS", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 11\n\n@@ -97,19 +97,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"4fadf4b3fbdaaa5eb29e16db\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Demario\",\n \"position\": 5405039845703680,\n \"role\": PlayerRole {\n@@ -122,11 +114,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"5c3b9bb65fecc77bd79f573c\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Roma\",\n \"position\": 6378099291717632,\n \"role\": PlayerRole {\n@@ -139,19 +139,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"7b72b8d07b1ec6ceb75f0bd7\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Frederic\",\n \"position\": 7467434046914560,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "569" + "420" ], "coveredBy": [ "420", @@ -33228,7 +33364,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 88 }, "start": { @@ -33241,7 +33377,7 @@ "id": "820", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(92,52): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(91,52): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -33263,15 +33399,19 @@ "id": "821", "mutatorName": "MethodExpression", "replacement": "game.players", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 51\n\n@@ -14,6 +14,57 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ Player {\n+ \"_id\": \"ebfbb44ab4bcd96a8edb52f0\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Kian\",\n+ \"position\": 5499806665408512,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"17c16bec293934b6e6cc15d1\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Sally\",\n+ \"position\": 8970370354774016,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"4ff2bcbdb07176f3a9fce6dd\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Ludie\",\n+ \"position\": 8495014720045056,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "570" + ], "coveredBy": [ "570" ], "location": { "end": { - "column": 104, + "column": 103, "line": 92 }, "start": { @@ -33292,7 +33432,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 92 }, "start": { @@ -33305,19 +33445,15 @@ "id": "823", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 51\n\n@@ -14,6 +14,57 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ Player {\n+ \"_id\": \"665b3cb708088cc9e1d25fec\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Price\",\n+ \"position\": 8713920520912896,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"bd3aeec5ce2dfd7cba36cc69\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Moshe\",\n+ \"position\": 4117305778765824,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"e76cbfd9e9ef9bffae172f18\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Vaughn\",\n+ \"position\": 3209498583891968,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "570" - ], + "killedBy": [], "coveredBy": [ "570" ], "location": { "end": { - "column": 103, + "column": 102, "line": 92 }, "start": { @@ -33330,19 +33466,15 @@ "id": "824", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"6c310f1d07d952b33d126f0d\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Brandi\",\n- \"position\": 535580702146560,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "570" - ], + "killedBy": [], "coveredBy": [ "570" ], "location": { "end": { - "column": 103, + "column": 102, "line": 92 }, "start": { @@ -33354,8 +33486,8 @@ { "id": "825", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive || player.side.current === ROLE_SIDES.WEREWOLVES", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 34\n\n@@ -14,6 +14,40 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ Player {\n+ \"_id\": \"f47fabb95fbdfb7fd80ca86f\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Katlynn\",\n+ \"position\": 375051994005504,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"86fcf5e2feeef0adbda90bfa\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Dewayne\",\n+ \"position\": 6323575378149376,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.isAlive || player.side.current === RoleSides.WEREWOLVES", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 34\n\n@@ -14,6 +14,40 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ Player {\n+ \"_id\": \"58e23adeeb3134c31f57b6c4\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Constance\",\n+ \"position\": 2715127012917248,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"af1bf0e8da45cd4be1d52d0f\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Jaeden\",\n+ \"position\": 3184599781867520,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -33367,7 +33499,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 92 }, "start": { @@ -33380,7 +33512,7 @@ "id": "826", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 17\n\n@@ -14,6 +14,23 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ Player {\n+ \"_id\": \"a03dacaaa36338fd7c7ef575\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Jonas\",\n+ \"position\": 7556947240812544,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 17\n\n@@ -14,6 +14,23 @@\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ Player {\n+ \"_id\": \"aeac6dbaa0fa5055616fc38e\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Troy\",\n+ \"position\": 5528202499850240,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -33392,7 +33524,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 92 }, "start": { @@ -33404,8 +33536,8 @@ { "id": "827", "mutatorName": "EqualityOperator", - "replacement": "player.side.current !== ROLE_SIDES.WEREWOLVES", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 7\n+ Received + 7\n\n Array [\n Player {\n- \"_id\": \"c490c17bbdc2cbaffe2ed77c\",\n+ \"_id\": \"2ab6ef1d9ac251faccddd498\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Gudrun\",\n- \"position\": 3707157467889664,\n+ \"name\": \"Orrin\",\n+ \"position\": 5572916685045760,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"villager\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"villager\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.side.current !== RoleSides.WEREWOLVES", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 7\n+ Received + 7\n\n Array [\n Player {\n- \"_id\": \"67a3abf0cbbea8eb78d34fdc\",\n+ \"_id\": \"2bd878acfec4ef8fae2ec8dd\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Zella\",\n- \"position\": 5958692555980800,\n+ \"name\": \"Anibal\",\n+ \"position\": 833570851520512,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"villager\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"villager\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:366:50)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -33417,7 +33549,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 92 }, "start": { @@ -33430,7 +33562,7 @@ "id": "828", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(96,56): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(95,56): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -33438,7 +33570,6 @@ "530", "531", "571", - "656", "657", "658", "659", @@ -33446,13 +33577,14 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { @@ -33469,18 +33601,17 @@ "id": "829", "mutatorName": "MethodExpression", "replacement": "game.players", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 67\n\n@@ -1,13 +1,80 @@\n Array [\n Player {\n+ \"_id\": \"3ff9d4b5443c66d7a0e78ea1\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"charmed\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"pied-piper\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Helmer\",\n+ \"position\": 97799429423104,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"db92be6ec5b6e336ead0bd6e\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Lourdes\",\n+ \"position\": 8506400550420480,\n+ \"role\": PlayerRole {\n+ \"current\": \"pied-piper\",\n+ \"isRevealed\": false,\n+ \"original\": \"pied-piper\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"ee4ffc2413c42b33993f630d\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Aletha\",\n \"position\": 6835420868378624,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"d8cbdedc141554d29ed82a3c\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"charmed\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"pied-piper\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Greyson\",\n+ \"position\": 7207287852630016,\n \"role\": PlayerRole {\n \"current\": \"villager\",\n \"isRevealed\": false,\n \"original\": \"villager\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:381:54)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 18, "static": false, "killedBy": [ - "571" + "663" ], "coveredBy": [ "530", "531", "571", - "656", "657", "658", "659", @@ -33488,17 +33619,18 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 51, + "column": 50, "line": 97 }, "start": { @@ -33511,14 +33643,17 @@ "id": "830", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 36\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"74bdf96ff40a51bc6fec8ee2\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Rebecca\",\n- \"position\": 4107481837993984,\n- \"role\": PlayerRole {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Player {\n- \"_id\": \"3cd458f12e176fba367d0f1f\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Madisyn\",\n- \"position\": 2876252570517504,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:381:54)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 18, "static": false, - "killedBy": [], + "killedBy": [ + "571" + ], "coveredBy": [ "530", "531", "571", - "656", "657", "658", "659", @@ -33526,17 +33661,18 @@ "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 50, + "column": 49, "line": 97 }, "start": { @@ -33556,24 +33692,24 @@ "530", "531", "571", - "657", "658", "659", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 50, + "column": 49, "line": 97 }, "start": { @@ -33593,24 +33729,24 @@ "530", "531", "571", - "657", "658", "659", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 50, + "column": 49, "line": 97 }, "start": { @@ -33622,7 +33758,7 @@ { "id": "833", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CHARMED, game) || player.role.current !== ROLE_NAMES.PIED_PIPER", + "replacement": "player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CHARMED, game) || player.role.current !== RoleNames.PIED_PIPER", "status": "Timeout", "static": false, "killedBy": [], @@ -33630,24 +33766,24 @@ "530", "531", "571", - "657", "658", "659", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 50, + "column": 49, "line": 97 }, "start": { @@ -33667,24 +33803,24 @@ "530", "531", "571", - "657", "658", "659", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 142, + "column": 140, "line": 96 }, "start": { @@ -33696,36 +33832,36 @@ { "id": "835", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive || !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CHARMED, game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.isAlive || !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CHARMED, game)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 25\n\n@@ -1,7 +1,32 @@\n Array [\n Player {\n+ \"_id\": \"85d5ca179fbf627244c1fba4\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"charmed\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"pied-piper\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Sydni\",\n+ \"position\": 5128140978388992,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n \"_id\": \"acd8dd18dc96589ce0ce3bf5\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Kavon\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:381:54)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 17, "static": false, "killedBy": [ - "662" + "571" ], "coveredBy": [ "530", "531", "571", - "657", "658", "659", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 142, + "column": 140, "line": 96 }, "start": { @@ -33737,36 +33873,36 @@ { "id": "836", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CHARMED, game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CHARMED, game)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 17, "static": false, "killedBy": [ - "662" + "663" ], "coveredBy": [ "530", "531", "571", - "657", "658", "659", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 142, + "column": 140, "line": 96 }, "start": { @@ -33779,34 +33915,30 @@ "id": "837", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 16, + "status": "Timeout", "static": false, - "killedBy": [ - "662" - ], + "killedBy": [], "coveredBy": [ "530", "531", "571", - "657", - "659", + "658", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 50, + "column": 49, "line": 97 }, "start": { @@ -33818,35 +33950,35 @@ { "id": "838", "mutatorName": "EqualityOperator", - "replacement": "player.role.current === ROLE_NAMES.PIED_PIPER", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:299:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.role.current === RoleNames.PIED_PIPER", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 22\n+ Received + 5\n\n Array [\n Player {\n- \"_id\": \"f0ae5a1f0d0ccbec4fe52caa\",\n+ \"_id\": \"7fde3cb1b78eb0ec1b631eb8\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Carole\",\n- \"position\": 1946387289735168,\n+ \"name\": \"Anastacio\",\n+ \"position\": 4592704302350336,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"pied-piper\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"pied-piper\",\n },\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n- },\n- },\n- Player {\n- \"_id\": \"fdcefa1b86f3b6e6d82cf1f5\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Alisa\",\n- \"position\": 2195984062873600,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:381:54)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 16, "static": false, "killedBy": [ - "662" + "571" ], "coveredBy": [ "530", "531", "571", - "657", - "659", + "658", "660", "661", "662", "663", - "681", + "664", "682", - "686", + "683", "687", "688", "689", - "690" + "690", + "691" ], "location": { "end": { - "column": 50, + "column": 49, "line": 97 }, "start": { @@ -33859,7 +33991,7 @@ "id": "839", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(101,55): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(100,55): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -33892,7 +34024,7 @@ "id": "840", "mutatorName": "MethodExpression", "replacement": "game.players", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 12, "static": false, @@ -33915,7 +34047,7 @@ ], "location": { "end": { - "column": 88, + "column": 86, "line": 102 }, "start": { @@ -33928,7 +34060,7 @@ "id": "841", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:745:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:745:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 12, "static": false, @@ -33951,7 +34083,7 @@ ], "location": { "end": { - "column": 87, + "column": 85, "line": 102 }, "start": { @@ -33964,7 +34096,7 @@ "id": "842", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 12, "static": false, @@ -33987,7 +34119,7 @@ ], "location": { "end": { - "column": 87, + "column": 85, "line": 102 }, "start": { @@ -34000,9 +34132,13 @@ "id": "843", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:745:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 12, "static": false, - "killedBy": [], + "killedBy": [ + "48" + ], "coveredBy": [ "39", "40", @@ -34019,7 +34155,7 @@ ], "location": { "end": { - "column": 87, + "column": 85, "line": 102 }, "start": { @@ -34031,7 +34167,7 @@ { "id": "844", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive && player.side.current === ROLE_SIDES.VILLAGERS || !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.EATEN, game)", + "replacement": "player.isAlive && player.side.current === RoleSides.VILLAGERS || !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.EATEN, game)", "status": "Timeout", "static": false, "killedBy": [], @@ -34051,7 +34187,7 @@ ], "location": { "end": { - "column": 87, + "column": 85, "line": 102 }, "start": { @@ -34064,13 +34200,9 @@ "id": "845", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 12, + "status": "Timeout", "static": false, - "killedBy": [ - "39" - ], + "killedBy": [], "coveredBy": [ "39", "40", @@ -34087,7 +34219,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 101 }, "start": { @@ -34099,7 +34231,7 @@ { "id": "846", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive || player.side.current === ROLE_SIDES.VILLAGERS", + "replacement": "player.isAlive || player.side.current === RoleSides.VILLAGERS", "status": "Timeout", "static": false, "killedBy": [], @@ -34119,7 +34251,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 101 }, "start": { @@ -34132,13 +34264,9 @@ "id": "847", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 34\n\n@@ -1,7 +1,24 @@\n Array [\n Player {\n+ \"_id\": \"c2e1f3e14be4b73ea0abd2b8\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Caroline\",\n+ \"position\": 6625510719225856,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n \"_id\": \"dd10da298c3a6c1f0adc5903\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Vilma\",\n@@ -12,8 +29,25 @@\n \"original\": \"pied-piper\",\n },\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"6bfb5ee7decbaa0bea0ce40b\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Theresa\",\n+ \"position\": 5981267724075008,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:396:53)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 12, + "status": "Timeout", "static": false, - "killedBy": [ - "572" - ], + "killedBy": [], "coveredBy": [ "39", "40", @@ -34155,7 +34283,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 101 }, "start": { @@ -34167,7 +34295,7 @@ { "id": "848", "mutatorName": "EqualityOperator", - "replacement": "player.side.current !== ROLE_SIDES.VILLAGERS", + "replacement": "player.side.current !== RoleSides.VILLAGERS", "status": "Timeout", "static": false, "killedBy": [], @@ -34187,7 +34315,7 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 101 }, "start": { @@ -34199,10 +34327,14 @@ { "id": "849", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.EATEN, game)", - "status": "Timeout", + "replacement": "doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.EATEN, game)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:690:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 10, "static": false, - "killedBy": [], + "killedBy": [ + "43" + ], "coveredBy": [ "39", "40", @@ -34211,14 +34343,13 @@ "43", "44", "45", - "46", "48", "49", "572" ], "location": { "end": { - "column": 87, + "column": 85, "line": 102 }, "start": { @@ -34231,7 +34362,7 @@ "id": "850", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(106,58): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(105,58): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -34259,7 +34390,7 @@ "id": "851", "mutatorName": "MethodExpression", "replacement": "game.players", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 76\n\n@@ -1,7 +1,83 @@\n Array [\n Player {\n+ \"_id\": \"c6c0fb1f18cc286beecd3007\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Helen\",\n+ \"position\": 61026632466432,\n+ \"role\": PlayerRole {\n+ \"current\": \"white-werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"white-werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"ef260eacecbec3e03720feae\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Verda\",\n+ \"position\": 5207298863529984,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"7cf9f0d58a514fbeee05f8f3\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Genevieve\",\n+ \"position\": 2548542023401472,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"ebfddaafcfe8e4780dcd2cc2\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Vergie\",\n+ \"position\": 5150635171250176,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"af7af3e141881eafdbe55d2c\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Amir\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 76\n\n@@ -1,7 +1,83 @@\n Array [\n Player {\n+ \"_id\": \"48bb5e637ccdf2bbd2b8ec7f\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Easter\",\n+ \"position\": 6819007053168640,\n+ \"role\": PlayerRole {\n+ \"current\": \"white-werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"white-werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"d97eedf279eff1c9cf33c08c\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Paxton\",\n+ \"position\": 8741217760182272,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"333efb3d89a65cb5fad411c4\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Linda\",\n+ \"position\": 9005087678529536,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"979afd76e4d29ea748a1d9aa\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Darryl\",\n+ \"position\": 159842459189248,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"9a6bcae5d0da918fbfa3c88a\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Maida\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -34277,7 +34408,7 @@ ], "location": { "end": { - "column": 157, + "column": 155, "line": 106 }, "start": { @@ -34290,7 +34421,7 @@ "id": "852", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"6a3aab23472ac0914effcdc2\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Chad\",\n- \"position\": 3403090241781760,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"eadcbe8fcce2e5be3dc72b2d\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Asha\",\n- \"position\": 846051384754176,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -34308,7 +34439,7 @@ ], "location": { "end": { - "column": 156, + "column": 154, "line": 106 }, "start": { @@ -34335,7 +34466,7 @@ ], "location": { "end": { - "column": 156, + "column": 154, "line": 106 }, "start": { @@ -34348,9 +34479,13 @@ "id": "854", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 19\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"961d0192eea7b8bc28bcfa3f\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Rusty\",\n- \"position\": 9002133628125184,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "573" + ], "coveredBy": [ "44", "45", @@ -34362,7 +34497,7 @@ ], "location": { "end": { - "column": 156, + "column": 154, "line": 106 }, "start": { @@ -34374,8 +34509,8 @@ { "id": "855", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive && player.side.current === ROLE_SIDES.WEREWOLVES || player.role.current !== ROLE_NAMES.WHITE_WEREWOLF", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 76\n\n@@ -1,7 +1,83 @@\n Array [\n Player {\n+ \"_id\": \"fce69233e1c48d547fd30d71\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Carlos\",\n+ \"position\": 4518746993459200,\n+ \"role\": PlayerRole {\n+ \"current\": \"white-werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"white-werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"8c0e51b5fee83b6032d4eddd\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Walton\",\n+ \"position\": 5144224517324800,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"d0084c62b20bf3c59b6f4add\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Magali\",\n+ \"position\": 3096556832030720,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"e4d7116c26e33eadab03c54f\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Ottilie\",\n+ \"position\": 7676946922078208,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"8ffefc8dfd2bc9819dd8af10\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Delmer\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.isAlive && player.side.current === RoleSides.WEREWOLVES || player.role.current !== RoleNames.WHITE_WEREWOLF", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 76\n\n@@ -1,7 +1,83 @@\n Array [\n Player {\n+ \"_id\": \"fdffa2edad2f1fc7c5d71b37\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Andreanne\",\n+ \"position\": 8768839816839168,\n+ \"role\": PlayerRole {\n+ \"current\": \"white-werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"white-werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"bb7d568c2c0da98043f491a7\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Christelle\",\n+ \"position\": 5927014137593856,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"bf69fbcf61fd31fecda50ad7\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Lucile\",\n+ \"position\": 4774073852755968,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"b5abdde631edcf58b92fd983\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Jaquelin\",\n+ \"position\": 2176585593520128,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"53a612b8b8f1aa9b5dd503af\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Pete\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -34393,7 +34528,7 @@ ], "location": { "end": { - "column": 156, + "column": 154, "line": 106 }, "start": { @@ -34406,13 +34541,9 @@ "id": "856", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:704:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "44" - ], + "killedBy": [], "coveredBy": [ "44", "45", @@ -34424,7 +34555,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 106 }, "start": { @@ -34436,14 +34567,10 @@ { "id": "857", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive || player.side.current === ROLE_SIDES.WEREWOLVES", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:704:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "replacement": "player.isAlive || player.side.current === RoleSides.WEREWOLVES", + "status": "Timeout", "static": false, - "killedBy": [ - "44" - ], + "killedBy": [], "coveredBy": [ "44", "45", @@ -34455,7 +34582,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 106 }, "start": { @@ -34468,7 +34595,7 @@ "id": "858", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:718:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:718:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -34486,7 +34613,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 106 }, "start": { @@ -34498,14 +34625,10 @@ { "id": "859", "mutatorName": "EqualityOperator", - "replacement": "player.side.current !== ROLE_SIDES.WEREWOLVES", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 7\n+ Received + 32\n\n Array [\n Player {\n- \"_id\": \"65ec3d2e9c43fbf9fffb60cb\",\n+ \"_id\": \"6ff66a75dbbafc32bd7aeb60\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Leanna\",\n+ \"position\": 7209516131155968,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"b816e0daea74dfdf9b658eb0\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Annabel\",\n- \"position\": 8081803959074816,\n+ \"name\": \"Easton\",\n+ \"position\": 6155447811702784,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"villager\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"villager\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "replacement": "player.side.current !== RoleSides.WEREWOLVES", + "status": "Timeout", "static": false, - "killedBy": [ - "573" - ], + "killedBy": [], "coveredBy": [ "44", "45", @@ -34517,7 +34640,7 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 106 }, "start": { @@ -34530,12 +34653,12 @@ "id": "860", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:728:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 17\n\n@@ -1,7 +1,24 @@\n Array [\n Player {\n+ \"_id\": \"a2ad9fe41dadd03f7f8675ba\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Jaclyn\",\n+ \"position\": 5478875263926272,\n+ \"role\": PlayerRole {\n+ \"current\": \"white-werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"white-werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n \"_id\": \"f13aaceab8a5b2b5be1edb79\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Ericka\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:411:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "46" + "573" ], "coveredBy": [ "44", @@ -34546,11 +34669,11 @@ ], "location": { "end": { - "column": 156, + "column": 154, "line": 106 }, "start": { - "column": 107, + "column": 106, "line": 106 } } @@ -34558,10 +34681,14 @@ { "id": "861", "mutatorName": "EqualityOperator", - "replacement": "player.role.current === ROLE_NAMES.WHITE_WEREWOLF", - "status": "Timeout", + "replacement": "player.role.current === RoleNames.WHITE_WEREWOLF", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:728:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "46" + ], "coveredBy": [ "44", "45", @@ -34571,11 +34698,11 @@ ], "location": { "end": { - "column": 156, + "column": 154, "line": 106 }, "start": { - "column": 107, + "column": 106, "line": 106 } } @@ -34584,7 +34711,7 @@ "id": "862", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(110,63): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(109,62): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -34613,7 +34740,7 @@ "line": 123 }, "start": { - "column": 72, + "column": 71, "line": 109 } } @@ -34622,9 +34749,13 @@ "id": "863", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:769:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 17, "static": false, - "killedBy": [], + "killedBy": [ + "185" + ], "coveredBy": [ "144", "145", @@ -34646,7 +34777,7 @@ ], "location": { "end": { - "column": 34, + "column": 33, "line": 110 }, "start": { @@ -34683,7 +34814,7 @@ ], "location": { "end": { - "column": 34, + "column": 33, "line": 110 }, "start": { @@ -34695,8 +34826,8 @@ { "id": "865", "mutatorName": "EqualityOperator", - "replacement": "group !== PLAYER_GROUPS.ALL", - "statusReason": "src/modules/game/helpers/game.helper.ts(114,7): error TS2367: This comparison appears to be unintentional because the types 'PLAYER_GROUPS.ALL' and 'PLAYER_GROUPS.LOVERS' have no overlap.\nsrc/modules/game/helpers/game.helper.ts(117,7): error TS2367: This comparison appears to be unintentional because the types 'PLAYER_GROUPS.ALL' and 'PLAYER_GROUPS.CHARMED' have no overlap.\nsrc/modules/game/helpers/game.helper.ts(120,7): error TS2367: This comparison appears to be unintentional because the types 'PLAYER_GROUPS.ALL' and 'PLAYER_GROUPS.VILLAGERS' have no overlap.\n", + "replacement": "group !== PlayerGroups.ALL", + "statusReason": "src/modules/game/helpers/game.helper.ts(113,7): error TS2367: This comparison appears to be unintentional because the types 'PlayerGroups.ALL' and 'PlayerGroups.LOVERS' have no overlap.\nsrc/modules/game/helpers/game.helper.ts(116,7): error TS2367: This comparison appears to be unintentional because the types 'PlayerGroups.ALL' and 'PlayerGroups.CHARMED' have no overlap.\nsrc/modules/game/helpers/game.helper.ts(119,7): error TS2367: This comparison appears to be unintentional because the types 'PlayerGroups.ALL' and 'PlayerGroups.VILLAGERS' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -34721,7 +34852,7 @@ ], "location": { "end": { - "column": 34, + "column": 33, "line": 110 }, "start": { @@ -34749,7 +34880,7 @@ "line": 112 }, "start": { - "column": 36, + "column": 35, "line": 110 } } @@ -34779,7 +34910,7 @@ ], "location": { "end": { - "column": 37, + "column": 36, "line": 113 }, "start": { @@ -34813,7 +34944,7 @@ ], "location": { "end": { - "column": 37, + "column": 36, "line": 113 }, "start": { @@ -34825,8 +34956,8 @@ { "id": "869", "mutatorName": "EqualityOperator", - "replacement": "group !== PLAYER_GROUPS.LOVERS", - "statusReason": "src/modules/game/helpers/game.helper.ts(117,7): error TS2367: This comparison appears to be unintentional because the types 'PLAYER_GROUPS.LOVERS' and 'PLAYER_GROUPS.CHARMED' have no overlap.\nsrc/modules/game/helpers/game.helper.ts(120,7): error TS2367: This comparison appears to be unintentional because the types 'PLAYER_GROUPS.LOVERS' and 'PLAYER_GROUPS.VILLAGERS' have no overlap.\n", + "replacement": "group !== PlayerGroups.LOVERS", + "statusReason": "src/modules/game/helpers/game.helper.ts(116,7): error TS2367: This comparison appears to be unintentional because the types 'PlayerGroups.LOVERS' and 'PlayerGroups.CHARMED' have no overlap.\nsrc/modules/game/helpers/game.helper.ts(119,7): error TS2367: This comparison appears to be unintentional because the types 'PlayerGroups.LOVERS' and 'PlayerGroups.VILLAGERS' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -34848,7 +34979,7 @@ ], "location": { "end": { - "column": 37, + "column": 36, "line": 113 }, "start": { @@ -34861,7 +34992,7 @@ "id": "870", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 26\n\n@@ -1,29 +1,46 @@\n Array [\n Player {\n- \"_id\": \"fed0f5bfc4ea1b1ebad1affa\",\n+ \"_id\": \"ddafae40a0dc8bce98e7cac4\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Elliott\",\n+ \"position\": 3008258279211008,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"25a68e62e159032097cc368e\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n+ \"name\": \"charmed\",\n \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n+ \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Hulda\",\n- \"position\": 1492311859003392,\n+ \"name\": \"Laurianne\",\n+ \"position\": 7741174032891904,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"fb0e92e3ffdf66b7670fa3b0\",\n \"attributes\": Array [\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:431:61)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 26\n\n@@ -1,29 +1,46 @@\n Array [\n Player {\n- \"_id\": \"9535ecea0683bbbd1ed59919\",\n+ \"_id\": \"7eec7e9bdfdda2cf3649cbe3\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Foster\",\n+ \"position\": 7797903059845120,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"a4b338a5cbb44df82a45d3b1\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n+ \"name\": \"charmed\",\n \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n+ \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Shania\",\n- \"position\": 5020887900225536,\n+ \"name\": \"Lottie\",\n+ \"position\": 7969625077710848,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"e5a7b5dbcb1ebee0d52eccfa\",\n \"attributes\": Array [\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:431:60)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -34877,7 +35008,7 @@ "line": 115 }, "start": { - "column": 39, + "column": 38, "line": 113 } } @@ -34886,13 +35017,9 @@ "id": "871", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -13,14 +13,6 @@\n \"source\": GamePlaySource {\n \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n ]\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 13, + "status": "Timeout", "static": false, - "killedBy": [ - "144" - ], + "killedBy": [], "coveredBy": [ "144", "145", @@ -34910,7 +35037,7 @@ ], "location": { "end": { - "column": 38, + "column": 37, "line": 116 }, "start": { @@ -34923,7 +35050,7 @@ "id": "872", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 14\n+ Received + 31\n\n@@ -1,8 +1,25 @@\n Array [\n Player {\n- \"_id\": \"ab8ba9d1e5b10ddbcbf99853\",\n+ \"_id\": \"5ff51a63ad95567beac80be2\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Emmie\",\n+ \"position\": 2353490206654464,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"dfe87e6812dee8edaf9deb8f\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"charmed\",\n@@ -10,41 +27,41 @@\n \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Cale\",\n- \"position\": 8056147237928960,\n+ \"name\": \"Sadye\",\n+ \"position\": 3083260781395968,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"dfe87e6812dee8edaf9deb8f\",\n+ \"_id\": \"1d3d063b83e893528f34fc3d\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n+ \"name\": \"in-love\",\n \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Sadye\",\n- \"position\": 3083260781395968,\n+ \"name\": \"Grace\",\n+ \"position\": 6457405044948992,\n \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:435:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 14\n+ Received + 31\n\n@@ -1,8 +1,25 @@\n Array [\n Player {\n- \"_id\": \"2f0914de47bcbed1bbeec42d\",\n+ \"_id\": \"fefc96ec27e02394e7dc413e\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Luisa\",\n+ \"position\": 2009559608590336,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"ee96a42eeccb9acd0404038a\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"charmed\",\n@@ -10,41 +27,41 @@\n \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Darrel\",\n- \"position\": 5747135486099456,\n+ \"name\": \"Melody\",\n+ \"position\": 2778883478781952,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"ee96a42eeccb9acd0404038a\",\n+ \"_id\": \"3ffeb1dac4848af5a2eb2fd1\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n+ \"name\": \"in-love\",\n \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Melody\",\n- \"position\": 2778883478781952,\n+ \"name\": \"Percival\",\n+ \"position\": 8556738666037248,\n \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:435:61)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, @@ -34947,7 +35074,7 @@ ], "location": { "end": { - "column": 38, + "column": 37, "line": 116 }, "start": { @@ -34959,8 +35086,8 @@ { "id": "873", "mutatorName": "EqualityOperator", - "replacement": "group !== PLAYER_GROUPS.CHARMED", - "statusReason": "src/modules/game/helpers/game.helper.ts(120,7): error TS2367: This comparison appears to be unintentional because the types 'PLAYER_GROUPS.CHARMED' and 'PLAYER_GROUPS.VILLAGERS' have no overlap.\n", + "replacement": "group !== PlayerGroups.CHARMED", + "statusReason": "src/modules/game/helpers/game.helper.ts(119,7): error TS2367: This comparison appears to be unintentional because the types 'PlayerGroups.CHARMED' and 'PlayerGroups.VILLAGERS' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -34981,7 +35108,7 @@ ], "location": { "end": { - "column": 38, + "column": 37, "line": 116 }, "start": { @@ -34994,7 +35121,7 @@ "id": "874", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 14\n+ Received + 31\n\n@@ -1,8 +1,25 @@\n Array [\n Player {\n- \"_id\": \"b3bb2afb6b8cc8face3d54e4\",\n+ \"_id\": \"bc6cedb8b3a7c71d7b1028ce\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Leonor\",\n+ \"position\": 7892467892355072,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"eb63869136e6e8b34cc870d2\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"charmed\",\n@@ -10,41 +27,41 @@\n \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Grant\",\n- \"position\": 8913783911088128,\n+ \"name\": \"Kianna\",\n+ \"position\": 7540054054404096,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"eb63869136e6e8b34cc870d2\",\n+ \"_id\": \"6a046ba9b568a3048ece8e1d\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n+ \"name\": \"in-love\",\n \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Kianna\",\n- \"position\": 7540054054404096,\n+ \"name\": \"Lucas\",\n+ \"position\": 4544516377804800,\n \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:435:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 14\n+ Received + 31\n\n@@ -1,8 +1,25 @@\n Array [\n Player {\n- \"_id\": \"c4beafb703df6cd9fe32f5f6\",\n+ \"_id\": \"ddfdccd027ccc35dbdc64aa4\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Nigel\",\n+ \"position\": 3204187861024768,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"de6b757b4bf0399adb2aaaad\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"charmed\",\n@@ -10,41 +27,41 @@\n \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Kennedi\",\n- \"position\": 249479523467264,\n+ \"name\": \"Izabella\",\n+ \"position\": 4963272065286144,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"de6b757b4bf0399adb2aaaad\",\n+ \"_id\": \"99c0de9cfbfec63dc8e3d02b\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n+ \"name\": \"in-love\",\n \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Izabella\",\n- \"position\": 4963272065286144,\n+ \"name\": \"Luciano\",\n+ \"position\": 642951201947648,\n \"role\": PlayerRole {\n- \"current\": \"white-werewolf\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:435:61)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -35010,7 +35137,7 @@ "line": 118 }, "start": { - "column": 40, + "column": 39, "line": 116 } } @@ -35019,12 +35146,12 @@ "id": "875", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -167,17 +167,9 @@\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n ],\n \"updatedAt\": 2023-08-26T13:16:07.847Z,\n \"victory\": undefined,\n }\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:299:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 21\n+ Received + 15\n\n@@ -5,45 +5,39 @@\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n \"players\": Array [\n Object {\n- \"_id\": \"53aefa34c55d9c9545a7bc39\",\n- \"attributes\": Array [\n- Object {\n- \"name\": \"seen\",\n- \"remainingPhases\": 1,\n- \"source\": \"seer\",\n- },\n- ],\n+ \"_id\": \"aeb81066bc92fa0cbc7f8adf\",\n+ \"attributes\": Array [],\n \"isAlive\": true,\n- \"name\": \"Leopold\",\n- \"position\": 1736760090427392,\n+ \"name\": \"Cristian\",\n+ \"position\": 8005011141296128,\n \"role\": Object {\n- \"current\": \"werewolf\",\n+ \"current\": \"seer\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"seer\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": \"b5cd8d7b0e3ccbb435a98e51\",\n+ \"_id\": \"f001baba0774debc9afcff56\",\n \"attributes\": Array [],\n \"isAlive\": true,\n- \"name\": \"Deon\",\n- \"position\": 1596048550133760,\n+ \"name\": \"Natalie\",\n+ \"position\": 5680823806197760,\n \"role\": Object {\n- \"current\": \"werewolf\",\n+ \"current\": \"villager\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"villager\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ],\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 12, "static": false, "killedBy": [ - "148" + "531" ], "coveredBy": [ "144", @@ -35042,7 +35169,7 @@ ], "location": { "end": { - "column": 40, + "column": 39, "line": 119 }, "start": { @@ -35055,7 +35182,7 @@ "id": "876", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 35\n+ Received + 27\n\n Array [\n Player {\n- \"_id\": \"994b4eb2d2ab7bba4f7e3dc8\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"_id\": \"7b142a0fe8a0715ce72eab89\",\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Norwood\",\n- \"position\": 669508511465472,\n+ \"name\": \"Destini\",\n+ \"position\": 8406280374845440,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"e89f24d6201fc3dfa45e16f7\",\n+ \"_id\": \"89080c1ef7bbcd7ecbf99ffb\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n+ \"name\": \"charmed\",\n \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n+ \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Dave\",\n- \"position\": 5043219664470016,\n+ \"name\": \"Zola\",\n+ \"position\": 8114181651824640,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"cbfdce07bcc34236e1f0ab54\",\n+ \"_id\": \"8cdfdc5f3f8f82b9c0cd9e27\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n+ \"name\": \"in-love\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Donato\",\n- \"position\": 7494255893282816,\n+ \"name\": \"Viva\",\n+ \"position\": 3363615237210112,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:439:64)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 35\n+ Received + 27\n\n Array [\n Player {\n- \"_id\": \"d94474eecbadc263da630abe\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"_id\": \"c0901f665c7bedb800bf0fbc\",\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Myra\",\n- \"position\": 4996663116562432,\n+ \"name\": \"Jermey\",\n+ \"position\": 7689427635666944,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"c0ed647ccdffcbe0ed7d48df\",\n+ \"_id\": \"f90a8dfded9af4196cdcb043\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n+ \"name\": \"charmed\",\n \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n+ \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Eldon\",\n- \"position\": 2411399074545664,\n+ \"name\": \"Chelsey\",\n+ \"position\": 3304516917133312,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"bf2d33eaac5c3de93598bfcf\",\n+ \"_id\": \"ae0eedd7a2f3cbbb4dea8944\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n+ \"name\": \"in-love\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Tyler\",\n- \"position\": 5050225685168128,\n+ \"name\": \"Freddie\",\n+ \"position\": 1947942766247936,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:439:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 12, "static": false, @@ -35078,7 +35205,7 @@ ], "location": { "end": { - "column": 40, + "column": 39, "line": 119 }, "start": { @@ -35090,13 +35217,13 @@ { "id": "877", "mutatorName": "EqualityOperator", - "replacement": "group !== PLAYER_GROUPS.VILLAGERS", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -167,17 +167,9 @@\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n ],\n \"updatedAt\": 2023-08-26T07:31:01.312Z,\n \"victory\": undefined,\n }\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:299:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "group !== PlayerGroups.VILLAGERS", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 35\n+ Received + 27\n\n Array [\n Player {\n- \"_id\": \"b0e0e7852ff0f9ff9bc7a3bf\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"_id\": \"2f3f8dae4b0daa9ca1bedb05\",\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Kaycee\",\n- \"position\": 1311228383199232,\n+ \"name\": \"Tianna\",\n+ \"position\": 5172838172459008,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"4b66beaf11d4b05e1c2bfe88\",\n+ \"_id\": \"b9f88a85b1ddfdeb4d5f1c47\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n+ \"name\": \"charmed\",\n \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n+ \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Emmett\",\n- \"position\": 6680989614997504,\n+ \"name\": \"Cayla\",\n+ \"position\": 7901811750993920,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"31f0d9faad400ede081ab4aa\",\n+ \"_id\": \"794127700bd54caded5eb0dc\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n+ \"name\": \"in-love\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Laurel\",\n- \"position\": 2047397765054464,\n+ \"name\": \"Arlo\",\n+ \"position\": 1083663580135424,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:439:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 12, "static": false, "killedBy": [ - "148" + "577" ], "coveredBy": [ "144", @@ -35114,7 +35241,7 @@ ], "location": { "end": { - "column": 40, + "column": 39, "line": 119 }, "start": { @@ -35127,7 +35254,7 @@ "id": "878", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 35\n+ Received + 27\n\n Array [\n Player {\n- \"_id\": \"b0bfba3e720f02c2ba53a949\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"_id\": \"0c1e9c1ebfb68f4c9e9ef53f\",\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Bertha\",\n- \"position\": 5372383187697664,\n+ \"name\": \"Kale\",\n+ \"position\": 4436926950014976,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"cec5ccb53ad4d06c727b7eba\",\n+ \"_id\": \"4dfe224cdd90da12da35cbef\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n+ \"name\": \"charmed\",\n \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n+ \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Emiliano\",\n- \"position\": 2205337608257536,\n+ \"name\": \"Deja\",\n+ \"position\": 4191680292978688,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"dbe46c80fea488ec08c2b3ac\",\n+ \"_id\": \"c333e15b30aacffdbaf56eec\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n+ \"name\": \"in-love\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Jakob\",\n- \"position\": 2757605132861440,\n+ \"name\": \"Ruthie\",\n+ \"position\": 3833036126814208,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:439:64)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 35\n+ Received + 27\n\n Array [\n Player {\n- \"_id\": \"ebde34b42cb64ffd5d313c00\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"_id\": \"6407388bc35a9daa8e04e98f\",\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Rico\",\n- \"position\": 2135493005279232,\n+ \"name\": \"Jazmin\",\n+ \"position\": 6583524157030400,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"9f6ec9edd8cd837df21f52a1\",\n+ \"_id\": \"c6c7e6c5fc6915aa5d6cffca\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"in-love\",\n+ \"name\": \"charmed\",\n \"remainingPhases\": undefined,\n- \"source\": \"cupid\",\n+ \"source\": \"pied-piper\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Louisa\",\n- \"position\": 1381482480271360,\n+ \"name\": \"George\",\n+ \"position\": 422790370951168,\n \"role\": PlayerRole {\n- \"current\": \"seer\",\n+ \"current\": \"white-werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"white-werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Player {\n- \"_id\": \"cfef14631be8dea9edfcdeef\",\n+ \"_id\": \"6884fcf39b6ce9dcef11b7cd\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n+ \"name\": \"in-love\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"cupid\",\n },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Dorian\",\n- \"position\": 6564371603914752,\n+ \"name\": \"Paula\",\n+ \"position\": 8093913776652288,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:439:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -35143,7 +35270,7 @@ "line": 121 }, "start": { - "column": 42, + "column": 41, "line": 119 } } @@ -35152,7 +35279,7 @@ "id": "879", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(126,48): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(125,48): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -35184,7 +35311,7 @@ "line": 127 }, "start": { - "column": 69, + "column": 68, "line": 125 } } @@ -35193,7 +35320,7 @@ "id": "880", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(130,49): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(129,49): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -35225,7 +35352,7 @@ "line": 131 }, "start": { - "column": 73, + "column": 72, "line": 129 } } @@ -35328,7 +35455,7 @@ "id": "885", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(138,73): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(137,73): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -35362,7 +35489,7 @@ "id": "886", "mutatorName": "OptionalChaining", "replacement": "candidatePlayers.find", - "statusReason": "src/modules/game/helpers/game.helper.ts(139,10): error TS18048: 'candidatePlayers' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(138,10): error TS18048: 'candidatePlayers' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -35429,9 +35556,13 @@ "id": "888", "mutatorName": "BooleanLiteral", "replacement": "getPlayerWithId(game, candidatePlayer._id)", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 12, "static": false, - "killedBy": [], + "killedBy": [ + "472" + ], "coveredBy": [ "472", "473", @@ -35461,7 +35592,7 @@ "id": "889", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(142,77): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(141,77): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -35518,7 +35649,7 @@ "id": "891", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(143,99): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ gameId: ObjectId; playerId: ObjectId; }'.\n Type '{}' is missing the following properties from type '{ gameId: ObjectId; playerId: ObjectId; }': gameId, playerId\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(142,99): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ gameId: ObjectId; playerId: ObjectId; }'.\n Type '{}' is missing the following properties from type '{ gameId: ObjectId; playerId: ObjectId; }': gameId, playerId\n", "status": "CompileError", "static": false, "killedBy": [], @@ -36144,7 +36275,7 @@ "id": "913", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(156,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(155,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -36223,7 +36354,7 @@ "id": "915", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/helpers/game.helper.ts(158,21): error TS2345: Argument of type '() => undefined' is not assignable to parameter of type '(a: Player, b: Player) => number'.\n Type 'undefined' is not assignable to type 'number'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(157,21): error TS2345: Argument of type '() => undefined' is not assignable to parameter of type '(a: Player, b: Player) => number'.\n Type 'undefined' is not assignable to type 'number'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -36263,9 +36394,13 @@ "id": "916", "mutatorName": "ArithmeticOperator", "replacement": "a.position + b.position", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 7\n+ Received + 7\n\n Player {\n- \"_id\": \"efabf061b9008fde8b78b0bb\",\n+ \"_id\": \"ed7fdadd2cdda8b1c5aaf0dd\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Kenyatta\",\n- \"position\": 1,\n+ \"name\": \"Camden\",\n+ \"position\": 2,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:612:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 17, "static": false, - "killedBy": [], + "killedBy": [ + "593" + ], "coveredBy": [ "328", "329", @@ -36339,7 +36474,7 @@ "id": "918", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(159,102): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ gameId: ObjectId; playerId: ObjectId; }'.\n Type '{}' is missing the following properties from type '{ gameId: ObjectId; playerId: ObjectId; }': gameId, playerId\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(158,102): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ gameId: ObjectId; playerId: ObjectId; }'.\n Type '{}' is missing the following properties from type '{ gameId: ObjectId; playerId: ObjectId; }': gameId, playerId\n", "status": "CompileError", "static": false, "killedBy": [], @@ -36379,9 +36514,13 @@ "id": "919", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 17\n+ Received + 0\n\n@@ -31,23 +31,6 @@\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Player {\n- \"_id\": \"f6a3f0b7bbb7aee1e4700e5e\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n- \"name\": \"Maymie\",\n- \"position\": 0,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:516:58)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 18, "static": false, - "killedBy": [], + "killedBy": [ + "587" + ], "coveredBy": [ "328", "329", @@ -36501,7 +36640,7 @@ "id": "922", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "src/modules/game/helpers/game.helper.ts(161,24): error TS2367: This comparison appears to be unintentional because the types '\"left\" | \"right\"' and '\"\"' have no overlap.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(160,24): error TS2367: This comparison appears to be unintentional because the types '\"left\" | \"right\"' and '\"\"' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -36623,7 +36762,7 @@ "id": "925", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.helper.ts(156,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(155,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -36742,7 +36881,7 @@ "id": "928", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(156,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(155,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -36821,9 +36960,13 @@ "id": "930", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'position')\n at getNearestAliveNeighbor (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/game.helper.ts:398:438)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:627:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 17, "static": false, - "killedBy": [], + "killedBy": [ + "594" + ], "coveredBy": [ "328", "329", @@ -36858,7 +37001,7 @@ "id": "931", "mutatorName": "EqualityOperator", "replacement": "currentIndex <= 0", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 3\n\n@@ -1,12 +1,12 @@\n Player {\n- \"_id\": \"84f8499a4dcee46d354ede8b\",\n+ \"_id\": \"ceb2f3c0c0a1a7bdc7bbcabd\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Roman\",\n- \"position\": 0,\n+ \"name\": \"Rosalind\",\n+ \"position\": 4,\n \"role\": PlayerRole {\n \"current\": \"werewolf\",\n \"isRevealed\": false,\n \"original\": \"werewolf\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:657:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 3\n\n@@ -1,12 +1,12 @@\n Player {\n- \"_id\": \"12ee452b8fd8bb5abcdeb95b\",\n+ \"_id\": \"e9f7e85a634abdcdda6ecb1f\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Neil\",\n- \"position\": 0,\n+ \"name\": \"Jade\",\n+ \"position\": 4,\n \"role\": PlayerRole {\n \"current\": \"werewolf\",\n \"isRevealed\": false,\n \"original\": \"werewolf\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:657:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 17, "static": false, @@ -36932,6 +37075,36 @@ } } }, + { + "id": "933", + "mutatorName": "BlockStatement", + "replacement": "{}", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'position')\n at getNearestAliveNeighbor (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/game.helper.ts:398:438)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:627:37)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, + "static": false, + "killedBy": [ + "594" + ], + "coveredBy": [ + "407", + "410", + "411", + "594", + "595", + "597" + ], + "location": { + "end": { + "column": 6, + "line": 166 + }, + "start": { + "column": 27, + "line": 164 + } + } + }, { "id": "935", "mutatorName": "ConditionalExpression", @@ -37059,9 +37232,13 @@ "id": "938", "mutatorName": "EqualityOperator", "replacement": "currentIndex < alivePlayers.length", - "status": "Timeout", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'position')\n at getNearestAliveNeighbor (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/game.helper.ts:398:438)\n at getFoxSniffedPlayers (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/game.helper.ts:340:32)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:516:34)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 17, "static": false, - "killedBy": [], + "killedBy": [ + "587" + ], "coveredBy": [ "328", "329", @@ -37167,7 +37344,7 @@ "id": "941", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.helper.ts(156,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(155,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37480,12 +37657,12 @@ "id": "949", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"ecdcf8cbeb2ffc362a54d3c7\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Carissa\", \"position\": 3, \"role\": {\"current\": \"villager\", \"isRevealed\": false, \"original\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:642:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -114,19 +114,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"1147cbef6de253be1a969ddc\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"contaminated\",\n- \"remainingPhases\": 2,\n- \"source\": \"rusty-sword-knight\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Joanie\",\n \"position\": 3,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:850:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "595" + "411" ], "coveredBy": [ "407", @@ -37512,12 +37689,12 @@ "id": "950", "mutatorName": "EqualityOperator", "replacement": "checkingNeighbor.side.current !== options.playerSide", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 7\n+ Received + 7\n\n Player {\n- \"_id\": \"c30b4a4fdfcb6e262d24456d\",\n+ \"_id\": \"3412effe1527ffb83c4fe9bd\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n- \"name\": \"Nils\",\n- \"position\": 3,\n+ \"name\": \"Giles\",\n+ \"position\": 4,\n \"role\": PlayerRole {\n- \"current\": \"villager\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"villager\",\n+ \"original\": \"werewolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:642:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -131,11 +131,19 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"d59c3ebd9a8779f83b98e48f\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Ansel\",\n \"position\": 3148487562625024,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:828:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "595" + "410" ], "coveredBy": [ "407", @@ -37544,7 +37721,7 @@ "id": "951", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(156,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(155,107): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37611,7 +37788,7 @@ "id": "954", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.helper.ts(179,48): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(178,48): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37644,7 +37821,7 @@ "id": "955", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "src/modules/game/helpers/game.helper.ts(193,55): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/game-play.enum\").GAME_PLAY_ACTIONS' is not assignable to parameter of type 'never'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(192,55): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/game-play.enum\").GamePlayActions' is not assignable to parameter of type 'never'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37664,7 +37841,7 @@ ], "location": { "end": { - "column": 132, + "column": 126, "line": 180 }, "start": { @@ -37677,7 +37854,7 @@ "id": "956", "mutatorName": "ArrayDeclaration", "replacement": "[\"Stryker was here\"]", - "statusReason": "src/modules/game/helpers/game.helper.ts(182,42): error TS2322: Type 'string' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(181,42): error TS2322: Type 'string' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37710,7 +37887,7 @@ "id": "957", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game.helper.ts(186,25): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(187,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(187,53): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'PLAYER_GROUPS'.\n Type 'ROLE_NAMES.WEREWOLF' is not assignable to type 'PLAYER_GROUPS'.\nsrc/modules/game/helpers/game.helper.ts(188,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(189,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(189,61): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'ROLE_NAMES'.\n Type 'PLAYER_ATTRIBUTE_NAMES.SHERIFF' is not assignable to type 'ROLE_NAMES'.\nsrc/modules/game/helpers/game.helper.ts(193,55): error TS18047: 'currentPlay' is possibly 'null'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(185,25): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(186,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(186,53): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'PlayerGroups'.\n Type 'RoleNames.WEREWOLF' is not assignable to type 'PlayerGroups'.\nsrc/modules/game/helpers/game.helper.ts(187,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,61): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'RoleNames'.\n Type 'PlayerAttributeNames.SHERIFF' is not assignable to type 'RoleNames'.\nsrc/modules/game/helpers/game.helper.ts(192,55): error TS18047: 'currentPlay' is possibly 'null'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37743,7 +37920,7 @@ "id": "958", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.helper.ts(186,25): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(187,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(189,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(193,55): error TS18047: 'currentPlay' is possibly 'null'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(185,25): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(186,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(187,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(192,55): error TS18047: 'currentPlay' is possibly 'null'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37776,7 +37953,7 @@ "id": "959", "mutatorName": "EqualityOperator", "replacement": "currentPlay !== null", - "statusReason": "src/modules/game/helpers/game.helper.ts(186,25): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(187,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(189,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(193,55): error TS18047: 'currentPlay' is possibly 'null'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(185,25): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(186,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(187,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(192,55): error TS18047: 'currentPlay' is possibly 'null'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37874,7 +38051,7 @@ "id": "963", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game.helper.ts(187,53): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'PLAYER_GROUPS'.\n Type 'ROLE_NAMES.WEREWOLF' is not assignable to type 'PLAYER_GROUPS'.\nsrc/modules/game/helpers/game.helper.ts(188,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(189,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(189,61): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'ROLE_NAMES'.\n Type 'PLAYER_ATTRIBUTE_NAMES.SHERIFF' is not assignable to type 'ROLE_NAMES'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(186,53): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'PlayerGroups'.\n Type 'RoleNames.WEREWOLF' is not assignable to type 'PlayerGroups'.\nsrc/modules/game/helpers/game.helper.ts(187,31): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,61): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'RoleNames'.\n Type 'PlayerAttributeNames.SHERIFF' is not assignable to type 'RoleNames'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37906,7 +38083,7 @@ "id": "964", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.helper.ts(187,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(187,53): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'PLAYER_GROUPS'.\n Type 'ROLE_NAMES.WEREWOLF' is not assignable to type 'PLAYER_GROUPS'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(186,53): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(186,53): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'PlayerGroups'.\n Type 'RoleNames.WEREWOLF' is not assignable to type 'PlayerGroups'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37963,7 +38140,7 @@ "id": "966", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game.helper.ts(189,61): error TS2345: Argument of type 'ROLE_NAMES | PLAYER_ATTRIBUTE_NAMES.SHERIFF' is not assignable to parameter of type 'ROLE_NAMES'.\n Type 'PLAYER_ATTRIBUTE_NAMES.SHERIFF' is not assignable to type 'ROLE_NAMES'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(188,61): error TS2345: Argument of type 'RoleNames | PlayerAttributeNames.SHERIFF' is not assignable to parameter of type 'RoleNames'.\n Type 'PlayerAttributeNames.SHERIFF' is not assignable to type 'RoleNames'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -37990,7 +38167,7 @@ "id": "967", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.helper.ts(189,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(189,61): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'ROLE_NAMES'.\n Type 'PLAYER_ATTRIBUTE_NAMES.SHERIFF' is not assignable to type 'ROLE_NAMES'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(188,61): error TS18047: 'currentPlay' is possibly 'null'.\nsrc/modules/game/helpers/game.helper.ts(188,61): error TS2345: Argument of type 'GameSource' is not assignable to parameter of type 'RoleNames'.\n Type 'PlayerAttributeNames.SHERIFF' is not assignable to type 'RoleNames'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -38041,7 +38218,7 @@ "id": "969", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 27\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"baa1daad4b77ab0f6711125e\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"sheriff\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Estelle\",\n- \"position\": 182416293494784,\n- \"role\": PlayerRole {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:760:46)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 27\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"a7ffc4c8e2e055d94aa475dc\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"sheriff\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Christina\",\n- \"position\": 4686603184242688,\n- \"role\": PlayerRole {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:760:46)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -38102,9 +38279,13 @@ "id": "971", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 27\n+ Received + 1\n\n- Array [\n- Player {\n- \"_id\": \"2d86db597ca19d48d2e2ecdc\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"sheriff\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Kadin\",\n- \"position\": 6118546465619968,\n- \"role\": PlayerRole {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:760:46)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "603" + ], "coveredBy": [ "517", "518", @@ -38133,9 +38314,13 @@ "id": "972", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 17\n\n@@ -15,10 +15,27 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Player {\n+ \"_id\": \"1d4ba1dfa00cc2cd7cdb7d1b\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Megane\",\n+ \"position\": 8599879733477376,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n \"_id\": \"6254f20efe107070d34b1c78\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Joshua\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:715:46)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "600" + ], "coveredBy": [ "517", "518", @@ -38196,9 +38381,13 @@ "id": "974", "mutatorName": "MethodExpression", "replacement": "expectedPlayersToPlay", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 17\n\n@@ -15,10 +15,27 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Player {\n+ \"_id\": \"6c0ac56beb15f7cdabed6f68\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Stanford\",\n+ \"position\": 4421456884662272,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n \"_id\": \"de7bd3f3f416aaf8dabaab4d\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Nathan\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.helper.spec.ts:715:46)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "600" + ], "coveredBy": [ "517", "518", @@ -38252,7 +38441,7 @@ "id": "976", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/helpers/game.helper.ts(196,3): error TS2322: Type 'undefined[]' is not assignable to type 'Player[]'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/helpers/game.helper.ts(195,3): error TS2322: Type 'undefined[]' is not assignable to type 'Player[]'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -38280,31 +38469,6 @@ } } }, - { - "id": "933", - "mutatorName": "BlockStatement", - "replacement": "{}", - "status": "Timeout", - "static": false, - "coveredBy": [ - "407", - "410", - "411", - "594", - "595", - "597" - ], - "location": { - "end": { - "column": 6, - "line": 166 - }, - "start": { - "column": 27, - "line": 164 - } - } - }, { "id": "934", "mutatorName": "ArithmeticOperator", @@ -38358,7 +38522,7 @@ } } ], - "source": "import type { Types } from \"mongoose\";\n\nimport type { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { GAME_PLAY_ACTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameSource, GetNearestPlayerOptions } from \"@/modules/game/types/game.type\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { createCantFindPlayerUnexpectedException, createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nfunction getPlayerDtoWithRole(game: CreateGameDto, role: ROLE_NAMES): CreateGamePlayerDto | undefined {\n return game.players.find(player => player.role.name === role);\n}\n\nfunction getPlayerWithCurrentRole(game: Game, role: ROLE_NAMES): Player | undefined {\n return game.players.find(player => player.role.current === role);\n}\n\nfunction getPlayersWithCurrentRole(game: Game, role: ROLE_NAMES): Player[] {\n return game.players.filter(player => player.role.current === role);\n}\n\nfunction getPlayersWithCurrentSide(game: Game, side: ROLE_SIDES): Player[] {\n return game.players.filter(player => player.side.current === side);\n}\n\nfunction getPlayerWithId(game: Game, id: Types.ObjectId): Player | undefined {\n return game.players.find(({ _id }) => _id.toString() === id.toString());\n}\n\nfunction getPlayerWithIdOrThrow(playerId: Types.ObjectId, game: Game, exception: Error): Player {\n const player = getPlayerWithId(game, playerId);\n if (!player) {\n throw exception;\n }\n return player;\n}\n\nfunction getPlayerWithName(game: Game, playerName: string): Player | undefined {\n return game.players.find(({ name }) => name.toString() === playerName.toString());\n}\n\nfunction getPlayerWithNameOrThrow(playerName: string, game: Game, exception: Error): Player {\n const player = getPlayerWithName(game, playerName);\n if (!player) {\n throw exception;\n }\n return player;\n}\n\nfunction getAdditionalCardWithId(cards: GameAdditionalCard[] | undefined, id: Types.ObjectId): GameAdditionalCard | undefined {\n return cards?.find(({ _id }) => _id.toString() === id.toString());\n}\n\nfunction areAllWerewolvesAlive(game: Game): boolean {\n const werewolfPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES);\n return werewolfPlayers.length > 0 && werewolfPlayers.every(werewolf => werewolf.isAlive);\n}\n\nfunction areAllVillagersAlive(game: Game): boolean {\n const villagerPlayers = getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS);\n return villagerPlayers.length > 0 && villagerPlayers.every(villager => villager.isAlive);\n}\n\nfunction areAllPlayersDead(game: Game): boolean {\n return game.players.length > 0 && game.players.every(({ isAlive }) => !isAlive);\n}\n\nfunction getPlayerWithActiveAttributeName(game: Game, attributeName: PLAYER_ATTRIBUTE_NAMES): Player | undefined {\n return game.players.find(player => doesPlayerHaveActiveAttributeWithName(player, attributeName, game));\n}\n\nfunction getPlayersWithActiveAttributeName(game: Game, attribute: PLAYER_ATTRIBUTE_NAMES): Player[] {\n return game.players.filter(player => doesPlayerHaveActiveAttributeWithName(player, attribute, game));\n}\n\nfunction getAlivePlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive);\n}\n\nfunction getAliveVillagerSidedPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.VILLAGERS);\n}\n\nfunction getAliveWerewolfSidedPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.WEREWOLVES);\n}\n\nfunction getLeftToCharmByPiedPiperPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CHARMED, game) &&\n player.role.current !== ROLE_NAMES.PIED_PIPER);\n}\n\nfunction getLeftToEatByWerewolvesPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.VILLAGERS &&\n !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.EATEN, game));\n}\n\nfunction getLeftToEatByWhiteWerewolfPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === ROLE_SIDES.WEREWOLVES && player.role.current !== ROLE_NAMES.WHITE_WEREWOLF);\n}\n\nfunction getGroupOfPlayers(game: Game, group: PLAYER_GROUPS): Player[] {\n if (group === PLAYER_GROUPS.ALL) {\n return game.players;\n }\n if (group === PLAYER_GROUPS.LOVERS) {\n return getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE);\n }\n if (group === PLAYER_GROUPS.CHARMED) {\n return getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.CHARMED);\n }\n if (group === PLAYER_GROUPS.VILLAGERS) {\n return getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS);\n }\n return getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES);\n}\n\nfunction isGameSourceRole(source: GameSource): source is ROLE_NAMES {\n return Object.values(ROLE_NAMES).includes(source as ROLE_NAMES);\n}\n\nfunction isGameSourceGroup(source: GameSource): source is PLAYER_GROUPS {\n return Object.values(PLAYER_GROUPS).includes(source as PLAYER_GROUPS);\n}\n\nfunction getNonexistentPlayerId(game: Game, candidateIds?: Types.ObjectId[]): Types.ObjectId | undefined {\n return candidateIds?.find(candidateId => !getPlayerWithId(game, candidateId));\n}\n\nfunction getNonexistentPlayer(game: Game, candidatePlayers?: Player[]): Player | undefined {\n return candidatePlayers?.find(candidatePlayer => !getPlayerWithId(game, candidatePlayer._id));\n}\n\nfunction getFoxSniffedPlayers(sniffedTargetId: Types.ObjectId, game: Game): Player[] {\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"getFoxSniffedTargets\", { gameId: game._id, playerId: sniffedTargetId });\n const sniffedTarget = getPlayerWithIdOrThrow(sniffedTargetId, game, cantFindPlayerException);\n const leftAliveNeighbor = getNearestAliveNeighbor(sniffedTarget._id, game, { direction: \"left\" });\n const rightAliveNeighbor = getNearestAliveNeighbor(sniffedTarget._id, game, { direction: \"right\" });\n const sniffedTargets = [leftAliveNeighbor, sniffedTarget, rightAliveNeighbor].filter((player): player is Player => !!player);\n return sniffedTargets.reduce((acc, target) => {\n if (!acc.some(uniqueTarget => uniqueTarget._id.toString() === target._id.toString())) {\n return [...acc, target];\n }\n return acc;\n }, []);\n}\n\nfunction getNearestAliveNeighbor(playerId: Types.ObjectId, game: Game, options: GetNearestPlayerOptions): Player | undefined {\n const alivePlayers = getAlivePlayers(game);\n alivePlayers.sort((a, b) => a.position - b.position);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"getNearestAliveNeighbor\", { gameId: game._id, playerId });\n const player = getPlayerWithIdOrThrow(playerId, game, cantFindPlayerException);\n const indexHeading = options.direction === \"left\" ? -1 : 1;\n let currentIndex = player.position + indexHeading;\n let count = 0;\n while (count < alivePlayers.length) {\n if (currentIndex < 0) {\n currentIndex = alivePlayers.length - 1;\n } else if (currentIndex >= alivePlayers.length) {\n currentIndex = 0;\n }\n const checkingNeighbor = alivePlayers[currentIndex];\n if (checkingNeighbor.position !== player.position && (options.playerSide === undefined || checkingNeighbor.side.current === options.playerSide)) {\n return checkingNeighbor;\n }\n currentIndex += indexHeading;\n count++;\n }\n}\n\nfunction getExpectedPlayersToPlay(game: Game): Player[] {\n const { currentPlay } = game;\n const mustIncludeDeadPlayersGamePlayActions = [GAME_PLAY_ACTIONS.SHOOT, GAME_PLAY_ACTIONS.BAN_VOTING, GAME_PLAY_ACTIONS.DELEGATE];\n let expectedPlayersToPlay: Player[] = [];\n if (currentPlay === null) {\n throw createNoCurrentGamePlayUnexpectedException(\"getExpectedPlayersToPlay\", { gameId: game._id });\n }\n if (isGameSourceGroup(currentPlay.source.name)) {\n expectedPlayersToPlay = getGroupOfPlayers(game, currentPlay.source.name);\n } else if (isGameSourceRole(currentPlay.source.name)) {\n expectedPlayersToPlay = getPlayersWithCurrentRole(game, currentPlay.source.name);\n } else {\n expectedPlayersToPlay = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SHERIFF);\n }\n if (!mustIncludeDeadPlayersGamePlayActions.includes(currentPlay.action)) {\n expectedPlayersToPlay = expectedPlayersToPlay.filter(player => player.isAlive);\n }\n return expectedPlayersToPlay.map(player => createPlayer(player));\n}\n\nexport {\n getPlayerDtoWithRole,\n getPlayerWithCurrentRole,\n getPlayersWithCurrentRole,\n getPlayersWithCurrentSide,\n getPlayerWithId,\n getPlayerWithIdOrThrow,\n getPlayerWithName,\n getPlayerWithNameOrThrow,\n getAdditionalCardWithId,\n areAllWerewolvesAlive,\n areAllVillagersAlive,\n areAllPlayersDead,\n getPlayerWithActiveAttributeName,\n getPlayersWithActiveAttributeName,\n getAlivePlayers,\n getAliveVillagerSidedPlayers,\n getAliveWerewolfSidedPlayers,\n getLeftToCharmByPiedPiperPlayers,\n getLeftToEatByWerewolvesPlayers,\n getLeftToEatByWhiteWerewolfPlayers,\n getGroupOfPlayers,\n isGameSourceRole,\n isGameSourceGroup,\n getNonexistentPlayerId,\n getNonexistentPlayer,\n getFoxSniffedPlayers,\n getNearestAliveNeighbor,\n getExpectedPlayersToPlay,\n};" + "source": "import type { Types } from \"mongoose\";\n\nimport type { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { GamePlayActions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameSource, GetNearestPlayerOptions } from \"@/modules/game/types/game.type\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { createCantFindPlayerUnexpectedException, createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nfunction getPlayerDtoWithRole(game: CreateGameDto, role: RoleNames): CreateGamePlayerDto | undefined {\n return game.players.find(player => player.role.name === role);\n}\n\nfunction getPlayerWithCurrentRole(game: Game, role: RoleNames): Player | undefined {\n return game.players.find(player => player.role.current === role);\n}\n\nfunction getPlayersWithCurrentRole(game: Game, role: RoleNames): Player[] {\n return game.players.filter(player => player.role.current === role);\n}\n\nfunction getPlayersWithCurrentSide(game: Game, side: RoleSides): Player[] {\n return game.players.filter(player => player.side.current === side);\n}\n\nfunction getPlayerWithId(game: Game, id: Types.ObjectId): Player | undefined {\n return game.players.find(({ _id }) => _id.toString() === id.toString());\n}\n\nfunction getPlayerWithIdOrThrow(playerId: Types.ObjectId, game: Game, exception: Error): Player {\n const player = getPlayerWithId(game, playerId);\n if (!player) {\n throw exception;\n }\n return player;\n}\n\nfunction getPlayerWithName(game: Game, playerName: string): Player | undefined {\n return game.players.find(({ name }) => name.toString() === playerName.toString());\n}\n\nfunction getPlayerWithNameOrThrow(playerName: string, game: Game, exception: Error): Player {\n const player = getPlayerWithName(game, playerName);\n if (!player) {\n throw exception;\n }\n return player;\n}\n\nfunction getAdditionalCardWithId(cards: GameAdditionalCard[] | undefined, id: Types.ObjectId): GameAdditionalCard | undefined {\n return cards?.find(({ _id }) => _id.toString() === id.toString());\n}\n\nfunction areAllWerewolvesAlive(game: Game): boolean {\n const werewolfPlayers = getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES);\n return werewolfPlayers.length > 0 && werewolfPlayers.every(werewolf => werewolf.isAlive);\n}\n\nfunction areAllVillagersAlive(game: Game): boolean {\n const villagerPlayers = getPlayersWithCurrentSide(game, RoleSides.VILLAGERS);\n return villagerPlayers.length > 0 && villagerPlayers.every(villager => villager.isAlive);\n}\n\nfunction areAllPlayersDead(game: Game): boolean {\n return game.players.length > 0 && game.players.every(({ isAlive }) => !isAlive);\n}\n\nfunction getPlayerWithActiveAttributeName(game: Game, attributeName: PlayerAttributeNames): Player | undefined {\n return game.players.find(player => doesPlayerHaveActiveAttributeWithName(player, attributeName, game));\n}\n\nfunction getPlayersWithActiveAttributeName(game: Game, attribute: PlayerAttributeNames): Player[] {\n return game.players.filter(player => doesPlayerHaveActiveAttributeWithName(player, attribute, game));\n}\n\nfunction getAlivePlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive);\n}\n\nfunction getAliveVillagerSidedPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === RoleSides.VILLAGERS);\n}\n\nfunction getAliveWerewolfSidedPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === RoleSides.WEREWOLVES);\n}\n\nfunction getLeftToCharmByPiedPiperPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CHARMED, game) &&\n player.role.current !== RoleNames.PIED_PIPER);\n}\n\nfunction getLeftToEatByWerewolvesPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === RoleSides.VILLAGERS &&\n !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.EATEN, game));\n}\n\nfunction getLeftToEatByWhiteWerewolfPlayers(game: Game): Player[] {\n return game.players.filter(player => player.isAlive && player.side.current === RoleSides.WEREWOLVES && player.role.current !== RoleNames.WHITE_WEREWOLF);\n}\n\nfunction getGroupOfPlayers(game: Game, group: PlayerGroups): Player[] {\n if (group === PlayerGroups.ALL) {\n return game.players;\n }\n if (group === PlayerGroups.LOVERS) {\n return getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE);\n }\n if (group === PlayerGroups.CHARMED) {\n return getPlayersWithActiveAttributeName(game, PlayerAttributeNames.CHARMED);\n }\n if (group === PlayerGroups.VILLAGERS) {\n return getPlayersWithCurrentSide(game, RoleSides.VILLAGERS);\n }\n return getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES);\n}\n\nfunction isGameSourceRole(source: GameSource): source is RoleNames {\n return Object.values(RoleNames).includes(source as RoleNames);\n}\n\nfunction isGameSourceGroup(source: GameSource): source is PlayerGroups {\n return Object.values(PlayerGroups).includes(source as PlayerGroups);\n}\n\nfunction getNonexistentPlayerId(game: Game, candidateIds?: Types.ObjectId[]): Types.ObjectId | undefined {\n return candidateIds?.find(candidateId => !getPlayerWithId(game, candidateId));\n}\n\nfunction getNonexistentPlayer(game: Game, candidatePlayers?: Player[]): Player | undefined {\n return candidatePlayers?.find(candidatePlayer => !getPlayerWithId(game, candidatePlayer._id));\n}\n\nfunction getFoxSniffedPlayers(sniffedTargetId: Types.ObjectId, game: Game): Player[] {\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"getFoxSniffedTargets\", { gameId: game._id, playerId: sniffedTargetId });\n const sniffedTarget = getPlayerWithIdOrThrow(sniffedTargetId, game, cantFindPlayerException);\n const leftAliveNeighbor = getNearestAliveNeighbor(sniffedTarget._id, game, { direction: \"left\" });\n const rightAliveNeighbor = getNearestAliveNeighbor(sniffedTarget._id, game, { direction: \"right\" });\n const sniffedTargets = [leftAliveNeighbor, sniffedTarget, rightAliveNeighbor].filter((player): player is Player => !!player);\n return sniffedTargets.reduce((acc, target) => {\n if (!acc.some(uniqueTarget => uniqueTarget._id.toString() === target._id.toString())) {\n return [...acc, target];\n }\n return acc;\n }, []);\n}\n\nfunction getNearestAliveNeighbor(playerId: Types.ObjectId, game: Game, options: GetNearestPlayerOptions): Player | undefined {\n const alivePlayers = getAlivePlayers(game);\n alivePlayers.sort((a, b) => a.position - b.position);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"getNearestAliveNeighbor\", { gameId: game._id, playerId });\n const player = getPlayerWithIdOrThrow(playerId, game, cantFindPlayerException);\n const indexHeading = options.direction === \"left\" ? -1 : 1;\n let currentIndex = player.position + indexHeading;\n let count = 0;\n while (count < alivePlayers.length) {\n if (currentIndex < 0) {\n currentIndex = alivePlayers.length - 1;\n } else if (currentIndex >= alivePlayers.length) {\n currentIndex = 0;\n }\n const checkingNeighbor = alivePlayers[currentIndex];\n if (checkingNeighbor.position !== player.position && (options.playerSide === undefined || checkingNeighbor.side.current === options.playerSide)) {\n return checkingNeighbor;\n }\n currentIndex += indexHeading;\n count++;\n }\n}\n\nfunction getExpectedPlayersToPlay(game: Game): Player[] {\n const { currentPlay } = game;\n const mustIncludeDeadPlayersGamePlayActions = [GamePlayActions.SHOOT, GamePlayActions.BAN_VOTING, GamePlayActions.DELEGATE];\n let expectedPlayersToPlay: Player[] = [];\n if (currentPlay === null) {\n throw createNoCurrentGamePlayUnexpectedException(\"getExpectedPlayersToPlay\", { gameId: game._id });\n }\n if (isGameSourceGroup(currentPlay.source.name)) {\n expectedPlayersToPlay = getGroupOfPlayers(game, currentPlay.source.name);\n } else if (isGameSourceRole(currentPlay.source.name)) {\n expectedPlayersToPlay = getPlayersWithCurrentRole(game, currentPlay.source.name);\n } else {\n expectedPlayersToPlay = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.SHERIFF);\n }\n if (!mustIncludeDeadPlayersGamePlayActions.includes(currentPlay.action)) {\n expectedPlayersToPlay = expectedPlayersToPlay.filter(player => player.isAlive);\n }\n return expectedPlayersToPlay.map(player => createPlayer(player));\n}\n\nexport {\n getPlayerDtoWithRole,\n getPlayerWithCurrentRole,\n getPlayersWithCurrentRole,\n getPlayersWithCurrentSide,\n getPlayerWithId,\n getPlayerWithIdOrThrow,\n getPlayerWithName,\n getPlayerWithNameOrThrow,\n getAdditionalCardWithId,\n areAllWerewolvesAlive,\n areAllVillagersAlive,\n areAllPlayersDead,\n getPlayerWithActiveAttributeName,\n getPlayersWithActiveAttributeName,\n getAlivePlayers,\n getAliveVillagerSidedPlayers,\n getAliveWerewolfSidedPlayers,\n getLeftToCharmByPiedPiperPlayers,\n getLeftToEatByWerewolvesPlayers,\n getLeftToEatByWhiteWerewolfPlayers,\n getGroupOfPlayers,\n isGameSourceRole,\n isGameSourceGroup,\n getNonexistentPlayerId,\n getNonexistentPlayer,\n getFoxSniffedPlayers,\n getNearestAliveNeighbor,\n getExpectedPlayersToPlay,\n};" }, "src/modules/game/helpers/game.mutator.ts": { "language": "typescript", @@ -38367,7 +38531,7 @@ "id": "977", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.mutator.ts(14,105): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(13,105): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -38398,13 +38562,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38421,7 +38585,7 @@ "id": "978", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Sigurd\",\n \"position\": 660338951323648,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"05c13cebfa62b01c9fdbb6a6\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Lydia\",\n \"position\": 4183082890428416,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"13dbf0e0eb39cd0b75b848d3\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 33, "static": false, @@ -38455,13 +38619,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38512,13 +38676,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38540,7 +38704,7 @@ "testsCompleted": 33, "static": false, "killedBy": [ - "849" + "850" ], "coveredBy": [ "286", @@ -38569,13 +38733,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38592,13 +38756,9 @@ "id": "981", "mutatorName": "EqualityOperator", "replacement": "player._id.toString() !== playerId.toString()", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 36\n\n@@ -27,10 +27,32 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n+ \"_id\": \"532dbef05c82b4ac5806a669\",\n+ \"attributes\": Array [\n+ Object {\n+ \"name\": \"seen\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"seer\",\n+ },\n+ ],\n+ \"isAlive\": true,\n+ \"name\": \"Araceli\",\n+ \"position\": 8008730721386496,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n \"_id\": \"ffcbce5febe542f2d3ca694e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Piper\",\n \"position\": 3111010481209344,\n@@ -144,24 +166,30 @@\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n+ Object {\n+ \"_id\": \"532dbef05c82b4ac5806a669\",\n+ \"attributes\": Array [\n Object {\n- \"_id\": \"f9490deae35bba3dabfdfa81\",\n- \"attributes\": Array [],\n+ \"name\": \"seen\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"seer\",\n+ },\n+ ],\n \"isAlive\": true,\n- \"name\": \"Dudley\",\n- \"position\": 1923540750172160,\n+ \"name\": \"Araceli\",\n+ \"position\": 8008730721386496,\n \"role\": Object {\n- \"current\": \"seer\",\n+ \"current\": \"werewolf\",\n \"isRevealed\": false,\n- \"original\": \"seer\",\n+ \"original\": \"werewolf\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n },\n },\n Object {\n \"_id\": \"b23edbaebc7bc162d0b6603c\",\n \"attributes\": Array [],\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 33, + "status": "Timeout", "static": false, - "killedBy": [ - "531" - ], + "killedBy": [], "coveredBy": [ "286", "306", @@ -38626,13 +38786,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38649,12 +38809,12 @@ "id": "982", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in revealPlayerRole\"\nReceived message: \"\\\"undefined\\\" is not valid JSON\"\n\n 9 | return obj.map(item => JSON.parse(JSON.stringify(item)) as Record);\n 10 | }\n > 11 | return JSON.parse(JSON.stringify(obj)) as Record;\n | ^\n 12 | }\n 13 |\n 14 | export { toJSON };\n\n at toJSON (tests/helpers/object/object.helper.ts:11:15)\n at createPlayer (src/modules/game/helpers/player/player.factory.ts:57:42)\n at updatePlayerInGame (src/modules/game/helpers/game.mutator.ts:70:42)\n at PlayerKillerService.revealPlayerRole (src/modules/game/providers/services/player/player-killer.service.ts:141:38)\n at tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:245:61\n at Object. (../../node_modules/expect/build/toThrowMatchers.js:74:11)\n at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)\n at Object. (tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:245:84)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:245:84)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "SyntaxError: \"undefined\" is not valid JSON\n at JSON.parse ()\n at toJSON (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/helpers/object/object.helper.ts:11:15)\n at createPlayer (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/player/player.factory.ts:57:42)\n at updatePlayerInGame (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/game.mutator.ts:70:42)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts:21:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 33, "static": false, "killedBy": [ - "365" + "849" ], "coveredBy": [ "286", @@ -38683,13 +38843,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38736,13 +38896,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38759,13 +38919,9 @@ "id": "984", "mutatorName": "EqualityOperator", "replacement": "playerIdx === -1", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Clement\",\n \"position\": 7050875231010816,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"553429da3b0a2ced2f7522f2\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 33, + "status": "Timeout", "static": false, - "killedBy": [ - "318" - ], + "killedBy": [], "coveredBy": [ "286", "306", @@ -38793,13 +38949,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38816,12 +38972,12 @@ "id": "985", "mutatorName": "UnaryOperator", "replacement": "+1", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -115,11 +115,11 @@\n \"current\": \"dog-wolf\",\n \"isRevealed\": false,\n \"original\": \"dog-wolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"b82af92aee4afcf07e1de3e1\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1010:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in revealPlayerRole\"\nReceived message: \"\\\"undefined\\\" is not valid JSON\"\n\n 9 | return obj.map(item => JSON.parse(JSON.stringify(item)) as Record);\n 10 | }\n > 11 | return JSON.parse(JSON.stringify(obj)) as Record;\n | ^\n 12 | }\n 13 |\n 14 | export { toJSON };\n\n at toJSON (tests/helpers/object/object.helper.ts:11:15)\n at createPlayer (src/modules/game/helpers/player/player.factory.ts:57:42)\n at updatePlayerInGame (src/modules/game/helpers/game.mutator.ts:70:42)\n at PlayerKillerService.revealPlayerRole (src/modules/game/providers/services/player/player-killer.service.ts:141:38)\n at tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:245:61\n at Object. (../../node_modules/expect/build/toThrowMatchers.js:74:11)\n at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)\n at Object. (tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:245:84)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:245:84)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 33, "static": false, "killedBy": [ - "323" + "365" ], "coveredBy": [ "286", @@ -38850,13 +39006,13 @@ "396", "411", "531", - "848", "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38873,12 +39029,12 @@ "id": "986", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Hailee\",\n \"position\": 4074102042132480,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"c09de9daaf40ddb4b4fa3ebb\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -87,11 +87,11 @@\n \"isAlive\": true,\n \"name\": \"Cole\",\n \"position\": 3282466938814464,\n \"role\": PlayerRole {\n \"current\": \"wild-child\",\n- \"isRevealed\": true,\n+ \"isRevealed\": false,\n \"original\": \"wild-child\",\n },\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:270:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "318" + "366" ], "coveredBy": [ "286", @@ -38906,12 +39062,12 @@ "396", "411", "531", - "849", "850", - "852", + "851", "853", - "858", - "859" + "854", + "859", + "860" ], "location": { "end": { @@ -38928,7 +39084,7 @@ "id": "987", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.mutator.ts(24,102): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(23,102): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -38950,9 +39106,9 @@ "359", "411", "531", - "851", "852", - "853" + "853", + "854" ], "location": { "end": { @@ -38969,7 +39125,7 @@ "id": "988", "mutatorName": "BooleanLiteral", "replacement": "player", - "statusReason": "src/modules/game/helpers/game.mutator.ts(30,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(31,39): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Partial'.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(29,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(30,39): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -38991,9 +39147,9 @@ "359", "411", "531", - "851", "852", - "853" + "853", + "854" ], "location": { "end": { @@ -39010,7 +39166,7 @@ "id": "989", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game.mutator.ts(30,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(31,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(29,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(30,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -39032,9 +39188,9 @@ "359", "411", "531", - "851", "852", - "853" + "853", + "854" ], "location": { "end": { @@ -39051,7 +39207,7 @@ "id": "990", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.mutator.ts(30,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(31,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(29,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(30,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -39073,9 +39229,9 @@ "359", "411", "531", - "851", "852", - "853" + "853", + "854" ], "location": { "end": { @@ -39097,7 +39253,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "851" + "852" ], "location": { "end": { @@ -39124,9 +39280,9 @@ "342", "344", "420", - "854", "855", - "856" + "856", + "857" ], "location": { "end": { @@ -39153,9 +39309,9 @@ "342", "344", "420", - "854", "855", - "856" + "856", + "857" ], "location": { "end": { @@ -39185,9 +39341,9 @@ "342", "344", "420", - "854", "855", - "856" + "856", + "857" ], "location": { "end": { @@ -39213,9 +39369,9 @@ "342", "344", "420", - "854", "855", - "856" + "856", + "857" ], "location": { "end": { @@ -39244,8 +39400,8 @@ "342", "344", "420", - "855", - "856" + "856", + "857" ], "location": { "end": { @@ -39262,15 +39418,15 @@ "id": "997", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.mutator.ts(45,122): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(44,120): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "286", - "857", "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39278,7 +39434,7 @@ "line": 52 }, "start": { - "column": 127, + "column": 125, "line": 44 } } @@ -39287,15 +39443,15 @@ "id": "998", "mutatorName": "BooleanLiteral", "replacement": "player", - "statusReason": "src/modules/game/helpers/game.mutator.ts(51,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(51,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(52,39): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Partial'.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(50,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(50,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(51,39): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "286", - "857", "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39312,15 +39468,15 @@ "id": "999", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/helpers/game.mutator.ts(51,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(51,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(52,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(50,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(50,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(51,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "286", - "857", "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39337,15 +39493,15 @@ "id": "1000", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/helpers/game.mutator.ts(51,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(51,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(52,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(50,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(50,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(51,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "286", - "857", "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39362,12 +39518,12 @@ "id": "1001", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.mutator.ts(49,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(49,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(50,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(48,3): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(48,23): error TS18048: 'player' is possibly 'undefined'.\nsrc/modules/game/helpers/game.mutator.ts(49,39): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "857" + "858" ], "location": { "end": { @@ -39393,8 +39549,8 @@ ], "coveredBy": [ "286", - "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39411,17 +39567,17 @@ "id": "1003", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -97,19 +97,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"abab4d2df462fb0bdbd4997e\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": false,\n \"name\": \"Stacy\",\n \"position\": 2609739745722368,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts:166:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -97,19 +97,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"6b8eaf3dccbd7a348ebf3b20\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Yazmin\",\n \"position\": 8962907178008576,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts:166:106)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "858" + "859" ], "coveredBy": [ "286", - "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39447,8 +39603,8 @@ ], "coveredBy": [ "286", - "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39465,17 +39621,13 @@ "id": "1005", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -97,19 +97,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"cf3a97aa80993aad86b1a7b0\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"charmed\",\n- \"remainingPhases\": undefined,\n- \"source\": \"pied-piper\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Kayden\",\n \"position\": 4701368736546816,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts:166:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "858" - ], + "killedBy": [], "coveredBy": [ "286", - "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39501,8 +39653,8 @@ ], "coveredBy": [ "286", - "858", - "859" + "859", + "860" ], "location": { "end": { @@ -39519,7 +39671,7 @@ "id": "1007", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.mutator.ts(55,69): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(54,69): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -39538,8 +39690,8 @@ "415", "425", "530", - "860", - "861" + "861", + "862" ], "location": { "end": { @@ -39556,14 +39708,14 @@ "id": "1008", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/game.mutator.ts(61,68): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/game.mutator.ts(60,68): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "303", - "862", - "863" + "863", + "864" ], "location": { "end": { @@ -39577,7 +39729,7 @@ } } ], - "source": "import type { Types } from \"mongoose\";\n\nimport type { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getPlayerWithId } from \"@/modules/game/helpers/game.helper\";\nimport { createPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\n\nfunction updatePlayerInGame(playerId: Types.ObjectId, playerDataToUpdate: Partial, game: Game): Game {\n const clonedGame = createGame(game);\n const playerIdx = clonedGame.players.findIndex(player => player._id.toString() === playerId.toString());\n if (playerIdx !== -1) {\n const clonedPlayer = createPlayer(clonedGame.players[playerIdx]);\n clonedGame.players.splice(playerIdx, 1, createPlayer(Object.assign(clonedPlayer, playerDataToUpdate)));\n }\n return clonedGame;\n}\n\nfunction addPlayerAttributeInGame(playerId: Types.ObjectId, game: Game, attribute: PlayerAttribute): Game {\n const clonedGame = createGame(game);\n const player = getPlayerWithId(clonedGame, playerId);\n if (!player) {\n return clonedGame;\n }\n player.attributes.push(createPlayerAttribute(attribute));\n return updatePlayerInGame(playerId, player, clonedGame);\n}\n\nfunction addPlayersAttributeInGame(playerIds: Types.ObjectId[], game: Game, attribute: PlayerAttribute): Game {\n const clonedGame = createGame(game);\n clonedGame.players = clonedGame.players.map(player => {\n if (playerIds.includes(player._id)) {\n player.attributes.push(createPlayerAttribute(attribute));\n }\n return player;\n });\n return clonedGame;\n}\n\nfunction removePlayerAttributeByNameInGame(playerId: Types.ObjectId, game: Game, attributeName: PLAYER_ATTRIBUTE_NAMES): Game {\n const clonedGame = createGame(game);\n const player = getPlayerWithId(clonedGame, playerId);\n if (!player) {\n return clonedGame;\n }\n player.attributes = player.attributes.filter(({ name }) => name !== attributeName);\n return updatePlayerInGame(playerId, player, clonedGame);\n}\n\nfunction prependUpcomingPlayInGame(gamePlay: GamePlay, game: Game): Game {\n const clonedGame = createGame(game);\n clonedGame.upcomingPlays.unshift(gamePlay);\n return clonedGame;\n}\n\nfunction appendUpcomingPlayInGame(gamePlay: GamePlay, game: Game): Game {\n const clonedGame = createGame(game);\n clonedGame.upcomingPlays.push(gamePlay);\n return clonedGame;\n}\n\nexport {\n updatePlayerInGame,\n addPlayerAttributeInGame,\n addPlayersAttributeInGame,\n removePlayerAttributeByNameInGame,\n prependUpcomingPlayInGame,\n appendUpcomingPlayInGame,\n};" + "source": "import type { Types } from \"mongoose\";\n\nimport type { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getPlayerWithId } from \"@/modules/game/helpers/game.helper\";\nimport { createPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\n\nfunction updatePlayerInGame(playerId: Types.ObjectId, playerDataToUpdate: Partial, game: Game): Game {\n const clonedGame = createGame(game);\n const playerIdx = clonedGame.players.findIndex(player => player._id.toString() === playerId.toString());\n if (playerIdx !== -1) {\n const clonedPlayer = createPlayer(clonedGame.players[playerIdx]);\n clonedGame.players.splice(playerIdx, 1, createPlayer(Object.assign(clonedPlayer, playerDataToUpdate)));\n }\n return clonedGame;\n}\n\nfunction addPlayerAttributeInGame(playerId: Types.ObjectId, game: Game, attribute: PlayerAttribute): Game {\n const clonedGame = createGame(game);\n const player = getPlayerWithId(clonedGame, playerId);\n if (!player) {\n return clonedGame;\n }\n player.attributes.push(createPlayerAttribute(attribute));\n return updatePlayerInGame(playerId, player, clonedGame);\n}\n\nfunction addPlayersAttributeInGame(playerIds: Types.ObjectId[], game: Game, attribute: PlayerAttribute): Game {\n const clonedGame = createGame(game);\n clonedGame.players = clonedGame.players.map(player => {\n if (playerIds.includes(player._id)) {\n player.attributes.push(createPlayerAttribute(attribute));\n }\n return player;\n });\n return clonedGame;\n}\n\nfunction removePlayerAttributeByNameInGame(playerId: Types.ObjectId, game: Game, attributeName: PlayerAttributeNames): Game {\n const clonedGame = createGame(game);\n const player = getPlayerWithId(clonedGame, playerId);\n if (!player) {\n return clonedGame;\n }\n player.attributes = player.attributes.filter(({ name }) => name !== attributeName);\n return updatePlayerInGame(playerId, player, clonedGame);\n}\n\nfunction prependUpcomingPlayInGame(gamePlay: GamePlay, game: Game): Game {\n const clonedGame = createGame(game);\n clonedGame.upcomingPlays.unshift(gamePlay);\n return clonedGame;\n}\n\nfunction appendUpcomingPlayInGame(gamePlay: GamePlay, game: Game): Game {\n const clonedGame = createGame(game);\n clonedGame.upcomingPlays.push(gamePlay);\n return clonedGame;\n}\n\nexport {\n updatePlayerInGame,\n addPlayerAttributeInGame,\n addPlayersAttributeInGame,\n removePlayerAttributeByNameInGame,\n prependUpcomingPlayInGame,\n appendUpcomingPlayInGame,\n};" }, "src/modules/game/helpers/player/player-attribute/player-attribute.factory.ts": { "language": "typescript", @@ -39592,7 +39744,7 @@ "killedBy": [], "coveredBy": [ "411", - "818" + "819" ], "location": { "end": { @@ -39615,7 +39767,7 @@ "killedBy": [], "coveredBy": [ "411", - "818" + "819" ], "location": { "end": { @@ -39637,7 +39789,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "819" + "820" ], "location": { "end": { @@ -39659,7 +39811,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "819" + "820" ], "location": { "end": { @@ -39683,7 +39835,7 @@ "coveredBy": [ "341", "342", - "820" + "821" ], "location": { "end": { @@ -39707,7 +39859,7 @@ "coveredBy": [ "341", "342", - "820" + "821" ], "location": { "end": { @@ -39730,7 +39882,7 @@ "killedBy": [], "coveredBy": [ "359", - "821" + "822" ], "location": { "end": { @@ -39753,7 +39905,7 @@ "killedBy": [], "coveredBy": [ "359", - "821" + "822" ], "location": { "end": { @@ -39776,8 +39928,8 @@ "killedBy": [], "coveredBy": [ "320", - "822", - "823" + "823", + "824" ], "location": { "end": { @@ -39800,8 +39952,8 @@ "killedBy": [], "coveredBy": [ "320", - "822", - "823" + "823", + "824" ], "location": { "end": { @@ -39824,8 +39976,8 @@ "killedBy": [], "coveredBy": [ "320", - "822", - "823" + "823", + "824" ], "location": { "end": { @@ -39842,21 +39994,17 @@ "id": "1020", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -1,9 +1,9 @@\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 2,\n+ \"turn\": 3,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:87:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "823" - ], + "killedBy": [], "coveredBy": [ "320", - "822", - "823" + "823", + "824" ], "location": { "end": { - "column": 43, + "column": 42, "line": 53 }, "start": { @@ -39869,21 +40017,21 @@ "id": "1021", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -108,11 +108,11 @@\n \"_id\": \"97762b21538adaef03f4007b\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 6069318263504897,\n+ \"turn\": 6069318263504896,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n@@ -136,11 +136,11 @@\n \"_id\": \"f0d581eefa06facd5efc2f46\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 6069318263504897,\n+ \"turn\": 6069318263504896,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:954:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -1,9 +1,9 @@\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 3,\n+ \"turn\": 2,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:71:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "320" + "823" ], "coveredBy": [ "320", - "822", - "823" + "823", + "824" ], "location": { "end": { - "column": 43, + "column": 42, "line": 53 }, "start": { @@ -39895,22 +40043,22 @@ { "id": "1022", "mutatorName": "EqualityOperator", - "replacement": "game.phase !== GAME_PHASES.DAY", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -1,9 +1,9 @@\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 3,\n+ \"turn\": 2,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:72:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.phase !== GamePhases.DAY", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -108,11 +108,11 @@\n \"_id\": \"170dfb798e263db5ffaae1db\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 4639012690067456,\n+ \"turn\": 4639012690067457,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n@@ -136,11 +136,11 @@\n \"_id\": \"0df7ac8fe6bfdcecdb4c0eed\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 4639012690067456,\n+ \"turn\": 4639012690067457,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:954:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "822" + "320" ], "coveredBy": [ "320", - "822", - "823" + "823", + "824" ], "location": { "end": { - "column": 43, + "column": 42, "line": 53 }, "start": { @@ -39923,24 +40071,24 @@ "id": "1023", "mutatorName": "ArithmeticOperator", "replacement": "game.turn - 1", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -1,9 +1,9 @@\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 3,\n+ \"turn\": 1,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:72:62)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -108,11 +108,11 @@\n \"_id\": \"7c6eee2fec3b6cc78cdbbdd1\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 3385548915867649,\n+ \"turn\": 3385548915867647,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n@@ -136,11 +136,11 @@\n \"_id\": \"3bad234a7e4e3cbf3fb150e1\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": PlayerAttributeActivation {\n \"phase\": \"day\",\n- \"turn\": 3385548915867649,\n+ \"turn\": 3385548915867647,\n },\n \"doesRemainAfterDeath\": undefined,\n \"name\": \"cant-vote\",\n \"remainingPhases\": 1,\n \"source\": \"scapegoat\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:954:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "822" + "320" ], "coveredBy": [ "320", - "822" + "823" ], "location": { "end": { - "column": 59, + "column": 58, "line": 53 }, "start": { - "column": 46, + "column": 45, "line": 53 } } @@ -39955,7 +40103,7 @@ "killedBy": [], "coveredBy": [ "330", - "824" + "825" ], "location": { "end": { @@ -39978,7 +40126,7 @@ "killedBy": [], "coveredBy": [ "330", - "824" + "825" ], "location": { "end": { @@ -39995,12 +40143,16 @@ "id": "1026", "mutatorName": "BooleanLiteral", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n PlayerAttribute {\n \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n+ \"doesRemainAfterDeath\": false,\n \"name\": \"powerless\",\n \"remainingPhases\": undefined,\n \"source\": \"fox\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:98:53)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "825" + ], "coveredBy": [ "330", - "824" + "825" ], "location": { "end": { @@ -40025,7 +40177,7 @@ "369", "395", "420", - "825" + "826" ], "location": { "end": { @@ -40050,7 +40202,7 @@ "369", "395", "420", - "825" + "826" ], "location": { "end": { @@ -40067,18 +40219,18 @@ "id": "1029", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n PlayerAttribute {\n \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n+ \"doesRemainAfterDeath\": false,\n \"name\": \"powerless\",\n \"remainingPhases\": undefined,\n \"source\": \"ancient\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:111:57)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n PlayerAttribute {\n \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n+ \"doesRemainAfterDeath\": false,\n \"name\": \"powerless\",\n \"remainingPhases\": undefined,\n \"source\": \"ancient\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:110:57)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "825" + "826" ], "coveredBy": [ "369", "395", "420", - "825" + "826" ], "location": { "end": { @@ -40106,7 +40258,7 @@ "394", "395", "396", - "826" + "827" ], "location": { "end": { @@ -40134,7 +40286,7 @@ "394", "395", "396", - "826" + "827" ], "location": { "end": { @@ -40157,7 +40309,7 @@ "killedBy": [], "coveredBy": [ "344", - "827" + "828" ], "location": { "end": { @@ -40180,7 +40332,7 @@ "killedBy": [], "coveredBy": [ "344", - "827" + "828" ], "location": { "end": { @@ -40203,7 +40355,7 @@ "killedBy": [], "coveredBy": [ "332", - "828" + "829" ], "location": { "end": { @@ -40226,7 +40378,7 @@ "killedBy": [], "coveredBy": [ "332", - "828" + "829" ], "location": { "end": { @@ -40249,7 +40401,7 @@ "killedBy": [], "coveredBy": [ "334", - "829" + "830" ], "location": { "end": { @@ -40272,7 +40424,7 @@ "killedBy": [], "coveredBy": [ "334", - "829" + "830" ], "location": { "end": { @@ -40296,7 +40448,7 @@ "coveredBy": [ "338", "339", - "830" + "831" ], "location": { "end": { @@ -40320,7 +40472,7 @@ "coveredBy": [ "338", "339", - "830" + "831" ], "location": { "end": { @@ -40344,7 +40496,7 @@ "coveredBy": [ "338", "339", - "831" + "832" ], "location": { "end": { @@ -40368,7 +40520,7 @@ "coveredBy": [ "338", "339", - "831" + "832" ], "location": { "end": { @@ -40391,7 +40543,7 @@ "killedBy": [], "coveredBy": [ "350", - "832" + "833" ], "location": { "end": { @@ -40414,7 +40566,7 @@ "killedBy": [], "coveredBy": [ "350", - "832" + "833" ], "location": { "end": { @@ -40437,7 +40589,7 @@ "killedBy": [], "coveredBy": [ "348", - "833" + "834" ], "location": { "end": { @@ -40460,7 +40612,7 @@ "killedBy": [], "coveredBy": [ "348", - "833" + "834" ], "location": { "end": { @@ -40486,7 +40638,7 @@ "353", "354", "355", - "834" + "835" ], "location": { "end": { @@ -40512,7 +40664,7 @@ "353", "354", "355", - "834" + "835" ], "location": { "end": { @@ -40536,7 +40688,7 @@ "coveredBy": [ "346", "531", - "835" + "836" ], "location": { "end": { @@ -40560,7 +40712,7 @@ "coveredBy": [ "346", "531", - "835" + "836" ], "location": { "end": { @@ -40583,7 +40735,7 @@ "killedBy": [], "coveredBy": [ "286", - "836" + "837" ], "location": { "end": { @@ -40606,7 +40758,7 @@ "killedBy": [], "coveredBy": [ "286", - "836" + "837" ], "location": { "end": { @@ -40623,16 +40775,16 @@ "id": "1052", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n PlayerAttribute {\n \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n+ \"doesRemainAfterDeath\": false,\n \"name\": \"sheriff\",\n \"remainingPhases\": undefined,\n \"source\": \"sheriff\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:241:55)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n PlayerAttribute {\n \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n+ \"doesRemainAfterDeath\": false,\n \"name\": \"sheriff\",\n \"remainingPhases\": undefined,\n \"source\": \"sheriff\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:240:55)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "836" + "837" ], "coveredBy": [ "286", - "836" + "837" ], "location": { "end": { @@ -40656,7 +40808,7 @@ "coveredBy": [ "306", "311", - "837" + "838" ], "location": { "end": { @@ -40680,7 +40832,7 @@ "coveredBy": [ "306", "311", - "837" + "838" ], "location": { "end": { @@ -40697,13 +40849,17 @@ "id": "1055", "mutatorName": "BooleanLiteral", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n PlayerAttribute {\n \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n+ \"doesRemainAfterDeath\": false,\n \"name\": \"sheriff\",\n \"remainingPhases\": undefined,\n \"source\": \"all\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts:252:51)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "838" + ], "coveredBy": [ "306", "311", - "837" + "838" ], "location": { "end": { @@ -40755,7 +40911,6 @@ "411", "420", "531", - "818", "819", "820", "821", @@ -40776,15 +40931,16 @@ "836", "837", "838", - "852", + "839", "853", - "855", + "854", "856", - "867", + "857", "868", "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -40798,7 +40954,7 @@ } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createContaminatedByRustySwordKnightPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CONTAMINATED,\n source: ROLE_NAMES.RUSTY_SWORD_KNIGHT,\n remainingPhases: 2,\n ...playerAttribute,\n });\n}\n\nfunction createGrowledByBearTamerPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.GROWLED,\n source: ROLE_NAMES.BEAR_TAMER,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createCharmedByPiedPiperPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CHARMED,\n source: ROLE_NAMES.PIED_PIPER,\n ...playerAttribute,\n });\n}\n\nfunction createCantVoteByAllPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE,\n source: PLAYER_GROUPS.ALL,\n ...playerAttribute,\n });\n}\n\nfunction createCantVoteByScapegoatPlayerAttribute(game: Game, playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE,\n source: ROLE_NAMES.SCAPEGOAT,\n remainingPhases: 1,\n activeAt: {\n turn: game.phase === GAME_PHASES.DAY ? game.turn + 1 : game.turn,\n phase: GAME_PHASES.DAY,\n },\n ...playerAttribute,\n });\n}\n\nfunction createPowerlessByFoxPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.POWERLESS,\n source: ROLE_NAMES.FOX,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createPowerlessByAncientPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.POWERLESS,\n source: ROLE_NAMES.ANCIENT,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createWorshipedByWildChildPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.WORSHIPED,\n source: ROLE_NAMES.WILD_CHILD,\n ...playerAttribute,\n });\n}\n\nfunction createInLoveByCupidPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.IN_LOVE,\n source: ROLE_NAMES.CUPID,\n ...playerAttribute,\n });\n}\n\nfunction createRavenMarkByRavenPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.RAVEN_MARKED,\n source: ROLE_NAMES.RAVEN,\n remainingPhases: 2,\n ...playerAttribute,\n });\n}\n\nfunction createProtectedByGuardPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.PROTECTED,\n source: ROLE_NAMES.GUARD,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createDrankDeathPotionByWitchPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.DRANK_DEATH_POTION,\n source: ROLE_NAMES.WITCH,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createDrankLifePotionByWitchPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.DRANK_LIFE_POTION,\n source: ROLE_NAMES.WITCH,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createEatenByBigBadWolfPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.EATEN,\n source: ROLE_NAMES.BIG_BAD_WOLF,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createEatenByWhiteWerewolfPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.EATEN,\n source: ROLE_NAMES.WHITE_WEREWOLF,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createEatenByWerewolvesPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.EATEN,\n source: PLAYER_GROUPS.WEREWOLVES,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createSeenBySeerPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.SEEN,\n source: ROLE_NAMES.SEER,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createSheriffBySheriffPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n source: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createSheriffByAllPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n source: PLAYER_GROUPS.ALL,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createPlayerAttribute(playerAttribute: PlayerAttribute): PlayerAttribute {\n return plainToInstance(PlayerAttribute, toJSON(playerAttribute), plainToInstanceDefaultOptions);\n}\n\nexport {\n createContaminatedByRustySwordKnightPlayerAttribute,\n createGrowledByBearTamerPlayerAttribute,\n createCharmedByPiedPiperPlayerAttribute,\n createCantVoteByAllPlayerAttribute,\n createCantVoteByScapegoatPlayerAttribute,\n createPowerlessByFoxPlayerAttribute,\n createPowerlessByAncientPlayerAttribute,\n createWorshipedByWildChildPlayerAttribute,\n createInLoveByCupidPlayerAttribute,\n createRavenMarkByRavenPlayerAttribute,\n createProtectedByGuardPlayerAttribute,\n createDrankDeathPotionByWitchPlayerAttribute,\n createDrankLifePotionByWitchPlayerAttribute,\n createEatenByBigBadWolfPlayerAttribute,\n createEatenByWhiteWerewolfPlayerAttribute,\n createEatenByWerewolvesPlayerAttribute,\n createSeenBySeerPlayerAttribute,\n createSheriffBySheriffPlayerAttribute,\n createSheriffByAllPlayerAttribute,\n createPlayerAttribute,\n};" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createContaminatedByRustySwordKnightPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.CONTAMINATED,\n source: RoleNames.RUSTY_SWORD_KNIGHT,\n remainingPhases: 2,\n ...playerAttribute,\n });\n}\n\nfunction createGrowledByBearTamerPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.GROWLED,\n source: RoleNames.BEAR_TAMER,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createCharmedByPiedPiperPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.CHARMED,\n source: RoleNames.PIED_PIPER,\n ...playerAttribute,\n });\n}\n\nfunction createCantVoteByAllPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.CANT_VOTE,\n source: PlayerGroups.ALL,\n ...playerAttribute,\n });\n}\n\nfunction createCantVoteByScapegoatPlayerAttribute(game: Game, playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.CANT_VOTE,\n source: RoleNames.SCAPEGOAT,\n remainingPhases: 1,\n activeAt: {\n turn: game.phase === GamePhases.DAY ? game.turn + 1 : game.turn,\n phase: GamePhases.DAY,\n },\n ...playerAttribute,\n });\n}\n\nfunction createPowerlessByFoxPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.POWERLESS,\n source: RoleNames.FOX,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createPowerlessByAncientPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.POWERLESS,\n source: RoleNames.ANCIENT,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createWorshipedByWildChildPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.WORSHIPED,\n source: RoleNames.WILD_CHILD,\n ...playerAttribute,\n });\n}\n\nfunction createInLoveByCupidPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.IN_LOVE,\n source: RoleNames.CUPID,\n ...playerAttribute,\n });\n}\n\nfunction createRavenMarkByRavenPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.RAVEN_MARKED,\n source: RoleNames.RAVEN,\n remainingPhases: 2,\n ...playerAttribute,\n });\n}\n\nfunction createProtectedByGuardPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.PROTECTED,\n source: RoleNames.GUARD,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createDrankDeathPotionByWitchPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.DRANK_DEATH_POTION,\n source: RoleNames.WITCH,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createDrankLifePotionByWitchPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.DRANK_LIFE_POTION,\n source: RoleNames.WITCH,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createEatenByBigBadWolfPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.EATEN,\n source: RoleNames.BIG_BAD_WOLF,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createEatenByWhiteWerewolfPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.EATEN,\n source: RoleNames.WHITE_WEREWOLF,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createEatenByWerewolvesPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.EATEN,\n source: PlayerGroups.WEREWOLVES,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createSeenBySeerPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.SEEN,\n source: RoleNames.SEER,\n remainingPhases: 1,\n ...playerAttribute,\n });\n}\n\nfunction createSheriffBySheriffPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.SHERIFF,\n source: PlayerAttributeNames.SHERIFF,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createSheriffByAllPlayerAttribute(playerAttribute: Partial = {}): PlayerAttribute {\n return createPlayerAttribute({\n name: PlayerAttributeNames.SHERIFF,\n source: PlayerGroups.ALL,\n doesRemainAfterDeath: true,\n ...playerAttribute,\n });\n}\n\nfunction createPlayerAttribute(playerAttribute: PlayerAttribute): PlayerAttribute {\n return plainToInstance(PlayerAttribute, toJSON(playerAttribute), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n}\n\nexport {\n createContaminatedByRustySwordKnightPlayerAttribute,\n createGrowledByBearTamerPlayerAttribute,\n createCharmedByPiedPiperPlayerAttribute,\n createCantVoteByAllPlayerAttribute,\n createCantVoteByScapegoatPlayerAttribute,\n createPowerlessByFoxPlayerAttribute,\n createPowerlessByAncientPlayerAttribute,\n createWorshipedByWildChildPlayerAttribute,\n createInLoveByCupidPlayerAttribute,\n createRavenMarkByRavenPlayerAttribute,\n createProtectedByGuardPlayerAttribute,\n createDrankDeathPotionByWitchPlayerAttribute,\n createDrankLifePotionByWitchPlayerAttribute,\n createEatenByBigBadWolfPlayerAttribute,\n createEatenByWhiteWerewolfPlayerAttribute,\n createEatenByWerewolvesPlayerAttribute,\n createSeenBySeerPlayerAttribute,\n createSheriffBySheriffPlayerAttribute,\n createSheriffByAllPlayerAttribute,\n createPlayerAttribute,\n};" }, "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts": { "language": "typescript", @@ -40864,47 +41020,47 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "795", + "727", "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", + "809", "811", - "843", - "845", - "869", - "871", + "812", + "844", + "846", + "870", "872", - "898", - "904" + "873", + "899", + "905" ], "location": { "end": { @@ -40921,9 +41077,13 @@ "id": "1058", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:25:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 93, "static": false, - "killedBy": [], + "killedBy": [ + "797" + ], "coveredBy": [ "11", "14", @@ -40977,51 +41137,51 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "795", + "727", "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", + "809", "811", - "843", - "845", - "869", - "871", + "812", + "844", + "846", + "870", "872", - "898", - "904" + "873", + "899", + "905" ], "location": { "end": { - "column": 101, + "column": 100, "line": 10 }, "start": { @@ -41034,123 +41194,13 @@ "id": "1059", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts:167:33)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 93, "static": false, - "killedBy": [], - "coveredBy": [ - "11", - "14", - "43", - "113", - "116", - "146", - "148", - "168", - "170", - "171", - "178", - "185", - "190", - "201", - "247", - "250", - "253", - "258", - "286", - "292", - "295", - "296", - "369", - "378", - "380", - "381", - "382", - "383", - "393", - "394", - "395", - "396", - "398", - "399", - "400", - "402", - "403", - "404", - "406", - "408", - "413", - "417", - "424", - "459", - "564", - "566", - "571", - "572", - "575", - "576", - "602", - "603", - "648", - "649", - "650", - "658", - "659", - "660", - "661", - "662", - "663", - "668", - "681", - "685", - "686", - "714", - "716", - "717", - "718", - "719", - "720", - "721", - "722", - "724", - "725", - "726", - "795", - "796", - "797", - "798", - "799", - "800", - "807", - "808", - "810", - "811", - "843", - "845", - "869", - "871", - "872", - "898", - "904" + "killedBy": [ + "651" ], - "location": { - "end": { - "column": 101, - "line": 10 - }, - "start": { - "column": 10, - "line": 9 - } - } - }, - { - "id": "1060", - "mutatorName": "LogicalOperator", - "replacement": "(activeAt === undefined || activeAt.turn < game.turn) && activeAt.turn === game.turn && (activeAt.phase === game.phase || game.phase === GAME_PHASES.DAY)", - "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(9,67): error TS18048: 'activeAt' is possibly 'undefined'.\nsrc/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(9,99): error TS18048: 'activeAt' is possibly 'undefined'.\n", - "status": "CompileError", - "static": false, - "killedBy": [], "coveredBy": [ "11", "14", @@ -41204,51 +41254,165 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "795", + "727", "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", + "809", "811", - "843", - "845", - "869", - "871", + "812", + "844", + "846", + "870", "872", - "898", - "904" + "873", + "899", + "905" ], "location": { "end": { - "column": 101, + "column": 100, + "line": 10 + }, + "start": { + "column": 10, + "line": 9 + } + } + }, + { + "id": "1060", + "mutatorName": "LogicalOperator", + "replacement": "(activeAt === undefined || activeAt.turn < game.turn) && activeAt.turn === game.turn && (activeAt.phase === game.phase || game.phase === GamePhases.DAY)", + "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(9,67): error TS18048: 'activeAt' is possibly 'undefined'.\nsrc/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(9,99): error TS18048: 'activeAt' is possibly 'undefined'.\n", + "status": "CompileError", + "static": false, + "killedBy": [], + "coveredBy": [ + "11", + "14", + "43", + "113", + "116", + "146", + "148", + "168", + "170", + "171", + "178", + "185", + "190", + "201", + "247", + "250", + "253", + "258", + "286", + "292", + "295", + "296", + "369", + "378", + "380", + "381", + "382", + "383", + "393", + "394", + "395", + "396", + "398", + "399", + "400", + "402", + "403", + "404", + "406", + "408", + "413", + "417", + "424", + "459", + "564", + "566", + "571", + "572", + "575", + "576", + "602", + "603", + "649", + "650", + "651", + "659", + "660", + "661", + "662", + "663", + "664", + "669", + "682", + "686", + "687", + "715", + "717", + "718", + "719", + "720", + "721", + "722", + "723", + "725", + "726", + "727", + "796", + "797", + "798", + "799", + "800", + "801", + "808", + "809", + "811", + "812", + "844", + "846", + "870", + "872", + "873", + "899", + "905" + ], + "location": { + "end": { + "column": 100, "line": 10 }, "start": { @@ -41318,47 +41482,47 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "795", + "727", "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", + "809", "811", - "843", - "845", - "869", - "871", + "812", + "844", + "846", + "870", "872", - "898", - "904" + "873", + "899", + "905" ], "location": { "end": { @@ -41432,47 +41596,47 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "795", + "727", "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", + "809", "811", - "843", - "845", - "869", - "871", + "812", + "844", + "846", + "870", "872", - "898", - "904" + "873", + "899", + "905" ], "location": { "end": { @@ -41546,47 +41710,47 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "795", + "727", "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", + "809", "811", - "843", - "845", - "869", - "871", + "812", + "844", + "846", + "870", "872", - "898", - "904" + "873", + "899", + "905" ], "location": { "end": { @@ -41660,47 +41824,47 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "795", + "727", "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", + "809", "811", - "843", - "845", - "869", - "871", + "812", + "844", + "846", + "870", "872", - "898", - "904" + "873", + "899", + "905" ], "location": { "end": { @@ -41717,19 +41881,23 @@ "id": "1065", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:32:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 9, "static": false, - "killedBy": [], + "killedBy": [ + "798" + ], "coveredBy": [ - "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", - "811" + "809", + "811", + "812" ], "location": { "end": { @@ -41746,19 +41914,23 @@ "id": "1066", "mutatorName": "EqualityOperator", "replacement": "activeAt.turn <= game.turn", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:39:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 9, "static": false, - "killedBy": [], + "killedBy": [ + "799" + ], "coveredBy": [ - "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", - "811" + "809", + "811", + "812" ], "location": { "end": { @@ -41779,15 +41951,15 @@ "static": false, "killedBy": [], "coveredBy": [ - "796", "797", "798", "799", "800", - "807", + "801", "808", - "810", - "811" + "809", + "811", + "812" ], "location": { "end": { @@ -41808,18 +41980,18 @@ "static": false, "killedBy": [], "coveredBy": [ - "796", - "798", + "797", "799", "800", - "807", + "801", "808", - "810", - "811" + "809", + "811", + "812" ], "location": { "end": { - "column": 101, + "column": 100, "line": 10 }, "start": { @@ -41831,27 +42003,27 @@ { "id": "1069", "mutatorName": "LogicalOperator", - "replacement": "activeAt.turn === game.turn || activeAt.phase === game.phase || game.phase === GAME_PHASES.DAY", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:26:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "activeAt.turn === game.turn || activeAt.phase === game.phase || game.phase === GamePhases.DAY", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:25:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "796" + "797" ], "coveredBy": [ - "796", - "798", + "797", "799", "800", - "807", + "801", "808", - "810", - "811" + "809", + "811", + "812" ], "location": { "end": { - "column": 101, + "column": 100, "line": 10 }, "start": { @@ -41864,22 +42036,18 @@ "id": "1070", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:26:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 8, + "status": "Timeout", "static": false, - "killedBy": [ - "796" - ], + "killedBy": [], "coveredBy": [ - "796", - "798", + "797", "799", "800", - "807", + "801", "808", - "810", - "811" + "809", + "811", + "812" ], "location": { "end": { @@ -41896,22 +42064,18 @@ "id": "1071", "mutatorName": "EqualityOperator", "replacement": "activeAt.turn !== game.turn", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:26:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 8, + "status": "Timeout", "static": false, - "killedBy": [ - "796" - ], + "killedBy": [], "coveredBy": [ - "796", - "798", + "797", "799", "800", - "807", + "801", "808", - "810", - "811" + "809", + "811", + "812" ], "location": { "end": { @@ -41932,15 +42096,15 @@ "static": false, "killedBy": [], "coveredBy": [ - "798", "799", "800", - "808", - "811" + "801", + "809", + "812" ], "location": { "end": { - "column": 100, + "column": 99, "line": 10 }, "start": { @@ -41952,20 +42116,20 @@ { "id": "1073", "mutatorName": "LogicalOperator", - "replacement": "activeAt.phase === game.phase && game.phase === GAME_PHASES.DAY", + "replacement": "activeAt.phase === game.phase && game.phase === GamePhases.DAY", "status": "Timeout", "static": false, "killedBy": [], "coveredBy": [ - "798", "799", "800", - "808", - "811" + "801", + "809", + "812" ], "location": { "end": { - "column": 100, + "column": 99, "line": 10 }, "start": { @@ -41982,11 +42146,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "798", "799", "800", - "808", - "811" + "801", + "809", + "812" ], "location": { "end": { @@ -42003,19 +42167,19 @@ "id": "1075", "mutatorName": "EqualityOperator", "replacement": "activeAt.phase !== game.phase", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:40:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:39:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "798" + "799" ], "coveredBy": [ - "798", "799", "800", - "808", - "811" + "801", + "809", + "812" ], "location": { "end": { @@ -42032,20 +42196,16 @@ "id": "1076", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:54:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "800" - ], + "killedBy": [], "coveredBy": [ - "798", - "800" + "799", + "801" ], "location": { "end": { - "column": 100, + "column": 99, "line": 10 }, "start": { @@ -42057,17 +42217,17 @@ { "id": "1077", "mutatorName": "EqualityOperator", - "replacement": "game.phase !== GAME_PHASES.DAY", + "replacement": "game.phase !== GamePhases.DAY", "status": "Timeout", "static": false, "killedBy": [], "coveredBy": [ - "798", - "800" + "799", + "801" ], "location": { "end": { - "column": 100, + "column": 99, "line": 10 }, "start": { @@ -42080,16 +42240,16 @@ "id": "1078", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(13,101): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(13,99): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "801", "802", "803", "804", - "805" + "805", + "806" ], "location": { "end": { @@ -42097,7 +42257,7 @@ "line": 15 }, "start": { - "column": 129, + "column": 127, "line": 13 } } @@ -42106,15 +42266,19 @@ "id": "1079", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:65:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "802" + ], "coveredBy": [ - "801", "802", "803", "804", - "805" + "805", + "806" ], "location": { "end": { @@ -42135,10 +42299,10 @@ "static": false, "killedBy": [], "coveredBy": [ - "801", "802", - "804", - "805" + "803", + "805", + "806" ], "location": { "end": { @@ -42155,18 +42319,14 @@ "id": "1081", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:66:84)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "801" - ], + "killedBy": [], "coveredBy": [ - "801", "802", - "804", - "805" + "803", + "805", + "806" ], "location": { "end": { @@ -42183,14 +42343,18 @@ "id": "1082", "mutatorName": "EqualityOperator", "replacement": "name !== attributeName", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n+ \"name\": \"sheriff\",\n \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n+ \"source\": \"all\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:65:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "802" + ], "coveredBy": [ - "801", "802", - "804", - "805" + "803", + "805", + "806" ], "location": { "end": { @@ -42207,14 +42371,14 @@ "id": "1083", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(17,98): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(17,96): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "803", "804", - "805" + "805", + "806" ], "location": { "end": { @@ -42222,7 +42386,7 @@ "line": 19 }, "start": { - "column": 106, + "column": 104, "line": 17 } } @@ -42231,17 +42395,13 @@ "id": "1084", "mutatorName": "BooleanLiteral", "replacement": "!getPlayerAttributeWithName(player, attributeName)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:84:84)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "803" - ], + "killedBy": [], "coveredBy": [ - "803", "804", - "805" + "805", + "806" ], "location": { "end": { @@ -42258,17 +42418,13 @@ "id": "1085", "mutatorName": "BooleanLiteral", "replacement": "getPlayerAttributeWithName(player, attributeName)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:84:84)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "803" - ], + "killedBy": [], "coveredBy": [ - "803", "804", - "805" + "805", + "806" ], "location": { "end": { @@ -42285,7 +42441,7 @@ "id": "1086", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(21,119): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(21,117): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -42302,7 +42458,6 @@ "43", "44", "45", - "46", "48", "49", "113", @@ -42428,32 +42583,31 @@ "576", "602", "603", - "647", "648", "649", "650", - "657", + "651", "658", "659", "660", "661", "662", "663", - "668", + "664", "669", "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", + "691", "715", "716", "717", @@ -42466,22 +42620,23 @@ "724", "725", "726", - "806", + "727", "807", "808", "809", "810", "811", - "842", + "812", "843", "844", "845", - "898", - "900", + "846", + "899", "901", "902", - "904", - "905" + "903", + "905", + "906" ], "location": { "end": { @@ -42489,7 +42644,7 @@ "line": 23 }, "start": { - "column": 147, + "column": 145, "line": 21 } } @@ -42514,7 +42669,6 @@ "43", "44", "45", - "46", "48", "49", "113", @@ -42640,32 +42794,31 @@ "576", "602", "603", - "647", "648", "649", "650", - "657", + "651", "658", "659", "660", "661", "662", "663", - "668", + "664", "669", "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", + "691", "715", "716", "717", @@ -42678,22 +42831,23 @@ "724", "725", "726", - "806", + "727", "807", "808", "809", "810", "811", - "842", + "812", "843", "844", "845", - "898", - "900", + "846", + "899", "901", "902", - "904", - "905" + "903", + "905", + "906" ], "location": { "end": { @@ -42771,42 +42925,42 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "806", + "727", "807", "808", "809", "810", "811", - "842", + "812", "843", "844", "845", - "898", - "904" + "846", + "899", + "905" ], "location": { "end": { @@ -42823,238 +42977,12 @@ "id": "1089", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", - "static": false, - "killedBy": [], - "coveredBy": [ - "11", - "14", - "43", - "113", - "116", - "146", - "148", - "168", - "170", - "171", - "178", - "185", - "190", - "201", - "247", - "250", - "253", - "258", - "286", - "292", - "295", - "296", - "369", - "378", - "380", - "381", - "382", - "383", - "393", - "394", - "395", - "396", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "408", - "413", - "417", - "424", - "459", - "531", - "564", - "565", - "566", - "567", - "571", - "572", - "575", - "576", - "602", - "603", - "648", - "649", - "650", - "658", - "659", - "660", - "661", - "662", - "663", - "668", - "681", - "685", - "686", - "714", - "716", - "717", - "718", - "719", - "720", - "721", - "722", - "724", - "725", - "726", - "806", - "807", - "808", - "809", - "810", - "811", - "842", - "843", - "844", - "845", - "898", - "904" - ], - "location": { - "end": { - "column": 115, - "line": 22 - }, - "start": { - "column": 39, - "line": 22 - } - } - }, - { - "id": "1090", - "mutatorName": "LogicalOperator", - "replacement": "attribute.name === attributeName || isPlayerAttributeActive(attribute, game)", - "status": "Timeout", - "static": false, - "killedBy": [], - "coveredBy": [ - "11", - "14", - "43", - "113", - "116", - "146", - "148", - "168", - "170", - "171", - "178", - "185", - "190", - "201", - "247", - "250", - "253", - "258", - "286", - "292", - "295", - "296", - "369", - "378", - "380", - "381", - "382", - "383", - "393", - "394", - "395", - "396", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "408", - "413", - "417", - "424", - "459", - "531", - "564", - "565", - "566", - "567", - "571", - "572", - "575", - "576", - "602", - "603", - "648", - "649", - "650", - "658", - "659", - "660", - "661", - "662", - "663", - "668", - "681", - "685", - "686", - "714", - "716", - "717", - "718", - "719", - "720", - "721", - "722", - "724", - "725", - "726", - "806", - "807", - "808", - "809", - "810", - "811", - "842", - "843", - "844", - "845", - "898", - "904" - ], - "location": { - "end": { - "column": 115, - "line": 22 - }, - "start": { - "column": 39, - "line": 22 - } - } - }, - { - "id": "1091", - "mutatorName": "ConditionalExpression", - "replacement": "true", - "statusReason": "Error: expect(received).toBeUndefined()\n\nReceived: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:109:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"activeAt\": {\"phase\": \"day\", \"turn\": 1}, \"doesRemainAfterDeath\": undefined, \"name\": \"in-love\", \"remainingPhases\": undefined, \"source\": \"cupid\"}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:130:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 93, "static": false, "killedBy": [ - "806" + "809" ], "coveredBy": [ "11", @@ -43114,42 +43042,276 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "806", + "727", "807", "808", "809", "810", "811", - "842", + "812", + "843", + "844", + "845", + "846", + "899", + "905" + ], + "location": { + "end": { + "column": 115, + "line": 22 + }, + "start": { + "column": 39, + "line": 22 + } + } + }, + { + "id": "1090", + "mutatorName": "LogicalOperator", + "replacement": "attribute.name === attributeName || isPlayerAttributeActive(attribute, game)", + "statusReason": "Error: expect(received).toBeUndefined()\n\nReceived: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:108:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 93, + "static": false, + "killedBy": [ + "807" + ], + "coveredBy": [ + "11", + "14", + "43", + "113", + "116", + "146", + "148", + "168", + "170", + "171", + "178", + "185", + "190", + "201", + "247", + "250", + "253", + "258", + "286", + "292", + "295", + "296", + "369", + "378", + "380", + "381", + "382", + "383", + "393", + "394", + "395", + "396", + "398", + "399", + "400", + "401", + "402", + "403", + "404", + "405", + "406", + "408", + "413", + "417", + "424", + "459", + "531", + "564", + "565", + "566", + "567", + "571", + "572", + "575", + "576", + "602", + "603", + "649", + "650", + "651", + "659", + "660", + "661", + "662", + "663", + "664", + "669", + "682", + "686", + "687", + "715", + "717", + "718", + "719", + "720", + "721", + "722", + "723", + "725", + "726", + "727", + "807", + "808", + "809", + "810", + "811", + "812", "843", "844", "845", - "898", - "904" + "846", + "899", + "905" + ], + "location": { + "end": { + "column": 115, + "line": 22 + }, + "start": { + "column": 39, + "line": 22 + } + } + }, + { + "id": "1091", + "mutatorName": "ConditionalExpression", + "replacement": "true", + "statusReason": "Error: expect(received).toBeUndefined()\n\nReceived: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:108:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 93, + "static": false, + "killedBy": [ + "807" + ], + "coveredBy": [ + "11", + "14", + "43", + "113", + "116", + "146", + "148", + "168", + "170", + "171", + "178", + "185", + "190", + "201", + "247", + "250", + "253", + "258", + "286", + "292", + "295", + "296", + "369", + "378", + "380", + "381", + "382", + "383", + "393", + "394", + "395", + "396", + "398", + "399", + "400", + "401", + "402", + "403", + "404", + "405", + "406", + "408", + "413", + "417", + "424", + "459", + "531", + "564", + "565", + "566", + "567", + "571", + "572", + "575", + "576", + "602", + "603", + "649", + "650", + "651", + "659", + "660", + "661", + "662", + "663", + "664", + "669", + "682", + "686", + "687", + "715", + "717", + "718", + "719", + "720", + "721", + "722", + "723", + "725", + "726", + "727", + "807", + "808", + "809", + "810", + "811", + "812", + "843", + "844", + "845", + "846", + "899", + "905" ], "location": { "end": { @@ -43231,42 +43393,42 @@ "576", "602", "603", - "648", "649", "650", - "658", + "651", "659", "660", "661", "662", "663", - "668", - "681", - "685", + "664", + "669", + "682", "686", - "714", - "716", + "687", + "715", "717", "718", "719", "720", "721", "722", - "724", + "723", "725", "726", - "806", + "727", "807", "808", "809", "810", "811", - "842", + "812", "843", "844", "845", - "898", - "904" + "846", + "899", + "905" ], "location": { "end": { @@ -43283,7 +43445,7 @@ "id": "1093", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(25,116): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(25,114): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -43300,7 +43462,6 @@ "43", "44", "45", - "46", "48", "49", "113", @@ -43426,32 +43587,31 @@ "576", "602", "603", - "647", "648", "649", "650", - "657", + "651", "658", "659", "660", "661", "662", "663", - "668", + "664", "669", "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", + "691", "715", "716", "717", @@ -43464,19 +43624,20 @@ "724", "725", "726", - "809", + "727", "810", "811", - "842", + "812", "843", "844", "845", - "898", - "900", + "846", + "899", "901", "902", - "904", - "905" + "903", + "905", + "906" ], "location": { "end": { @@ -43484,7 +43645,7 @@ "line": 27 }, "start": { - "column": 124, + "column": 122, "line": 25 } } @@ -43509,7 +43670,6 @@ "43", "44", "45", - "46", "48", "49", "113", @@ -43635,32 +43795,31 @@ "576", "602", "603", - "647", "648", "649", "650", - "657", + "651", "658", "659", "660", "661", "662", "663", - "668", + "664", "669", "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", + "691", "715", "716", "717", @@ -43673,19 +43832,20 @@ "724", "725", "726", - "809", + "727", "810", "811", - "842", + "812", "843", "844", "845", - "898", - "900", + "846", + "899", "901", "902", - "904", - "905" + "903", + "905", + "906" ], "location": { "end": { @@ -43718,7 +43878,6 @@ "43", "44", "45", - "46", "48", "49", "113", @@ -43844,32 +44003,31 @@ "576", "602", "603", - "647", "648", "649", "650", - "657", + "651", "658", "659", "660", "661", "662", "663", - "668", + "664", "669", "670", "671", "672", - "681", + "673", "682", - "684", + "683", "685", "686", "687", "688", "689", "690", - "714", + "691", "715", "716", "717", @@ -43882,19 +44040,20 @@ "724", "725", "726", - "809", + "727", "810", "811", - "842", + "812", "843", "844", "845", - "898", - "900", + "846", + "899", "901", "902", - "904", - "905" + "903", + "905", + "906" ], "location": { "end": { @@ -43911,17 +44070,17 @@ "id": "1096", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(29,139): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(29,137): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "812", "813", "814", "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -43929,7 +44088,7 @@ "line": 31 }, "start": { - "column": 167, + "column": 165, "line": 29 } } @@ -43938,20 +44097,16 @@ "id": "1097", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:178:113)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "812" - ], + "killedBy": [], "coveredBy": [ - "812", "813", "814", "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -43968,16 +44123,20 @@ "id": "1098", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n+ \"name\": \"sheriff\",\n \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n+ \"source\": \"all\",\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:177:110)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, "static": false, - "killedBy": [], + "killedBy": [ + "813" + ], "coveredBy": [ - "812", "813", "814", "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -43998,12 +44157,12 @@ "static": false, "killedBy": [], "coveredBy": [ - "812", "813", "814", "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -44020,20 +44179,16 @@ "id": "1100", "mutatorName": "LogicalOperator", "replacement": "name === attributeName || source === attributeSource", - "statusReason": "Error: expect(received).toBeUndefined()\n\nReceived: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:188:111)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "813" - ], + "killedBy": [], "coveredBy": [ - "812", "813", "814", "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -44050,20 +44205,20 @@ "id": "1101", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBeUndefined()\n\nReceived: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:188:111)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBeUndefined()\n\nReceived: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:187:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "813" + "814" ], "coveredBy": [ - "812", "813", "814", "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -44084,12 +44239,12 @@ "static": false, "killedBy": [], "coveredBy": [ - "812", "813", "814", "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -44106,18 +44261,14 @@ "id": "1103", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBeUndefined()\n\nReceived: {\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:198:111)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "814" - ], + "killedBy": [], "coveredBy": [ - "812", - "814", + "813", "815", - "817" + "816", + "818" ], "location": { "end": { @@ -44138,10 +44289,10 @@ "static": false, "killedBy": [], "coveredBy": [ - "812", - "814", + "813", "815", - "817" + "816", + "818" ], "location": { "end": { @@ -44158,14 +44309,14 @@ "id": "1105", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(33,136): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts(33,134): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ - "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -44173,7 +44324,7 @@ "line": 35 }, "start": { - "column": 144, + "column": 142, "line": 33 } } @@ -44182,17 +44333,13 @@ "id": "1106", "mutatorName": "BooleanLiteral", "replacement": "!getPlayerAttributeWithNameAndSource(player, attributeName, attributeSource)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:210:118)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "815" - ], + "killedBy": [], "coveredBy": [ - "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -44209,13 +44356,17 @@ "id": "1107", "mutatorName": "BooleanLiteral", "replacement": "getPlayerAttributeWithNameAndSource(player, attributeName, attributeSource)", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts:209:115)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "816" + ], "coveredBy": [ - "815", "816", - "817" + "817", + "818" ], "location": { "end": { @@ -44229,7 +44380,7 @@ } } ], - "source": "import { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport type { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\n\nfunction isPlayerAttributeActive({ activeAt }: PlayerAttribute, game: Game): boolean {\n return activeAt === undefined || activeAt.turn < game.turn ||\n activeAt.turn === game.turn && (activeAt.phase === game.phase || game.phase === GAME_PHASES.DAY);\n}\n\nfunction getPlayerAttributeWithName({ attributes }: Player, attributeName: PLAYER_ATTRIBUTE_NAMES): PlayerAttribute | undefined {\n return attributes.find(({ name }) => name === attributeName);\n}\n\nfunction doesPlayerHaveAttributeWithName(player: Player, attributeName: PLAYER_ATTRIBUTE_NAMES): boolean {\n return !!getPlayerAttributeWithName(player, attributeName);\n}\n\nfunction getActivePlayerAttributeWithName({ attributes }: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, game: Game): PlayerAttribute | undefined {\n return attributes.find(attribute => attribute.name === attributeName && isPlayerAttributeActive(attribute, game));\n}\n\nfunction doesPlayerHaveActiveAttributeWithName(player: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, game: Game): boolean {\n return !!getActivePlayerAttributeWithName(player, attributeName, game);\n}\n\nfunction getPlayerAttributeWithNameAndSource({ attributes }: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, attributeSource: GameSource): PlayerAttribute | undefined {\n return attributes.find(({ name, source }) => name === attributeName && source === attributeSource);\n}\n\nfunction doesPlayerHaveAttributeWithNameAndSource(player: Player, attributeName: PLAYER_ATTRIBUTE_NAMES, attributeSource: GameSource): boolean {\n return !!getPlayerAttributeWithNameAndSource(player, attributeName, attributeSource);\n}\n\nexport {\n isPlayerAttributeActive,\n getPlayerAttributeWithName,\n doesPlayerHaveAttributeWithName,\n getActivePlayerAttributeWithName,\n doesPlayerHaveActiveAttributeWithName,\n getPlayerAttributeWithNameAndSource,\n doesPlayerHaveAttributeWithNameAndSource,\n};" + "source": "import { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport type { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\n\nfunction isPlayerAttributeActive({ activeAt }: PlayerAttribute, game: Game): boolean {\n return activeAt === undefined || activeAt.turn < game.turn ||\n activeAt.turn === game.turn && (activeAt.phase === game.phase || game.phase === GamePhases.DAY);\n}\n\nfunction getPlayerAttributeWithName({ attributes }: Player, attributeName: PlayerAttributeNames): PlayerAttribute | undefined {\n return attributes.find(({ name }) => name === attributeName);\n}\n\nfunction doesPlayerHaveAttributeWithName(player: Player, attributeName: PlayerAttributeNames): boolean {\n return !!getPlayerAttributeWithName(player, attributeName);\n}\n\nfunction getActivePlayerAttributeWithName({ attributes }: Player, attributeName: PlayerAttributeNames, game: Game): PlayerAttribute | undefined {\n return attributes.find(attribute => attribute.name === attributeName && isPlayerAttributeActive(attribute, game));\n}\n\nfunction doesPlayerHaveActiveAttributeWithName(player: Player, attributeName: PlayerAttributeNames, game: Game): boolean {\n return !!getActivePlayerAttributeWithName(player, attributeName, game);\n}\n\nfunction getPlayerAttributeWithNameAndSource({ attributes }: Player, attributeName: PlayerAttributeNames, attributeSource: GameSource): PlayerAttribute | undefined {\n return attributes.find(({ name, source }) => name === attributeName && source === attributeSource);\n}\n\nfunction doesPlayerHaveAttributeWithNameAndSource(player: Player, attributeName: PlayerAttributeNames, attributeSource: GameSource): boolean {\n return !!getPlayerAttributeWithNameAndSource(player, attributeName, attributeSource);\n}\n\nexport {\n isPlayerAttributeActive,\n getPlayerAttributeWithName,\n doesPlayerHaveAttributeWithName,\n getActivePlayerAttributeWithName,\n doesPlayerHaveActiveAttributeWithName,\n getPlayerAttributeWithNameAndSource,\n doesPlayerHaveAttributeWithNameAndSource,\n};" }, "src/modules/game/helpers/player/player-death/player-death.factory.ts": { "language": "typescript", @@ -44243,8 +44394,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "866", - "886" + "867", + "887" ], "location": { "end": { @@ -44266,8 +44417,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "866", - "886" + "867", + "887" ], "location": { "end": { @@ -44290,7 +44441,7 @@ "killedBy": [], "coveredBy": [ "400", - "887" + "888" ], "location": { "end": { @@ -44313,7 +44464,7 @@ "killedBy": [], "coveredBy": [ "400", - "887" + "888" ], "location": { "end": { @@ -44336,7 +44487,7 @@ "killedBy": [], "coveredBy": [ "422", - "888" + "889" ], "location": { "end": { @@ -44359,7 +44510,7 @@ "killedBy": [], "coveredBy": [ "422", - "888" + "889" ], "location": { "end": { @@ -44382,7 +44533,7 @@ "killedBy": [], "coveredBy": [ "293", - "889" + "890" ], "location": { "end": { @@ -44405,7 +44556,7 @@ "killedBy": [], "coveredBy": [ "293", - "889" + "890" ], "location": { "end": { @@ -44428,7 +44579,7 @@ "killedBy": [], "coveredBy": [ "284", - "890" + "891" ], "location": { "end": { @@ -44451,7 +44602,7 @@ "killedBy": [], "coveredBy": [ "284", - "890" + "891" ], "location": { "end": { @@ -44474,7 +44625,7 @@ "killedBy": [], "coveredBy": [ "304", - "891" + "892" ], "location": { "end": { @@ -44497,7 +44648,7 @@ "killedBy": [], "coveredBy": [ "304", - "891" + "892" ], "location": { "end": { @@ -44520,7 +44671,7 @@ "killedBy": [], "coveredBy": [ "336", - "892" + "893" ], "location": { "end": { @@ -44543,7 +44694,7 @@ "killedBy": [], "coveredBy": [ "336", - "892" + "893" ], "location": { "end": { @@ -44565,7 +44716,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "893" + "894" ], "location": { "end": { @@ -44587,7 +44738,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "893" + "894" ], "location": { "end": { @@ -44609,7 +44760,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "894" + "895" ], "location": { "end": { @@ -44631,7 +44782,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "894" + "895" ], "location": { "end": { @@ -44653,8 +44804,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "864", - "895" + "865", + "896" ], "location": { "end": { @@ -44676,8 +44827,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "864", - "895" + "865", + "896" ], "location": { "end": { @@ -44699,8 +44850,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "865", - "896" + "866", + "897" ], "location": { "end": { @@ -44722,8 +44873,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "865", - "896" + "866", + "897" ], "location": { "end": { @@ -44753,10 +44904,9 @@ "400", "422", "432", - "864", "865", "866", - "886", + "867", "887", "888", "889", @@ -44767,7 +44917,8 @@ "894", "895", "896", - "897" + "897", + "898" ], "location": { "end": { @@ -44781,7 +44932,7 @@ } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { PlayerDeath } from \"@/modules/game/schemas/player/player-death.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nfunction createPlayerDiseaseByRustySwordKnightDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.DISEASE,\n source: ROLE_NAMES.RUSTY_SWORD_KNIGHT,\n ...playerDeath,\n });\n}\n\nfunction createPlayerBrokenHeartByCupidDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.BROKEN_HEART,\n source: ROLE_NAMES.CUPID,\n ...playerDeath,\n });\n}\n\nfunction createPlayerReconsiderPardonByAllDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.RECONSIDER_PARDON,\n source: PLAYER_GROUPS.ALL,\n ...playerDeath,\n });\n}\n\nfunction createPlayerVoteScapegoatedByAllDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED,\n source: PLAYER_GROUPS.ALL,\n ...playerDeath,\n });\n}\n\nfunction createPlayerVoteBySheriffDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.VOTE,\n source: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n ...playerDeath,\n });\n}\n\nfunction createPlayerVoteByAllDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.VOTE,\n source: PLAYER_GROUPS.ALL,\n ...playerDeath,\n });\n}\n\nfunction createPlayerShotByHunterDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.SHOT,\n source: ROLE_NAMES.HUNTER,\n ...playerDeath,\n });\n}\n\nfunction createPlayerEatenByWhiteWerewolfDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.EATEN,\n source: ROLE_NAMES.WHITE_WEREWOLF,\n ...playerDeath,\n });\n}\n\nfunction createPlayerEatenByBigBadWolfDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.EATEN,\n source: ROLE_NAMES.BIG_BAD_WOLF,\n ...playerDeath,\n });\n}\n\nfunction createPlayerEatenByWerewolvesDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.EATEN,\n source: PLAYER_GROUPS.WEREWOLVES,\n ...playerDeath,\n });\n}\n\nfunction createPlayerDeathPotionByWitchDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PLAYER_DEATH_CAUSES.DEATH_POTION,\n source: ROLE_NAMES.WITCH,\n ...playerDeath,\n });\n}\n\nfunction createPlayerDeath(playerDeath: PlayerDeath): PlayerDeath {\n return plainToInstance(PlayerDeath, playerDeath, plainToInstanceDefaultOptions);\n}\n\nexport {\n createPlayerDiseaseByRustySwordKnightDeath,\n createPlayerBrokenHeartByCupidDeath,\n createPlayerReconsiderPardonByAllDeath,\n createPlayerVoteScapegoatedByAllDeath,\n createPlayerVoteBySheriffDeath,\n createPlayerVoteByAllDeath,\n createPlayerShotByHunterDeath,\n createPlayerEatenByWhiteWerewolfDeath,\n createPlayerEatenByBigBadWolfDeath,\n createPlayerEatenByWerewolvesDeath,\n createPlayerDeathPotionByWitchDeath,\n createPlayerDeath,\n};" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { PlayerAttributeNames, PlayerDeathCauses, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { PlayerDeath } from \"@/modules/game/schemas/player/player-death.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nfunction createPlayerDiseaseByRustySwordKnightDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.DISEASE,\n source: RoleNames.RUSTY_SWORD_KNIGHT,\n ...playerDeath,\n });\n}\n\nfunction createPlayerBrokenHeartByCupidDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.BROKEN_HEART,\n source: RoleNames.CUPID,\n ...playerDeath,\n });\n}\n\nfunction createPlayerReconsiderPardonByAllDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.RECONSIDER_PARDON,\n source: PlayerGroups.ALL,\n ...playerDeath,\n });\n}\n\nfunction createPlayerVoteScapegoatedByAllDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.VOTE_SCAPEGOATED,\n source: PlayerGroups.ALL,\n ...playerDeath,\n });\n}\n\nfunction createPlayerVoteBySheriffDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.VOTE,\n source: PlayerAttributeNames.SHERIFF,\n ...playerDeath,\n });\n}\n\nfunction createPlayerVoteByAllDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.VOTE,\n source: PlayerGroups.ALL,\n ...playerDeath,\n });\n}\n\nfunction createPlayerShotByHunterDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.SHOT,\n source: RoleNames.HUNTER,\n ...playerDeath,\n });\n}\n\nfunction createPlayerEatenByWhiteWerewolfDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.EATEN,\n source: RoleNames.WHITE_WEREWOLF,\n ...playerDeath,\n });\n}\n\nfunction createPlayerEatenByBigBadWolfDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.EATEN,\n source: RoleNames.BIG_BAD_WOLF,\n ...playerDeath,\n });\n}\n\nfunction createPlayerEatenByWerewolvesDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.EATEN,\n source: PlayerGroups.WEREWOLVES,\n ...playerDeath,\n });\n}\n\nfunction createPlayerDeathPotionByWitchDeath(playerDeath: Partial = {}): PlayerDeath {\n return createPlayerDeath({\n cause: PlayerDeathCauses.DEATH_POTION,\n source: RoleNames.WITCH,\n ...playerDeath,\n });\n}\n\nfunction createPlayerDeath(playerDeath: PlayerDeath): PlayerDeath {\n return plainToInstance(PlayerDeath, playerDeath, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n}\n\nexport {\n createPlayerDiseaseByRustySwordKnightDeath,\n createPlayerBrokenHeartByCupidDeath,\n createPlayerReconsiderPardonByAllDeath,\n createPlayerVoteScapegoatedByAllDeath,\n createPlayerVoteBySheriffDeath,\n createPlayerVoteByAllDeath,\n createPlayerShotByHunterDeath,\n createPlayerEatenByWhiteWerewolfDeath,\n createPlayerEatenByBigBadWolfDeath,\n createPlayerEatenByWerewolvesDeath,\n createPlayerDeathPotionByWitchDeath,\n createPlayerDeath,\n};" }, "src/modules/game/helpers/player/player.factory.ts": { "language": "typescript", @@ -44835,24 +44986,24 @@ "603", "604", "605", - "714", - "842", + "715", "843", "844", "845", "846", "847", - "849", + "848", "850", - "852", + "851", "853", - "858", + "854", "859", - "870", + "860", "871", "872", - "1003", - "1004" + "873", + "1004", + "1005" ], "location": { "end": { @@ -44869,9 +45020,13 @@ "id": "1132", "mutatorName": "ObjectLiteral", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -8,10 +8,11 @@\n \"remainingPhases\": undefined,\n \"source\": \"fox\",\n },\n ],\n \"death\": undefined,\n+ \"extra\": \"extra\",\n \"isAlive\": true,\n \"name\": \"Toto\",\n \"position\": 1,\n \"role\": PlayerRole {\n \"current\": \"seer\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player.factory.spec.ts:37:55)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 58, "static": false, - "killedBy": [], + "killedBy": [ + "1005" + ], "coveredBy": [ "286", "306", @@ -44913,28 +45068,28 @@ "603", "604", "605", - "714", - "842", + "715", "843", "844", "845", "846", "847", - "849", + "848", "850", - "852", + "851", "853", - "858", + "854", "859", - "870", + "860", "871", "872", - "1003", - "1004" + "873", + "1004", + "1005" ], "location": { "end": { - "column": 117, + "column": 121, "line": 10 }, "start": { @@ -44947,9 +45102,13 @@ "id": "1133", "mutatorName": "BooleanLiteral", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 1\n\n@@ -8,10 +8,11 @@\n \"remainingPhases\": undefined,\n \"source\": \"fox\",\n },\n ],\n \"death\": undefined,\n+ \"extra\": \"extra\",\n \"isAlive\": true,\n \"name\": \"Toto\",\n \"position\": 1,\n \"role\": PlayerRole {\n \"current\": \"big-bad-wolf\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player.factory.spec.ts:37:55)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 58, "static": false, - "killedBy": [], + "killedBy": [ + "1005" + ], "coveredBy": [ "286", "306", @@ -44991,38 +45150,38 @@ "603", "604", "605", - "714", - "842", + "715", "843", "844", "845", "846", "847", - "849", + "848", "850", - "852", + "851", "853", - "858", + "854", "859", - "870", + "860", "871", "872", - "1003", - "1004" + "873", + "1004", + "1005" ], "location": { "end": { - "column": 115, + "column": 119, "line": 10 }, "start": { - "column": 111, + "column": 115, "line": 10 } } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { Player } from \"@/modules/game/schemas/player/player.schema\";\n\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createPlayer(player: Player): Player {\n return plainToInstance(Player, toJSON(player), { ...plainToInstanceDefaultOptions, excludeExtraneousValues: true });\n}\n\nexport { createPlayer };" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { Player } from \"@/modules/game/schemas/player/player.schema\";\n\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createPlayer(player: Player): Player {\n return plainToInstance(Player, toJSON(player), { ...PLAIN_TO_INSTANCE_DEFAULT_OPTIONS, excludeExtraneousValues: true });\n}\n\nexport { createPlayer };" }, "src/modules/game/helpers/player/player.helper.ts": { "language": "typescript", @@ -45037,11 +45196,11 @@ "killedBy": [], "coveredBy": [ "145", - "898", "899", "900", "901", - "902" + "902", + "903" ], "location": { "end": { @@ -45058,24 +45217,24 @@ "id": "1135", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:19:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:19:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "898" + "899" ], "coveredBy": [ "145", - "898", "899", "900", "901", - "902" + "902", + "903" ], "location": { "end": { - "column": 142, + "column": 141, "line": 9 }, "start": { @@ -45093,15 +45252,15 @@ "killedBy": [], "coveredBy": [ "145", - "898", "899", "900", "901", - "902" + "902", + "903" ], "location": { "end": { - "column": 142, + "column": 141, "line": 9 }, "start": { @@ -45113,25 +45272,21 @@ { "id": "1137", "mutatorName": "LogicalOperator", - "replacement": "isPlayerAliveAndPowerful(piedPiperPlayer, game) || !isPowerlessIfInfected || piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:19:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "replacement": "isPlayerAliveAndPowerful(piedPiperPlayer, game) || !isPowerlessIfInfected || piedPiperPlayer.side.current === RoleSides.VILLAGERS", + "status": "Timeout", "static": false, - "killedBy": [ - "898" - ], + "killedBy": [], "coveredBy": [ "145", - "898", "899", "900", "901", - "902" + "902", + "903" ], "location": { "end": { - "column": 142, + "column": 141, "line": 9 }, "start": { @@ -45144,22 +45299,18 @@ "id": "1138", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:35:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "900" - ], + "killedBy": [], "coveredBy": [ "145", - "900", "901", - "902" + "902", + "903" ], "location": { "end": { - "column": 141, + "column": 140, "line": 9 }, "start": { @@ -45171,19 +45322,19 @@ { "id": "1139", "mutatorName": "LogicalOperator", - "replacement": "!isPowerlessIfInfected && piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS", + "replacement": "!isPowerlessIfInfected && piedPiperPlayer.side.current === RoleSides.VILLAGERS", "status": "Timeout", "static": false, "killedBy": [], "coveredBy": [ "145", - "900", "901", - "902" + "902", + "903" ], "location": { "end": { - "column": 141, + "column": 140, "line": 9 }, "start": { @@ -45196,18 +45347,14 @@ "id": "1140", "mutatorName": "BooleanLiteral", "replacement": "isPowerlessIfInfected", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:35:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "900" - ], + "killedBy": [], "coveredBy": [ "145", - "900", "901", - "902" + "902", + "903" ], "location": { "end": { @@ -45224,17 +45371,21 @@ "id": "1141", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 16\n+ Received + 0\n\n@@ -141,22 +141,6 @@\n \"source\": GamePlaySource {\n \"name\": \"witch\",\n \"players\": undefined,\n },\n },\n- GamePlay {\n- \"action\": \"charm\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"pied-piper\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"meet-each-other\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"charmed\",\n- \"players\": undefined,\n- },\n- },\n ]\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "145" + ], "coveredBy": [ "145", - "900", - "902" + "901", + "903" ], "location": { "end": { - "column": 141, + "column": 140, "line": 9 }, "start": { @@ -45246,22 +45397,18 @@ { "id": "1142", "mutatorName": "EqualityOperator", - "replacement": "piedPiperPlayer.side.current !== ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:35:56)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "replacement": "piedPiperPlayer.side.current !== RoleSides.VILLAGERS", + "status": "Timeout", "static": false, - "killedBy": [ - "900" - ], + "killedBy": [], "coveredBy": [ "145", - "900", - "902" + "901", + "903" ], "location": { "end": { - "column": 141, + "column": 140, "line": 9 }, "start": { @@ -45345,32 +45492,32 @@ "425", "530", "531", - "659", "660", "661", "662", "663", - "668", + "664", "669", "670", "671", "672", - "681", + "673", "682", - "684", - "686", - "714", - "722", + "683", + "685", + "687", + "715", "723", "724", "725", "726", - "898", - "900", + "727", + "899", "901", "902", - "904", - "905" + "903", + "905", + "906" ], "location": { "end": { @@ -45386,7 +45533,7 @@ { "id": "1144", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, game)", + "replacement": "doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.POWERLESS, game)", "status": "Timeout", "static": false, "killedBy": [], @@ -45457,36 +45604,36 @@ "425", "530", "531", - "659", "660", "661", "662", "663", - "668", + "664", "669", "670", "671", "672", - "681", + "673", "682", - "684", - "686", - "714", - "722", + "683", + "685", + "687", + "715", "723", "724", "725", "726", - "898", - "900", + "727", + "899", "901", "902", - "904", - "905" + "903", + "905", + "906" ], "location": { "end": { - "column": 96, + "column": 94, "line": 13 }, "start": { @@ -45549,22 +45696,22 @@ "293", "530", "531", - "658", "659", "660", "661", "662", "663", - "681", - "686", - "898", + "664", + "682", + "687", "899", "900", "901", "902", "903", "904", - "905" + "905", + "906" ], "location": { "end": { @@ -45586,7 +45733,7 @@ "testsCompleted": 61, "static": false, "killedBy": [ - "658" + "659" ], "coveredBy": [ "28", @@ -45634,22 +45781,22 @@ "293", "530", "531", - "658", "659", "660", "661", "662", "663", - "681", - "686", - "898", + "664", + "682", + "687", "899", "900", "901", "902", "903", "904", - "905" + "905", + "906" ], "location": { "end": { @@ -45719,22 +45866,22 @@ "293", "530", "531", - "658", "659", "660", "661", "662", "663", - "681", - "686", - "898", + "664", + "682", + "687", "899", "900", "901", "902", "903", "904", - "905" + "905", + "906" ], "location": { "end": { @@ -45800,22 +45947,22 @@ "293", "530", "531", - "658", "659", "660", "661", "662", "663", - "681", - "686", - "898", + "664", + "682", + "687", "899", "900", "901", "902", "903", "904", - "905" + "905", + "906" ], "location": { "end": { @@ -45837,8 +45984,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "906", - "907" + "907", + "908" ], "location": { "end": { @@ -45855,20 +46002,16 @@ "id": "1150", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:80:74)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "906" - ], + "killedBy": [], "coveredBy": [ - "906", - "907" + "907", + "908" ], "location": { "end": { - "column": 55, + "column": 54, "line": 21 }, "start": { @@ -45885,12 +46028,12 @@ "static": false, "killedBy": [], "coveredBy": [ - "906", - "907" + "907", + "908" ], "location": { "end": { - "column": 55, + "column": 54, "line": 21 }, "start": { @@ -45902,17 +46045,17 @@ { "id": "1152", "mutatorName": "EqualityOperator", - "replacement": "player.side.current !== ROLE_SIDES.WEREWOLVES", + "replacement": "player.side.current !== RoleSides.WEREWOLVES", "status": "Timeout", "static": false, "killedBy": [], "coveredBy": [ - "906", - "907" + "907", + "908" ], "location": { "end": { - "column": 55, + "column": 54, "line": 21 }, "start": { @@ -45930,8 +46073,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "908", - "909" + "909", + "910" ], "location": { "end": { @@ -45948,20 +46091,20 @@ "id": "1154", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:94:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts:94:77)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "909" + "910" ], "coveredBy": [ - "908", - "909" + "909", + "910" ], "location": { "end": { - "column": 54, + "column": 53, "line": 25 }, "start": { @@ -45978,12 +46121,12 @@ "static": false, "killedBy": [], "coveredBy": [ - "908", - "909" + "909", + "910" ], "location": { "end": { - "column": 54, + "column": 53, "line": 25 }, "start": { @@ -45995,17 +46138,17 @@ { "id": "1156", "mutatorName": "EqualityOperator", - "replacement": "player.side.current !== ROLE_SIDES.VILLAGERS", + "replacement": "player.side.current !== RoleSides.VILLAGERS", "status": "Timeout", "static": false, "killedBy": [], "coveredBy": [ - "908", - "909" + "909", + "910" ], "location": { "end": { - "column": 54, + "column": 53, "line": 25 }, "start": { @@ -46015,7 +46158,7 @@ } } ], - "source": "import { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nfunction canPiedPiperCharm(piedPiperPlayer: Player, game: Game): boolean {\n const { isPowerlessIfInfected } = game.options.roles.piedPiper;\n return isPlayerAliveAndPowerful(piedPiperPlayer, game) && (!isPowerlessIfInfected || piedPiperPlayer.side.current === ROLE_SIDES.VILLAGERS);\n}\n\nfunction isPlayerPowerful(player: Player, game: Game): boolean {\n return !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, game);\n}\n\nfunction isPlayerAliveAndPowerful(player: Player, game: Game): boolean {\n return player.isAlive && isPlayerPowerful(player, game);\n}\n\nfunction isPlayerOnWerewolvesSide(player: Player): boolean {\n return player.side.current === ROLE_SIDES.WEREWOLVES;\n}\n\nfunction isPlayerOnVillagersSide(player: Player): boolean {\n return player.side.current === ROLE_SIDES.VILLAGERS;\n}\n\nexport {\n canPiedPiperCharm,\n isPlayerPowerful,\n isPlayerAliveAndPowerful,\n isPlayerOnWerewolvesSide,\n isPlayerOnVillagersSide,\n};" + "source": "import { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { RoleSides } from \"@/modules/role/enums/role.enum\";\n\nfunction canPiedPiperCharm(piedPiperPlayer: Player, game: Game): boolean {\n const { isPowerlessIfInfected } = game.options.roles.piedPiper;\n return isPlayerAliveAndPowerful(piedPiperPlayer, game) && (!isPowerlessIfInfected || piedPiperPlayer.side.current === RoleSides.VILLAGERS);\n}\n\nfunction isPlayerPowerful(player: Player, game: Game): boolean {\n return !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.POWERLESS, game);\n}\n\nfunction isPlayerAliveAndPowerful(player: Player, game: Game): boolean {\n return player.isAlive && isPlayerPowerful(player, game);\n}\n\nfunction isPlayerOnWerewolvesSide(player: Player): boolean {\n return player.side.current === RoleSides.WEREWOLVES;\n}\n\nfunction isPlayerOnVillagersSide(player: Player): boolean {\n return player.side.current === RoleSides.VILLAGERS;\n}\n\nexport {\n canPiedPiperCharm,\n isPlayerPowerful,\n isPlayerAliveAndPowerful,\n isPlayerOnWerewolvesSide,\n isPlayerOnVillagersSide,\n};" }, "src/modules/game/providers/repositories/game-history-record.repository.ts": { "language": "typescript", @@ -46024,7 +46167,7 @@ "id": "1157", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(18,56): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(17,56): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46037,11 +46180,11 @@ "location": { "end": { "column": 4, - "line": 20 + "line": 19 }, "start": { "column": 85, - "line": 18 + "line": 17 } } }, @@ -46065,11 +46208,11 @@ "location": { "end": { "column": 55, - "line": 19 + "line": 18 }, "start": { "column": 45, - "line": 19 + "line": 18 } } }, @@ -46077,7 +46220,7 @@ "id": "1159", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(22,70): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(21,70): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46097,11 +46240,11 @@ "location": { "end": { "column": 4, - "line": 24 + "line": 23 }, "start": { "column": 97, - "line": 22 + "line": 21 } } }, @@ -46109,7 +46252,7 @@ "id": "1160", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(26,79): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(25,79): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46121,11 +46264,11 @@ "location": { "end": { "column": 4, - "line": 33 + "line": 32 }, "start": { "column": 113, - "line": 26 + "line": 25 } } }, @@ -46133,13 +46276,9 @@ "id": "1161", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toBeNull()\n\nReceived: {\"_id\": \"605a12a00b1190acbbcbb827\", \"createdAt\": 2023-08-26T09:43:49.691Z, \"gameId\": \"fa8e442b8bd8cfd3ee17eced\", \"phase\": \"day\", \"play\": {\"action\": \"use-potions\", \"source\": {\"name\": \"witch\", \"players\": [{\"_id\": \"b6e9306beeb8ba9623a7ad04\", \"attributes\": [], \"isAlive\": true, \"name\": \"Eda\", \"position\": 4947186466947072, \"role\": {\"current\": \"witch\", \"isRevealed\": false, \"original\": \"witch\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}}, \"tick\": 7984000073203712, \"turn\": 6124696070258688}\n at Object.toBeNull (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:138:107)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "617" - ], + "killedBy": [], "coveredBy": [ "617", "618", @@ -46148,11 +46287,11 @@ "location": { "end": { "column": 6, - "line": 31 + "line": 30 }, "start": { "column": 52, - "line": 27 + "line": 26 } } }, @@ -46175,11 +46314,11 @@ "location": { "end": { "column": 94, - "line": 32 + "line": 31 }, "start": { "column": 67, - "line": 32 + "line": 31 } } }, @@ -46202,11 +46341,11 @@ "location": { "end": { "column": 92, - "line": 32 + "line": 31 }, "start": { "column": 75, - "line": 32 + "line": 31 } } }, @@ -46229,11 +46368,11 @@ "location": { "end": { "column": 90, - "line": 32 + "line": 31 }, "start": { "column": 88, - "line": 32 + "line": 31 } } }, @@ -46241,7 +46380,7 @@ "id": "1165", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(35,103): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(34,101): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46254,11 +46393,11 @@ "location": { "end": { "column": 4, - "line": 42 + "line": 41 }, "start": { - "column": 137, - "line": 35 + "column": 135, + "line": 34 } } }, @@ -46266,13 +46405,9 @@ "id": "1166", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toBeNull()\n\nReceived: {\"_id\": \"9799be6e6d225dc3c9f75f82\", \"createdAt\": 2023-08-26T17:10:15.955Z, \"gameId\": \"a908ab6e1d55fdff8d4af65f\", \"phase\": \"night\", \"play\": {\"action\": \"use-potions\", \"source\": {\"name\": \"witch\", \"players\": [{\"_id\": \"8a8cec37de76fb464a7c3d1a\", \"attributes\": [], \"isAlive\": true, \"name\": \"Adalberto\", \"position\": 8588337130504192, \"role\": {\"current\": \"witch\", \"isRevealed\": false, \"original\": \"witch\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]}}, \"tick\": 3356961678557184, \"turn\": 1129889356840960}\n at Object.toBeNull (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:175:128)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "620" - ], + "killedBy": [], "coveredBy": [ "620", "621", @@ -46282,11 +46417,11 @@ "location": { "end": { "column": 6, - "line": 40 + "line": 39 }, "start": { "column": 52, - "line": 36 + "line": 35 } } }, @@ -46294,7 +46429,7 @@ "id": "1167", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 11\n+ Received + 11\n\n Object {\n- \"_id\": \"6dc621cdf3ec88d0cbad8434\",\n- \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n+ \"_id\": \"c5d3e2cf09f242a3fcf57449\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"27da09228dbaf4ba3af32463\",\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"c8bfa2baccb5246f23da4be2\",\n+ \"_id\": \"34efbf2044e7c7e690946df4\",\n \"attributes\": Array [],\n \"isAlive\": false,\n- \"name\": \"Woodrow\",\n- \"position\": 5274816584089600,\n+ \"name\": \"Alda\",\n+ \"position\": 4032280473370624,\n \"role\": Object {\n- \"current\": \"cupid\",\n+ \"current\": \"raven\",\n \"isRevealed\": true,\n- \"original\": \"stuttering-judge\",\n+ \"original\": \"ancient\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n ],\n },\n \"voting\": Object {\n \"result\": \"tie\",\n },\n },\n- \"tick\": 8324560317317120,\n- \"turn\": 3496899355082752,\n+ \"tick\": 8377122229846016,\n+ \"turn\": 8076034169634816,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:214:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 12\n\n Object {\n- \"_id\": \"fc46f2b2bb62b1e6fb4c8ed3\",\n- \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n+ \"_id\": \"aee83d36eec90fb680aac657\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"ace6ee7c0efba5623316ac72\",\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"f6cafcbaecf47cb96c39731b\",\n+ \"_id\": \"8d429c91b13dbebc5df5d06e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n- \"name\": \"Stanley\",\n- \"position\": 390325080162304,\n+ \"name\": \"Mozelle\",\n+ \"position\": 7210097763680256,\n \"role\": Object {\n- \"current\": \"wild-child\",\n+ \"current\": \"raven\",\n \"isRevealed\": false,\n- \"original\": \"wild-child\",\n+ \"original\": \"cupid\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ],\n },\n \"voting\": Object {\n \"result\": \"tie\",\n },\n },\n- \"tick\": 6984912223600640,\n- \"turn\": 5168011990269952,\n+ \"tick\": 1094636466601984,\n+ \"turn\": 6044048252993536,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:214:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -46310,11 +46445,11 @@ "location": { "end": { "column": 94, - "line": 41 + "line": 40 }, "start": { "column": 67, - "line": 41 + "line": 40 } } }, @@ -46322,7 +46457,7 @@ "id": "1168", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 13\n+ Received + 13\n\n Object {\n- \"_id\": \"a8d2f3d9eaadcf8f5cc53adf\",\n- \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n+ \"_id\": \"b0c6ccaaecafaa4ce64dac1c\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"c088a9a27a8fc8eeec70ba52\",\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"7eb890aca7fb968f541bb69b\",\n+ \"_id\": \"0ae75c4c8b29bc8b0bf0577f\",\n \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Kariane\",\n- \"position\": 6238683801845760,\n+ \"isAlive\": false,\n+ \"name\": \"Griffin\",\n+ \"position\": 764295367360512,\n \"role\": Object {\n- \"current\": \"three-brothers\",\n- \"isRevealed\": true,\n- \"original\": \"angel\",\n+ \"current\": \"raven\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n- \"original\": \"werewolves\",\n+ \"original\": \"villagers\",\n },\n },\n ],\n },\n \"voting\": Object {\n \"result\": \"tie\",\n },\n },\n- \"tick\": 2110343249657856,\n- \"turn\": 6918672845111296,\n+ \"tick\": 4751542638870528,\n+ \"turn\": 6125430406905856,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:214:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 12\n\n@@ -1,25 +1,25 @@\n Object {\n- \"_id\": \"7f0b4ceb79a75f8d2146f0ea\",\n- \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n+ \"_id\": \"fbded5ecec70cc4cb44eef8e\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"06ce27feeaab5c797afe25ac\",\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"2efdc42ccf2ebeb153aae279\",\n+ \"_id\": \"c6559ba5e88cbadef580e297\",\n \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Arjun\",\n- \"position\": 1565547271553024,\n+ \"isAlive\": false,\n+ \"name\": \"Sage\",\n+ \"position\": 4131627173150720,\n \"role\": Object {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": true,\n- \"original\": \"three-brothers\",\n+ \"current\": \"thief\",\n+ \"isRevealed\": false,\n+ \"original\": \"dog-wolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n@@ -28,8 +28,8 @@\n },\n \"voting\": Object {\n \"result\": \"tie\",\n },\n },\n- \"tick\": 5867645377183744,\n- \"turn\": 4114560495648768,\n+ \"tick\": 5522650730332160,\n+ \"turn\": 6003160044797952,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:214:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -46338,11 +46473,11 @@ "location": { "end": { "column": 92, - "line": 41 + "line": 40 }, "start": { "column": 75, - "line": 41 + "line": 40 } } }, @@ -46350,13 +46485,9 @@ "id": "1169", "mutatorName": "UnaryOperator", "replacement": "+1", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 12\n\n Object {\n- \"_id\": \"fd62cc5cfe68d8c706beb81a\",\n- \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n+ \"_id\": \"68bdeb99577f1fefb2ab7d3c\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"2aed7fa6bcb9a0a9cce5ce6e\",\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"b19365ef72f4b8c673c72cfd\",\n+ \"_id\": \"1cb46b65a2b1e3cfa541f4ed\",\n \"attributes\": Array [],\n- \"isAlive\": false,\n- \"name\": \"Viviane\",\n- \"position\": 1590077897572352,\n+ \"isAlive\": true,\n+ \"name\": \"Madilyn\",\n+ \"position\": 3750596842618880,\n \"role\": Object {\n- \"current\": \"two-sisters\",\n+ \"current\": \"raven\",\n \"isRevealed\": true,\n- \"original\": \"white-werewolf\",\n+ \"original\": \"rusty-sword-knight\",\n },\n \"side\": Object {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n ],\n },\n \"voting\": Object {\n \"result\": \"tie\",\n },\n },\n- \"tick\": 497516890030080,\n- \"turn\": 7598753370341376,\n+ \"tick\": 5885682480316416,\n+ \"turn\": 4345652632879104,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:214:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "623" - ], + "killedBy": [], "coveredBy": [ "620", "621", @@ -46366,11 +46497,11 @@ "location": { "end": { "column": 90, - "line": 41 + "line": 40 }, "start": { "column": 88, - "line": 41 + "line": 40 } } }, @@ -46378,7 +46509,7 @@ "id": "1170", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(44,109): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(43,108): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46392,11 +46523,11 @@ "location": { "end": { "column": 4, - "line": 52 + "line": 51 }, "start": { - "column": 138, - "line": 44 + "column": 137, + "line": 43 } } }, @@ -46404,9 +46535,13 @@ "id": "1171", "mutatorName": "ObjectLiteral", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 136\n\n- Array []\n+ Array [\n+ Object {\n+ \"_id\": \"db6fc2fb81a8fad7d65bcad1\",\n+ \"createdAt\": \"2023-08-28T16:08:08.772Z\",\n+ \"gameId\": \"51dab6ceeb5a197bfa6f8acc\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"a1cacb1afbad55d5db6aaa3b\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Darrick\",\n+ \"position\": 534220747309056,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"dog-wolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"voting\": Object {\n+ \"result\": \"tie\",\n+ },\n+ },\n+ \"tick\": 4884257619050496,\n+ \"turn\": 5005637387812864,\n+ },\n+ Object {\n+ \"_id\": \"cbda9f956b4bb54dd72abd44\",\n+ \"createdAt\": \"2023-08-27T19:11:17.732Z\",\n+ \"gameId\": \"51dab6ceeb5a197bfa6f8acc\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"aa3fc4087d56b8ca3d2a1a5d\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Ana\",\n+ \"position\": 300535037034496,\n+ \"role\": Object {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 8816909101301760,\n+ \"turn\": 5591560643149824,\n+ },\n+ Object {\n+ \"_id\": \"fc16b382cc9e4ba9ad823cb3\",\n+ \"createdAt\": \"2023-08-28T11:30:13.405Z\",\n+ \"gameId\": \"51dab6ceeb5a197bfa6f8acc\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"dcded1a8b8ca0ef1f238bec6\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Herminia\",\n+ \"position\": 743139750969344,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 1514651298824192,\n+ \"turn\": 3190605108740096,\n+ },\n+ Object {\n+ \"_id\": \"2f8e35dfc33a45f40a9cf9cf\",\n+ \"createdAt\": \"2023-08-28T14:16:37.243Z\",\n+ \"gameId\": \"51dab6ceeb5a197bfa6f8acc\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"efcddefaf60e7d6a54ba5a15\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Amalia\",\n+ \"position\": 6743998725095424,\n+ \"role\": Object {\n+ \"current\": \"little-girl\",\n+ \"isRevealed\": true,\n+ \"original\": \"thief\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"voting\": Object {\n+ \"result\": \"tie\",\n+ },\n+ },\n+ \"tick\": 1509230569848832,\n+ \"turn\": 3047574204317696,\n+ },\n+ ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:231:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "624" + ], "coveredBy": [ "624", "625", @@ -46417,11 +46552,11 @@ "location": { "end": { "column": 6, - "line": 50 + "line": 49 }, "start": { "column": 52, - "line": 45 + "line": 44 } } }, @@ -46429,7 +46564,7 @@ "id": "1172", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(54,89): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(53,89): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46440,11 +46575,11 @@ "location": { "end": { "column": 4, - "line": 61 + "line": 60 }, "start": { "column": 118, - "line": 54 + "line": 53 } } }, @@ -46452,7 +46587,7 @@ "id": "1173", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 130\n\n- Array []\n+ Array [\n+ Object {\n+ \"_id\": \"5ee4de84bddfa19babf967be\",\n+ \"createdAt\": \"2023-08-25T23:46:09.514Z\",\n+ \"gameId\": \"7c36cf5af3073d2d5d3ece6a\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"9c9bc8de5cbe9dcadcdbb2b8\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Dorothea\",\n+ \"position\": 1746042942914560,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 2729560250515456,\n+ \"turn\": 3493563935490048,\n+ },\n+ Object {\n+ \"_id\": \"2c1076764f176f0dd0edefca\",\n+ \"createdAt\": \"2023-08-25T21:25:15.190Z\",\n+ \"gameId\": \"7c36cf5af3073d2d5d3ece6a\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"5830ed0ddf62c12daae6bd32\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Cecelia\",\n+ \"position\": 8549796589600768,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 7885537664827392,\n+ \"turn\": 8302926594310144,\n+ },\n+ Object {\n+ \"_id\": \"c531c3a83028bb8afa69d4c2\",\n+ \"createdAt\": \"2023-08-26T13:07:23.574Z\",\n+ \"gameId\": \"7c36cf5af3073d2d5d3ece6a\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"41f6fa4a0d8fb2faad7a1e1f\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Else\",\n+ \"position\": 1656748911886336,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 4806237713596416,\n+ \"turn\": 3251331026386944,\n+ },\n+ Object {\n+ \"_id\": \"9c8c80e2d8ab7e6fca9f18e7\",\n+ \"createdAt\": \"2023-08-25T23:25:38.313Z\",\n+ \"gameId\": \"7c36cf5af3073d2d5d3ece6a\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"ee1b3ccdddfa191696bd9ecb\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Maci\",\n+ \"position\": 8627209975627776,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"vile-father-of-wolves\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 5744339852460032,\n+ \"turn\": 5268674566946816,\n+ },\n+ ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:325:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 130\n\n- Array []\n+ Array [\n+ Object {\n+ \"_id\": \"e2cbae8ad3ccbf107c0eec1b\",\n+ \"createdAt\": \"2023-08-28T10:56:02.670Z\",\n+ \"gameId\": \"7ecc84ad29c6a098bacfac5f\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"53fe5d40955c0ce7beecaa7c\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Albina\",\n+ \"position\": 4826830662008832,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"little-girl\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 3248213792391168,\n+ \"turn\": 1636068375920640,\n+ },\n+ Object {\n+ \"_id\": \"79d124fcdba8bc414fabc78b\",\n+ \"createdAt\": \"2023-08-28T07:03:42.184Z\",\n+ \"gameId\": \"7ecc84ad29c6a098bacfac5f\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"13b94a31d83df6faed5bb5a9\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Hoyt\",\n+ \"position\": 8843844420370432,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 8242217485336576,\n+ \"turn\": 3347700363821056,\n+ },\n+ Object {\n+ \"_id\": \"490d3133b734dcfbc3c063a5\",\n+ \"createdAt\": \"2023-08-27T17:35:59.351Z\",\n+ \"gameId\": \"7ecc84ad29c6a098bacfac5f\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"dddd35fb0e0e3bf375aafb8d\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jamil\",\n+ \"position\": 8407640776376320,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 8794431626936320,\n+ \"turn\": 6643368274690048,\n+ },\n+ Object {\n+ \"_id\": \"aad87dcd99e80cc9c8a5d6fc\",\n+ \"createdAt\": \"2023-08-27T19:18:35.734Z\",\n+ \"gameId\": \"7ecc84ad29c6a098bacfac5f\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"3db64d209aedcf118e6e1ab6\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jordyn\",\n+ \"position\": 5446831494397952,\n+ \"role\": Object {\n+ \"current\": \"scapegoat\",\n+ \"isRevealed\": false,\n+ \"original\": \"white-werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 2053145052053504,\n+ \"turn\": 8460060451667968,\n+ },\n+ ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:325:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -46466,11 +46601,11 @@ "location": { "end": { "column": 6, - "line": 59 + "line": 58 }, "start": { "column": 52, - "line": 55 + "line": 54 } } }, @@ -46492,11 +46627,11 @@ "location": { "end": { "column": 38, - "line": 58 + "line": 57 }, "start": { "column": 34, - "line": 58 + "line": 57 } } }, @@ -46515,11 +46650,11 @@ "location": { "end": { "column": 4, - "line": 69 + "line": 68 }, "start": { "column": 104, - "line": 63 + "line": 62 } } }, @@ -46541,11 +46676,11 @@ "location": { "end": { "column": 6, - "line": 67 + "line": 66 }, "start": { "column": 52, - "line": 64 + "line": 63 } } }, @@ -46567,11 +46702,11 @@ "location": { "end": { "column": 46, - "line": 66 + "line": 65 }, "start": { "column": 42, - "line": 66 + "line": 65 } } }, @@ -46579,7 +46714,7 @@ "id": "1178", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(71,83): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(70,83): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46590,11 +46725,11 @@ "location": { "end": { "column": 4, - "line": 78 + "line": 77 }, "start": { "column": 112, - "line": 71 + "line": 70 } } }, @@ -46602,7 +46737,7 @@ "id": "1179", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 131\n\n- Array []\n+ Array [\n+ Object {\n+ \"_id\": \"072e5147bac9a9091cceabe6\",\n+ \"createdAt\": \"2023-08-26T15:58:51.106Z\",\n+ \"gameId\": \"5c5f88a0cc44121bacc0ac9e\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"didJudgeRequestAnotherVote\": false,\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"bdaadd5ed4ef2c6bce652e2c\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Elna\",\n+ \"position\": 1933221375770624,\n+ \"role\": Object {\n+ \"current\": \"little-girl\",\n+ \"isRevealed\": false,\n+ \"original\": \"scapegoat\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 7292921227247616,\n+ \"turn\": 1615456951599104,\n+ },\n+ Object {\n+ \"_id\": \"fdcfff991dd9e53ffddcdd2c\",\n+ \"createdAt\": \"2023-08-26T04:56:14.491Z\",\n+ \"gameId\": \"5c5f88a0cc44121bacc0ac9e\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"dab978f0bf9d6cb6a34e5320\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Natasha\",\n+ \"position\": 5554870950035456,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 5617637709053952,\n+ \"turn\": 4806111494406144,\n+ },\n+ Object {\n+ \"_id\": \"f87d60a162ad219c51eb8d0e\",\n+ \"createdAt\": \"2023-08-25T20:33:04.194Z\",\n+ \"gameId\": \"5c5f88a0cc44121bacc0ac9e\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"6abf85e8f4adbd1cb4eee3fc\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Norris\",\n+ \"position\": 5923003967733760,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 827009083113472,\n+ \"turn\": 3557939306561536,\n+ },\n+ Object {\n+ \"_id\": \"c8c6a4bb3db800dff2d46cf5\",\n+ \"createdAt\": \"2023-08-25T21:36:11.400Z\",\n+ \"gameId\": \"5c5f88a0cc44121bacc0ac9e\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"c4e3d90a63b7c6c5e809b2b9\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Sabrina\",\n+ \"position\": 6557710560526336,\n+ \"role\": Object {\n+ \"current\": \"pied-piper\",\n+ \"isRevealed\": false,\n+ \"original\": \"bear-tamer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 4146689277427712,\n+ \"turn\": 1549681649778688,\n+ },\n+ ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:393:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 131\n\n- Array []\n+ Array [\n+ Object {\n+ \"_id\": \"15a9b221d3a7d86e34a16747\",\n+ \"createdAt\": \"2023-08-27T16:52:03.151Z\",\n+ \"gameId\": \"dd1f3b965b3098bec3f4ae5e\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"didJudgeRequestAnotherVote\": false,\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"5ec61ce5acdc8e4ddf19cfef\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Myron\",\n+ \"position\": 8489803469291520,\n+ \"role\": Object {\n+ \"current\": \"pied-piper\",\n+ \"isRevealed\": true,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 6667870205378560,\n+ \"turn\": 6367788855721984,\n+ },\n+ Object {\n+ \"_id\": \"d2de8e7ed348c9891eda6963\",\n+ \"createdAt\": \"2023-08-28T07:17:39.658Z\",\n+ \"gameId\": \"dd1f3b965b3098bec3f4ae5e\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"86abaabaa298cdfacb6aaa74\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Lolita\",\n+ \"position\": 4498742795304960,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 4357876619411456,\n+ \"turn\": 4353764743970816,\n+ },\n+ Object {\n+ \"_id\": \"6b0a6b34e7ec7eac4e864dda\",\n+ \"createdAt\": \"2023-08-28T08:57:33.265Z\",\n+ \"gameId\": \"dd1f3b965b3098bec3f4ae5e\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"d60bf7c3c5f03dead3c1fecd\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Marcia\",\n+ \"position\": 7181120558858240,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 8362120745844736,\n+ \"turn\": 5221257085714432,\n+ },\n+ Object {\n+ \"_id\": \"9e35039d5339f733f5c208eb\",\n+ \"createdAt\": \"2023-08-28T01:33:09.588Z\",\n+ \"gameId\": \"dd1f3b965b3098bec3f4ae5e\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"df4aadf2e9b04cfaa23a2a8d\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Madisyn\",\n+ \"position\": 99919014658048,\n+ \"role\": Object {\n+ \"current\": \"bear-tamer\",\n+ \"isRevealed\": true,\n+ \"original\": \"pied-piper\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 3718342439337984,\n+ \"turn\": 4351366222839808,\n+ },\n+ ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:393:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -46616,11 +46751,11 @@ "location": { "end": { "column": 6, - "line": 76 + "line": 75 }, "start": { "column": 52, - "line": 72 + "line": 71 } } }, @@ -46628,7 +46763,7 @@ "id": "1180", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(80,93): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(79,93): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -46638,11 +46773,11 @@ "location": { "end": { "column": 4, - "line": 102 + "line": 101 }, "start": { "column": 122, - "line": 80 + "line": 79 } } }, @@ -46650,7 +46785,7 @@ "id": "1181", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 209\n\n@@ -1,7 +1,40 @@\n Array [\n Object {\n+ \"_id\": \"71485e3eaebdc6abd8cc8a50\",\n+ \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"gameId\": \"df31438724ccb065d6a2bce5\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"didJudgeRequestAnotherVote\": false,\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"c64fe6f16839c2b3b9f41efd\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Neoma\",\n+ \"position\": 6859850585735168,\n+ \"role\": Object {\n+ \"current\": \"stuttering-judge\",\n+ \"isRevealed\": false,\n+ \"original\": \"stuttering-judge\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 2126169583386624,\n+ \"turn\": 1158301402267648,\n+ },\n+ Object {\n \"_id\": \"8cbbf7dee36e19ab81f2c6b0\",\n \"createdAt\": \"2023-08-25T22:35:21.313Z\",\n \"gameId\": \"df31438724ccb065d6a2bce5\",\n \"phase\": \"day\",\n \"play\": Object {\n@@ -66,10 +99,186 @@\n },\n ],\n },\n \"tick\": 55594950066176,\n \"turn\": 3500886697443328,\n+ },\n+ Object {\n+ \"_id\": \"bbaaba5fa3efbfdae0bf7170\",\n+ \"createdAt\": \"2023-08-26T06:58:30.797Z\",\n+ \"gameId\": \"96e82ef770ad1ed01cbed277\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"ddbcba14fcd4fdaed872b03f\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jade\",\n+ \"position\": 5912167643611136,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"player\": Object {\n+ \"_id\": \"b6ce0c4bd26b2b2e9fcac1ba\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Favian\",\n+ \"position\": 5738359817240576,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 3653266741133312,\n+ \"turn\": 7740560794189824,\n+ },\n+ Object {\n+ \"_id\": \"003af3e1a34bed23fb5a1e0d\",\n+ \"createdAt\": \"2023-08-25T18:50:28.454Z\",\n+ \"gameId\": \"df31438724ccb065d6a2bce5\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"fa7fee5fc7cbdae982c3d635\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Magnolia\",\n+ \"position\": 3685367356063744,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"player\": Object {\n+ \"_id\": \"dc4f6d62f56cb4abfdf8fcfe\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Nickolas\",\n+ \"position\": 2912878925447168,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 1192779046715392,\n+ \"turn\": 2088885119090688,\n+ },\n+ Object {\n+ \"_id\": \"b2e4ada34273098c6b6aab8c\",\n+ \"createdAt\": \"2023-08-25T21:46:15.577Z\",\n+ \"gameId\": \"df31438724ccb065d6a2bce5\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"d61ced4ec71a895d19b827ed\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Lowell\",\n+ \"position\": 4547434183131136,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"drankPotion\": \"life\",\n+ \"player\": Object {\n+ \"_id\": \"acfbaddad937c5e2bcd987ee\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Haleigh\",\n+ \"position\": 5195575202938880,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ Object {\n+ \"drankPotion\": \"death\",\n+ \"player\": Object {\n+ \"_id\": \"5bfa89d1caa5e7f9db28d4d2\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Samanta\",\n+ \"position\": 2256270004322304,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 5859780667113472,\n+ \"turn\": 491550157045760,\n },\n Object {\n \"_id\": \"9afe97ba1cd40b2c1207d86d\",\n \"createdAt\": \"2023-08-25T18:28:59.832Z\",\n \"gameId\": \"df31438724ccb065d6a2bce5\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 209\n\n@@ -1,7 +1,40 @@\n Array [\n Object {\n+ \"_id\": \"8df2507fcbb3024b4c23857e\",\n+ \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"gameId\": \"7c9e5acc9cead119cfc60b4b\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"didJudgeRequestAnotherVote\": false,\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"8b80ea9e6ffd534f0ca4da5c\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Soledad\",\n+ \"position\": 4466748914925568,\n+ \"role\": Object {\n+ \"current\": \"dog-wolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"thief\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 5269213902012416,\n+ \"turn\": 3625850285064192,\n+ },\n+ Object {\n \"_id\": \"a2f9fb6d9a227cbbdaee39cb\",\n \"createdAt\": \"2023-08-28T02:16:05.421Z\",\n \"gameId\": \"7c9e5acc9cead119cfc60b4b\",\n \"phase\": \"night\",\n \"play\": Object {\n@@ -66,10 +99,186 @@\n },\n ],\n },\n \"tick\": 4071251733643264,\n \"turn\": 6868795196964864,\n+ },\n+ Object {\n+ \"_id\": \"0374d5bda4fc8a878fd6dc0c\",\n+ \"createdAt\": \"2023-08-28T09:07:46.722Z\",\n+ \"gameId\": \"1bae162596beaadab4109cc0\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"a28bcbabcae18ad85d1fcfc8\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Myrtice\",\n+ \"position\": 666098741542912,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"player\": Object {\n+ \"_id\": \"aed8a9dc7fefeeb15a52c2c5\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Gerald\",\n+ \"position\": 530001946476544,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 5518975437897728,\n+ \"turn\": 5230128355344384,\n+ },\n+ Object {\n+ \"_id\": \"eaeaa3bbd0a6a11de2276fac\",\n+ \"createdAt\": \"2023-08-28T01:33:35.216Z\",\n+ \"gameId\": \"7c9e5acc9cead119cfc60b4b\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"eae93d8603fec810eef05fe9\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Colleen\",\n+ \"position\": 7248713542008832,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"player\": Object {\n+ \"_id\": \"fcd1dbcabe758da3fcdabe71\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Sigurd\",\n+ \"position\": 1033060000727040,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 6109190357516288,\n+ \"turn\": 8105218705195008,\n+ },\n+ Object {\n+ \"_id\": \"0f9082edbcb816cc58cd1ef7\",\n+ \"createdAt\": \"2023-08-27T21:56:26.344Z\",\n+ \"gameId\": \"7c9e5acc9cead119cfc60b4b\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"46bb6abf7cabc697faddd909\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Zita\",\n+ \"position\": 2884309260173312,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"drankPotion\": \"life\",\n+ \"player\": Object {\n+ \"_id\": \"e1fc4ced5d4b9f67eafeaf03\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Leopoldo\",\n+ \"position\": 8417248888750080,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ Object {\n+ \"drankPotion\": \"death\",\n+ \"player\": Object {\n+ \"_id\": \"e4aad782e7065049a0d9973b\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Flossie\",\n+ \"position\": 5204471078453248,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 8798404238901248,\n+ \"turn\": 496134950748160,\n },\n Object {\n \"_id\": \"ed790d29141c2ce4dfbf8f4c\",\n \"createdAt\": \"2023-08-28T15:52:06.898Z\",\n \"gameId\": \"7c9e5acc9cead119cfc60b4b\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -46663,11 +46798,11 @@ "location": { "end": { "column": 6, - "line": 100 + "line": 99 }, "start": { "column": 52, - "line": 81 + "line": 80 } } }, @@ -46688,11 +46823,11 @@ "location": { "end": { "column": 8, - "line": 99 + "line": 98 }, "start": { "column": 12, - "line": 83 + "line": 82 } } }, @@ -46700,24 +46835,20 @@ "id": "1183", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 157\n\n@@ -1,7 +1,40 @@\n Array [\n Object {\n+ \"_id\": \"d4e9321263b1cdc0ffdee00e\",\n+ \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"gameId\": \"43a2e797fc06dfa89dc5489e\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"didJudgeRequestAnotherVote\": false,\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"b170eacadd10a21bddc43779\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Christine\",\n+ \"position\": 7656902049660928,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": true,\n+ \"original\": \"two-sisters\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 3109043564445696,\n+ \"turn\": 7977415955447808,\n+ },\n+ Object {\n \"_id\": \"aee6fa9ea7ef1d69eabd79c2\",\n \"createdAt\": \"2023-08-25T19:40:18.623Z\",\n \"gameId\": \"43a2e797fc06dfa89dc5489e\",\n \"phase\": \"night\",\n \"play\": Object {\n@@ -66,10 +99,134 @@\n },\n ],\n },\n \"tick\": 2988700617146368,\n \"turn\": 1593166429945856,\n+ },\n+ Object {\n+ \"_id\": \"dc1ed9e6bf13afe5d2beddbb\",\n+ \"createdAt\": \"2023-08-25T19:54:03.687Z\",\n+ \"gameId\": \"43a2e797fc06dfa89dc5489e\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"c6d7bf15c706cbcf84ffaadd\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jarrod\",\n+ \"position\": 8134493464428544,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"player\": Object {\n+ \"_id\": \"15522bdb413f7edb0d73fb86\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Maegan\",\n+ \"position\": 6769476372529152,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 4730342780960768,\n+ \"turn\": 7386928986980352,\n+ },\n+ Object {\n+ \"_id\": \"d7ff0fc8ce72e6ddea6a4f9d\",\n+ \"createdAt\": \"2023-08-26T16:51:59.869Z\",\n+ \"gameId\": \"43a2e797fc06dfa89dc5489e\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"09c3bb45d6f1da8637becbff\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Theresia\",\n+ \"position\": 239988750942208,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"drankPotion\": \"life\",\n+ \"player\": Object {\n+ \"_id\": \"5be29aa5ffcb343ee2ba1c35\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Althea\",\n+ \"position\": 2418181173936128,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ Object {\n+ \"drankPotion\": \"death\",\n+ \"player\": Object {\n+ \"_id\": \"4c7d6ad61ce3eedf39cdcf8f\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Karlee\",\n+ \"position\": 5881967239233536,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 4297616112222208,\n+ \"turn\": 1010684429074432,\n },\n Object {\n \"_id\": \"bae5cb3da33dabbd42dceddb\",\n \"createdAt\": \"2023-08-25T19:23:03.209Z\",\n \"gameId\": \"43a2e797fc06dfa89dc5489e\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "635" - ], + "killedBy": [], "coveredBy": [ "635" ], "location": { "end": { "column": 10, - "line": 88 + "line": 87 }, "start": { "column": 9, - "line": 84 + "line": 83 } } }, @@ -46725,7 +46856,7 @@ "id": "1184", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 157\n\n@@ -1,7 +1,40 @@\n Array [\n Object {\n+ \"_id\": \"b627d2ed2ccc7a8641bfa0fa\",\n+ \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"gameId\": \"dfd4d8bdde36ab9beee732db\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"didJudgeRequestAnotherVote\": false,\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"48eaea05e92b2edbef2e3eeb\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Emanuel\",\n+ \"position\": 322724585013248,\n+ \"role\": Object {\n+ \"current\": \"stuttering-judge\",\n+ \"isRevealed\": true,\n+ \"original\": \"wild-child\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 1077440174620672,\n+ \"turn\": 754914640789504,\n+ },\n+ Object {\n \"_id\": \"8d5a1de3bdf741cd14bdee4e\",\n \"createdAt\": \"2023-08-26T06:42:18.100Z\",\n \"gameId\": \"dfd4d8bdde36ab9beee732db\",\n \"phase\": \"day\",\n \"play\": Object {\n@@ -66,10 +99,134 @@\n },\n ],\n },\n \"tick\": 6828009306718208,\n \"turn\": 8867641164824576,\n+ },\n+ Object {\n+ \"_id\": \"ebcd38202df9eb27db8dbce9\",\n+ \"createdAt\": \"2023-08-26T16:55:08.558Z\",\n+ \"gameId\": \"dfd4d8bdde36ab9beee732db\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"d8d69aaaa8e77ec45c5a53ca\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Reymundo\",\n+ \"position\": 5565314890727424,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"player\": Object {\n+ \"_id\": \"4197c81fbce0dc9ff691e3c6\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jett\",\n+ \"position\": 5280510362255360,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 2131923289767936,\n+ \"turn\": 1841566461198336,\n+ },\n+ Object {\n+ \"_id\": \"9fbffcfbeae2e2a0b3caefc0\",\n+ \"createdAt\": \"2023-08-26T16:29:36.689Z\",\n+ \"gameId\": \"dfd4d8bdde36ab9beee732db\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"f47da5bb692cac05af3d9cb4\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Jamil\",\n+ \"position\": 7095910909607936,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"drankPotion\": \"life\",\n+ \"player\": Object {\n+ \"_id\": \"e4d62f5cbdc2b9017fbb3bda\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Josiah\",\n+ \"position\": 6278800438460416,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ Object {\n+ \"drankPotion\": \"death\",\n+ \"player\": Object {\n+ \"_id\": \"c27a86665deafa89dfb8ee46\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Marty\",\n+ \"position\": 2267219171999744,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 2787491136405504,\n+ \"turn\": 8723160776048640,\n },\n Object {\n \"_id\": \"b453c04bf9661cfde2c8ad3b\",\n \"createdAt\": \"2023-08-26T05:19:17.118Z\",\n \"gameId\": \"dfd4d8bdde36ab9beee732db\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 157\n\n@@ -1,7 +1,40 @@\n Array [\n Object {\n+ \"_id\": \"dfdea5ec5a1af74cda3a44db\",\n+ \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"gameId\": \"d265fa9b4f0f331dc8387bcc\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"vote\",\n+ \"didJudgeRequestAnotherVote\": false,\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"bc2c71daa9ece33de3dbf72f\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Antonio\",\n+ \"position\": 3473348600266752,\n+ \"role\": Object {\n+ \"current\": \"scapegoat\",\n+ \"isRevealed\": true,\n+ \"original\": \"vile-father-of-wolves\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 8676892827713536,\n+ \"turn\": 200159858262016,\n+ },\n+ Object {\n \"_id\": \"4fdbac7ffb8a41bdfd8cbce8\",\n \"createdAt\": \"2023-08-28T13:45:13.912Z\",\n \"gameId\": \"d265fa9b4f0f331dc8387bcc\",\n \"phase\": \"night\",\n \"play\": Object {\n@@ -66,10 +99,134 @@\n },\n ],\n },\n \"tick\": 674877809885184,\n \"turn\": 6982903676272640,\n+ },\n+ Object {\n+ \"_id\": \"2ed08aeec8e283acec2b0ae7\",\n+ \"createdAt\": \"2023-08-28T09:28:00.147Z\",\n+ \"gameId\": \"d265fa9b4f0f331dc8387bcc\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"guard\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"20ef2c1b55f1f5ec64d0fb27\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Scottie\",\n+ \"position\": 6123054476296192,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"guard\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"player\": Object {\n+ \"_id\": \"7bd13fb478611189ce3cb7f5\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Christa\",\n+ \"position\": 5867913965731840,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 8633762061484032,\n+ \"turn\": 7407983099117568,\n+ },\n+ Object {\n+ \"_id\": \"4ecdf54addf5a1e4dfb117d1\",\n+ \"createdAt\": \"2023-08-28T00:35:48.592Z\",\n+ \"gameId\": \"d265fa9b4f0f331dc8387bcc\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"cb3f84cecfff29ab6cdb706e\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Khalil\",\n+ \"position\": 6810286942060544,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"drankPotion\": \"life\",\n+ \"player\": Object {\n+ \"_id\": \"ab6efd9979a6eb48dedf6fc8\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Layne\",\n+ \"position\": 27745291599872,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ Object {\n+ \"drankPotion\": \"death\",\n+ \"player\": Object {\n+ \"_id\": \"2cab7a6ce1971a7d6da589d8\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Filomena\",\n+ \"position\": 170040223596544,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 3395587850371072,\n+ \"turn\": 1330189265010688,\n },\n Object {\n \"_id\": \"de88737eafef0c59fe02daad\",\n \"createdAt\": \"2023-08-27T23:29:35.728Z\",\n \"gameId\": \"d265fa9b4f0f331dc8387bcc\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -46738,11 +46869,11 @@ "location": { "end": { "column": 10, - "line": 98 + "line": 97 }, "start": { "column": 9, - "line": 89 + "line": 88 } } }, @@ -46750,7 +46881,7 @@ "id": "1185", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 72\n+ Received + 0\n\n@@ -67,78 +67,6 @@\n ],\n },\n \"tick\": 2894363910733824,\n \"turn\": 4042515355271168,\n },\n- Object {\n- \"_id\": \"cb7fa3700e565ffb91e1c7fa\",\n- \"createdAt\": \"2023-08-26T14:18:30.845Z\",\n- \"gameId\": \"995de7afbb70d435e1fc7825\",\n- \"phase\": \"day\",\n- \"play\": Object {\n- \"action\": \"use-potions\",\n- \"source\": Object {\n- \"name\": \"witch\",\n- \"players\": Array [\n- Object {\n- \"_id\": \"bf1b0aedd2aef6315b6dfd6c\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Wendy\",\n- \"position\": 1950055741259776,\n- \"role\": Object {\n- \"current\": \"witch\",\n- \"isRevealed\": false,\n- \"original\": \"witch\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n- },\n- \"targets\": Array [\n- Object {\n- \"drankPotion\": \"death\",\n- \"player\": Object {\n- \"_id\": \"fbe7c1aabb07e0b2cabeb3f8\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Aileen\",\n- \"position\": 4901309748609024,\n- \"role\": Object {\n- \"current\": \"seer\",\n- \"isRevealed\": false,\n- \"original\": \"seer\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- },\n- Object {\n- \"drankPotion\": \"life\",\n- \"player\": Object {\n- \"_id\": \"7ccfebfd42e5c60603ddf57a\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Therese\",\n- \"position\": 3517155003858944,\n- \"role\": Object {\n- \"current\": \"ancient\",\n- \"isRevealed\": false,\n- \"original\": \"ancient\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- },\n- ],\n- },\n- \"tick\": 3457074780438528,\n- \"turn\": 572906176249856,\n- },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 72\n+ Received + 0\n\n@@ -67,78 +67,6 @@\n ],\n },\n \"tick\": 5059477027946496,\n \"turn\": 574748635430912,\n },\n- Object {\n- \"_id\": \"d941d6d0bd89986a0ae93afc\",\n- \"createdAt\": \"2023-08-28T16:35:41.693Z\",\n- \"gameId\": \"b14479a07ebcf7adaa2ec951\",\n- \"phase\": \"night\",\n- \"play\": Object {\n- \"action\": \"use-potions\",\n- \"source\": Object {\n- \"name\": \"witch\",\n- \"players\": Array [\n- Object {\n- \"_id\": \"dcea8ed1d3cdcd92aaa8eaec\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Kenyatta\",\n- \"position\": 7207856430383104,\n- \"role\": Object {\n- \"current\": \"witch\",\n- \"isRevealed\": false,\n- \"original\": \"witch\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n- },\n- \"targets\": Array [\n- Object {\n- \"drankPotion\": \"death\",\n- \"player\": Object {\n- \"_id\": \"d4b25d8cc4ceefed847e3d64\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Elna\",\n- \"position\": 609360690544640,\n- \"role\": Object {\n- \"current\": \"seer\",\n- \"isRevealed\": false,\n- \"original\": \"seer\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- },\n- Object {\n- \"drankPotion\": \"life\",\n- \"player\": Object {\n- \"_id\": \"3dc9483b53d6c3f1dbee6bef\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Raoul\",\n- \"position\": 5306391883415552,\n- \"role\": Object {\n- \"current\": \"ancient\",\n- \"isRevealed\": false,\n- \"original\": \"ancient\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- },\n- ],\n- },\n- \"tick\": 5175988138803200,\n- \"turn\": 5407005885857792,\n- },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -46763,11 +46894,11 @@ "location": { "end": { "column": 12, - "line": 97 + "line": 96 }, "start": { "column": 27, - "line": 92 + "line": 91 } } }, @@ -46775,7 +46906,7 @@ "id": "1186", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 72\n\n@@ -68,10 +68,82 @@\n },\n \"tick\": 3774496563527680,\n \"turn\": 1057088235110400,\n },\n Object {\n+ \"_id\": \"6cad49aaea80fcb011ea673f\",\n+ \"createdAt\": \"2023-08-26T09:53:23.491Z\",\n+ \"gameId\": \"eb9b566c4d2ddc72ba5f9ff9\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"5a86cffeeb8e7d5717cf7bf3\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Zakary\",\n+ \"position\": 6877341905059840,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"drankPotion\": \"life\",\n+ \"player\": Object {\n+ \"_id\": \"78bb2c6b78df8cf7c3a4e4fa\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Cora\",\n+ \"position\": 2950715106394112,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ Object {\n+ \"drankPotion\": \"death\",\n+ \"player\": Object {\n+ \"_id\": \"cc9729481b44b09be784dab8\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Freeman\",\n+ \"position\": 6633656321835008,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 3712239076900864,\n+ \"turn\": 988199704854528,\n+ },\n+ Object {\n \"_id\": \"287dddfc89faba42fea450d1\",\n \"createdAt\": \"2023-08-26T14:43:20.662Z\",\n \"gameId\": \"eb9b566c4d2ddc72ba5f9ff9\",\n \"phase\": \"day\",\n \"play\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 72\n\n@@ -68,10 +68,82 @@\n },\n \"tick\": 4414874398490624,\n \"turn\": 2953571939123200,\n },\n Object {\n+ \"_id\": \"1dfb196af2d0ca1b6ddf5fe3\",\n+ \"createdAt\": \"2023-08-27T20:11:12.905Z\",\n+ \"gameId\": \"ffc8fd8d0cdd0bf78586a01e\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"use-potions\",\n+ \"source\": Object {\n+ \"name\": \"witch\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"abbceceadb49b0b1db2c307f\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Haven\",\n+ \"position\": 327203657089024,\n+ \"role\": Object {\n+ \"current\": \"witch\",\n+ \"isRevealed\": false,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ \"targets\": Array [\n+ Object {\n+ \"drankPotion\": \"life\",\n+ \"player\": Object {\n+ \"_id\": \"fb48fdcceadfb6dfc3b3924b\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Ross\",\n+ \"position\": 1112359496056832,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ Object {\n+ \"drankPotion\": \"death\",\n+ \"player\": Object {\n+ \"_id\": \"d4cafadbeddb465dbcec688a\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Delbert\",\n+ \"position\": 5824319334645760,\n+ \"role\": Object {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": false,\n+ \"original\": \"ancient\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ },\n+ ],\n+ },\n+ \"tick\": 2972273367580672,\n+ \"turn\": 369195132911616,\n+ },\n+ Object {\n \"_id\": \"ba7e5ca6b962da125bf4a74a\",\n \"createdAt\": \"2023-08-27T16:47:15.286Z\",\n \"gameId\": \"ffc8fd8d0cdd0bf78586a01e\",\n \"phase\": \"day\",\n \"play\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:477:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -46788,11 +46919,11 @@ "location": { "end": { "column": 14, - "line": 96 + "line": 95 }, "start": { "column": 25, - "line": 93 + "line": 92 } } }, @@ -46800,10 +46931,9 @@ "id": "1187", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(104,70): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(103,70): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ "636", "637" @@ -46811,161 +46941,150 @@ "location": { "end": { "column": 4, - "line": 107 + "line": 106 }, "start": { "column": 104, - "line": 104 + "line": 103 } } }, { - "id": "1188", - "mutatorName": "ObjectLiteral", + "id": "1192", + "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(108,101): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ - "636", - "637" + "530", + "531", + "638" ], "location": { "end": { - "column": 62, - "line": 105 + "column": 4, + "line": 110 }, "start": { - "column": 52, - "line": 105 + "column": 130, + "line": 108 } } }, { - "id": "1189", + "id": "1190", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 11\n+ Received + 11\n\n Object {\n- \"_id\": \"dfefe123aad5b7acdaca9e70\",\n- \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"_id\": \"1ebb0e2edc9d7aea01f924f3\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"945cb2b0ace5c5051a41fed5\",\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"c8ab32d1d1c869cbea73efb4\",\n+ \"_id\": \"dcf82f6eafdcb992310d8127\",\n \"attributes\": Array [],\n \"isAlive\": true,\n- \"name\": \"Ayla\",\n- \"position\": 4046817268334592,\n+ \"name\": \"Damien\",\n+ \"position\": 4059424857522176,\n \"role\": Object {\n- \"current\": \"raven\",\n+ \"current\": \"two-sisters\",\n \"isRevealed\": false,\n- \"original\": \"vile-father-of-wolves\",\n+ \"original\": \"witch\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"werewolves\",\n },\n },\n ],\n },\n },\n- \"tick\": 3606228500480000,\n- \"turn\": 708709042880512,\n+ \"tick\": 4805969330569216,\n+ \"turn\": 5769227122245632,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:508:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "637" - ], "coveredBy": [ "636", "637" ], "location": { "end": { - "column": 94, - "line": 106 + "column": 92, + "line": 105 }, "start": { - "column": 67, - "line": 106 + "column": 75, + "line": 105 } } }, { - "id": "1190", + "id": "1193", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 12\n\n Object {\n- \"_id\": \"d52e9ee3625f7b7655f3d162\",\n- \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"_id\": \"33aa139419a4c57cc69f5d11\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"9ff1ab4bc018f6beec2840b0\",\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"bdbef84a0dc7fa57f2c1662e\",\n+ \"_id\": \"2c86152ce21c342ee1e4b1fa\",\n \"attributes\": Array [],\n \"isAlive\": false,\n- \"name\": \"Mathilde\",\n- \"position\": 8150564651139072,\n+ \"name\": \"Kyle\",\n+ \"position\": 8252104521023488,\n \"role\": Object {\n- \"current\": \"idiot\",\n- \"isRevealed\": true,\n- \"original\": \"scapegoat\",\n+ \"current\": \"scapegoat\",\n+ \"isRevealed\": false,\n+ \"original\": \"fox\",\n },\n \"side\": Object {\n \"current\": \"villagers\",\n- \"original\": \"villagers\",\n+ \"original\": \"werewolves\",\n },\n },\n ],\n },\n },\n- \"tick\": 5145672202321920,\n- \"turn\": 8730789606850560,\n+ \"tick\": 2882144248528896,\n+ \"turn\": 8446900336328704,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:508:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 96\n\n@@ -30,10 +30,42 @@\n },\n \"tick\": 6722079156076544,\n \"turn\": 1,\n },\n Object {\n+ \"_id\": \"8a69ab49f3c8feb8802ed32a\",\n+ \"createdAt\": \"2023-08-28T10:15:04.624Z\",\n+ \"gameId\": \"47717db7bca7e82dbcc6dadf\",\n+ \"phase\": \"night\",\n+ \"play\": Object {\n+ \"action\": \"delegate\",\n+ \"source\": Object {\n+ \"name\": \"seer\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"7bfec6ae42cb8f874d1c0bce\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Jesus\",\n+ \"position\": 8814305587757056,\n+ \"role\": Object {\n+ \"current\": \"scapegoat\",\n+ \"isRevealed\": false,\n+ \"original\": \"little-girl\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 2724298364026880,\n+ \"turn\": 1,\n+ },\n+ Object {\n \"_id\": \"39e1e05dcf4c7fdb06ecc3dc\",\n \"createdAt\": \"2023-08-28T09:49:36.936Z\",\n \"gameId\": \"47717db7bca7e82dbcc6dadf\",\n \"phase\": \"day\",\n \"play\": Object {\n@@ -60,11 +92,43 @@\n ],\n },\n },\n \"tick\": 5097275156070400,\n \"turn\": 1,\n+ },\n+ Object {\n+ \"_id\": \"2ecb9dabd35d4def48fb8bc1\",\n+ \"createdAt\": \"2023-08-28T22:03:35.804Z\",\n+ \"gameId\": \"47717db7bca7e82dbcc6dadf\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"protect\",\n+ \"source\": Object {\n+ \"name\": \"hunter\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"3ae43e80dab34ecbedf2fca7\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Bruce\",\n+ \"position\": 5508915626246144,\n+ \"role\": Object {\n+ \"current\": \"guard\",\n+ \"isRevealed\": false,\n+ \"original\": \"scapegoat\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ ],\n },\n+ },\n+ \"tick\": 7245376755073024,\n+ \"turn\": 2,\n+ },\n Object {\n \"_id\": \"8a6d1e94cf7119ffde6aeb43\",\n \"createdAt\": \"2023-08-28T13:35:11.105Z\",\n \"gameId\": \"47717db7bca7e82dbcc6dadf\",\n \"phase\": \"day\",\n@@ -91,8 +155,40 @@\n },\n ],\n },\n },\n \"tick\": 5593953963343872,\n+ \"turn\": 1,\n+ },\n+ Object {\n+ \"_id\": \"8aa372deffd2991c30bc3fa1\",\n+ \"createdAt\": \"2023-08-29T04:14:20.980Z\",\n+ \"gameId\": \"cd1acddef9db8d23b80d7d94\",\n+ \"phase\": \"day\",\n+ \"play\": Object {\n+ \"action\": \"choose-model\",\n+ \"source\": Object {\n+ \"name\": \"ancient\",\n+ \"players\": Array [\n+ Object {\n+ \"_id\": \"eb9bbb57e480b5a3b69fc9b0\",\n+ \"attributes\": Array [],\n+ \"isAlive\": false,\n+ \"name\": \"Rylee\",\n+ \"position\": 8621189909970944,\n+ \"role\": Object {\n+ \"current\": \"stuttering-judge\",\n+ \"isRevealed\": true,\n+ \"original\": \"bear-tamer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ ],\n+ },\n+ },\n+ \"tick\": 8622656549027840,\n \"turn\": 1,\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox4259022/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:527:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", - "testsCompleted": 2, "static": false, + "testsCompleted": 3, "killedBy": [ - "637" + "638" ], "coveredBy": [ - "636", - "637" + "530", + "531", + "638" ], "location": { "end": { - "column": 92, - "line": 106 + "column": 68, + "line": 109 }, "start": { - "column": 75, - "line": 106 + "column": 45, + "line": 109 } } }, { - "id": "1191", - "mutatorName": "UnaryOperator", - "replacement": "+1", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 12\n\n Object {\n- \"_id\": \"a0cb5fa9a61c792a06fe19b1\",\n- \"createdAt\": \"2023-01-01T00:00:00.000Z\",\n+ \"_id\": \"551c289a0d3f6a9cebd4eafd\",\n+ \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n \"gameId\": \"641c3ac9ac1c31f41c658bb3\",\n \"phase\": \"day\",\n \"play\": Object {\n \"action\": \"vote\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": \"358af6757746bc7fb15d6d83\",\n+ \"_id\": \"fc9f17f816427e8cabea8e03\",\n \"attributes\": Array [],\n- \"isAlive\": false,\n- \"name\": \"Jermain\",\n- \"position\": 8188592587276288,\n+ \"isAlive\": true,\n+ \"name\": \"Kade\",\n+ \"position\": 873395786874880,\n \"role\": Object {\n- \"current\": \"thief\",\n- \"isRevealed\": false,\n- \"original\": \"pied-piper\",\n+ \"current\": \"cupid\",\n+ \"isRevealed\": true,\n+ \"original\": \"thief\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"original\": \"villagers\",\n },\n },\n ],\n },\n },\n- \"tick\": 7690348037931008,\n- \"turn\": 4352620355387392,\n+ \"tick\": 8589398799024128,\n+ \"turn\": 534417770545152,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:508:30)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 2, + "id": "1188", + "mutatorName": "ObjectLiteral", + "replacement": "{}", + "status": "Timeout", "static": false, - "killedBy": [ - "637" - ], "coveredBy": [ "636", "637" ], "location": { "end": { - "column": 90, - "line": 106 + "column": 62, + "line": 104 }, "start": { - "column": 88, - "line": 106 + "column": 52, + "line": 104 } } }, { - "id": "1192", - "mutatorName": "BlockStatement", + "id": "1189", + "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "src/modules/game/providers/repositories/game-history-record.repository.ts(109,102): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", - "status": "CompileError", + "status": "Timeout", "static": false, - "killedBy": [], "coveredBy": [ - "530", - "531" + "636", + "637" ], "location": { "end": { - "column": 4, - "line": 111 + "column": 94, + "line": 105 }, "start": { - "column": 131, - "line": 109 + "column": 67, + "line": 105 } } }, { - "id": "1193", - "mutatorName": "ObjectLiteral", - "replacement": "{}", + "id": "1191", + "mutatorName": "UnaryOperator", + "replacement": "+1", "status": "Timeout", "static": false, - "killedBy": [], "coveredBy": [ - "530", - "531" + "636", + "637" ], "location": { "end": { - "column": 68, - "line": 110 + "column": 90, + "line": 105 }, "start": { - "column": 45, - "line": 110 + "column": 88, + "line": 105 } } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport { InjectModel } from \"@nestjs/mongoose\";\nimport { Model } from \"mongoose\";\nimport type { FilterQuery, Types } from \"mongoose\";\n\nimport { GAME_HISTORY_RECORD_VOTING_RESULTS } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GAME_PLAY_ACTIONS, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport type { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport type { GameHistoryRecordDocument } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\n@Injectable()\nexport class GameHistoryRecordRepository {\n public constructor(@InjectModel(GameHistoryRecord.name) private readonly gameHistoryRecordModel: Model) {}\n\n public async getGameHistory(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordModel.find({ gameId });\n }\n\n public async create(gameHistoryRecord: GameHistoryRecordToInsert): Promise {\n return this.gameHistoryRecordModel.create(gameHistoryRecord);\n }\n\n public async getLastGameHistoryGuardProtectsRecord(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": GAME_PLAY_ACTIONS.PROTECT,\n \"play.source.name\": ROLE_NAMES.GUARD,\n };\n return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } });\n }\n \n public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GAME_PLAY_ACTIONS): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": action,\n \"play.voting.result\": GAME_HISTORY_RECORD_VOTING_RESULTS.TIE,\n };\n return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } });\n }\n\n public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WITCH_POTIONS): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.source.name\": ROLE_NAMES.WITCH,\n \"play.action\": GAME_PLAY_ACTIONS.USE_POTIONS,\n \"play.targets.drankPotion\": potion,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n\n public async getGameHistoryVileFatherOfWolvesInfectedRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": GAME_PLAY_ACTIONS.EAT,\n \"play.targets.isInfected\": true,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n\n public async getGameHistoryJudgeRequestRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.didJudgeRequestAnotherVote\": true,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n \n public async getGameHistoryWerewolvesEatAncientRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": GAME_PLAY_ACTIONS.EAT,\n \"play.targets.player.role.current\": ROLE_NAMES.ANCIENT,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n\n public async getGameHistoryAncientProtectedFromWerewolvesRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n $or: [\n {\n \"play.source.name\": ROLE_NAMES.GUARD,\n \"play.action\": GAME_PLAY_ACTIONS.PROTECT,\n \"play.targets.player.role.current\": ROLE_NAMES.ANCIENT,\n },\n {\n \"play.source.name\": ROLE_NAMES.WITCH,\n \"play.action\": GAME_PLAY_ACTIONS.USE_POTIONS,\n \"play.targets\": {\n $elemMatch: {\n \"player.role.current\": ROLE_NAMES.ANCIENT,\n \"drankPotion\": WITCH_POTIONS.LIFE,\n },\n },\n },\n ],\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n \n public async getPreviousGameHistoryRecord(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = { gameId };\n return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } });\n }\n\n public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GAME_PHASES): Promise {\n return this.gameHistoryRecordModel.find({ gameId, turn, phase });\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport { InjectModel } from \"@nestjs/mongoose\";\nimport { Model } from \"mongoose\";\nimport type { FilterQuery, Types } from \"mongoose\";\n\nimport { GameHistoryRecordVotingResults } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GamePlayActions, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport type { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { GameHistoryRecordDocument, GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\n@Injectable()\nexport class GameHistoryRecordRepository {\n public constructor(@InjectModel(GameHistoryRecord.name) private readonly gameHistoryRecordModel: Model) {}\n\n public async getGameHistory(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordModel.find({ gameId });\n }\n\n public async create(gameHistoryRecord: GameHistoryRecordToInsert): Promise {\n return this.gameHistoryRecordModel.create(gameHistoryRecord);\n }\n\n public async getLastGameHistoryGuardProtectsRecord(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": GamePlayActions.PROTECT,\n \"play.source.name\": RoleNames.GUARD,\n };\n return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } });\n }\n \n public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GamePlayActions): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": action,\n \"play.voting.result\": GameHistoryRecordVotingResults.TIE,\n };\n return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } });\n }\n\n public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WitchPotions): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.source.name\": RoleNames.WITCH,\n \"play.action\": GamePlayActions.USE_POTIONS,\n \"play.targets.drankPotion\": potion,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n\n public async getGameHistoryVileFatherOfWolvesInfectedRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": GamePlayActions.EAT,\n \"play.targets.isInfected\": true,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n\n public async getGameHistoryJudgeRequestRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.didJudgeRequestAnotherVote\": true,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n \n public async getGameHistoryWerewolvesEatAncientRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n \"play.action\": GamePlayActions.EAT,\n \"play.targets.player.role.current\": RoleNames.ANCIENT,\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n\n public async getGameHistoryAncientProtectedFromWerewolvesRecords(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = {\n gameId,\n $or: [\n {\n \"play.source.name\": RoleNames.GUARD,\n \"play.action\": GamePlayActions.PROTECT,\n \"play.targets.player.role.current\": RoleNames.ANCIENT,\n },\n {\n \"play.source.name\": RoleNames.WITCH,\n \"play.action\": GamePlayActions.USE_POTIONS,\n \"play.targets\": {\n $elemMatch: {\n \"player.role.current\": RoleNames.ANCIENT,\n \"drankPotion\": WitchPotions.LIFE,\n },\n },\n },\n ],\n };\n return this.gameHistoryRecordModel.find(filter);\n }\n \n public async getPreviousGameHistoryRecord(gameId: Types.ObjectId): Promise {\n const filter: FilterQuery = { gameId };\n return this.gameHistoryRecordModel.findOne(filter, undefined, { sort: { createdAt: -1 } });\n }\n\n public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GamePhases): Promise {\n return this.gameHistoryRecordModel.find({ gameId, turn, phase });\n }\n}" }, "src/modules/game/providers/repositories/game.repository.ts": { "language": "typescript", @@ -47110,7 +47229,7 @@ "id": "1199", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 98\n+ Received + 0\n\n@@ -3,108 +3,10 @@\n \"createdAt\": Any,\n \"currentPlay\": Object {\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n- \"players\": Array [\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Antoine\",\n- \"position\": 0,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Mathis\",\n- \"position\": 1,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Virgil\",\n- \"position\": 2,\n- \"role\": Object {\n- \"current\": \"villager-villager\",\n- \"isRevealed\": true,\n- \"original\": \"villager-villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"JB\",\n- \"position\": 3,\n- \"role\": Object {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Doudou\",\n- \"position\": 4,\n- \"role\": Object {\n- \"current\": \"cupid\",\n- \"isRevealed\": false,\n- \"original\": \"cupid\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Juju\",\n- \"position\": 5,\n- \"role\": Object {\n- \"current\": \"seer\",\n- \"isRevealed\": false,\n- \"original\": \"seer\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n \"isHidden\": false,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 98\n+ Received + 0\n\n@@ -3,108 +3,10 @@\n \"createdAt\": Any,\n \"currentPlay\": Object {\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n- \"players\": Array [\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Antoine\",\n- \"position\": 0,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Mathis\",\n- \"position\": 1,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Virgil\",\n- \"position\": 2,\n- \"role\": Object {\n- \"current\": \"villager-villager\",\n- \"isRevealed\": true,\n- \"original\": \"villager-villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"JB\",\n- \"position\": 3,\n- \"role\": Object {\n- \"current\": \"white-werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"white-werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Doudou\",\n- \"position\": 4,\n- \"role\": Object {\n- \"current\": \"cupid\",\n- \"isRevealed\": false,\n- \"original\": \"cupid\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": Any,\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Juju\",\n- \"position\": 5,\n- \"role\": Object {\n- \"current\": \"seer\",\n- \"isRevealed\": false,\n- \"original\": \"seer\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n \"isHidden\": false,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -47137,7 +47256,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport { InjectModel } from \"@nestjs/mongoose\";\nimport { Model } from \"mongoose\";\nimport type { FilterQuery, QueryOptions } from \"mongoose\";\n\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport type { GameDocument } from \"@/modules/game/schemas/game.schema\";\nimport { Game } from \"@/modules/game/schemas/game.schema\";\n\n@Injectable()\nexport class GameRepository {\n public constructor(@InjectModel(Game.name) private readonly gameModel: Model) {}\n public async find(filter: FilterQuery = {}): Promise {\n return this.gameModel.find(filter);\n }\n\n public async findOne(filter: FilterQuery): Promise {\n return this.gameModel.findOne(filter);\n }\n\n public async create(game: CreateGameDto): Promise {\n return this.gameModel.create(game);\n }\n\n public async updateOne(filter: FilterQuery, game: Partial, options: QueryOptions = {}): Promise {\n return this.gameModel.findOneAndUpdate(filter, game, { new: true, ...options });\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport { InjectModel } from \"@nestjs/mongoose\";\nimport { Model } from \"mongoose\";\nimport type { FilterQuery, QueryOptions } from \"mongoose\";\n\nimport type { GameDocument } from \"@/modules/game/types/game.type\";\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { Game } from \"@/modules/game/schemas/game.schema\";\n\n@Injectable()\nexport class GameRepository {\n public constructor(@InjectModel(Game.name) private readonly gameModel: Model) {}\n public async find(filter: FilterQuery = {}): Promise {\n return this.gameModel.find(filter);\n }\n\n public async findOne(filter: FilterQuery): Promise {\n return this.gameModel.findOne(filter);\n }\n\n public async create(game: CreateGameDto): Promise {\n return this.gameModel.create(game);\n }\n\n public async updateOne(filter: FilterQuery, game: Partial, options: QueryOptions = {}): Promise {\n return this.gameModel.findOneAndUpdate(filter, game, { new: true, ...options });\n }\n}" }, "src/modules/game/providers/services/game-history/game-history-record.service.ts": { "language": "typescript", @@ -47192,7 +47311,7 @@ "id": "1202", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(49,103): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(49,101): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -47205,7 +47324,7 @@ "line": 51 }, "start": { - "column": 137, + "column": 135, "line": 49 } } @@ -47214,7 +47333,7 @@ "id": "1203", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(53,109): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(53,108): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -47228,7 +47347,7 @@ "line": 55 }, "start": { - "column": 138, + "column": 137, "line": 53 } } @@ -47325,7 +47444,7 @@ "id": "1208", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(73,102): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(73,101): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -47340,7 +47459,7 @@ "line": 75 }, "start": { - "column": 131, + "column": 130, "line": 73 } } @@ -47401,7 +47520,7 @@ "id": "1211", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -47463,9 +47582,13 @@ "id": "1213", "mutatorName": "EqualityOperator", "replacement": "baseGame.currentPlay !== null", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:233:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 9, "static": false, - "killedBy": [], + "killedBy": [ + "446" + ], "coveredBy": [ "446", "447", @@ -47621,9 +47744,13 @@ "id": "1219", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:301:102)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "451" + ], "coveredBy": [ "447", "448", @@ -47933,9 +48060,13 @@ "id": "1231", "mutatorName": "BooleanLiteral", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 24\n+ Received + 7\n\n Array [\n Player {\n- \"_id\": \"30252cba02784807ae87adbd\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": false,\n- \"name\": \"Laila\",\n- \"position\": 1581789462134784,\n- \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Player {\n- \"_id\": \"e87bfd0f1e40ffbd45175052\",\n+ \"_id\": \"f0b64256cedd9c5e5dea2aa0\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": false,\n- \"name\": \"Daryl\",\n- \"position\": 6091915223105536,\n+ \"name\": \"Brandi\",\n+ \"position\": 2701638758301696,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"villager\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"villager\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:348:116)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "454" + ], "coveredBy": [ "454", "455", @@ -48010,9 +48141,13 @@ "id": "1234", "mutatorName": "MethodExpression", "replacement": "newPlayers", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 68\n\n@@ -15,10 +15,27 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Player {\n+ \"_id\": \"ce336b90ca2df040ac6b4762\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Beatrice\",\n+ \"position\": 6648998576259072,\n+ \"role\": PlayerRole {\n+ \"current\": \"two-sisters\",\n+ \"isRevealed\": true,\n+ \"original\": \"cupid\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"4c4c3cbda08a1be4774e0ebb\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Lance\",\n@@ -29,8 +46,59 @@\n \"original\": \"scapegoat\",\n },\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"ead8bcec69aa5b44ad8bd313\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Alfreda\",\n+ \"position\": 1231453002137600,\n+ \"role\": PlayerRole {\n+ \"current\": \"ancient\",\n+ \"isRevealed\": true,\n+ \"original\": \"fox\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"d8b62a57dd9021a11c7e5cd2\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Glenna\",\n+ \"position\": 8335297886552064,\n+ \"role\": PlayerRole {\n+ \"current\": \"pied-piper\",\n+ \"isRevealed\": false,\n+ \"original\": \"white-werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"36b435eaea0e9bbae93eca5d\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Janie\",\n+ \"position\": 5739188060160000,\n+ \"role\": PlayerRole {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager-villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:403:120)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "456" + ], "coveredBy": [ "456", "457", @@ -48062,9 +48197,13 @@ "id": "1236", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 68\n\n@@ -15,10 +15,27 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Player {\n+ \"_id\": \"351cf87eeb92cd79c2702bfd\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Nakia\",\n+ \"position\": 2369609632055296,\n+ \"role\": PlayerRole {\n+ \"current\": \"dog-wolf\",\n+ \"isRevealed\": true,\n+ \"original\": \"witch\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"2acf35f085ef11feeead31be\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Scottie\",\n@@ -29,8 +46,59 @@\n \"original\": \"seer\",\n },\n \"side\": PlayerSide {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"d6ed9a311ddfab7f0b2ff6ce\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": false,\n+ \"name\": \"Tyler\",\n+ \"position\": 7693421923794944,\n+ \"role\": PlayerRole {\n+ \"current\": \"stuttering-judge\",\n+ \"isRevealed\": true,\n+ \"original\": \"dog-wolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"3f054a0b9ce24da622bdcbdb\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Kara\",\n+ \"position\": 8148735083151360,\n+ \"role\": PlayerRole {\n+ \"current\": \"dog-wolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n+ \"_id\": \"c7da1c9ee5395ced4fecc5fa\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Roselyn\",\n+ \"position\": 558363341488128,\n+ \"role\": PlayerRole {\n+ \"current\": \"vile-father-of-wolves\",\n+ \"isRevealed\": false,\n+ \"original\": \"fox\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:403:120)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "456" + ], "coveredBy": [ "456", "457", @@ -48194,9 +48333,13 @@ "id": "1241", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 17\n\n@@ -15,10 +15,27 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Player {\n+ \"_id\": \"f84d26bdebb6cbc5d877f685\",\n+ \"attributes\": Array [],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Marianne\",\n+ \"position\": 2067743337611264,\n+ \"role\": PlayerRole {\n+ \"current\": \"angel\",\n+ \"isRevealed\": true,\n+ \"original\": \"dog-wolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Player {\n \"_id\": \"d78aecbbef8cfe39eea73cbc\",\n \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Dustin\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:403:120)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "456" + ], "coveredBy": [ "456", "457", @@ -48364,7 +48507,7 @@ "line": 159 }, "start": { - "column": 41, + "column": 37, "line": 140 } } @@ -48373,13 +48516,9 @@ "id": "1248", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 9, + "status": "Timeout", "static": false, - "killedBy": [ - "465" - ], + "killedBy": [], "coveredBy": [ "459", "460", @@ -48434,8 +48573,8 @@ { "id": "1250", "mutatorName": "EqualityOperator", - "replacement": "gameHistoryRecordToInsert.deadPlayers?.some(({\n death\n}) => {\n const deathFromVoteCauses = [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED];\n return death?.cause !== undefined && deathFromVoteCauses.includes(death.cause);\n}) !== true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "gameHistoryRecordToInsert.deadPlayers?.some(({\n death\n}) => {\n const deathFromVoteCauses = [PlayerDeathCauses.VOTE, PlayerDeathCauses.VOTE_SCAPEGOATED];\n return death?.cause !== undefined && deathFromVoteCauses.includes(death.cause);\n}) !== true", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -48467,10 +48606,14 @@ { "id": "1251", "mutatorName": "MethodExpression", - "replacement": "gameHistoryRecordToInsert.deadPlayers?.every(({\n death\n}) => {\n const deathFromVoteCauses = [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED];\n return death?.cause !== undefined && deathFromVoteCauses.includes(death.cause);\n})", - "status": "Timeout", + "replacement": "gameHistoryRecordToInsert.deadPlayers?.every(({\n death\n}) => {\n const deathFromVoteCauses = [PlayerDeathCauses.VOTE, PlayerDeathCauses.VOTE_SCAPEGOATED];\n return death?.cause !== undefined && deathFromVoteCauses.includes(death.cause);\n})", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 9, "static": false, - "killedBy": [], + "killedBy": [ + "463" + ], "coveredBy": [ "459", "460", @@ -48527,13 +48670,9 @@ "id": "1253", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "463" - ], + "killedBy": [], "coveredBy": [ "461", "462", @@ -48557,7 +48696,7 @@ "id": "1254", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(144,73): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/player.enum\").PLAYER_DEATH_CAUSES' is not assignable to parameter of type 'never'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(144,73): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/player.enum\").PlayerDeathCauses' is not assignable to parameter of type 'never'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -48571,7 +48710,7 @@ ], "location": { "end": { - "column": 99, + "column": 95, "line": 143 }, "start": { @@ -48584,7 +48723,7 @@ "id": "1255", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -48748,13 +48887,9 @@ "id": "1261", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 9, + "status": "Timeout", "static": false, - "killedBy": [ - "463" - ], + "killedBy": [], "coveredBy": [ "459", "460", @@ -48798,7 +48933,7 @@ ], "location": { "end": { - "column": 72, + "column": 70, "line": 146 }, "start": { @@ -48811,13 +48946,9 @@ "id": "1263", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"sheriff-election\"\nReceived: \"skipped\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:486:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 9, + "status": "Timeout", "static": false, - "killedBy": [ - "459" - ], + "killedBy": [], "coveredBy": [ "459", "460", @@ -48831,7 +48962,7 @@ ], "location": { "end": { - "column": 72, + "column": 70, "line": 146 }, "start": { @@ -48843,14 +48974,10 @@ { "id": "1264", "mutatorName": "EqualityOperator", - "replacement": "baseGame.currentPlay.action !== GAME_PLAY_ACTIONS.ELECT_SHERIFF", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"sheriff-election\"\nReceived: \"skipped\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:486:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 9, + "replacement": "baseGame.currentPlay.action !== GamePlayActions.ELECT_SHERIFF", + "status": "Timeout", "static": false, - "killedBy": [ - "459" - ], + "killedBy": [], "coveredBy": [ "459", "460", @@ -48864,7 +48991,7 @@ ], "location": { "end": { - "column": 72, + "column": 70, "line": 146 }, "start": { @@ -48877,9 +49004,13 @@ "id": "1265", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"sheriff-election\"\nReceived: \"skipped\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:486:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "459" + ], "coveredBy": [ "459", "460" @@ -48890,7 +49021,7 @@ "line": 148 }, "start": { - "column": 74, + "column": 72, "line": 146 } } @@ -48899,9 +49030,13 @@ "id": "1266", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"skipped\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "463" + ], "coveredBy": [ "461", "462", @@ -48926,9 +49061,13 @@ "id": "1267", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"skipped\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:531:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "461" + ], "coveredBy": [ "461", "462", @@ -49009,7 +49148,7 @@ "id": "1270", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"skipped\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:554:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"skipped\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:554:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -49039,13 +49178,9 @@ "id": "1271", "mutatorName": "EqualityOperator", "replacement": "gameHistoryRecordToInsert.play.votes.length !== 0", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"skipped\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:554:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "462" - ], + "killedBy": [], "coveredBy": [ "462", "463", @@ -49069,13 +49204,9 @@ "id": "1272", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"skipped\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:531:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "461" - ], + "killedBy": [], "coveredBy": [ "461", "462" @@ -49095,7 +49226,7 @@ "id": "1273", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"death\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -49124,7 +49255,7 @@ "id": "1274", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -49153,7 +49284,7 @@ "id": "1275", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"death\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:581:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -49179,9 +49310,13 @@ "id": "1276", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"tie\"\nReceived: \"inconsequential\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:650:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "466" + ], "coveredBy": [ "465", "466", @@ -49189,7 +49324,7 @@ ], "location": { "end": { - "column": 84, + "column": 82, "line": 155 }, "start": { @@ -49202,7 +49337,7 @@ "id": "1277", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -49216,7 +49351,7 @@ ], "location": { "end": { - "column": 84, + "column": 82, "line": 155 }, "start": { @@ -49228,14 +49363,10 @@ { "id": "1278", "mutatorName": "EqualityOperator", - "replacement": "baseGame.currentPlay.cause !== GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "replacement": "baseGame.currentPlay.cause !== GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES", + "status": "Timeout", "static": false, - "killedBy": [ - "465" - ], + "killedBy": [], "coveredBy": [ "465", "466", @@ -49243,7 +49374,7 @@ ], "location": { "end": { - "column": 84, + "column": 82, "line": 155 }, "start": { @@ -49256,9 +49387,13 @@ "id": "1279", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: \"inconsequential\"\nReceived: \"tie\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:627:144)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "465" + ], "coveredBy": [ "465" ], @@ -49268,7 +49403,7 @@ "line": 157 }, "start": { - "column": 86, + "column": 84, "line": 155 } } @@ -49402,13 +49537,9 @@ "id": "1285", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 9, + "status": "Timeout", "static": false, - "killedBy": [ - "472" - ], + "killedBy": [], "coveredBy": [ "472", "473", @@ -49435,7 +49566,7 @@ "id": "1286", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(182,66): error TS18048: 'unmatchedSource' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(186,66): error TS18048: 'unmatchedTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(190,66): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(194,66): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,80): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(182,65): error TS18048: 'unmatchedSource' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(186,65): error TS18048: 'unmatchedTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(190,65): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(194,65): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,79): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49465,7 +49596,7 @@ "id": "1287", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(182,66): error TS18048: 'unmatchedSource' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(182,65): error TS18048: 'unmatchedSource' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49495,7 +49626,7 @@ "id": "1288", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -49573,7 +49704,7 @@ "id": "1291", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(186,66): error TS18048: 'unmatchedTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(190,66): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(194,66): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,80): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(186,65): error TS18048: 'unmatchedTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(190,65): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(194,65): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,79): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49602,7 +49733,7 @@ "id": "1292", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(186,66): error TS18048: 'unmatchedTarget' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(186,65): error TS18048: 'unmatchedTarget' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49631,9 +49762,13 @@ "id": "1293", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "473" + ], "coveredBy": [ "473" ], @@ -49705,7 +49840,7 @@ "id": "1296", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(190,66): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(194,66): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,80): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(190,65): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(194,65): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,79): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49733,7 +49868,7 @@ "id": "1297", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(190,66): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(190,65): error TS18048: 'unmatchedVoter' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49761,13 +49896,9 @@ "id": "1298", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "474" - ], + "killedBy": [], "coveredBy": [ "474" ], @@ -49837,7 +49968,7 @@ "id": "1301", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(194,66): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,80): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(194,65): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,79): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49864,7 +49995,7 @@ "id": "1302", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(194,66): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(194,65): error TS18048: 'unmatchedVoteTarget' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49891,9 +50022,13 @@ "id": "1303", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "475" + ], "coveredBy": [ "475" ], @@ -49912,7 +50047,7 @@ "id": "1304", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(197,80): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(197,79): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49938,7 +50073,7 @@ "id": "1305", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(197,80): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(197,79): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -49964,7 +50099,7 @@ "id": "1306", "mutatorName": "LogicalOperator", "replacement": "play.chosenCard || !getAdditionalCardWithId(game.additionalCards, play.chosenCard._id)", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,80): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(196,75): error TS18048: 'play.chosenCard' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(197,79): error TS18048: 'play.chosenCard' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -50012,13 +50147,9 @@ "id": "1308", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: ResourceNotFoundException\n\nReceived function did not throw\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:813:109\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "476" - ], + "killedBy": [], "coveredBy": [ "476" ], @@ -50037,7 +50168,7 @@ "id": "1309", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:860:108\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:860:108\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -50097,7 +50228,7 @@ "id": "1311", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(207,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(209,66): error TS18048: 'unmatchedRevealedPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(211,54): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(213,66): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(215,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(207,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(209,65): error TS18048: 'unmatchedRevealedPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(211,54): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(213,65): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(215,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -50200,7 +50331,7 @@ "id": "1315", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(209,66): error TS18048: 'unmatchedRevealedPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(211,54): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(213,66): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(215,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(209,65): error TS18048: 'unmatchedRevealedPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(211,54): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(213,65): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(215,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -50226,7 +50357,7 @@ "id": "1316", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(209,66): error TS18048: 'unmatchedRevealedPlayer' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(209,65): error TS18048: 'unmatchedRevealedPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -50252,9 +50383,13 @@ "id": "1317", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"players\", \"99d8b5175f6512ad4acfa2c7\", \"Game Play - Player in `revealedPlayers` is not in the game players\"], but it was called with \"players\"\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts:861:41", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "479" + ], "coveredBy": [ "479" ], @@ -50273,7 +50408,7 @@ "id": "1318", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(213,66): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(215,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(213,65): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-history/game-history-record.service.ts(215,58): error TS2345: Argument of type 'Game | null' is not assignable to parameter of type 'Game'.\n Type 'null' is not assignable to type 'Game'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -50298,7 +50433,7 @@ "id": "1319", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(213,66): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-history/game-history-record.service.ts(213,65): error TS18048: 'unmatchedDeadPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -50341,7 +50476,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport { plainToInstance } from \"class-transformer\";\nimport type { Types } from \"mongoose\";\n\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GAME_HISTORY_RECORD_VOTING_RESULTS } from \"@/modules/game/enums/game-history-record.enum\";\nimport type { WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from \"@/modules/game/enums/game-play.enum\";\nimport type { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES } from \"@/modules/game/enums/player.enum\";\nimport { getAdditionalCardWithId, getNonexistentPlayer, getPlayerWithActiveAttributeName, getPlayerWithId } from \"@/modules/game/helpers/game.helper\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { GameHistoryRecordPlaySource } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema\";\nimport { GameHistoryRecordPlayVoting } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema\";\nimport { GameHistoryRecordPlay } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema\";\nimport type { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { RESOURCE_NOT_FOUND_REASONS } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\n@Injectable()\nexport class GameHistoryRecordService {\n public constructor(\n private readonly gamePlayVoteService: GamePlayVoteService,\n private readonly gameHistoryRecordRepository: GameHistoryRecordRepository,\n private readonly gameRepository: GameRepository,\n ) {}\n \n public async createGameHistoryRecord(gameHistoryRecordToInsert: GameHistoryRecordToInsert): Promise {\n await this.validateGameHistoryRecordToInsertData(gameHistoryRecordToInsert);\n return this.gameHistoryRecordRepository.create(gameHistoryRecordToInsert);\n }\n\n public async getLastGameHistoryGuardProtectsRecord(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getLastGameHistoryGuardProtectsRecord(gameId);\n }\n\n public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GAME_PLAY_ACTIONS): Promise {\n return this.gameHistoryRecordRepository.getLastGameHistoryTieInVotesRecord(gameId, action);\n }\n\n public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WITCH_POTIONS): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryWitchUsesSpecificPotionRecords(gameId, potion);\n }\n\n public async getGameHistoryVileFatherOfWolvesInfectedRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n }\n\n public async getGameHistoryJudgeRequestRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryJudgeRequestRecords(gameId);\n }\n\n public async getGameHistoryWerewolvesEatAncientRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryWerewolvesEatAncientRecords(gameId);\n }\n\n public async getGameHistoryAncientProtectedFromWerewolvesRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryAncientProtectedFromWerewolvesRecords(gameId);\n }\n\n public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GAME_PHASES): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryPhaseRecords(gameId, turn, phase);\n }\n\n public async getPreviousGameHistoryRecord(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getPreviousGameHistoryRecord(gameId);\n }\n \n public generateCurrentGameHistoryRecordToInsert(baseGame: Game, newGame: Game, play: MakeGamePlayWithRelationsDto): GameHistoryRecordToInsert {\n if (baseGame.currentPlay === null) {\n throw createNoCurrentGamePlayUnexpectedException(\"generateCurrentGameHistoryRecordToInsert\", { gameId: baseGame._id });\n }\n const gameHistoryRecordToInsert: GameHistoryRecordToInsert = {\n gameId: baseGame._id,\n turn: baseGame.turn,\n phase: baseGame.phase,\n tick: baseGame.tick,\n play: this.generateCurrentGameHistoryRecordPlayToInsert(baseGame as GameWithCurrentPlay, play),\n revealedPlayers: this.generateCurrentGameHistoryRecordRevealedPlayersToInsert(baseGame, newGame),\n deadPlayers: this.generateCurrentGameHistoryRecordDeadPlayersToInsert(baseGame, newGame),\n };\n if (gameHistoryRecordToInsert.play.votes) {\n gameHistoryRecordToInsert.play.voting = this.generateCurrentGameHistoryRecordPlayVotingToInsert(baseGame as GameWithCurrentPlay, newGame, gameHistoryRecordToInsert);\n }\n return plainToInstance(GameHistoryRecordToInsert, gameHistoryRecordToInsert, plainToInstanceDefaultOptions);\n }\n\n public async getGameHistory(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistory(gameId);\n }\n\n private generateCurrentGameHistoryRecordDeadPlayersToInsert(baseGame: Game, newGame: Game): Player[] | undefined {\n const { players: newPlayers } = newGame;\n const currentDeadPlayers = newPlayers.filter(player => {\n const matchingBasePlayer = getPlayerWithId(baseGame, player._id);\n return matchingBasePlayer?.isAlive === true && !player.isAlive;\n });\n return currentDeadPlayers.length ? currentDeadPlayers : undefined;\n }\n\n private generateCurrentGameHistoryRecordRevealedPlayersToInsert(baseGame: Game, newGame: Game): Player[] | undefined {\n const { players: newPlayers } = newGame;\n const currentRevealedPlayers = newPlayers.filter(player => {\n const matchingBasePlayer = getPlayerWithId(baseGame, player._id);\n return matchingBasePlayer?.role.isRevealed === false && player.role.isRevealed && player.isAlive;\n });\n return currentRevealedPlayers.length ? currentRevealedPlayers : undefined;\n }\n \n private generateCurrentGameHistoryRecordPlayToInsert(baseGame: GameWithCurrentPlay, play: MakeGamePlayWithRelationsDto): GameHistoryRecordPlay {\n const gameHistoryRecordPlayToInsert: GameHistoryRecordPlay = {\n source: this.generateCurrentGameHistoryRecordPlaySourceToInsert(baseGame),\n action: baseGame.currentPlay.action,\n cause: baseGame.currentPlay.cause,\n didJudgeRequestAnotherVote: play.doesJudgeRequestAnotherVote,\n targets: play.targets,\n votes: play.votes,\n chosenCard: play.chosenCard,\n chosenSide: play.chosenSide,\n };\n return plainToInstance(GameHistoryRecordPlay, toJSON(gameHistoryRecordPlayToInsert), plainToInstanceDefaultOptions);\n }\n \n private generateCurrentGameHistoryRecordPlayVotingResultToInsert(\n baseGame: GameWithCurrentPlay,\n newGame: Game,\n gameHistoryRecordToInsert: GameHistoryRecordToInsert,\n ): GAME_HISTORY_RECORD_VOTING_RESULTS {\n const sheriffPlayer = getPlayerWithActiveAttributeName(newGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF);\n const areSomePlayersDeadFromCurrentVotes = gameHistoryRecordToInsert.deadPlayers?.some(({ death }) => {\n const deathFromVoteCauses = [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED];\n return death?.cause !== undefined && deathFromVoteCauses.includes(death.cause);\n }) === true;\n if (baseGame.currentPlay.action === GAME_PLAY_ACTIONS.ELECT_SHERIFF) {\n return sheriffPlayer ? GAME_HISTORY_RECORD_VOTING_RESULTS.SHERIFF_ELECTION : GAME_HISTORY_RECORD_VOTING_RESULTS.TIE;\n }\n if (!gameHistoryRecordToInsert.play.votes || gameHistoryRecordToInsert.play.votes.length === 0) {\n return GAME_HISTORY_RECORD_VOTING_RESULTS.SKIPPED;\n }\n if (areSomePlayersDeadFromCurrentVotes) {\n return GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH;\n }\n if (baseGame.currentPlay.cause === GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) {\n return GAME_HISTORY_RECORD_VOTING_RESULTS.INCONSEQUENTIAL;\n }\n return GAME_HISTORY_RECORD_VOTING_RESULTS.TIE;\n }\n\n private generateCurrentGameHistoryRecordPlayVotingToInsert(\n baseGame: GameWithCurrentPlay,\n newGame: Game,\n gameHistoryRecordToInsert: GameHistoryRecordToInsert,\n ): GameHistoryRecordPlayVoting {\n const votes = gameHistoryRecordToInsert.play.votes ?? [];\n const nominatedPlayers = this.gamePlayVoteService.getNominatedPlayers(votes, baseGame);\n const gameHistoryRecordPlayVoting: GameHistoryRecordPlayVoting = {\n result: this.generateCurrentGameHistoryRecordPlayVotingResultToInsert(baseGame, newGame, gameHistoryRecordToInsert),\n nominatedPlayers,\n };\n return plainToInstance(GameHistoryRecordPlayVoting, gameHistoryRecordPlayVoting, plainToInstanceDefaultOptions);\n }\n \n private generateCurrentGameHistoryRecordPlaySourceToInsert(baseGame: GameWithCurrentPlay): GameHistoryRecordPlaySource {\n return plainToInstance(GameHistoryRecordPlaySource, toJSON(baseGame.currentPlay.source), plainToInstanceDefaultOptions);\n }\n\n private validateGameHistoryRecordToInsertPlayData(play: GameHistoryRecordPlay, game: Game): void {\n const unmatchedSource = getNonexistentPlayer(game, play.source.players);\n if (unmatchedSource) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedSource._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_SOURCE);\n }\n const unmatchedTarget = getNonexistentPlayer(game, play.targets?.map(target => target.player));\n if (unmatchedTarget) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedTarget._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_TARGET);\n }\n const unmatchedVoter = getNonexistentPlayer(game, play.votes?.map(vote => vote.source));\n if (unmatchedVoter) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedVoter._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE);\n }\n const unmatchedVoteTarget = getNonexistentPlayer(game, play.votes?.map(vote => vote.target));\n if (unmatchedVoteTarget) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedVoteTarget._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET);\n }\n if (play.chosenCard && !getAdditionalCardWithId(game.additionalCards, play.chosenCard._id)) {\n throw new ResourceNotFoundException(API_RESOURCES.GAME_ADDITIONAL_CARDS, play.chosenCard._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_CHOSEN_CARD);\n }\n }\n\n private async validateGameHistoryRecordToInsertData(gameHistoryRecordToInsert: GameHistoryRecordToInsert): Promise {\n const { gameId, play, revealedPlayers, deadPlayers } = gameHistoryRecordToInsert;\n const game = await this.gameRepository.findOne({ _id: gameId });\n if (game === null) {\n throw new ResourceNotFoundException(API_RESOURCES.GAMES, gameId.toString(), RESOURCE_NOT_FOUND_REASONS.UNKNOWN_GAME_PLAY_GAME_ID);\n }\n const unmatchedRevealedPlayer = getNonexistentPlayer(game, revealedPlayers);\n if (unmatchedRevealedPlayer) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedRevealedPlayer._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_REVEALED_PLAYER);\n }\n const unmatchedDeadPlayer = getNonexistentPlayer(game, deadPlayers);\n if (unmatchedDeadPlayer) {\n throw new ResourceNotFoundException(API_RESOURCES.PLAYERS, unmatchedDeadPlayer._id.toString(), RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_DEAD_PLAYER);\n }\n this.validateGameHistoryRecordToInsertPlayData(play, game);\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport { plainToInstance } from \"class-transformer\";\nimport type { Types } from \"mongoose\";\n\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GameHistoryRecordVotingResults } from \"@/modules/game/enums/game-history-record.enum\";\nimport type { WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { GamePlayActions, GamePlayCauses } from \"@/modules/game/enums/game-play.enum\";\nimport type { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerAttributeNames, PlayerDeathCauses } from \"@/modules/game/enums/player.enum\";\nimport { getAdditionalCardWithId, getNonexistentPlayer, getPlayerWithActiveAttributeName, getPlayerWithId } from \"@/modules/game/helpers/game.helper\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { GameHistoryRecordPlaySource } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-source.schema\";\nimport { GameHistoryRecordPlayVoting } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play-voting.schema\";\nimport { GameHistoryRecordPlay } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema\";\nimport type { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { ResourceNotFoundReasons } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\n@Injectable()\nexport class GameHistoryRecordService {\n public constructor(\n private readonly gamePlayVoteService: GamePlayVoteService,\n private readonly gameHistoryRecordRepository: GameHistoryRecordRepository,\n private readonly gameRepository: GameRepository,\n ) {}\n \n public async createGameHistoryRecord(gameHistoryRecordToInsert: GameHistoryRecordToInsert): Promise {\n await this.validateGameHistoryRecordToInsertData(gameHistoryRecordToInsert);\n return this.gameHistoryRecordRepository.create(gameHistoryRecordToInsert);\n }\n\n public async getLastGameHistoryGuardProtectsRecord(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getLastGameHistoryGuardProtectsRecord(gameId);\n }\n\n public async getLastGameHistoryTieInVotesRecord(gameId: Types.ObjectId, action: GamePlayActions): Promise {\n return this.gameHistoryRecordRepository.getLastGameHistoryTieInVotesRecord(gameId, action);\n }\n\n public async getGameHistoryWitchUsesSpecificPotionRecords(gameId: Types.ObjectId, potion: WitchPotions): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryWitchUsesSpecificPotionRecords(gameId, potion);\n }\n\n public async getGameHistoryVileFatherOfWolvesInfectedRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n }\n\n public async getGameHistoryJudgeRequestRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryJudgeRequestRecords(gameId);\n }\n\n public async getGameHistoryWerewolvesEatAncientRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryWerewolvesEatAncientRecords(gameId);\n }\n\n public async getGameHistoryAncientProtectedFromWerewolvesRecords(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryAncientProtectedFromWerewolvesRecords(gameId);\n }\n\n public async getGameHistoryPhaseRecords(gameId: Types.ObjectId, turn: number, phase: GamePhases): Promise {\n return this.gameHistoryRecordRepository.getGameHistoryPhaseRecords(gameId, turn, phase);\n }\n\n public async getPreviousGameHistoryRecord(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getPreviousGameHistoryRecord(gameId);\n }\n \n public generateCurrentGameHistoryRecordToInsert(baseGame: Game, newGame: Game, play: MakeGamePlayWithRelationsDto): GameHistoryRecordToInsert {\n if (baseGame.currentPlay === null) {\n throw createNoCurrentGamePlayUnexpectedException(\"generateCurrentGameHistoryRecordToInsert\", { gameId: baseGame._id });\n }\n const gameHistoryRecordToInsert: GameHistoryRecordToInsert = {\n gameId: baseGame._id,\n turn: baseGame.turn,\n phase: baseGame.phase,\n tick: baseGame.tick,\n play: this.generateCurrentGameHistoryRecordPlayToInsert(baseGame as GameWithCurrentPlay, play),\n revealedPlayers: this.generateCurrentGameHistoryRecordRevealedPlayersToInsert(baseGame, newGame),\n deadPlayers: this.generateCurrentGameHistoryRecordDeadPlayersToInsert(baseGame, newGame),\n };\n if (gameHistoryRecordToInsert.play.votes) {\n gameHistoryRecordToInsert.play.voting = this.generateCurrentGameHistoryRecordPlayVotingToInsert(baseGame as GameWithCurrentPlay, newGame, gameHistoryRecordToInsert);\n }\n return plainToInstance(GameHistoryRecordToInsert, gameHistoryRecordToInsert, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n\n public async getGameHistory(gameId: Types.ObjectId): Promise {\n return this.gameHistoryRecordRepository.getGameHistory(gameId);\n }\n\n private generateCurrentGameHistoryRecordDeadPlayersToInsert(baseGame: Game, newGame: Game): Player[] | undefined {\n const { players: newPlayers } = newGame;\n const currentDeadPlayers = newPlayers.filter(player => {\n const matchingBasePlayer = getPlayerWithId(baseGame, player._id);\n return matchingBasePlayer?.isAlive === true && !player.isAlive;\n });\n return currentDeadPlayers.length ? currentDeadPlayers : undefined;\n }\n\n private generateCurrentGameHistoryRecordRevealedPlayersToInsert(baseGame: Game, newGame: Game): Player[] | undefined {\n const { players: newPlayers } = newGame;\n const currentRevealedPlayers = newPlayers.filter(player => {\n const matchingBasePlayer = getPlayerWithId(baseGame, player._id);\n return matchingBasePlayer?.role.isRevealed === false && player.role.isRevealed && player.isAlive;\n });\n return currentRevealedPlayers.length ? currentRevealedPlayers : undefined;\n }\n \n private generateCurrentGameHistoryRecordPlayToInsert(baseGame: GameWithCurrentPlay, play: MakeGamePlayWithRelationsDto): GameHistoryRecordPlay {\n const gameHistoryRecordPlayToInsert: GameHistoryRecordPlay = {\n source: this.generateCurrentGameHistoryRecordPlaySourceToInsert(baseGame),\n action: baseGame.currentPlay.action,\n cause: baseGame.currentPlay.cause,\n didJudgeRequestAnotherVote: play.doesJudgeRequestAnotherVote,\n targets: play.targets,\n votes: play.votes,\n chosenCard: play.chosenCard,\n chosenSide: play.chosenSide,\n };\n return plainToInstance(GameHistoryRecordPlay, toJSON(gameHistoryRecordPlayToInsert), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n \n private generateCurrentGameHistoryRecordPlayVotingResultToInsert(\n baseGame: GameWithCurrentPlay,\n newGame: Game,\n gameHistoryRecordToInsert: GameHistoryRecordToInsert,\n ): GameHistoryRecordVotingResults {\n const sheriffPlayer = getPlayerWithActiveAttributeName(newGame, PlayerAttributeNames.SHERIFF);\n const areSomePlayersDeadFromCurrentVotes = gameHistoryRecordToInsert.deadPlayers?.some(({ death }) => {\n const deathFromVoteCauses = [PlayerDeathCauses.VOTE, PlayerDeathCauses.VOTE_SCAPEGOATED];\n return death?.cause !== undefined && deathFromVoteCauses.includes(death.cause);\n }) === true;\n if (baseGame.currentPlay.action === GamePlayActions.ELECT_SHERIFF) {\n return sheriffPlayer ? GameHistoryRecordVotingResults.SHERIFF_ELECTION : GameHistoryRecordVotingResults.TIE;\n }\n if (!gameHistoryRecordToInsert.play.votes || gameHistoryRecordToInsert.play.votes.length === 0) {\n return GameHistoryRecordVotingResults.SKIPPED;\n }\n if (areSomePlayersDeadFromCurrentVotes) {\n return GameHistoryRecordVotingResults.DEATH;\n }\n if (baseGame.currentPlay.cause === GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) {\n return GameHistoryRecordVotingResults.INCONSEQUENTIAL;\n }\n return GameHistoryRecordVotingResults.TIE;\n }\n\n private generateCurrentGameHistoryRecordPlayVotingToInsert(\n baseGame: GameWithCurrentPlay,\n newGame: Game,\n gameHistoryRecordToInsert: GameHistoryRecordToInsert,\n ): GameHistoryRecordPlayVoting {\n const votes = gameHistoryRecordToInsert.play.votes ?? [];\n const nominatedPlayers = this.gamePlayVoteService.getNominatedPlayers(votes, baseGame);\n const gameHistoryRecordPlayVoting: GameHistoryRecordPlayVoting = {\n result: this.generateCurrentGameHistoryRecordPlayVotingResultToInsert(baseGame, newGame, gameHistoryRecordToInsert),\n nominatedPlayers,\n };\n return plainToInstance(GameHistoryRecordPlayVoting, gameHistoryRecordPlayVoting, PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n \n private generateCurrentGameHistoryRecordPlaySourceToInsert(baseGame: GameWithCurrentPlay): GameHistoryRecordPlaySource {\n return plainToInstance(GameHistoryRecordPlaySource, toJSON(baseGame.currentPlay.source), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n }\n\n private validateGameHistoryRecordToInsertPlayData(play: GameHistoryRecordPlay, game: Game): void {\n const unmatchedSource = getNonexistentPlayer(game, play.source.players);\n if (unmatchedSource) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedSource._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_SOURCE);\n }\n const unmatchedTarget = getNonexistentPlayer(game, play.targets?.map(target => target.player));\n if (unmatchedTarget) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedTarget._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_TARGET);\n }\n const unmatchedVoter = getNonexistentPlayer(game, play.votes?.map(vote => vote.source));\n if (unmatchedVoter) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedVoter._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE);\n }\n const unmatchedVoteTarget = getNonexistentPlayer(game, play.votes?.map(vote => vote.target));\n if (unmatchedVoteTarget) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedVoteTarget._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_TARGET);\n }\n if (play.chosenCard && !getAdditionalCardWithId(game.additionalCards, play.chosenCard._id)) {\n throw new ResourceNotFoundException(ApiResources.GAME_ADDITIONAL_CARDS, play.chosenCard._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_CHOSEN_CARD);\n }\n }\n\n private async validateGameHistoryRecordToInsertData(gameHistoryRecordToInsert: GameHistoryRecordToInsert): Promise {\n const { gameId, play, revealedPlayers, deadPlayers } = gameHistoryRecordToInsert;\n const game = await this.gameRepository.findOne({ _id: gameId });\n if (game === null) {\n throw new ResourceNotFoundException(ApiResources.GAMES, gameId.toString(), ResourceNotFoundReasons.UNKNOWN_GAME_PLAY_GAME_ID);\n }\n const unmatchedRevealedPlayer = getNonexistentPlayer(game, revealedPlayers);\n if (unmatchedRevealedPlayer) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedRevealedPlayer._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_REVEALED_PLAYER);\n }\n const unmatchedDeadPlayer = getNonexistentPlayer(game, deadPlayers);\n if (unmatchedDeadPlayer) {\n throw new ResourceNotFoundException(ApiResources.PLAYERS, unmatchedDeadPlayer._id.toString(), ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_DEAD_PLAYER);\n }\n this.validateGameHistoryRecordToInsertPlayData(play, game);\n }\n}" }, "src/modules/game/providers/services/game-phase/game-phase.service.ts": { "language": "typescript", @@ -50355,7 +50490,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "839" + "840" ], "location": { "end": { @@ -50372,15 +50507,15 @@ "id": "1322", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: {\"_id\": \"c71b2c086fe2edc8a0af266a\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Cassie\", \"position\": 7090559539740672, \"role\": {\"current\": \"vile-father-of-wolves\", \"isRevealed\": false, \"original\": \"vile-father-of-wolves\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a80dc1a8ce1588c8eed5bbd5\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T07:50:24.912Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 4999068663152640}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"c71b2c086fe2edc8a0af266a\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Cassie\", \"position\": 7090559539740672, \"role\": {\"current\": \"vile-father-of-wolves\", \"isRevealed\": false, \"original\": \"vile-father-of-wolves\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"0cdb64bbeddacb6d749cebf8\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Jeremy\", \"position\": 2122043422146560, \"role\": {\"current\": \"pied-piper\", \"isRevealed\": false, \"original\": \"pied-piper\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"f8efb5bc2aed6aeaecfecefb\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Jayson\", \"position\": 2641085648076800, \"role\": {\"current\": \"three-brothers\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"werewolves\"}}, {\"_id\": \"2e8eeef2c31291577733f5fb\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Jeremy\", \"position\": 341279934251008, \"role\": {\"current\": \"fox\", \"isRevealed\": false, \"original\": \"big-bad-wolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"villagers\"}}], \"status\": \"playing\", \"tick\": 7604616604680192, \"turn\": 1168110434385920, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T09:23:34.498Z, \"victory\": undefined}\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:77:96)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: {\"_id\": \"eaf48a953d6ccfebbf36190c\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Grover\", \"position\": 8474298280837120, \"role\": {\"current\": \"angel\", \"isRevealed\": false, \"original\": \"stuttering-judge\"}, \"side\": {\"current\": \"villagers\", \"original\": \"werewolves\"}}, {\"_id\": \"dd61afe9e16fa840671fdfba\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T05:05:39.426Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 2027692677398528}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 1}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"eaf48a953d6ccfebbf36190c\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Grover\", \"position\": 8474298280837120, \"role\": {\"current\": \"angel\", \"isRevealed\": false, \"original\": \"stuttering-judge\"}, \"side\": {\"current\": \"villagers\", \"original\": \"werewolves\"}}, {\"_id\": \"370bbbec1c2f1eeaac4f5c77\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Ciara\", \"position\": 1561895700004864, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": true, \"original\": \"villager\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"e6efee13effaded1e44ec4e8\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Stephania\", \"position\": 5218850217918464, \"role\": {\"current\": \"thief\", \"isRevealed\": true, \"original\": \"cupid\"}, \"side\": {\"current\": \"villagers\", \"original\": \"werewolves\"}}, {\"_id\": \"0e1774e30c449af64dcd71fa\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Fausto\", \"position\": 7349069661863936, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 7038795549507584, \"turn\": 2966825044279296, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T19:04:27.004Z, \"victory\": undefined}\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:77:96)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "839" + "840" ], "coveredBy": [ - "839" + "840" ], "location": { "end": { @@ -50402,8 +50537,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { @@ -50420,20 +50555,20 @@ "id": "1324", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 4\n\n@@ -76,37 +76,29 @@\n },\n \"votes\": VotesGameOptions {\n \"canBeSkipped\": true,\n },\n },\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 894190556807168,\n- \"turn\": 8466727104937985,\n+ \"turn\": 8466727104937984,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-25T19:55:49.310Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 4\n\n@@ -76,37 +76,29 @@\n },\n \"votes\": VotesGameOptions {\n \"canBeSkipped\": false,\n },\n },\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 6939009320222720,\n- \"turn\": 1661720254742529,\n+ \"turn\": 1661720254742528,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-28T12:36:02.519Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "840" + "841" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 62, + "column": 61, "line": 30 }, "start": { @@ -50446,20 +50581,20 @@ "id": "1325", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 4\n+ Received + 12\n\n@@ -76,29 +76,37 @@\n },\n \"votes\": VotesGameOptions {\n \"canBeSkipped\": true,\n },\n },\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"over\",\n \"tick\": 7426573187678208,\n- \"turn\": 2671661681737728,\n+ \"turn\": 2671661681737729,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n+ \"action\": \"look\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-26T01:49:01.855Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:113:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 4\n+ Received + 12\n\n@@ -76,29 +76,37 @@\n },\n \"votes\": VotesGameOptions {\n \"canBeSkipped\": false,\n },\n },\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 3849891539320832,\n- \"turn\": 880295685390336,\n+ \"turn\": 880295685390337,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n+ \"action\": \"look\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-28T00:51:50.305Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:113:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "841" + "842" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 62, + "column": 61, "line": 30 }, "start": { @@ -50471,21 +50606,21 @@ { "id": "1326", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.phase !== GAME_PHASES.NIGHT", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 4\n\n@@ -76,37 +76,29 @@\n },\n \"votes\": VotesGameOptions {\n \"canBeSkipped\": true,\n },\n },\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"players\": Array [],\n \"status\": \"canceled\",\n \"tick\": 5407944545927168,\n- \"turn\": 7954890135437313,\n+ \"turn\": 7954890135437312,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-26T03:11:52.512Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "clonedGame.phase !== GamePhases.NIGHT", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 4\n\n@@ -76,37 +76,29 @@\n },\n \"votes\": VotesGameOptions {\n \"canBeSkipped\": false,\n },\n },\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 4768804410228736,\n- \"turn\": 8705263058026497,\n+ \"turn\": 8705263058026496,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-27T20:39:05.623Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "840" + "841" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 62, + "column": 61, "line": 30 }, "start": { @@ -50498,20 +50633,20 @@ "id": "1327", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [],\n \"status\": \"canceled\",\n \"tick\": 2230626308587520,\n- \"turn\": 281762905194496,\n+ \"turn\": 281762905194497,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:113:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 3501146180157440,\n- \"turn\": 6452968163377152,\n+ \"turn\": 6452968163377153,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:113:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "841" + "842" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 47, + "column": 46, "line": 31 }, "start": { @@ -50524,20 +50659,20 @@ "id": "1328", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"over\",\n \"tick\": 4025633613021184,\n- \"turn\": 2642351820374017,\n+ \"turn\": 2642351820374016,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"canceled\",\n \"tick\": 7917786867171328,\n- \"turn\": 8818442805182465,\n+ \"turn\": 8818442805182464,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "840" + "841" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 47, + "column": 46, "line": 31 }, "start": { @@ -50549,21 +50684,21 @@ { "id": "1329", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.phase !== GAME_PHASES.NIGHT", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"canceled\",\n \"tick\": 3971607978573824,\n- \"turn\": 3121266072485889,\n+ \"turn\": 3121266072485888,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "clonedGame.phase !== GamePhases.NIGHT", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"canceled\",\n \"tick\": 8174943690817536,\n- \"turn\": 1022586330808321,\n+ \"turn\": 1022586330808320,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "840" + "841" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 47, + "column": 46, "line": 31 }, "start": { @@ -50576,15 +50711,15 @@ "id": "1330", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"canceled\",\n \"tick\": 5369958582190080,\n- \"turn\": 2344120708235265,\n+ \"turn\": 2344120708235264,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 1969637407326208,\n- \"turn\": 7174111323226113,\n+ \"turn\": 7174111323226112,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "840" + "841" ], "coveredBy": [ - "840" + "841" ], "location": { "end": { @@ -50592,7 +50727,7 @@ "line": 33 }, "start": { - "column": 49, + "column": 48, "line": 31 } } @@ -50601,15 +50736,15 @@ "id": "1331", "mutatorName": "UpdateOperator", "replacement": "clonedGame.turn--", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"over\",\n \"tick\": 6723971145793536,\n- \"turn\": 7372623163949057,\n+ \"turn\": 7372623163949055,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -80,11 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 7660372043497472,\n- \"turn\": 8523167733645313,\n+ \"turn\": 8523167733645311,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "840" + "841" ], "coveredBy": [ - "840" + "841" ], "location": { "end": { @@ -50626,20 +50761,20 @@ "id": "1332", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -91,14 +91,22 @@\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n+ \"action\": \"look\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-25T18:24:13.467Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:113:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -91,14 +91,22 @@\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n+ \"action\": \"look\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-27T20:15:10.449Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:113:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "841" + "842" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 70, + "column": 69, "line": 36 }, "start": { @@ -50652,16 +50787,20 @@ "id": "1333", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -91,22 +91,14 @@\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-28T04:48:41.628Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], - "coveredBy": [ - "840", + "killedBy": [ "841" ], + "coveredBy": [ + "841", + "842" + ], "location": { "end": { - "column": 70, + "column": 69, "line": 36 }, "start": { @@ -50673,21 +50812,17 @@ { "id": "1334", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.phase !== GAME_PHASES.NIGHT", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -91,22 +91,14 @@\n \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ],\n \"updatedAt\": 2023-08-26T05:44:26.272Z,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "replacement": "clonedGame.phase !== GamePhases.NIGHT", + "status": "Timeout", "static": false, - "killedBy": [ - "840" - ], + "killedBy": [], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { - "column": 70, + "column": 69, "line": 36 }, "start": { @@ -50700,16 +50835,16 @@ "id": "1335", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 26\n+ Received + 1\n\n@@ -81,34 +81,9 @@\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"playing\",\n \"tick\": 4411635355615232,\n \"turn\": 3127975578959873,\n- \"upcomingPlays\": Array [\n- GamePlay {\n- \"action\": \"shoot\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n- \"players\": undefined,\n- },\n- },\n- ],\n+ \"upcomingPlays\": Array [],\n \"updatedAt\": 2023-08-26T17:53:12.568Z,\n \"victory\": undefined,\n }\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 26\n+ Received + 1\n\n@@ -81,34 +81,9 @@\n \"phase\": \"night\",\n \"players\": Array [],\n \"status\": \"canceled\",\n \"tick\": 2195411446005760,\n \"turn\": 8279565434617857,\n- \"upcomingPlays\": Array [\n- GamePlay {\n- \"action\": \"shoot\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n- \"players\": undefined,\n- },\n- },\n- ],\n+ \"upcomingPlays\": Array [],\n \"updatedAt\": 2023-08-27T17:23:25.870Z,\n \"victory\": undefined,\n }\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:102:98)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "840" + "841" ], "coveredBy": [ - "840", - "841" + "841", + "842" ], "location": { "end": { @@ -50731,8 +50866,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "842", - "843" + "843", + "844" ], "location": { "end": { @@ -50749,20 +50884,20 @@ "id": "1337", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"edbed75e4ab24b98afb85ab9\", \"additionalCards\": undefined, \"createdAt\": 2023-08-25T23:43:59.438Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 951411437207552}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"37b376a56b3d968bcabc2c2d\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Kaitlyn\", \"position\": 8239955530743808, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 3066402304950272, \"turn\": 1235478558801920, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T12:15:46.895Z, \"victory\": undefined}\nReceived: undefined\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:122:113)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"957c16f4126fdaa86db8c2da\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T15:49:22.225Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 5050630232080384}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 5}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"d817a479ffa3eb3fcdb2e384\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Morton\", \"position\": 8664978483576832, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 3770441179070464, \"turn\": 7216836542201856, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T21:10:24.126Z, \"victory\": undefined}\nReceived: undefined\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:122:113)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "842" + "843" ], "coveredBy": [ - "842", - "843" + "843", + "844" ], "location": { "end": { - "column": 109, + "column": 107, "line": 44 }, "start": { @@ -50775,20 +50910,20 @@ "id": "1338", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:131:79)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:131:79)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "843" + "844" ], "coveredBy": [ - "842", - "843" + "843", + "844" ], "location": { "end": { - "column": 109, + "column": 107, "line": 44 }, "start": { @@ -50801,15 +50936,15 @@ "id": "1339", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:131:79)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:131:79)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "843" + "844" ], "coveredBy": [ - "843" + "844" ], "location": { "end": { @@ -50817,7 +50952,7 @@ "line": 46 }, "start": { - "column": 111, + "column": 109, "line": 44 } } @@ -50831,8 +50966,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "844", - "845" + "845", + "846" ], "location": { "end": { @@ -50854,8 +50989,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "844", - "845" + "845", + "846" ], "location": { "end": { @@ -50877,8 +51012,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "844", - "845" + "845", + "846" ], "location": { "end": { @@ -50900,10 +51035,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "845" + "846" ], "coveredBy": [ - "845" + "846" ], "location": { "end": { @@ -50920,20 +51055,20 @@ "id": "1344", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"85a7e54fd22eea45c1b3aede\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T07:44:02.393Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 3381336511348736}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"007845cfc9772f5f4cbcaeeb\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Rebekah\", \"position\": 390562563751936, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 2799250725404672, \"turn\": 508294848315392, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T07:59:04.957Z, \"victory\": undefined}\nReceived: undefined\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:140:115)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"ef9ccdcddbdcf5ca0fd735a8\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T00:57:57.725Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 4}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 19621583257600}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [{\"_id\": \"d41bbcec9b191ab5aefcdb3f\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Lou\", \"position\": 3456445978771456, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 8460643210362880, \"turn\": 6686469806620672, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T11:06:25.223Z, \"victory\": undefined}\nReceived: undefined\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:140:115)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "844" + "845" ], "coveredBy": [ - "844", - "845" + "845", + "846" ], "location": { "end": { - "column": 115, + "column": 113, "line": 57 }, "start": { @@ -50946,16 +51081,20 @@ "id": "1345", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:158:83)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "846" + ], "coveredBy": [ - "844", - "845" + "845", + "846" ], "location": { "end": { - "column": 115, + "column": 113, "line": 57 }, "start": { @@ -50968,15 +51107,15 @@ "id": "1346", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:158:83)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:158:83)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "845" + "846" ], "coveredBy": [ - "845" + "846" ], "location": { "end": { @@ -50984,7 +51123,7 @@ "line": 59 }, "start": { - "column": 117, + "column": 115, "line": 57 } } @@ -50998,8 +51137,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "846", - "847" + "847", + "848" ], "location": { "end": { @@ -51016,20 +51155,16 @@ "id": "1348", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:193:90)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "847" - ], + "killedBy": [], "coveredBy": [ - "846", - "847" + "847", + "848" ], "location": { "end": { - "column": 47, + "column": 46, "line": 66 }, "start": { @@ -51042,20 +51177,20 @@ "id": "1349", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:184:92)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:184:92)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "846" + "847" ], "coveredBy": [ - "846", - "847" + "847", + "848" ], "location": { "end": { - "column": 47, + "column": 46, "line": 66 }, "start": { @@ -51067,21 +51202,21 @@ { "id": "1350", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.phase !== GAME_PHASES.NIGHT", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:184:92)", + "replacement": "clonedGame.phase !== GamePhases.NIGHT", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:184:92)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "846" + "847" ], "coveredBy": [ - "846", - "847" + "847", + "848" ], "location": { "end": { - "column": 47, + "column": 46, "line": 66 }, "start": { @@ -51094,11 +51229,15 @@ "id": "1351", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts:184:92)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "847" + ], "coveredBy": [ - "846" + "847" ], "location": { "end": { @@ -51106,13 +51245,13 @@ "line": 68 }, "start": { - "column": 49, + "column": 48, "line": 66 } } } ], - "source": "import { Injectable } from \"@nestjs/common\";\n\nimport { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { doesPlayerHaveActiveAttributeWithName, getActivePlayerAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\n\n@Injectable()\nexport class GamePhaseService {\n public constructor(\n private readonly playerAttributeService: PlayerAttributeService,\n private readonly gamePlayService: GamePlayService,\n ) {}\n\n public async applyEndingGamePhasePlayerAttributesOutcomesToPlayers(game: Game): Promise {\n let clonedGame = createGame(game);\n for (const player of clonedGame.players) {\n clonedGame = await this.applyEndingGamePhasePlayerAttributesOutcomesToPlayer(player, clonedGame);\n }\n return clonedGame;\n }\n\n public async switchPhaseAndAppendGamePhaseUpcomingPlays(game: Game): Promise {\n const clonedGame = createGame(game);\n clonedGame.phase = clonedGame.phase === GAME_PHASES.NIGHT ? GAME_PHASES.DAY : GAME_PHASES.NIGHT;\n if (clonedGame.phase === GAME_PHASES.NIGHT) {\n clonedGame.turn++;\n }\n const upcomingNightPlays = await this.gamePlayService.getUpcomingNightPlays(clonedGame);\n const upcomingDayPlays = this.gamePlayService.getUpcomingDayPlays();\n const phaseUpcomingPlays = clonedGame.phase === GAME_PHASES.NIGHT ? upcomingNightPlays : upcomingDayPlays;\n clonedGame.upcomingPlays = [...clonedGame.upcomingPlays, ...phaseUpcomingPlays];\n return clonedGame;\n }\n\n private async applyEndingDayPlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise {\n let clonedGame = createGame(game);\n const clonedPlayer = createPlayer(player);\n if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PLAYER_ATTRIBUTE_NAMES.CONTAMINATED, clonedGame)) {\n clonedGame = await this.playerAttributeService.applyContaminatedAttributeOutcomes(clonedPlayer, clonedGame);\n }\n return clonedGame;\n }\n\n private async applyEndingNightPlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise {\n let clonedGame = createGame(game);\n const clonedPlayer = createPlayer(player);\n const eatenAttribute = getActivePlayerAttributeWithName(clonedPlayer, PLAYER_ATTRIBUTE_NAMES.EATEN, clonedGame);\n if (eatenAttribute) {\n clonedGame = await this.playerAttributeService.applyEatenAttributeOutcomes(clonedPlayer, clonedGame, eatenAttribute);\n }\n if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PLAYER_ATTRIBUTE_NAMES.DRANK_DEATH_POTION, clonedGame)) {\n clonedGame = await this.playerAttributeService.applyDrankDeathPotionAttributeOutcomes(clonedPlayer, clonedGame);\n }\n return clonedGame;\n }\n \n private async applyEndingGamePhasePlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise {\n const clonedGame = createGame(game);\n const clonedPlayer = createPlayer(player);\n if (clonedGame.phase === GAME_PHASES.NIGHT) {\n return this.applyEndingNightPlayerAttributesOutcomesToPlayer(clonedPlayer, clonedGame);\n }\n return this.applyEndingDayPlayerAttributesOutcomesToPlayer(clonedPlayer, clonedGame);\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\n\nimport { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { doesPlayerHaveActiveAttributeWithName, getActivePlayerAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\n\n@Injectable()\nexport class GamePhaseService {\n public constructor(\n private readonly playerAttributeService: PlayerAttributeService,\n private readonly gamePlayService: GamePlayService,\n ) {}\n\n public async applyEndingGamePhasePlayerAttributesOutcomesToPlayers(game: Game): Promise {\n let clonedGame = createGame(game);\n for (const player of clonedGame.players) {\n clonedGame = await this.applyEndingGamePhasePlayerAttributesOutcomesToPlayer(player, clonedGame);\n }\n return clonedGame;\n }\n\n public async switchPhaseAndAppendGamePhaseUpcomingPlays(game: Game): Promise {\n const clonedGame = createGame(game);\n clonedGame.phase = clonedGame.phase === GamePhases.NIGHT ? GamePhases.DAY : GamePhases.NIGHT;\n if (clonedGame.phase === GamePhases.NIGHT) {\n clonedGame.turn++;\n }\n const upcomingNightPlays = await this.gamePlayService.getUpcomingNightPlays(clonedGame);\n const upcomingDayPlays = this.gamePlayService.getUpcomingDayPlays();\n const phaseUpcomingPlays = clonedGame.phase === GamePhases.NIGHT ? upcomingNightPlays : upcomingDayPlays;\n clonedGame.upcomingPlays = [...clonedGame.upcomingPlays, ...phaseUpcomingPlays];\n return clonedGame;\n }\n\n private async applyEndingDayPlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise {\n let clonedGame = createGame(game);\n const clonedPlayer = createPlayer(player);\n if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PlayerAttributeNames.CONTAMINATED, clonedGame)) {\n clonedGame = await this.playerAttributeService.applyContaminatedAttributeOutcomes(clonedPlayer, clonedGame);\n }\n return clonedGame;\n }\n\n private async applyEndingNightPlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise {\n let clonedGame = createGame(game);\n const clonedPlayer = createPlayer(player);\n const eatenAttribute = getActivePlayerAttributeWithName(clonedPlayer, PlayerAttributeNames.EATEN, clonedGame);\n if (eatenAttribute) {\n clonedGame = await this.playerAttributeService.applyEatenAttributeOutcomes(clonedPlayer, clonedGame, eatenAttribute);\n }\n if (doesPlayerHaveActiveAttributeWithName(clonedPlayer, PlayerAttributeNames.DRANK_DEATH_POTION, clonedGame)) {\n clonedGame = await this.playerAttributeService.applyDrankDeathPotionAttributeOutcomes(clonedPlayer, clonedGame);\n }\n return clonedGame;\n }\n \n private async applyEndingGamePhasePlayerAttributesOutcomesToPlayer(player: Player, game: Game): Promise {\n const clonedGame = createGame(game);\n const clonedPlayer = createPlayer(player);\n if (clonedGame.phase === GamePhases.NIGHT) {\n return this.applyEndingNightPlayerAttributesOutcomesToPlayer(clonedPlayer, clonedGame);\n }\n return this.applyEndingDayPlayerAttributesOutcomesToPlayer(clonedPlayer, clonedGame);\n }\n}" }, "src/modules/game/providers/services/game-play/game-play-maker.service.ts": { "language": "typescript", @@ -51121,7 +51260,7 @@ "id": "1352", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: Any\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:74:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: Any\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:74:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 94, "static": true, @@ -51239,7 +51378,7 @@ "id": "1353", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(32,33): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(32,32): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -51341,11 +51480,11 @@ ], "location": { "end": { - "column": 84, + "column": 83, "line": 32 }, "start": { - "column": 33, + "column": 32, "line": 32 } } @@ -51354,7 +51493,7 @@ "id": "1354", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(33,32): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(33,31): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -51456,11 +51595,11 @@ ], "location": { "end": { - "column": 79, + "column": 78, "line": 33 }, "start": { - "column": 32, + "column": 31, "line": 33 } } @@ -51469,7 +51608,7 @@ "id": "1355", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(34,34): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(34,33): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -51571,11 +51710,11 @@ ], "location": { "end": { - "column": 84, + "column": 83, "line": 34 }, "start": { - "column": 34, + "column": 33, "line": 34 } } @@ -51584,7 +51723,7 @@ "id": "1356", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(35,24): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(35,23): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -51686,11 +51825,11 @@ ], "location": { "end": { - "column": 66, + "column": 65, "line": 35 }, "start": { - "column": 24, + "column": 23, "line": 35 } } @@ -51699,7 +51838,7 @@ "id": "1357", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(36,25): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(36,24): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -51801,11 +51940,11 @@ ], "location": { "end": { - "column": 69, + "column": 68, "line": 36 }, "start": { - "column": 25, + "column": 24, "line": 36 } } @@ -51814,7 +51953,7 @@ "id": "1358", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(37,30): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(37,29): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -51916,11 +52055,11 @@ ], "location": { "end": { - "column": 78, + "column": 77, "line": 37 }, "start": { - "column": 30, + "column": 29, "line": 37 } } @@ -51929,7 +52068,7 @@ "id": "1359", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(38,25): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(38,24): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52031,11 +52170,11 @@ ], "location": { "end": { - "column": 74, + "column": 73, "line": 38 }, "start": { - "column": 25, + "column": 24, "line": 38 } } @@ -52044,7 +52183,7 @@ "id": "1360", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(39,26): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(39,25): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52146,11 +52285,11 @@ ], "location": { "end": { - "column": 76, + "column": 75, "line": 39 }, "start": { - "column": 26, + "column": 25, "line": 39 } } @@ -52159,7 +52298,7 @@ "id": "1361", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(40,25): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(40,24): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52261,11 +52400,11 @@ ], "location": { "end": { - "column": 71, + "column": 70, "line": 40 }, "start": { - "column": 25, + "column": 24, "line": 40 } } @@ -52274,7 +52413,7 @@ "id": "1362", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(41,23): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(41,22): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52376,11 +52515,11 @@ ], "location": { "end": { - "column": 65, + "column": 64, "line": 41 }, "start": { - "column": 23, + "column": 22, "line": 41 } } @@ -52389,7 +52528,7 @@ "id": "1363", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(42,30): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(42,29): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52491,11 +52630,11 @@ ], "location": { "end": { - "column": 84, + "column": 83, "line": 42 }, "start": { - "column": 30, + "column": 29, "line": 42 } } @@ -52504,7 +52643,7 @@ "id": "1364", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(43,28): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(43,27): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52606,11 +52745,11 @@ ], "location": { "end": { - "column": 79, + "column": 78, "line": 43 }, "start": { - "column": 28, + "column": 27, "line": 43 } } @@ -52619,7 +52758,7 @@ "id": "1365", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(44,29): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(44,28): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52721,11 +52860,11 @@ ], "location": { "end": { - "column": 81, + "column": 80, "line": 44 }, "start": { - "column": 29, + "column": 28, "line": 44 } } @@ -52734,7 +52873,7 @@ "id": "1366", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(45,25): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(45,24): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52836,11 +52975,11 @@ ], "location": { "end": { - "column": 74, + "column": 73, "line": 45 }, "start": { - "column": 25, + "column": 24, "line": 45 } } @@ -52849,7 +52988,7 @@ "id": "1367", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(46,26): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(46,25): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -52951,11 +53090,11 @@ ], "location": { "end": { - "column": 71, + "column": 70, "line": 46 }, "start": { - "column": 26, + "column": 25, "line": 46 } } @@ -52964,7 +53103,7 @@ "id": "1368", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(47,25): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(47,24): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -53066,11 +53205,11 @@ ], "location": { "end": { - "column": 68, + "column": 67, "line": 47 }, "start": { - "column": 25, + "column": 24, "line": 47 } } @@ -53079,7 +53218,7 @@ "id": "1369", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(48,39): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(48,37): error TS2322: Type '() => undefined' is not assignable to type '(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay) => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": true, "killedBy": [], @@ -53181,11 +53320,11 @@ ], "location": { "end": { - "column": 89, + "column": 87, "line": 48 }, "start": { - "column": 39, + "column": 37, "line": 48 } } @@ -53237,9 +53376,13 @@ "id": "1371", "mutatorName": "BooleanLiteral", "replacement": "game.currentPlay", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:133:91)", + "status": "Killed", + "testsCompleted": 22, "static": false, - "killedBy": [], + "killedBy": [ + "263" + ], "coveredBy": [ "263", "264", @@ -53907,7 +54050,7 @@ "id": "1395", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -87,11 +87,19 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"2442c62e83a1b26de19dfc82\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"sheriff\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"all\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": false,\n \"name\": \"Shad\",\n \"position\": 1645227733417984,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:333:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -87,11 +87,19 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"586a1cbaa79bebd164aae0fb\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"sheriff\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"all\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Avery\",\n \"position\": 3902157365444608,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:333:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -53956,7 +54099,7 @@ "id": "1397", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:367:64)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:367:64)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -53974,7 +54117,7 @@ "line": 99 }, "start": { - "column": 96, + "column": 94, "line": 96 } } @@ -53994,11 +54137,11 @@ ], "location": { "end": { - "column": 82, + "column": 80, "line": 97 }, "start": { - "column": 37, + "column": 35, "line": 97 } } @@ -54018,11 +54161,11 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 98 }, "start": { - "column": 41, + "column": 39, "line": 98 } } @@ -54278,7 +54421,7 @@ "id": "1409", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"cffbcba8a79350ee6786fa5d\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"29733254135e3c59f2d3d895\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Lizeth\",\n- \"position\": 2035626356506624,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"bf6f7bf13df31e6e76857371\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Lolita\",\n \"position\": 8695879905050624,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"3bbadb9feebdf5caaf9fd3d5\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Elliott\",\n- \"position\": 8014009926156288,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"c40a6259dccada1f0bfcf1a9\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Madie\",\n- \"position\": 5229075266273280,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 4220130160541697,\n \"turn\": 5494385558945792,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"48298fbcffe5e3fead9bdeae\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"e01aeadacaff8cce71be92ad\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Rylan\",\n- \"position\": 6245843719946240,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"9dbb71eb0fecf380deeecb8f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Adolf\",\n \"position\": 7404222226104320,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"14883c0cc168ea4ffeebbadf\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Winfield\",\n- \"position\": 1550033337974784,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"e9eec9ec9dc8fafa5adfe0ac\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Cesar\",\n- \"position\": 4359853908688896,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 4948972210749441,\n \"turn\": 4530636071108608,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 10, "static": false, @@ -54346,12 +54489,12 @@ "id": "1411", "mutatorName": "EqualityOperator", "replacement": "sheriffPlayer?.isAlive !== true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"d853efafac4ceac6345bbef1\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"bf2c874eedd1dafe92dfaeef\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Mercedes\",\n- \"position\": 8940238384660480,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"1cb9d5d71e2fa0dfac99b1b1\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Ardith\",\n \"position\": 5446436942512128,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"db91fd4c8c4fa61c8babebda\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Kiana\",\n- \"position\": 1563955101171712,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"aac76ec7d8e9dbd56e1aeb77\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Brianne\",\n- \"position\": 7273614703329280,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 1822407899742209,\n \"turn\": 2725609889333248,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalledWith(...expected)\n\nExpected: not {\"action\": \"settle-votes\", \"cause\": undefined, \"source\": {\"name\": \"sheriff\", \"players\": undefined}}, {\"_id\": \"1486b8afad48de799f23ecfe\", \"createdAt\": 2023-08-28T00:26:47.864Z, \"currentPlay\": {\"action\": \"mark\", \"cause\": undefined, \"source\": {\"name\": \"vile-father-of-wolves\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 4487870769266688}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"c316b01f7bc4bade4a7400de\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dale\", \"position\": 5192494767669248, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"a3643d3badce1a67be7f1fde\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Alexie\", \"position\": 3967871482855424, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"1eece5113c7248ef1daada71\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Nikko\", \"position\": 4343207768883200, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"dc31b57f7d596f9e7b8a1a78\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dorris\", \"position\": 7083283456196608, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"canceled\", \"tick\": 3929806389379072, \"turn\": 8568126180425728, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T12:33:17.360Z}\nReceived: 0, [{\"action\": \"settle-votes\", \"cause\": undefined, \"source\": {\"name\": \"sheriff\", \"players\": undefined}}, {\"_id\": \"1486b8afad48de799f23ecfe\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T00:26:47.864Z, \"currentPlay\": {\"action\": \"mark\", \"cause\": undefined, \"source\": {\"name\": \"vile-father-of-wolves\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 4487870769266688}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"c316b01f7bc4bade4a7400de\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dale\", \"position\": 5192494767669248, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"a3643d3badce1a67be7f1fde\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Alexie\", \"position\": 3967871482855424, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"1eece5113c7248ef1daada71\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Nikko\", \"position\": 4343207768883200, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"dc31b57f7d596f9e7b8a1a78\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dorris\", \"position\": 7083283456196608, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"canceled\", \"tick\": 3929806389379072, \"turn\": 8568126180425728, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T12:33:17.360Z, \"victory\": undefined}]\n\nNumber of calls: 1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:450:68)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "530" + "294" ], "coveredBy": [ "290", @@ -54466,9 +54609,13 @@ "id": "1415", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -157,9 +157,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 6174334240423936,\n \"turn\": 3489044245774336,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n+ \"source\": GamePlaySource {\n+ \"name\": \"all\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T00:05:13.951Z,\n \"victory\": undefined,\n }\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:520:79)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 9, "static": false, - "killedBy": [], + "killedBy": [ + "299" + ], "coveredBy": [ "290", "291", @@ -54482,7 +54629,7 @@ ], "location": { "end": { - "column": 86, + "column": 84, "line": 119 }, "start": { @@ -54495,7 +54642,7 @@ "id": "1416", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"f271c0eed37e767bd65e5d98\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"1dbf512d5ad333dc2741903b\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Kelvin\",\n- \"position\": 2312918290923520,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"955ee2deb2ba540a31ccfbdb\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Clarabelle\",\n \"position\": 1565372455059456,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"3b49cccacdfc51f1d1c96b03\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Tania\",\n- \"position\": 5328040687042560,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"269e6b5696784e9772e5faf5\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Jarrod\",\n- \"position\": 3252995403808768,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 115217692360705,\n \"turn\": 3803420181921792,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"6eb2e554ab44bccdccfc2b0c\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"ad475bcf2bcaea491222ae9b\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Cordelia\",\n- \"position\": 2995260743483392,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"fc6c92ef1deb5e3fcc0e38fb\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Elijah\",\n \"position\": 5683200332398592,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"98c2976f3bad9ef2ffbb1a7d\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Lamont\",\n- \"position\": 289370521206784,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"cf0fee0083e30dcfcafedfa8\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Otha\",\n- \"position\": 6433417585491968,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 2396638922407937,\n \"turn\": 6556685277593600,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -54515,7 +54662,7 @@ ], "location": { "end": { - "column": 86, + "column": 84, "line": 119 }, "start": { @@ -54527,13 +54674,13 @@ { "id": "1417", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.currentPlay.cause === GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"03f91addcf1e1589b62ce8fb\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"2da707f117999e6d47f5707c\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Eloisa\",\n- \"position\": 872990101209088,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"4ec214d5a44dd2a8a0f1fefd\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Devan\",\n \"position\": 4608828339388416,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"d6fcd60b041ce2d2eeda4d0d\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Roxanne\",\n- \"position\": 4468937817325568,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"beaa0ebcbd193ae01aaefaad\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Oma\",\n- \"position\": 5271361356300288,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 7120156627042305,\n \"turn\": 6164769765588992,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "clonedGame.currentPlay.cause === GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:492:64)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "530" + "297" ], "coveredBy": [ "290", @@ -54548,7 +54695,7 @@ ], "location": { "end": { - "column": 86, + "column": 84, "line": 119 }, "start": { @@ -54561,13 +54708,9 @@ "id": "1418", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"13ce4bbebee6cbdd4dbf68af\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"efea6cefdb958b5ed8a9b11e\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Bette\",\n- \"position\": 185270471229440,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"44a0d0a06374f6dea4911eec\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Myron\",\n \"position\": 3338213810765824,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"c3aa725e9ebfd8fccd5a99ec\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Dayne\",\n- \"position\": 79465598156800,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"d1732da6ece8ade6c4e18b92\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Madeline\",\n- \"position\": 746347812618240,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 8257715505725441,\n \"turn\": 5768754382241792,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 8, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "290", "291", @@ -54584,7 +54727,7 @@ "line": 122 }, "start": { - "column": 88, + "column": 86, "line": 119 } } @@ -54593,12 +54736,12 @@ "id": "1419", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"action\": \"vote\", \"cause\": \"previous-votes-were-in-ties\", \"source\": {\"name\": \"all\", \"players\": undefined}}, {\"_id\": \"8c17ea1f2844dcaa2dac5d2a\", \"createdAt\": 2023-08-26T08:57:41.112Z, \"currentPlay\": {\"action\": \"elect-sheriff\", \"cause\": undefined, \"source\": {\"name\": \"angel\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 8637032398061568}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 1}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [{\"_id\": \"fe0fc7bdfce8dfbc6efc88fe\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Karson\", \"position\": 4700523573805056, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"20a9aecca14dca8aae517a77\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Lavon\", \"position\": 1856722857623552, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"2f7a62d51389e7d26d632f8f\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Woodrow\", \"position\": 8228398767800320, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"e1cc506e7444f3cb88a8efac\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Matt\", \"position\": 1616321366196224, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"canceled\", \"tick\": 1873925275385856, \"turn\": 652912069967872, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T01:42:33.297Z}], but it was called with {\"action\": \"vote\", \"cause\": undefined, \"source\": {\"name\": \"all\", \"players\": undefined}}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:492:64)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 0\n\n@@ -1,11 +1,10 @@\n Object {\n \"_id\": \"f3ffbf5acfd9a85fad7eb5f4\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n \"_id\": \"dcaa2d4cc8ce5bd8dcae6bc6\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "297" + "530" ], "coveredBy": [ "290", @@ -54612,7 +54755,7 @@ ], "location": { "end": { - "column": 108, + "column": 106, "line": 120 }, "start": { @@ -54755,9 +54898,13 @@ "id": "1425", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 7\n\n@@ -219,10 +219,17 @@\n \"status\": \"playing\",\n \"tick\": 4833016910184449,\n \"turn\": 4763272148418560,\n \"upcomingPlays\": Array [\n Object {\n+ \"action\": \"vote\",\n+ \"cause\": \"stuttering-judge-request\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ },\n+ },\n+ Object {\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "530" + ], "coveredBy": [ "301", "302", @@ -54780,7 +54927,7 @@ "id": "1426", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"ee60bfae1ff9dbebb8fca8ea\", \"createdAt\": 2023-08-26T05:31:51.644Z, \"currentPlay\": {\"action\": \"look\", \"cause\": undefined, \"source\": {\"name\": \"scapegoat\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 1126445134905344}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"e3babdea22cac374f3efefe1\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Rowland\", \"position\": 7096007420542976, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"e9edda9dbd349fa4acb9bcb3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Uriel\", \"position\": 5665358140669952, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"acac2f8f897fe6f9fa5665ea\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Levi\", \"position\": 2425449581903872, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"8a3e7bc523f9fcdce8e54298\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Savion\", \"position\": 1512906554343424, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 6513173200896000, \"turn\": 1877091406577664, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": \"stuttering-judge-request\", \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-26T09:55:26.489Z}], but it was called with {\"_id\": \"ee60bfae1ff9dbebb8fca8ea\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T05:31:51.644Z, \"currentPlay\": {\"action\": \"look\", \"cause\": undefined, \"source\": {\"name\": \"scapegoat\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 1126445134905344}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"e3babdea22cac374f3efefe1\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Rowland\", \"position\": 7096007420542976, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"e9edda9dbd349fa4acb9bcb3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Uriel\", \"position\": 5665358140669952, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"acac2f8f897fe6f9fa5665ea\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Levi\", \"position\": 2425449581903872, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"8a3e7bc523f9fcdce8e54298\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Savion\", \"position\": 1512906554343424, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 6513173200896000, \"turn\": 1877091406577664, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T09:55:26.489Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:610:64)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"a02e2e107934eded4c5047b0\", \"createdAt\": 2023-08-28T03:53:51.102Z, \"currentPlay\": {\"action\": \"protect\", \"cause\": undefined, \"source\": {\"name\": \"vile-father-of-wolves\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 8892923265417216}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 0}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [{\"_id\": \"35ca23e179e5c941a8dde1fe\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Damaris\", \"position\": 6703855842623488, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"6c4cfedfc5bd12dcf2189dca\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Elmira\", \"position\": 1746557688872960, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"ebe9bcb8a8bae4bdbefc8cfb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Elna\", \"position\": 6010381646430208, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"6ee69ff8bff2fabed73fc4d1\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Kitty\", \"position\": 507884028821504, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 6124117304541184, \"turn\": 2017198432321536, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": \"stuttering-judge-request\", \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-28T13:42:42.554Z}], but it was called with {\"_id\": \"a02e2e107934eded4c5047b0\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T03:53:51.102Z, \"currentPlay\": {\"action\": \"protect\", \"cause\": undefined, \"source\": {\"name\": \"vile-father-of-wolves\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 8892923265417216}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 0}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [{\"_id\": \"35ca23e179e5c941a8dde1fe\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Damaris\", \"position\": 6703855842623488, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"6c4cfedfc5bd12dcf2189dca\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Elmira\", \"position\": 1746557688872960, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"ebe9bcb8a8bae4bdbefc8cfb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Elna\", \"position\": 6010381646430208, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"6ee69ff8bff2fabed73fc4d1\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Kitty\", \"position\": 507884028821504, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 6124117304541184, \"turn\": 2017198432321536, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T13:42:42.554Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:610:64)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -54809,7 +54956,7 @@ "id": "1427", "mutatorName": "EqualityOperator", "replacement": "doesJudgeRequestAnotherVote !== true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 7\n\n@@ -219,10 +219,17 @@\n \"status\": \"playing\",\n \"tick\": 6932863412862977,\n \"turn\": 3051864155226112,\n \"upcomingPlays\": Array [\n Object {\n+ \"action\": \"vote\",\n+ \"cause\": \"stuttering-judge-request\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ },\n+ },\n+ Object {\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 7\n\n@@ -219,10 +219,17 @@\n \"status\": \"playing\",\n \"tick\": 2569991706640385,\n \"turn\": 1289448545320960,\n \"upcomingPlays\": Array [\n Object {\n+ \"action\": \"vote\",\n+ \"cause\": \"stuttering-judge-request\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ },\n+ },\n+ Object {\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -54867,7 +55014,7 @@ "id": "1429", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"76bebbfae111d4f94c4ba0ca\", \"createdAt\": 2023-08-26T09:22:17.886Z, \"currentPlay\": {\"action\": \"delegate\", \"cause\": undefined, \"source\": {\"name\": \"guard\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 1304102692716544}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"c3acfea05ae908daed72d1e3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Nils\", \"position\": 4650937555615744, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"3e4e901ef8f86fe8d45ab70b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Bobby\", \"position\": 6258680892751872, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"b5f3dfcfe48edd4bced566bb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Caroline\", \"position\": 5088729282641920, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"649e9fbfddf17aeaa6959d7f\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Fausto\", \"position\": 6691164059074560, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"canceled\", \"tick\": 3504075429642240, \"turn\": 1450115592093696, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": \"stuttering-judge-request\", \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-26T11:29:18.694Z}], but it was called with {\"_id\": \"76bebbfae111d4f94c4ba0ca\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T09:22:17.886Z, \"currentPlay\": {\"action\": \"delegate\", \"cause\": undefined, \"source\": {\"name\": \"guard\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 1304102692716544}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"c3acfea05ae908daed72d1e3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Nils\", \"position\": 4650937555615744, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"3e4e901ef8f86fe8d45ab70b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Bobby\", \"position\": 6258680892751872, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"b5f3dfcfe48edd4bced566bb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Caroline\", \"position\": 5088729282641920, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"649e9fbfddf17aeaa6959d7f\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Fausto\", \"position\": 6691164059074560, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"canceled\", \"tick\": 3504075429642240, \"turn\": 1450115592093696, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T11:29:18.694Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:610:64)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"c503fdb65d8ca45f3cad45c7\", \"createdAt\": 2023-08-28T01:39:54.819Z, \"currentPlay\": {\"action\": \"settle-votes\", \"cause\": undefined, \"source\": {\"name\": \"rusty-sword-knight\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 6049239031349248}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"0aa51744aceb44df71d04a70\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Antonina\", \"position\": 7735364238180352, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"3bccd8b5a526e9e09b47ebe4\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Alberta\", \"position\": 5694155518902272, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"a86bbeeabe24e07f163a1b3d\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Delphine\", \"position\": 215757883441152, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"dad0fef13a2b5a306fc9c453\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Marty\", \"position\": 5276893475504128, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 8825559196893184, \"turn\": 123943446904832, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": \"stuttering-judge-request\", \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-27T23:12:04.135Z}], but it was called with {\"_id\": \"c503fdb65d8ca45f3cad45c7\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T01:39:54.819Z, \"currentPlay\": {\"action\": \"settle-votes\", \"cause\": undefined, \"source\": {\"name\": \"rusty-sword-knight\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 6049239031349248}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"0aa51744aceb44df71d04a70\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Antonina\", \"position\": 7735364238180352, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"3bccd8b5a526e9e09b47ebe4\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Alberta\", \"position\": 5694155518902272, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"a86bbeeabe24e07f163a1b3d\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Delphine\", \"position\": 215757883441152, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"dad0fef13a2b5a306fc9c453\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Marty\", \"position\": 5276893475504128, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 8825559196893184, \"turn\": 123943446904832, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T23:12:04.135Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:610:64)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -54892,7 +55039,7 @@ "id": "1430", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"4aff390b20abce7bf7ac4a2e\", \"createdAt\": 2023-08-26T11:50:24.971Z, \"currentPlay\": {\"action\": \"mark\", \"cause\": undefined, \"source\": {\"name\": \"villager-villager\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 7893163398135808}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"3d30f5829be5df6fbb54c0ed\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Norene\", \"position\": 5487033657065472, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"41efbe965d197de5dd9b3b61\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Waldo\", \"position\": 5263689707945984, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"affecbe2ae88b9dfdcafe1fe\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Allene\", \"position\": 5278084288741376, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a2ca53ce90dbe7110cdede0d\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Anne\", \"position\": 993612439486464, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 2521144643026944, \"turn\": 1935131939962880, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": \"stuttering-judge-request\", \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-26T14:04:58.516Z}], but it was called with {\"_id\": \"4aff390b20abce7bf7ac4a2e\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T11:50:24.971Z, \"currentPlay\": {\"action\": \"mark\", \"cause\": undefined, \"source\": {\"name\": \"villager-villager\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 7893163398135808}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"3d30f5829be5df6fbb54c0ed\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Norene\", \"position\": 5487033657065472, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"41efbe965d197de5dd9b3b61\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Waldo\", \"position\": 5263689707945984, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"affecbe2ae88b9dfdcafe1fe\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Allene\", \"position\": 5278084288741376, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a2ca53ce90dbe7110cdede0d\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Anne\", \"position\": 993612439486464, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 2521144643026944, \"turn\": 1935131939962880, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": undefined, \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-26T14:04:58.516Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:610:64)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"b67b9a9abe7ce7ee3e0e2fcf\", \"createdAt\": 2023-08-28T13:13:27.409Z, \"currentPlay\": {\"action\": \"choose-sign\", \"cause\": undefined, \"source\": {\"name\": \"wild-child\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 6027475207323648}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 1}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"a0caf95ccccdd8c99307d85e\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Kory\", \"position\": 439123473072128, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"24e049e2b5a7bfda01023d20\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Jarrod\", \"position\": 3262148352409600, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"9a1ecbab89a9ffefdc5688ea\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Coleman\", \"position\": 3191119709995008, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"5e9e7d609acb70ddebf1bd1e\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Gudrun\", \"position\": 2337372779839488, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 2633075955597312, \"turn\": 2112147765067776, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": \"stuttering-judge-request\", \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-27T23:33:36.814Z}], but it was called with {\"_id\": \"b67b9a9abe7ce7ee3e0e2fcf\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T13:13:27.409Z, \"currentPlay\": {\"action\": \"choose-sign\", \"cause\": undefined, \"source\": {\"name\": \"wild-child\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 6027475207323648}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 1}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"a0caf95ccccdd8c99307d85e\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Kory\", \"position\": 439123473072128, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"24e049e2b5a7bfda01023d20\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Jarrod\", \"position\": 3262148352409600, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"9a1ecbab89a9ffefdc5688ea\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Coleman\", \"position\": 3191119709995008, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"5e9e7d609acb70ddebf1bd1e\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Gudrun\", \"position\": 2337372779839488, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 2633075955597312, \"turn\": 2112147765067776, \"upcomingPlays\": [{\"action\": \"vote\", \"cause\": undefined, \"source\": {\"name\": \"all\", \"players\": undefined}}], \"updatedAt\": 2023-08-27T23:33:36.814Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:610:64)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -54904,7 +55051,7 @@ ], "location": { "end": { - "column": 105, + "column": 103, "line": 133 }, "start": { @@ -54917,6 +55064,35 @@ "id": "1431", "mutatorName": "ConditionalExpression", "replacement": "true", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"1cec64b2ce6aeab3cb61a111\", \"additionalCards\": undefined, \"createdAt\": 2023-08-27T22:03:27.724Z, \"currentPlay\": {\"action\": \"ban-voting\", \"cause\": undefined, \"source\": {\"name\": \"lovers\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 4551355106590720}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 1}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [{\"_id\": \"eacfeff35acd628d5e6d0fed\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Mariane\", \"position\": 5066480771137536, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"d04def47accbafbaea30abdb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Beverly\", \"position\": 4205704613199872, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"9052b1bfe7f2d94befaafea4\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Talon\", \"position\": 3075338229776384, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"fcea37ce5fd3a2a5b6eab2b8\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Donnie\", \"position\": 811764520321024, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"over\", \"tick\": 7816739561668608, \"turn\": 1310682431619072, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T15:33:09.341Z, \"victory\": undefined}\nReceived: undefined\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:566:76)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, + "static": false, + "killedBy": [ + "301" + ], + "coveredBy": [ + "301", + "302", + "303", + "304", + "530" + ], + "location": { + "end": { + "column": 36, + "line": 136 + }, + "start": { + "column": 9, + "line": 136 + } + } + }, + { + "id": "1432", + "mutatorName": "ConditionalExpression", + "replacement": "false", "status": "Timeout", "static": false, "killedBy": [], @@ -54939,41 +55115,16 @@ } }, { - "id": "1432", - "mutatorName": "ConditionalExpression", - "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"8dbca2abdfebc05ee15c0b58\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"5775ffcf1ea7c9e6ab4a48a5\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Amber\",\n- \"position\": 837585211490304,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"99a9172aa490a55ece7ae4b6\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Demetrius\",\n \"position\": 2260196135010304,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"2cdf1bd83d379b8a8a33eacf\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Clementine\",\n- \"position\": 7874698903814144,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"1e2aee2444e1d9bc9beacc9d\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Ewell\",\n- \"position\": 5218893381500928,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 7673748224212993,\n \"turn\": 7256544087375872,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "id": "1433", + "mutatorName": "EqualityOperator", + "replacement": "nominatedPlayers.length >= 1", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:631:60)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "530" - ], - "coveredBy": [ - "301", - "302", - "303", - "304", - "530" + "304" ], - "location": { - "end": { - "column": 36, - "line": 136 - }, - "start": { - "column": 9, - "line": 136 - } - } - }, - { - "id": "1433", - "mutatorName": "EqualityOperator", - "replacement": "nominatedPlayers.length >= 1", - "status": "Timeout", - "static": false, - "killedBy": [], "coveredBy": [ "301", "302", @@ -54996,12 +55147,12 @@ "id": "1434", "mutatorName": "EqualityOperator", "replacement": "nominatedPlayers.length <= 1", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"6f7cebed5e0dbccecc0ffa3b\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"a6a32eddc8d7a878ae4b8d5d\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Winona\",\n- \"position\": 3336353332854784,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"cc85425dc6efa5c255abeec8\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Jamal\",\n \"position\": 3653421456424960,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"d7f9adf2e057fe73c9d4851d\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Olen\",\n- \"position\": 623024229318656,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"d77ecaf9f126ed6bb459a1bd\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Edyth\",\n- \"position\": 623901033889792,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 4608493975764993,\n \"turn\": 4169522158239744,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"914eb9ddfcf6ecffc2d1700f\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T04:32:52.410Z, \"currentPlay\": {\"action\": \"protect\", \"cause\": undefined, \"source\": {\"name\": \"cupid\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 4184757627781120}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [{\"_id\": \"da94c86ddcbdfc8dde49b1c7\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Katrina\", \"position\": 6496866151694336, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"a9de4da58a96bcb9fdf0d5da\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dion\", \"position\": 8601643763367936, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"c11539b5e7eeffd14a138379\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dylan\", \"position\": 5010479674032128, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"da941d7f7ba9efde9ce6b5b9\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Zackary\", \"position\": 5561335991500800, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}], \"status\": \"playing\", \"tick\": 315669526609920, \"turn\": 2493804896583680, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T00:13:25.142Z, \"victory\": undefined}\nReceived: undefined\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:566:76)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "530" + "301" ], "coveredBy": [ "301", @@ -55025,12 +55176,12 @@ "id": "1435", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: thrown: \"Exceeded timeout of 5000 ms for a test.\nAdd a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout.\"\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:877:5\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:766:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:50:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:586:64)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "530" + "302" ], "coveredBy": [ "302", @@ -55190,7 +55341,7 @@ ], "location": { "end": { - "column": 86, + "column": 84, "line": 148 }, "start": { @@ -55203,13 +55354,9 @@ "id": "1442", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -159,18 +159,10 @@\n \"status\": \"playing\",\n \"tick\": 7297828749574144,\n \"turn\": 4332701257564160,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"elect-sheriff\",\n- \"cause\": \"previous-votes-were-in-ties\",\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:658:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "305" - ], + "killedBy": [], "coveredBy": [ "305", "306", @@ -55217,7 +55364,7 @@ ], "location": { "end": { - "column": 86, + "column": 84, "line": 148 }, "start": { @@ -55229,8 +55376,8 @@ { "id": "1443", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.currentPlay.cause === GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -159,18 +159,10 @@\n \"status\": \"over\",\n \"tick\": 7512076125732864,\n \"turn\": 5784260306796544,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"elect-sheriff\",\n- \"cause\": \"previous-votes-were-in-ties\",\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:658:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "clonedGame.currentPlay.cause === GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -159,18 +159,10 @@\n \"status\": \"over\",\n \"tick\": 7134844777660416,\n \"turn\": 7083208392835072,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"elect-sheriff\",\n- \"cause\": \"previous-votes-were-in-ties\",\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:658:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -55244,7 +55391,7 @@ ], "location": { "end": { - "column": 86, + "column": 84, "line": 148 }, "start": { @@ -55257,7 +55404,7 @@ "id": "1444", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -159,18 +159,10 @@\n \"status\": \"canceled\",\n \"tick\": 3705652172029952,\n \"turn\": 8915350296985600,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"elect-sheriff\",\n- \"cause\": \"previous-votes-were-in-ties\",\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:658:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -159,18 +159,10 @@\n \"status\": \"canceled\",\n \"tick\": 2910652012167168,\n \"turn\": 5123509705506816,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"elect-sheriff\",\n- \"cause\": \"previous-votes-were-in-ties\",\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:658:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -55273,7 +55420,7 @@ "line": 151 }, "start": { - "column": 88, + "column": 86, "line": 148 } } @@ -55282,7 +55429,7 @@ "id": "1445", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -160,11 +160,11 @@\n \"tick\": 4715539983237120,\n \"turn\": 6012279740956672,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"elect-sheriff\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:658:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -160,11 +160,11 @@\n \"tick\": 42569455108096,\n \"turn\": 1700275645579264,\n \"upcomingPlays\": Array [\n GamePlay {\n \"action\": \"elect-sheriff\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:658:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -55294,7 +55441,7 @@ ], "location": { "end": { - "column": 128, + "column": 126, "line": 149 }, "start": { @@ -55353,9 +55500,13 @@ "id": "1448", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -87,19 +87,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"c26ddd2bd4fdfabaab1acf82\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"sheriff\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Braden\",\n \"position\": 857663818694656,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:686:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "306" + ], "coveredBy": [ "306" ], @@ -55730,7 +55881,7 @@ "id": "1463", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:829:63)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:829:63)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -55749,7 +55900,7 @@ "line": 182 }, "start": { - "column": 92, + "column": 90, "line": 179 } } @@ -55758,7 +55909,7 @@ "id": "1464", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(180,42): error TS2322: Type '() => undefined' is not assignable to type '() => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(180,40): error TS2322: Type '() => undefined' is not assignable to type '() => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -55770,11 +55921,11 @@ ], "location": { "end": { - "column": 86, + "column": 84, "line": 180 }, "start": { - "column": 42, + "column": 40, "line": 180 } } @@ -55783,7 +55934,7 @@ "id": "1465", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(181,33): error TS2322: Type '() => undefined' is not assignable to type '() => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(181,31): error TS2322: Type '() => undefined' is not assignable to type '() => Game | Promise'.\n Type 'undefined' is not assignable to type 'Game | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -55795,11 +55946,11 @@ ], "location": { "end": { - "column": 74, + "column": 72, "line": 181 }, "start": { - "column": 33, + "column": 31, "line": 181 } } @@ -56077,9 +56228,13 @@ "id": "1477", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Stephania\",\n \"position\": 7580507546058752,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"bb1a3e1c6e1cba5289f69efb\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "318" + ], "coveredBy": [ "317", "318" @@ -56125,13 +56280,9 @@ "id": "1479", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Alivia\",\n \"position\": 8961576811888640,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"fee80ef3ab58059c2b413959\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "318" - ], + "killedBy": [], "coveredBy": [ "317", "318" @@ -56312,7 +56463,7 @@ "id": "1487", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Dusty\",\n \"position\": 1874069366505472,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"6acd57d113f9a06ae4378c6a\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 2\n\n@@ -118,16 +118,16 @@\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Kasey\",\n \"position\": 3711149868580864,\n \"role\": PlayerRole {\n- \"current\": \"werewolf\",\n+ \"current\": \"thief\",\n \"isRevealed\": false,\n \"original\": \"thief\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"b96dfd6d4c55ddb9a1bbc7bf\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:912:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -56497,7 +56648,7 @@ "id": "1495", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'ROLE_SIDES | undefined' is not assignable to type 'ROLE_SIDES'.\n Type 'undefined' is not assignable to type 'ROLE_SIDES'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(222,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'RoleSides | undefined' is not assignable to type 'RoleSides'.\n Type 'undefined' is not assignable to type 'RoleSides'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(222,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -56521,7 +56672,7 @@ "id": "1496", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'ROLE_SIDES | undefined' is not assignable to type 'ROLE_SIDES'.\n Type 'undefined' is not assignable to type 'ROLE_SIDES'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(222,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'RoleSides | undefined' is not assignable to type 'RoleSides'.\n Type 'undefined' is not assignable to type 'RoleSides'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(222,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -56545,7 +56696,7 @@ "id": "1497", "mutatorName": "LogicalOperator", "replacement": "chosenSide === undefined && !dogWolfPlayer", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'ROLE_SIDES | undefined' is not assignable to type 'ROLE_SIDES'.\n Type 'undefined' is not assignable to type 'ROLE_SIDES'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(222,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'RoleSides | undefined' is not assignable to type 'RoleSides'.\n Type 'undefined' is not assignable to type 'RoleSides'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(222,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -56569,7 +56720,7 @@ "id": "1498", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'ROLE_SIDES | undefined' is not assignable to type 'ROLE_SIDES'.\n Type 'undefined' is not assignable to type 'ROLE_SIDES'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'RoleSides | undefined' is not assignable to type 'RoleSides'.\n Type 'undefined' is not assignable to type 'RoleSides'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -56593,7 +56744,7 @@ "id": "1499", "mutatorName": "EqualityOperator", "replacement": "chosenSide !== undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'undefined' is not assignable to type 'ROLE_SIDES'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(221,82): error TS2322: Type 'undefined' is not assignable to type 'RoleSides'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -56640,7 +56791,7 @@ "id": "1501", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(219,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(219,82): error TS2322: Type 'ROLE_SIDES | undefined' is not assignable to type 'ROLE_SIDES'.\n Type 'undefined' is not assignable to type 'ROLE_SIDES'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(220,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-maker.service.ts(219,62): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(219,82): error TS2322: Type 'RoleSides | undefined' is not assignable to type 'RoleSides'.\n Type 'undefined' is not assignable to type 'RoleSides'.\nsrc/modules/game/providers/services/game-play/game-play-maker.service.ts(220,31): error TS18048: 'dogWolfPlayer' is possibly 'undefined'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -56663,7 +56814,7 @@ "id": "1502", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -115,11 +115,11 @@\n \"current\": \"dog-wolf\",\n \"isRevealed\": false,\n \"original\": \"dog-wolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"ffdbab0c4e9fe8e86fc2f3a7\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1010:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -115,11 +115,11 @@\n \"current\": \"dog-wolf\",\n \"isRevealed\": false,\n \"original\": \"dog-wolf\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"9eaa7b7a708d955f61eaf88a\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1010:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -57076,8 +57227,8 @@ { "id": "1519", "mutatorName": "MethodExpression", - "replacement": "foxSniffedPlayers.some(player => player.side.current === ROLE_SIDES.VILLAGERS)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -87,11 +87,19 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"2aabd8bac94fe5ccbec4e86b\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"fox\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Ophelia\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1116:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "foxSniffedPlayers.some(player => player.side.current === RoleSides.VILLAGERS)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -87,11 +87,19 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"f3dda8dfe0bd9eecaa8d608c\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"fox\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Jeff\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1116:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -57091,7 +57242,7 @@ ], "location": { "end": { - "column": 131, + "column": 130, "line": 246 }, "start": { @@ -57104,7 +57255,7 @@ "id": "1520", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -87,19 +87,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"de53ccde1fccbd9087dfa940\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"fox\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Yasmine\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1144:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -87,19 +87,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"fbe7a392dcffe53fdddff706\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"fox\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Melyssa\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1144:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -57118,7 +57269,7 @@ ], "location": { "end": { - "column": 130, + "column": 129, "line": 246 }, "start": { @@ -57131,9 +57282,13 @@ "id": "1521", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -87,11 +87,19 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"5c3e688dc6cebda6fef0ab2f\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"fox\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Victor\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1116:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "329" + ], "coveredBy": [ "328", "329", @@ -57141,7 +57296,7 @@ ], "location": { "end": { - "column": 130, + "column": 129, "line": 246 }, "start": { @@ -57154,7 +57309,7 @@ "id": "1522", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -87,19 +87,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"ee38526a7bcea1baddde1df5\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"fox\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Lula\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1144:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -87,19 +87,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"85dbb29dbdfcaa0ff7af2b0b\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"fox\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Jamaal\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1144:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -57168,7 +57323,7 @@ ], "location": { "end": { - "column": 130, + "column": 129, "line": 246 }, "start": { @@ -57180,8 +57335,8 @@ { "id": "1523", "mutatorName": "EqualityOperator", - "replacement": "player.side.current !== ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -87,19 +87,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"bbcf80e7e61af9cebea9f3ad\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"fox\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Emily\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1144:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.side.current !== RoleSides.VILLAGERS", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -87,19 +87,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"be61a91a602c4df73c8ce2f1\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"fox\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Verda\",\n \"position\": 0,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1144:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -57195,7 +57350,7 @@ ], "location": { "end": { - "column": 130, + "column": 129, "line": 246 }, "start": { @@ -57836,13 +57991,9 @@ "id": "1551", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -104,19 +104,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"e17f5a25db92a3d1df5309e9\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"drank-life-potion\",\n- \"remainingPhases\": 1,\n- \"source\": \"witch\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Marlin\",\n \"position\": 4288863306514432,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1305:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "338" - ], + "killedBy": [], "coveredBy": [ "338", "339" @@ -57862,7 +58013,7 @@ "id": "1552", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -133,11 +133,11 @@\n \"_id\": \"cc6b55bd477fd91aa5776fec\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"drank-death-potion\",\n+ \"name\": \"drank-life-potion\",\n \"remainingPhases\": 1,\n \"source\": \"witch\",\n },\n ],\n \"death\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1339:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -133,11 +133,11 @@\n \"_id\": \"eaeeea7defb6fbdadee2a1ba\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"drank-death-potion\",\n+ \"name\": \"drank-life-potion\",\n \"remainingPhases\": 1,\n \"source\": \"witch\",\n },\n ],\n \"death\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1339:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -57875,7 +58026,7 @@ ], "location": { "end": { - "column": 77, + "column": 76, "line": 296 }, "start": { @@ -57888,20 +58039,16 @@ "id": "1553", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -108,11 +108,11 @@\n \"_id\": \"c1d4a30e3a4d44dde9c3bd4c\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"drank-life-potion\",\n+ \"name\": \"drank-death-potion\",\n \"remainingPhases\": 1,\n \"source\": \"witch\",\n },\n ],\n \"death\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1305:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "338" - ], + "killedBy": [], "coveredBy": [ "338", "339" ], "location": { "end": { - "column": 77, + "column": 76, "line": 296 }, "start": { @@ -57913,8 +58060,8 @@ { "id": "1554", "mutatorName": "EqualityOperator", - "replacement": "target.drankPotion !== WITCH_POTIONS.LIFE", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -108,11 +108,11 @@\n \"_id\": \"4f6cc38c8eabb9d6a4e219fd\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"drank-life-potion\",\n+ \"name\": \"drank-death-potion\",\n \"remainingPhases\": 1,\n \"source\": \"witch\",\n },\n ],\n \"death\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1305:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "target.drankPotion !== WitchPotions.LIFE", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -108,11 +108,11 @@\n \"_id\": \"eefced43a8fc88ada9ba4f98\",\n \"attributes\": Array [\n PlayerAttribute {\n \"activeAt\": undefined,\n \"doesRemainAfterDeath\": undefined,\n- \"name\": \"drank-life-potion\",\n+ \"name\": \"drank-death-potion\",\n \"remainingPhases\": 1,\n \"source\": \"witch\",\n },\n ],\n \"death\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1305:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -57927,7 +58074,7 @@ ], "location": { "end": { - "column": 77, + "column": 76, "line": 296 }, "start": { @@ -58808,7 +58955,7 @@ "id": "1592", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -104,30 +104,22 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"c5b1de14bbdfe79eb30ba7ee\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Etha\",\n \"position\": 2137382360973312,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"331bcaee2ebd0fa0fc7bfc49\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1626:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -104,30 +104,22 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"c7dec3b9fd768a30fdcf232a\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Dax\",\n \"position\": 1349793427226624,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"cd4cfb54ae6bdbaaaae33230\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1626:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -58823,7 +58970,7 @@ ], "location": { "end": { - "column": 111, + "column": 110, "line": 363 }, "start": { @@ -58836,9 +58983,13 @@ "id": "1593", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -104,22 +104,30 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"11c94a12a2cddfe5dd4eecbd\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Suzanne\",\n \"position\": 2033508534976512,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"d57b4fd9771e00face9afb3f\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "354" + ], "coveredBy": [ "352", "353", @@ -58847,7 +58998,7 @@ ], "location": { "end": { - "column": 111, + "column": 110, "line": 363 }, "start": { @@ -58859,14 +59010,10 @@ { "id": "1594", "mutatorName": "LogicalOperator", - "replacement": "isTargetInfected === true || targetedPlayer.role.current !== ROLE_NAMES.ANCIENT || isAncientKillable", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -104,30 +104,22 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"aeeefae92f9c6ff3b3a0fcfa\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Cruz\",\n \"position\": 3802372386062336,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"244fc310b4d41f9c21e02c8a\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1626:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "replacement": "isTargetInfected === true || targetedPlayer.role.current !== RoleNames.ANCIENT || isAncientKillable", + "status": "Timeout", "static": false, - "killedBy": [ - "352" - ], + "killedBy": [], "coveredBy": [ "352", "353", @@ -58875,7 +59022,7 @@ ], "location": { "end": { - "column": 111, + "column": 110, "line": 363 }, "start": { @@ -58972,13 +59119,9 @@ "id": "1598", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -104,30 +104,22 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"7a4408cee8d95b6ec835aacd\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Domenico\",\n \"position\": 7146128403333120,\n \"role\": PlayerRole {\n \"current\": \"ancient\",\n \"isRevealed\": false,\n \"original\": \"ancient\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"fee1e77fa1fb96ea479b28cd\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1654:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "353" - ], + "killedBy": [], "coveredBy": [ "353", "354", @@ -58986,7 +59129,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 363 }, "start": { @@ -58998,8 +59141,8 @@ { "id": "1599", "mutatorName": "LogicalOperator", - "replacement": "targetedPlayer.role.current !== ROLE_NAMES.ANCIENT && isAncientKillable", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -104,22 +104,30 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"ca71ecff8fa5cdeddbbeaa9d\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Rubye\",\n \"position\": 3323698337546240,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"e6f32f2618f5ceb4cabd0a56\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "targetedPlayer.role.current !== RoleNames.ANCIENT && isAncientKillable", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -104,22 +104,30 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"5ac5f7b32b9b3dfae3a1c545\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Coty\",\n \"position\": 3949040496541696,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"e40fc8f11820acdebba7dbd0\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59013,7 +59156,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 363 }, "start": { @@ -59026,7 +59169,7 @@ "id": "1600", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -104,22 +104,30 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"efabf68ef951bb46df942fad\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Ebony\",\n \"position\": 3864926147837952,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"13ad0dd5bda936bf87feb10a\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -104,22 +104,30 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"9e371a58f7fe9d0c12aaeded\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Isidro\",\n \"position\": 6922338056536064,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"0dc5beb1b17d204bb065fded\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59040,7 +59183,7 @@ ], "location": { "end": { - "column": 89, + "column": 88, "line": 363 }, "start": { @@ -59052,8 +59195,8 @@ { "id": "1601", "mutatorName": "EqualityOperator", - "replacement": "targetedPlayer.role.current === ROLE_NAMES.ANCIENT", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -104,30 +104,22 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"acead96e1ad3d3eceef6ee3f\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Raphael\",\n \"position\": 8101323329241088,\n \"role\": PlayerRole {\n \"current\": \"ancient\",\n \"isRevealed\": false,\n \"original\": \"ancient\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"a48c68cbab3ef1cdfb1cd98d\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1654:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "targetedPlayer.role.current === RoleNames.ANCIENT", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 2\n\n@@ -104,30 +104,22 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"24e09d8ae11bbcc2004f7bfe\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"eaten\",\n- \"remainingPhases\": 1,\n- \"source\": \"werewolves\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Furman\",\n \"position\": 3371904251461632,\n \"role\": PlayerRole {\n \"current\": \"ancient\",\n \"isRevealed\": false,\n \"original\": \"ancient\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"a0acd953ae2efb580bfcfbd5\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1654:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59067,7 +59210,7 @@ ], "location": { "end": { - "column": 89, + "column": 88, "line": 363 }, "start": { @@ -59080,7 +59223,7 @@ "id": "1602", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -104,22 +104,30 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"bdffab98ceea06fadc27deda\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Melba\",\n \"position\": 7747364420845568,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"80ee2068c816e7459fa9fec2\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 10\n\n@@ -104,22 +104,30 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"bfcf02a93fdb1aaddaedebff\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"eaten\",\n+ \"remainingPhases\": 1,\n+ \"source\": \"werewolves\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Frederik\",\n \"position\": 337387884380160,\n \"role\": PlayerRole {\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"dfdeb05806ca4ac7a2d296f3\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -59097,7 +59240,7 @@ "line": 366 }, "start": { - "column": 113, + "column": 112, "line": 363 } } @@ -59106,7 +59249,7 @@ "id": "1603", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -115,11 +115,11 @@\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"926705b533d6326f5eadbcfc\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -115,11 +115,11 @@\n \"current\": \"raven\",\n \"isRevealed\": false,\n \"original\": \"raven\",\n },\n \"side\": PlayerSide {\n- \"current\": \"werewolves\",\n+ \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"0c61de8bfd5a938ad8f18eb3\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts:1682:82)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -59119,7 +59262,7 @@ ], "location": { "end": { - "column": 119, + "column": 118, "line": 364 }, "start": { @@ -59142,7 +59285,7 @@ ], "location": { "end": { - "column": 117, + "column": 116, "line": 364 }, "start": { @@ -59152,7 +59295,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport { sample } from \"lodash\";\n\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlayAllVote, createGamePlaySheriffSettlesVotes } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getFoxSniffedPlayers, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { addPlayerAttributeInGame, addPlayersAttributeInGame, appendUpcomingPlayInGame, prependUpcomingPlayInGame, removePlayerAttributeByNameInGame, updatePlayerInGame } from \"@/modules/game/helpers/game.mutator\";\nimport { createCantVoteByScapegoatPlayerAttribute, createCharmedByPiedPiperPlayerAttribute, createDrankDeathPotionByWitchPlayerAttribute, createDrankLifePotionByWitchPlayerAttribute, createEatenByBigBadWolfPlayerAttribute, createEatenByWerewolvesPlayerAttribute, createEatenByWhiteWerewolfPlayerAttribute, createInLoveByCupidPlayerAttribute, createPowerlessByFoxPlayerAttribute, createProtectedByGuardPlayerAttribute, createRavenMarkByRavenPlayerAttribute, createSeenBySeerPlayerAttribute, createSheriffByAllPlayerAttribute, createSheriffBySheriffPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { createPlayerShotByHunterDeath, createPlayerVoteByAllDeath, createPlayerVoteBySheriffDeath, createPlayerVoteScapegoatedByAllDeath } from \"@/modules/game/helpers/player/player-death/player-death.factory\";\nimport { isPlayerAliveAndPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { PlayerKillerService } from \"@/modules/game/providers/services/player/player-killer.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerRole } from \"@/modules/game/schemas/player/player-role.schema\";\nimport type { PlayerSide } from \"@/modules/game/schemas/player/player-side.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeGamePlayAllElectSheriff } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\n\n@Injectable()\nexport class GamePlayMakerService {\n private readonly gameSourcePlayMethods: Partial Game | Promise>> = {\n [PLAYER_GROUPS.WEREWOLVES]: async(play, game) => this.werewolvesEat(play, game),\n [ROLE_NAMES.BIG_BAD_WOLF]: (play, game) => this.bigBadWolfEats(play, game),\n [ROLE_NAMES.WHITE_WEREWOLF]: (play, game) => this.whiteWerewolfEats(play, game),\n [ROLE_NAMES.SEER]: (play, game) => this.seerLooks(play, game),\n [ROLE_NAMES.CUPID]: (play, game) => this.cupidCharms(play, game),\n [ROLE_NAMES.PIED_PIPER]: (play, game) => this.piedPiperCharms(play, game),\n [ROLE_NAMES.WITCH]: (play, game) => this.witchUsesPotions(play, game),\n [ROLE_NAMES.HUNTER]: async(play, game) => this.hunterShoots(play, game),\n [ROLE_NAMES.GUARD]: (play, game) => this.guardProtects(play, game),\n [ROLE_NAMES.FOX]: (play, game) => this.foxSniffs(play, game),\n [ROLE_NAMES.WILD_CHILD]: (play, game) => this.wildChildChoosesModel(play, game),\n [ROLE_NAMES.DOG_WOLF]: (play, game) => this.dogWolfChoosesSide(play, game),\n [ROLE_NAMES.SCAPEGOAT]: (play, game) => this.scapegoatBansVoting(play, game),\n [ROLE_NAMES.THIEF]: (play, game) => this.thiefChoosesCard(play, game),\n [PLAYER_GROUPS.ALL]: async(play, game) => this.allPlay(play, game),\n [ROLE_NAMES.RAVEN]: (play, game) => this.ravenMarks(play, game),\n [PLAYER_ATTRIBUTE_NAMES.SHERIFF]: async(play, game) => this.sheriffPlays(play, game),\n };\n\n public constructor(\n private readonly playerKillerService: PlayerKillerService,\n private readonly gamePlayVoteService: GamePlayVoteService,\n ) {}\n\n public async makeGamePlay(play: MakeGamePlayWithRelationsDto, game: Game): Promise {\n if (!game.currentPlay) {\n throw createNoCurrentGamePlayUnexpectedException(\"makeGamePlay\", { gameId: game._id });\n }\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const gameSourcePlayMethod = this.gameSourcePlayMethods[clonedGame.currentPlay.source.name];\n if (gameSourcePlayMethod === undefined) {\n return clonedGame;\n }\n return gameSourcePlayMethod(play, clonedGame);\n }\n\n private async sheriffSettlesVotes({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const targetedPlayer = targets[0].player;\n const voteBySheriffDeath = createPlayerVoteBySheriffDeath();\n return this.playerKillerService.killOrRevealPlayer(targetedPlayer._id, clonedGame, voteBySheriffDeath);\n }\n\n private sheriffDelegates({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n let clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const targetedPlayer = targets[0].player;\n const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF);\n if (sheriffPlayer) {\n clonedGame = removePlayerAttributeByNameInGame(sheriffPlayer._id, clonedGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF) as GameWithCurrentPlay;\n }\n const sheriffBySheriffPlayerAttribute = createSheriffBySheriffPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, sheriffBySheriffPlayerAttribute);\n }\n\n private async sheriffPlays(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const sheriffPlayMethods: Partial Game | Promise>> = {\n [GAME_PLAY_ACTIONS.DELEGATE]: () => this.sheriffDelegates(play, clonedGame),\n [GAME_PLAY_ACTIONS.SETTLE_VOTES]: async() => this.sheriffSettlesVotes(play, clonedGame),\n };\n const sheriffPlayMethod = sheriffPlayMethods[clonedGame.currentPlay.action];\n if (sheriffPlayMethod === undefined) {\n return clonedGame;\n }\n return sheriffPlayMethod();\n }\n\n private async handleTieInVotes(game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const scapegoatPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.SCAPEGOAT);\n if (scapegoatPlayer && isPlayerAliveAndPowerful(scapegoatPlayer, game)) {\n const playerVoteScapegoatedByAllDeath = createPlayerVoteScapegoatedByAllDeath();\n return this.playerKillerService.killOrRevealPlayer(scapegoatPlayer._id, clonedGame, playerVoteScapegoatedByAllDeath);\n }\n const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PLAYER_ATTRIBUTE_NAMES.SHERIFF);\n if (sheriffPlayer?.isAlive === true) {\n const gamePlaySheriffSettlesVotes = createGamePlaySheriffSettlesVotes();\n return prependUpcomingPlayInGame(gamePlaySheriffSettlesVotes, clonedGame);\n }\n if (clonedGame.currentPlay.cause !== GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) {\n const gamePlayAllVote = createGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n return prependUpcomingPlayInGame(gamePlayAllVote, clonedGame);\n }\n return clonedGame;\n }\n\n private async allVote({ votes, doesJudgeRequestAnotherVote }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n let clonedGame = createGame(game) as GameWithCurrentPlay;\n if (!votes) {\n return clonedGame;\n }\n const nominatedPlayers = this.gamePlayVoteService.getNominatedPlayers(votes, clonedGame);\n if (doesJudgeRequestAnotherVote === true) {\n const gamePlayAllVote = createGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST });\n clonedGame = appendUpcomingPlayInGame(gamePlayAllVote, clonedGame) as GameWithCurrentPlay;\n }\n if (nominatedPlayers.length > 1) {\n return this.handleTieInVotes(clonedGame);\n }\n if (nominatedPlayers.length === 1) {\n const playerVoteByAllDeath = createPlayerVoteByAllDeath();\n return this.playerKillerService.killOrRevealPlayer(nominatedPlayers[0]._id, clonedGame, playerVoteByAllDeath);\n }\n return clonedGame;\n }\n\n private handleTieInSheriffElection(nominatedPlayers: Player[], game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n if (clonedGame.currentPlay.cause !== GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) {\n const gamePlayAllElectSheriff = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n return prependUpcomingPlayInGame(gamePlayAllElectSheriff, clonedGame);\n }\n const randomNominatedPlayer = sample(nominatedPlayers);\n if (randomNominatedPlayer) {\n const sheriffByAllPlayerAttribute = createSheriffByAllPlayerAttribute();\n return addPlayerAttributeInGame(randomNominatedPlayer._id, clonedGame, sheriffByAllPlayerAttribute);\n }\n return clonedGame;\n }\n\n private allElectSheriff(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const { votes } = play;\n if (!votes) {\n return clonedGame;\n }\n const nominatedPlayers = this.gamePlayVoteService.getNominatedPlayers(votes, clonedGame);\n if (!nominatedPlayers.length) {\n return clonedGame;\n }\n if (nominatedPlayers.length !== 1) {\n return this.handleTieInSheriffElection(nominatedPlayers, clonedGame);\n }\n const sheriffByAllPlayerAttribute = createSheriffByAllPlayerAttribute();\n return addPlayerAttributeInGame(nominatedPlayers[0]._id, clonedGame, sheriffByAllPlayerAttribute);\n }\n\n private async allPlay(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const allPlayMethods: Partial Game | Promise>> = {\n [GAME_PLAY_ACTIONS.ELECT_SHERIFF]: () => this.allElectSheriff(play, clonedGame),\n [GAME_PLAY_ACTIONS.VOTE]: async() => this.allVote(play, clonedGame),\n };\n const allPlayMethod = allPlayMethods[clonedGame.currentPlay.action];\n if (allPlayMethod === undefined) {\n return clonedGame;\n }\n return allPlayMethod();\n }\n \n private thiefChoosesCard({ chosenCard }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const thiefPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.THIEF);\n if (!thiefPlayer || !chosenCard) {\n return clonedGame;\n }\n const chosenRole = roles.find(role => role.name === chosenCard.roleName);\n if (!chosenRole) {\n return clonedGame;\n }\n const newThiefSide: PlayerSide = { ...thiefPlayer.side, current: chosenRole.side };\n const newThiefRole: PlayerRole = { ...thiefPlayer.role, current: chosenRole.name };\n const playerDataToUpdate: Partial = { side: newThiefSide, role: newThiefRole };\n return updatePlayerInGame(thiefPlayer._id, playerDataToUpdate, clonedGame);\n }\n \n private scapegoatBansVoting({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n if (!targets) {\n return clonedGame;\n }\n const cantVoteByScapegoatPlayerAttribute = createCantVoteByScapegoatPlayerAttribute(clonedGame);\n return addPlayersAttributeInGame(targets.map(({ player }) => player._id), clonedGame, cantVoteByScapegoatPlayerAttribute);\n }\n \n private dogWolfChoosesSide({ chosenSide }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const dogWolfPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.DOG_WOLF);\n if (chosenSide === undefined || !dogWolfPlayer) {\n return clonedGame;\n }\n const playerDataToUpdate: Partial = { side: { ...dogWolfPlayer.side, current: chosenSide } };\n return updatePlayerInGame(dogWolfPlayer._id, playerDataToUpdate, clonedGame);\n }\n \n private wildChildChoosesModel({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const worshipedByWildChildPlayerAttribute = createWorshipedByWildChildPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, worshipedByWildChildPlayerAttribute);\n }\n\n private foxSniffs({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n const foxPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.FOX);\n const { isPowerlessIfMissesWerewolf: isFoxPowerlessIfMissesWerewolf } = clonedGame.options.roles.fox;\n if (targets?.length !== expectedTargetCount || !foxPlayer) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const foxSniffedPlayers = getFoxSniffedPlayers(targetedPlayer._id, clonedGame);\n const areEveryFoxSniffedPlayersVillagerSided = foxSniffedPlayers.every(player => player.side.current === ROLE_SIDES.VILLAGERS);\n if (isFoxPowerlessIfMissesWerewolf && areEveryFoxSniffedPlayersVillagerSided) {\n const powerlessByFoxPlayerAttribute = createPowerlessByFoxPlayerAttribute();\n return addPlayerAttributeInGame(foxPlayer._id, clonedGame, powerlessByFoxPlayerAttribute);\n }\n return clonedGame;\n }\n \n private ravenMarks({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const ravenMarkByRavenPlayerAttribute = createRavenMarkByRavenPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, ravenMarkByRavenPlayerAttribute);\n }\n \n private guardProtects({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const protectedByGuardPlayerAttribute = createProtectedByGuardPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, protectedByGuardPlayerAttribute);\n }\n\n private async hunterShoots({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const shotByHunterDeath = createPlayerShotByHunterDeath();\n return this.playerKillerService.killOrRevealPlayer(targetedPlayer._id, clonedGame, shotByHunterDeath);\n }\n\n private witchUsesPotions({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n let clonedGame = createGame(game);\n if (!targets) {\n return clonedGame;\n }\n const lifePotionAttribute = createDrankLifePotionByWitchPlayerAttribute();\n const deathPotionAttribute = createDrankDeathPotionByWitchPlayerAttribute();\n for (const target of targets) {\n const { player: targetedPlayer } = target;\n const drankPotionAttribute = target.drankPotion === WITCH_POTIONS.LIFE ? lifePotionAttribute : deathPotionAttribute;\n clonedGame = addPlayerAttributeInGame(targetedPlayer._id, clonedGame, drankPotionAttribute) as GameWithCurrentPlay;\n }\n return clonedGame;\n }\n\n private piedPiperCharms({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n if (targets === undefined) {\n return clonedGame;\n }\n const charmedByPiedPiperPlayerAttribute = createCharmedByPiedPiperPlayerAttribute();\n return addPlayersAttributeInGame(targets.map(({ player }) => player._id), clonedGame, charmedByPiedPiperPlayerAttribute);\n }\n\n private cupidCharms({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 2;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const inLoveByCupidPlayerAttribute = createInLoveByCupidPlayerAttribute();\n return addPlayersAttributeInGame(targets.map(({ player }) => player._id), clonedGame, inLoveByCupidPlayerAttribute);\n }\n\n private seerLooks({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const seenBySeerPlayerAttribute = createSeenBySeerPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, seenBySeerPlayerAttribute);\n }\n\n private whiteWerewolfEats({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const eatenByWhiteWerewolfPlayerAttribute = createEatenByWhiteWerewolfPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, eatenByWhiteWerewolfPlayerAttribute);\n }\n\n private bigBadWolfEats({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const eatenByBigBadWolfPlayerAttribute = createEatenByBigBadWolfPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, eatenByBigBadWolfPlayerAttribute);\n }\n\n private async werewolvesEat({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer, isInfected: isTargetInfected } = targets[0];\n const eatenByWerewolvesPlayerAttribute = createEatenByWerewolvesPlayerAttribute();\n const isAncientKillable = await this.playerKillerService.isAncientKillable(clonedGame, PLAYER_DEATH_CAUSES.EATEN);\n if (isTargetInfected === true && (targetedPlayer.role.current !== ROLE_NAMES.ANCIENT || isAncientKillable)) {\n const playerDataToUpdate: Partial = { side: { ...targetedPlayer.side, current: ROLE_SIDES.WEREWOLVES } };\n return updatePlayerInGame(targetedPlayer._id, playerDataToUpdate, clonedGame);\n }\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, eatenByWerewolvesPlayerAttribute);\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport { sample } from \"lodash\";\n\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GamePlayActions, GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames, PlayerDeathCauses, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlayAllVote, createGamePlaySheriffSettlesVotes } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getFoxSniffedPlayers, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { addPlayerAttributeInGame, addPlayersAttributeInGame, appendUpcomingPlayInGame, prependUpcomingPlayInGame, removePlayerAttributeByNameInGame, updatePlayerInGame } from \"@/modules/game/helpers/game.mutator\";\nimport { createCantVoteByScapegoatPlayerAttribute, createCharmedByPiedPiperPlayerAttribute, createDrankDeathPotionByWitchPlayerAttribute, createDrankLifePotionByWitchPlayerAttribute, createEatenByBigBadWolfPlayerAttribute, createEatenByWerewolvesPlayerAttribute, createEatenByWhiteWerewolfPlayerAttribute, createInLoveByCupidPlayerAttribute, createPowerlessByFoxPlayerAttribute, createProtectedByGuardPlayerAttribute, createRavenMarkByRavenPlayerAttribute, createSeenBySeerPlayerAttribute, createSheriffByAllPlayerAttribute, createSheriffBySheriffPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { createPlayerShotByHunterDeath, createPlayerVoteByAllDeath, createPlayerVoteBySheriffDeath, createPlayerVoteScapegoatedByAllDeath } from \"@/modules/game/helpers/player/player-death/player-death.factory\";\nimport { isPlayerAliveAndPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { PlayerKillerService } from \"@/modules/game/providers/services/player/player-killer.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerRole } from \"@/modules/game/schemas/player/player-role.schema\";\nimport type { PlayerSide } from \"@/modules/game/schemas/player/player-side.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeGamePlayAllElectSheriff } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\n\n@Injectable()\nexport class GamePlayMakerService {\n private readonly gameSourcePlayMethods: Partial Game | Promise>> = {\n [PlayerGroups.WEREWOLVES]: async(play, game) => this.werewolvesEat(play, game),\n [RoleNames.BIG_BAD_WOLF]: (play, game) => this.bigBadWolfEats(play, game),\n [RoleNames.WHITE_WEREWOLF]: (play, game) => this.whiteWerewolfEats(play, game),\n [RoleNames.SEER]: (play, game) => this.seerLooks(play, game),\n [RoleNames.CUPID]: (play, game) => this.cupidCharms(play, game),\n [RoleNames.PIED_PIPER]: (play, game) => this.piedPiperCharms(play, game),\n [RoleNames.WITCH]: (play, game) => this.witchUsesPotions(play, game),\n [RoleNames.HUNTER]: async(play, game) => this.hunterShoots(play, game),\n [RoleNames.GUARD]: (play, game) => this.guardProtects(play, game),\n [RoleNames.FOX]: (play, game) => this.foxSniffs(play, game),\n [RoleNames.WILD_CHILD]: (play, game) => this.wildChildChoosesModel(play, game),\n [RoleNames.DOG_WOLF]: (play, game) => this.dogWolfChoosesSide(play, game),\n [RoleNames.SCAPEGOAT]: (play, game) => this.scapegoatBansVoting(play, game),\n [RoleNames.THIEF]: (play, game) => this.thiefChoosesCard(play, game),\n [PlayerGroups.ALL]: async(play, game) => this.allPlay(play, game),\n [RoleNames.RAVEN]: (play, game) => this.ravenMarks(play, game),\n [PlayerAttributeNames.SHERIFF]: async(play, game) => this.sheriffPlays(play, game),\n };\n\n public constructor(\n private readonly playerKillerService: PlayerKillerService,\n private readonly gamePlayVoteService: GamePlayVoteService,\n ) {}\n\n public async makeGamePlay(play: MakeGamePlayWithRelationsDto, game: Game): Promise {\n if (!game.currentPlay) {\n throw createNoCurrentGamePlayUnexpectedException(\"makeGamePlay\", { gameId: game._id });\n }\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const gameSourcePlayMethod = this.gameSourcePlayMethods[clonedGame.currentPlay.source.name];\n if (gameSourcePlayMethod === undefined) {\n return clonedGame;\n }\n return gameSourcePlayMethod(play, clonedGame);\n }\n\n private async sheriffSettlesVotes({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const targetedPlayer = targets[0].player;\n const voteBySheriffDeath = createPlayerVoteBySheriffDeath();\n return this.playerKillerService.killOrRevealPlayer(targetedPlayer._id, clonedGame, voteBySheriffDeath);\n }\n\n private sheriffDelegates({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n let clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const targetedPlayer = targets[0].player;\n const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PlayerAttributeNames.SHERIFF);\n if (sheriffPlayer) {\n clonedGame = removePlayerAttributeByNameInGame(sheriffPlayer._id, clonedGame, PlayerAttributeNames.SHERIFF) as GameWithCurrentPlay;\n }\n const sheriffBySheriffPlayerAttribute = createSheriffBySheriffPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, sheriffBySheriffPlayerAttribute);\n }\n\n private async sheriffPlays(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const sheriffPlayMethods: Partial Game | Promise>> = {\n [GamePlayActions.DELEGATE]: () => this.sheriffDelegates(play, clonedGame),\n [GamePlayActions.SETTLE_VOTES]: async() => this.sheriffSettlesVotes(play, clonedGame),\n };\n const sheriffPlayMethod = sheriffPlayMethods[clonedGame.currentPlay.action];\n if (sheriffPlayMethod === undefined) {\n return clonedGame;\n }\n return sheriffPlayMethod();\n }\n\n private async handleTieInVotes(game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const scapegoatPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.SCAPEGOAT);\n if (scapegoatPlayer && isPlayerAliveAndPowerful(scapegoatPlayer, game)) {\n const playerVoteScapegoatedByAllDeath = createPlayerVoteScapegoatedByAllDeath();\n return this.playerKillerService.killOrRevealPlayer(scapegoatPlayer._id, clonedGame, playerVoteScapegoatedByAllDeath);\n }\n const sheriffPlayer = getPlayerWithActiveAttributeName(clonedGame, PlayerAttributeNames.SHERIFF);\n if (sheriffPlayer?.isAlive === true) {\n const gamePlaySheriffSettlesVotes = createGamePlaySheriffSettlesVotes();\n return prependUpcomingPlayInGame(gamePlaySheriffSettlesVotes, clonedGame);\n }\n if (clonedGame.currentPlay.cause !== GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) {\n const gamePlayAllVote = createGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n return prependUpcomingPlayInGame(gamePlayAllVote, clonedGame);\n }\n return clonedGame;\n }\n\n private async allVote({ votes, doesJudgeRequestAnotherVote }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n let clonedGame = createGame(game) as GameWithCurrentPlay;\n if (!votes) {\n return clonedGame;\n }\n const nominatedPlayers = this.gamePlayVoteService.getNominatedPlayers(votes, clonedGame);\n if (doesJudgeRequestAnotherVote === true) {\n const gamePlayAllVote = createGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST });\n clonedGame = appendUpcomingPlayInGame(gamePlayAllVote, clonedGame) as GameWithCurrentPlay;\n }\n if (nominatedPlayers.length > 1) {\n return this.handleTieInVotes(clonedGame);\n }\n if (nominatedPlayers.length === 1) {\n const playerVoteByAllDeath = createPlayerVoteByAllDeath();\n return this.playerKillerService.killOrRevealPlayer(nominatedPlayers[0]._id, clonedGame, playerVoteByAllDeath);\n }\n return clonedGame;\n }\n\n private handleTieInSheriffElection(nominatedPlayers: Player[], game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n if (clonedGame.currentPlay.cause !== GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) {\n const gamePlayAllElectSheriff = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n return prependUpcomingPlayInGame(gamePlayAllElectSheriff, clonedGame);\n }\n const randomNominatedPlayer = sample(nominatedPlayers);\n if (randomNominatedPlayer) {\n const sheriffByAllPlayerAttribute = createSheriffByAllPlayerAttribute();\n return addPlayerAttributeInGame(randomNominatedPlayer._id, clonedGame, sheriffByAllPlayerAttribute);\n }\n return clonedGame;\n }\n\n private allElectSheriff(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const { votes } = play;\n if (!votes) {\n return clonedGame;\n }\n const nominatedPlayers = this.gamePlayVoteService.getNominatedPlayers(votes, clonedGame);\n if (!nominatedPlayers.length) {\n return clonedGame;\n }\n if (nominatedPlayers.length !== 1) {\n return this.handleTieInSheriffElection(nominatedPlayers, clonedGame);\n }\n const sheriffByAllPlayerAttribute = createSheriffByAllPlayerAttribute();\n return addPlayerAttributeInGame(nominatedPlayers[0]._id, clonedGame, sheriffByAllPlayerAttribute);\n }\n\n private async allPlay(play: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const allPlayMethods: Partial Game | Promise>> = {\n [GamePlayActions.ELECT_SHERIFF]: () => this.allElectSheriff(play, clonedGame),\n [GamePlayActions.VOTE]: async() => this.allVote(play, clonedGame),\n };\n const allPlayMethod = allPlayMethods[clonedGame.currentPlay.action];\n if (allPlayMethod === undefined) {\n return clonedGame;\n }\n return allPlayMethod();\n }\n \n private thiefChoosesCard({ chosenCard }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const thiefPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.THIEF);\n if (!thiefPlayer || !chosenCard) {\n return clonedGame;\n }\n const chosenRole = ROLES.find(role => role.name === chosenCard.roleName);\n if (!chosenRole) {\n return clonedGame;\n }\n const newThiefSide: PlayerSide = { ...thiefPlayer.side, current: chosenRole.side };\n const newThiefRole: PlayerRole = { ...thiefPlayer.role, current: chosenRole.name };\n const playerDataToUpdate: Partial = { side: newThiefSide, role: newThiefRole };\n return updatePlayerInGame(thiefPlayer._id, playerDataToUpdate, clonedGame);\n }\n \n private scapegoatBansVoting({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n if (!targets) {\n return clonedGame;\n }\n const cantVoteByScapegoatPlayerAttribute = createCantVoteByScapegoatPlayerAttribute(clonedGame);\n return addPlayersAttributeInGame(targets.map(({ player }) => player._id), clonedGame, cantVoteByScapegoatPlayerAttribute);\n }\n \n private dogWolfChoosesSide({ chosenSide }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const dogWolfPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.DOG_WOLF);\n if (chosenSide === undefined || !dogWolfPlayer) {\n return clonedGame;\n }\n const playerDataToUpdate: Partial = { side: { ...dogWolfPlayer.side, current: chosenSide } };\n return updatePlayerInGame(dogWolfPlayer._id, playerDataToUpdate, clonedGame);\n }\n \n private wildChildChoosesModel({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const worshipedByWildChildPlayerAttribute = createWorshipedByWildChildPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, worshipedByWildChildPlayerAttribute);\n }\n\n private foxSniffs({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n const foxPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.FOX);\n const { isPowerlessIfMissesWerewolf: isFoxPowerlessIfMissesWerewolf } = clonedGame.options.roles.fox;\n if (targets?.length !== expectedTargetCount || !foxPlayer) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const foxSniffedPlayers = getFoxSniffedPlayers(targetedPlayer._id, clonedGame);\n const areEveryFoxSniffedPlayersVillagerSided = foxSniffedPlayers.every(player => player.side.current === RoleSides.VILLAGERS);\n if (isFoxPowerlessIfMissesWerewolf && areEveryFoxSniffedPlayersVillagerSided) {\n const powerlessByFoxPlayerAttribute = createPowerlessByFoxPlayerAttribute();\n return addPlayerAttributeInGame(foxPlayer._id, clonedGame, powerlessByFoxPlayerAttribute);\n }\n return clonedGame;\n }\n \n private ravenMarks({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const ravenMarkByRavenPlayerAttribute = createRavenMarkByRavenPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, ravenMarkByRavenPlayerAttribute);\n }\n \n private guardProtects({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const protectedByGuardPlayerAttribute = createProtectedByGuardPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, protectedByGuardPlayerAttribute);\n }\n\n private async hunterShoots({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const shotByHunterDeath = createPlayerShotByHunterDeath();\n return this.playerKillerService.killOrRevealPlayer(targetedPlayer._id, clonedGame, shotByHunterDeath);\n }\n\n private witchUsesPotions({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n let clonedGame = createGame(game);\n if (!targets) {\n return clonedGame;\n }\n const lifePotionAttribute = createDrankLifePotionByWitchPlayerAttribute();\n const deathPotionAttribute = createDrankDeathPotionByWitchPlayerAttribute();\n for (const target of targets) {\n const { player: targetedPlayer } = target;\n const drankPotionAttribute = target.drankPotion === WitchPotions.LIFE ? lifePotionAttribute : deathPotionAttribute;\n clonedGame = addPlayerAttributeInGame(targetedPlayer._id, clonedGame, drankPotionAttribute) as GameWithCurrentPlay;\n }\n return clonedGame;\n }\n\n private piedPiperCharms({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n if (targets === undefined) {\n return clonedGame;\n }\n const charmedByPiedPiperPlayerAttribute = createCharmedByPiedPiperPlayerAttribute();\n return addPlayersAttributeInGame(targets.map(({ player }) => player._id), clonedGame, charmedByPiedPiperPlayerAttribute);\n }\n\n private cupidCharms({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 2;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const inLoveByCupidPlayerAttribute = createInLoveByCupidPlayerAttribute();\n return addPlayersAttributeInGame(targets.map(({ player }) => player._id), clonedGame, inLoveByCupidPlayerAttribute);\n }\n\n private seerLooks({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const seenBySeerPlayerAttribute = createSeenBySeerPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, seenBySeerPlayerAttribute);\n }\n\n private whiteWerewolfEats({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const eatenByWhiteWerewolfPlayerAttribute = createEatenByWhiteWerewolfPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, eatenByWhiteWerewolfPlayerAttribute);\n }\n\n private bigBadWolfEats({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Game {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer } = targets[0];\n const eatenByBigBadWolfPlayerAttribute = createEatenByBigBadWolfPlayerAttribute();\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, eatenByBigBadWolfPlayerAttribute);\n }\n\n private async werewolvesEat({ targets }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n const clonedGame = createGame(game);\n const expectedTargetCount = 1;\n if (targets?.length !== expectedTargetCount) {\n return clonedGame;\n }\n const { player: targetedPlayer, isInfected: isTargetInfected } = targets[0];\n const eatenByWerewolvesPlayerAttribute = createEatenByWerewolvesPlayerAttribute();\n const isAncientKillable = await this.playerKillerService.isAncientKillable(clonedGame, PlayerDeathCauses.EATEN);\n if (isTargetInfected === true && (targetedPlayer.role.current !== RoleNames.ANCIENT || isAncientKillable)) {\n const playerDataToUpdate: Partial = { side: { ...targetedPlayer.side, current: RoleSides.WEREWOLVES } };\n return updatePlayerInGame(targetedPlayer._id, playerDataToUpdate, clonedGame);\n }\n return addPlayerAttributeInGame(targetedPlayer._id, clonedGame, eatenByWerewolvesPlayerAttribute);\n }\n}" }, "src/modules/game/providers/services/game-play/game-play-validator.service.ts": { "language": "typescript", @@ -59161,7 +59304,7 @@ "id": "1605", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -59349,7 +59492,7 @@ "id": "1612", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -59482,7 +59625,7 @@ "id": "1617", "mutatorName": "BooleanLiteral", "replacement": "mustChooseBetweenWerewolves", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -59532,8 +59675,8 @@ { "id": "1619", "mutatorName": "MethodExpression", - "replacement": "game.additionalCards.some(({\n roleName\n}) => werewolvesRoles.find(role => role.name === roleName))", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.additionalCards.some(({\n roleName\n}) => WEREWOLF_ROLES.find(role => role.name === roleName))", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59547,7 +59690,7 @@ ], "location": { "end": { - "column": 143, + "column": 142, "line": 47 }, "start": { @@ -59560,7 +59703,7 @@ "id": "1620", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59574,7 +59717,7 @@ ], "location": { "end": { - "column": 142, + "column": 141, "line": 47 }, "start": { @@ -59587,7 +59730,7 @@ "id": "1621", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59601,11 +59744,11 @@ ], "location": { "end": { - "column": 141, + "column": 140, "line": 47 }, "start": { - "column": 111, + "column": 110, "line": 47 } } @@ -59614,7 +59757,7 @@ "id": "1622", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59628,11 +59771,11 @@ ], "location": { "end": { - "column": 141, + "column": 140, "line": 47 }, "start": { - "column": 119, + "column": 118, "line": 47 } } @@ -59641,9 +59784,13 @@ "id": "1623", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "6" + ], "coveredBy": [ "4", "5", @@ -59651,11 +59798,11 @@ ], "location": { "end": { - "column": 141, + "column": 140, "line": 47 }, "start": { - "column": 119, + "column": 118, "line": 47 } } @@ -59664,13 +59811,9 @@ "id": "1624", "mutatorName": "EqualityOperator", "replacement": "role.name !== roleName", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "4" - ], + "killedBy": [], "coveredBy": [ "4", "5", @@ -59678,11 +59821,11 @@ ], "location": { "end": { - "column": 141, + "column": 140, "line": 47 }, "start": { - "column": 119, + "column": 118, "line": 47 } } @@ -59691,7 +59834,7 @@ "id": "1625", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59718,13 +59861,9 @@ "id": "1626", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "6" - ], + "killedBy": [], "coveredBy": [ "4", "5", @@ -59745,7 +59884,7 @@ "id": "1627", "mutatorName": "LogicalOperator", "replacement": "areAllAdditionalCardsWerewolves || !chosenCard", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:177:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -59772,7 +59911,7 @@ "id": "1628", "mutatorName": "BooleanLiteral", "replacement": "chosenCard", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:189:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:189:105)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -59798,7 +59937,7 @@ "id": "1629", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:201:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -59823,9 +59962,13 @@ "id": "1630", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:228:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "8" + ], "coveredBy": [ "7", "8", @@ -59848,7 +59991,7 @@ "id": "1631", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: thrown: BadGamePlayPayloadException {\n \"getResponse\": [Function getResponse],\n \"getStatus\": [Function getStatus],\n \"initCause\": [Function initCause],\n \"initMessage\": [Function initMessage],\n \"initName\": [Function initName],\n \"toString\": [Function toString],\n}\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:232:5\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:206:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:36:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: thrown: BadGamePlayPayloadException {\n \"getResponse\": [Function getResponse],\n \"getStatus\": [Function getStatus],\n \"initCause\": [Function initCause],\n \"initMessage\": [Function initMessage],\n \"initName\": [Function initName],\n \"toString\": [Function toString],\n}\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:232:5\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:206:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:36:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -59864,7 +60007,7 @@ ], "location": { "end": { - "column": 66, + "column": 64, "line": 54 }, "start": { @@ -59877,7 +60020,7 @@ "id": "1632", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:228:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:228:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -59893,7 +60036,7 @@ ], "location": { "end": { - "column": 66, + "column": 64, "line": 54 }, "start": { @@ -59905,14 +60048,10 @@ { "id": "1633", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.action === GAME_PLAY_ACTIONS.CHOOSE_CARD", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:228:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "game.currentPlay.action === GamePlayActions.CHOOSE_CARD", + "status": "Timeout", "static": false, - "killedBy": [ - "8" - ], + "killedBy": [], "coveredBy": [ "7", "8", @@ -59922,7 +60061,7 @@ ], "location": { "end": { - "column": 66, + "column": 64, "line": 54 }, "start": { @@ -59935,9 +60074,13 @@ "id": "1634", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:228:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "8" + ], "coveredBy": [ "7", "8", @@ -59950,7 +60093,7 @@ "line": 59 }, "start": { - "column": 68, + "column": 66, "line": 54 } } @@ -60011,7 +60154,7 @@ "id": "1637", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:228:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:228:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -60036,7 +60179,7 @@ "id": "1638", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:250:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:250:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -60090,7 +60233,7 @@ "id": "1640", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank life potion (`targets.drankPotion`)\"], but it was called with \"Life potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:251:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank life potion (`targets.drankPotion`)\"], but it was called with \"Life potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:251:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -60119,7 +60262,7 @@ "id": "1641", "mutatorName": "EqualityOperator", "replacement": "drankLifePotionTargets.length >= 1", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Life potion can't be applied to this target (`targets.drankPotion`)\"], but it was called with \"There are too much targets which drank life potion (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:260:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Life potion can't be applied to this target (`targets.drankPotion`)\"], but it was called with \"There are too much targets which drank life potion (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:260:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -60148,7 +60291,7 @@ "id": "1642", "mutatorName": "EqualityOperator", "replacement": "drankLifePotionTargets.length <= 1", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank life potion (`targets.drankPotion`)\"], but it was called with \"Life potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:251:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank life potion (`targets.drankPotion`)\"], but it was called with \"Life potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:251:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -60177,7 +60320,7 @@ "id": "1643", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank life potion (`targets.drankPotion`)\"], but it was called with \"Life potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:251:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank life potion (`targets.drankPotion`)\"], but it was called with \"Life potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:251:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -60202,7 +60345,7 @@ "id": "1644", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60217,7 +60360,7 @@ ], "location": { "end": { - "column": 162, + "column": 160, "line": 68 }, "start": { @@ -60230,7 +60373,7 @@ "id": "1645", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:259:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:259:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60245,7 +60388,7 @@ ], "location": { "end": { - "column": 162, + "column": 160, "line": 68 }, "start": { @@ -60257,8 +60400,8 @@ { "id": "1646", "mutatorName": "LogicalOperator", - "replacement": "drankLifePotionTargets.length || !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game) || !drankLifePotionTargets[0].player.isAlive", - "statusReason": "Error: expect(received).not.toThrow()\n\nError name: \"TypeError\"\nError message: \"Cannot read properties of undefined (reading 'player')\"\n\n 167 | }\n 168 | }\n > 169 | if (stryMutAct_9fa48(\"1646\") ? drankLifePotionTargets.length || !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game) || !drankLifePotionTargets[0].player.isAlive : stryMutAct_9fa48(\"1645\") ? false : stryMutAct_9fa48(\"1644\") ? true : (stryCov_9fa48(\"1644\", \"1645\", \"1646\"), drankLifePotionTargets.length && (stryMutAct_9fa48(\"1648\") ? !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game) && !drankLifePotionTargets[0].player.isAlive : stryMutAct_9fa48(\"1647\") ? true : (stryCov_9fa48(\"1647\", \"1648\"), (stryMutAct_9fa48(\"1649\") ? doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game) : (stryCov_9fa48(\"1649\"), !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game))) || (stryMutAct_9fa48(\"1650\") ? drankLifePotionTargets[0].player.isAlive : (stryCov_9fa48(\"1650\"), !drankLifePotionTargets[0].player.isAlive)))))) {\n | ^\n 170 | if (stryMutAct_9fa48(\"1651\")) {\n 171 | {}\n 172 | } else {\n\n at GamePlayValidatorService.validateDrankLifePotionTargets (src/modules/game/providers/services/game-play/game-play-validator.service.ts:169:136)\n at tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:80\n at Object. (../../node_modules/expect/build/toThrowMatchers.js:74:11)\n at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)\n at Object. (tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:96)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "drankLifePotionTargets.length || !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game) || !drankLifePotionTargets[0].player.isAlive", + "statusReason": "Error: expect(received).not.toThrow()\n\nError name: \"TypeError\"\nError message: \"Cannot read properties of undefined (reading 'player')\"\n\n 167 | }\n 168 | }\n > 169 | if (stryMutAct_9fa48(\"1646\") ? drankLifePotionTargets.length || !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game) || !drankLifePotionTargets[0].player.isAlive : stryMutAct_9fa48(\"1645\") ? false : stryMutAct_9fa48(\"1644\") ? true : (stryCov_9fa48(\"1644\", \"1645\", \"1646\"), drankLifePotionTargets.length && (stryMutAct_9fa48(\"1648\") ? !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game) && !drankLifePotionTargets[0].player.isAlive : stryMutAct_9fa48(\"1647\") ? true : (stryCov_9fa48(\"1647\", \"1648\"), (stryMutAct_9fa48(\"1649\") ? doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game) : (stryCov_9fa48(\"1649\"), !doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game))) || (stryMutAct_9fa48(\"1650\") ? drankLifePotionTargets[0].player.isAlive : (stryCov_9fa48(\"1650\"), !drankLifePotionTargets[0].player.isAlive)))))) {\n | ^\n 170 | if (stryMutAct_9fa48(\"1651\")) {\n 171 | {}\n 172 | } else {\n\n at GamePlayValidatorService.validateDrankLifePotionTargets (src/modules/game/providers/services/game-play/game-play-validator.service.ts:169:136)\n at tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:80\n at Object. (../../node_modules/expect/build/toThrowMatchers.js:74:11)\n at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)\n at Object. (tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:96)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:275:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60273,7 +60416,7 @@ ], "location": { "end": { - "column": 162, + "column": 160, "line": 68 }, "start": { @@ -60286,9 +60429,13 @@ "id": "1647", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:283:116)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "14" + ], "coveredBy": [ "11", "12", @@ -60296,7 +60443,7 @@ ], "location": { "end": { - "column": 161, + "column": 159, "line": 68 }, "start": { @@ -60308,8 +60455,8 @@ { "id": "1648", "mutatorName": "LogicalOperator", - "replacement": "!doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game) && !drankLifePotionTargets[0].player.isAlive", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:259:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game) && !drankLifePotionTargets[0].player.isAlive", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:259:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -60323,7 +60470,7 @@ ], "location": { "end": { - "column": 161, + "column": 159, "line": 68 }, "start": { @@ -60335,8 +60482,8 @@ { "id": "1649", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game)", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:268:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:268:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -60350,7 +60497,7 @@ ], "location": { "end": { - "column": 116, + "column": 114, "line": 68 }, "start": { @@ -60363,24 +60510,20 @@ "id": "1650", "mutatorName": "BooleanLiteral", "replacement": "drankLifePotionTargets[0].player.isAlive", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:259:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "11" - ], + "killedBy": [], "coveredBy": [ "11", "14" ], "location": { "end": { - "column": 161, + "column": 159, "line": 68 }, "start": { - "column": 120, + "column": 118, "line": 68 } } @@ -60389,7 +60532,7 @@ "id": "1651", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:259:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:259:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -60406,7 +60549,7 @@ "line": 70 }, "start": { - "column": 164, + "column": 162, "line": 68 } } @@ -60415,7 +60558,7 @@ "id": "1652", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:294:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:294:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60443,7 +60586,7 @@ "id": "1653", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Death potion can't be applied to this target (`targets.drankPotion`)\"], but it was called with \"There are too much targets which drank death potion (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:303:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Death potion can't be applied to this target (`targets.drankPotion`)\"], but it was called with \"There are too much targets which drank death potion (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:303:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60471,7 +60614,7 @@ "id": "1654", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank death potion (`targets.drankPotion`)\"], but it was called with \"Death potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:295:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank death potion (`targets.drankPotion`)\"], but it was called with \"Death potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:295:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60499,7 +60642,7 @@ "id": "1655", "mutatorName": "EqualityOperator", "replacement": "drankDeathPotionTargets.length >= 1", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Death potion can't be applied to this target (`targets.drankPotion`)\"], but it was called with \"There are too much targets which drank death potion (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:303:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Death potion can't be applied to this target (`targets.drankPotion`)\"], but it was called with \"There are too much targets which drank death potion (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:303:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60527,7 +60670,7 @@ "id": "1656", "mutatorName": "EqualityOperator", "replacement": "drankDeathPotionTargets.length <= 1", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:294:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank death potion (`targets.drankPotion`)\"], but it was called with \"Death potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:295:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -60555,7 +60698,7 @@ "id": "1657", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank death potion (`targets.drankPotion`)\"], but it was called with \"Death potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:295:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"There are too much targets which drank death potion (`targets.drankPotion`)\"], but it was called with \"Death potion can't be applied to this target (`targets.drankPotion`)\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:295:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -60607,9 +60750,13 @@ "id": "1659", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:302:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "16" + ], "coveredBy": [ "16", "17", @@ -60657,7 +60804,7 @@ "id": "1661", "mutatorName": "BooleanLiteral", "replacement": "drankDeathPotionTargets[0].player.isAlive", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:302:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:302:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -60683,13 +60830,9 @@ "id": "1662", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:302:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "16" - ], + "killedBy": [], "coveredBy": [ "16" ], @@ -60708,7 +60851,7 @@ "id": "1663", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60740,7 +60883,7 @@ "id": "1664", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60759,7 +60902,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 83 }, "start": { @@ -60772,7 +60915,7 @@ "id": "1665", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60791,7 +60934,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 83 }, "start": { @@ -60803,8 +60946,8 @@ { "id": "1666", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length >= 0", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length >= 0", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60823,7 +60966,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 83 }, "start": { @@ -60835,8 +60978,8 @@ { "id": "1667", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length <= 0", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length <= 0", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60855,7 +60998,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 83 }, "start": { @@ -60868,7 +61011,7 @@ "id": "1668", "mutatorName": "MethodExpression", "replacement": "playTargets", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[], {\"_id\": \"fc96f2fd3e30adc7dcaee7fd\", \"createdAt\": 2023-08-26T16:10:20.170Z, \"currentPlay\": {\"action\": \"use-potions\", \"cause\": undefined, \"source\": {\"name\": \"witch\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 2055276758827008}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 5}, \"twoSisters\": {\"wakingUpInterval\": 1}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [], \"status\": \"canceled\", \"tick\": 4642185540534272, \"turn\": 8705716166590464, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T15:37:09.233Z}], but it was called with [{\"player\": {\"_id\": \"ebba6ffa3d68433ced6badfa\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Elyssa\", \"position\": 3641561992658944, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:420:82)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[], {\"_id\": \"d9b7080cc4ab53cfefbdf89a\", \"createdAt\": 2023-08-27T20:17:59.364Z, \"currentPlay\": {\"action\": \"use-potions\", \"cause\": undefined, \"source\": {\"name\": \"witch\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 6338344063598592}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [], \"status\": \"playing\", \"tick\": 240473935446016, \"turn\": 2461858422325248, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T10:12:53.022Z}], but it was called with [{\"player\": {\"_id\": \"dee92e5b7b7085974886bf3b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Adeline\", \"position\": 8250206000775168, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:420:82)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60887,7 +61030,7 @@ ], "location": { "end": { - "column": 111, + "column": 110, "line": 84 }, "start": { @@ -60900,9 +61043,13 @@ "id": "1669", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "19" + ], "coveredBy": [ "19", "20", @@ -60915,7 +61062,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 84 }, "start": { @@ -60928,7 +61075,7 @@ "id": "1670", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[], {\"_id\": \"946d49eec508afb7dfebbcbe\", \"createdAt\": 2023-08-26T17:39:31.879Z, \"currentPlay\": {\"action\": \"use-potions\", \"cause\": undefined, \"source\": {\"name\": \"witch\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 4004372509884416}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [], \"status\": \"playing\", \"tick\": 2644121422397440, \"turn\": 867041426800640, \"upcomingPlays\": [], \"updatedAt\": 2023-08-25T20:54:50.403Z}], but it was called with [{\"player\": {\"_id\": \"dac65c11de7d3f550df8474c\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Rhiannon\", \"position\": 2274576048324608, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:420:82)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[], {\"_id\": \"f9ee8edbc2c12cb0944ec8c2\", \"createdAt\": 2023-08-28T06:53:11.789Z, \"currentPlay\": {\"action\": \"use-potions\", \"cause\": undefined, \"source\": {\"name\": \"witch\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 1158290018926592}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [], \"status\": \"canceled\", \"tick\": 152037683625984, \"turn\": 5063450703167488, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T06:28:22.070Z}], but it was called with [{\"player\": {\"_id\": \"edade8dcbcad75c97ccdac4a\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Eleazar\", \"position\": 3101676995084288, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:420:82)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60947,7 +61094,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 84 }, "start": { @@ -60960,7 +61107,7 @@ "id": "1671", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -60979,7 +61126,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 84 }, "start": { @@ -60991,8 +61138,8 @@ { "id": "1672", "mutatorName": "EqualityOperator", - "replacement": "drankPotion !== WITCH_POTIONS.LIFE", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[], {\"_id\": \"20fabcc9c92deba00d6dfb7f\", \"createdAt\": 2023-08-25T23:02:37.377Z, \"currentPlay\": {\"action\": \"use-potions\", \"cause\": undefined, \"source\": {\"name\": \"witch\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 6158305047085056}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [], \"status\": \"playing\", \"tick\": 802677822849024, \"turn\": 3706931954843648, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T01:30:34.667Z}], but it was called with [{\"player\": {\"_id\": \"7cb2fb4c0abd36bbfb930122\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Ansley\", \"position\": 7317502883266560, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:420:82)", + "replacement": "drankPotion !== WitchPotions.LIFE", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[], {\"_id\": \"e5a6c13934196b38f3a4bf19\", \"createdAt\": 2023-08-28T07:17:52.376Z, \"currentPlay\": {\"action\": \"use-potions\", \"cause\": undefined, \"source\": {\"name\": \"witch\", \"players\": undefined}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 7191134736482304}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [], \"status\": \"over\", \"tick\": 1637938899189760, \"turn\": 2845287057981440, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T02:37:41.354Z}], but it was called with [{\"player\": {\"_id\": \"b4b824e3ecf24493bb1684ae\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dolores\", \"position\": 6165748793737216, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:420:82)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61011,7 +61158,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 84 }, "start": { @@ -61024,7 +61171,7 @@ "id": "1673", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61043,7 +61190,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 85 }, "start": { @@ -61056,7 +61203,7 @@ "id": "1674", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61075,7 +61222,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 85 }, "start": { @@ -61087,8 +61234,8 @@ { "id": "1675", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length >= 0", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length >= 0", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61107,7 +61254,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 85 }, "start": { @@ -61119,10 +61266,14 @@ { "id": "1676", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length <= 0", - "status": "Timeout", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length <= 0", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "21" + ], "coveredBy": [ "19", "20", @@ -61135,7 +61286,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 85 }, "start": { @@ -61148,7 +61299,7 @@ "id": "1677", "mutatorName": "MethodExpression", "replacement": "playTargets", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[]], but it was called with [{\"player\": {\"_id\": \"bf35fbbcdd7ba49c084f5c9b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Erik\", \"position\": 3852405848408064, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:421:83)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[]], but it was called with [{\"player\": {\"_id\": \"c53d3bc434cedf3f4ded9d6c\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Frederick\", \"position\": 5207181576110080, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:421:83)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61167,7 +61318,7 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 86 }, "start": { @@ -61180,7 +61331,7 @@ "id": "1678", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61199,7 +61350,7 @@ ], "location": { "end": { - "column": 112, + "column": 111, "line": 86 }, "start": { @@ -61212,7 +61363,7 @@ "id": "1679", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[]], but it was called with [{\"player\": {\"_id\": \"1fa2d7e7f2bd1ecad98db517\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Luna\", \"position\": 2028068057120768, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:421:83)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[]], but it was called with [{\"player\": {\"_id\": \"4f3cf0cefca4f6e6d66e52ba\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dillan\", \"position\": 9003041827061760, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:421:83)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61231,7 +61382,7 @@ ], "location": { "end": { - "column": 112, + "column": 111, "line": 86 }, "start": { @@ -61244,7 +61395,7 @@ "id": "1680", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61263,7 +61414,7 @@ ], "location": { "end": { - "column": 112, + "column": 111, "line": 86 }, "start": { @@ -61275,14 +61426,10 @@ { "id": "1681", "mutatorName": "EqualityOperator", - "replacement": "drankPotion !== WITCH_POTIONS.DEATH", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [[]], but it was called with [{\"player\": {\"_id\": \"30ae1b3c3e882bc57ba9fe24\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Edyth\", \"position\": 4284225987543040, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:421:83)", - "status": "Killed", - "testsCompleted": 8, + "replacement": "drankPotion !== WitchPotions.DEATH", + "status": "Timeout", "static": false, - "killedBy": [ - "23" - ], + "killedBy": [], "coveredBy": [ "19", "20", @@ -61295,7 +61442,7 @@ ], "location": { "end": { - "column": 112, + "column": 111, "line": 86 }, "start": { @@ -61308,9 +61455,13 @@ "id": "1682", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:419:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "23" + ], "coveredBy": [ "19", "20", @@ -61336,7 +61487,7 @@ "id": "1683", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61368,9 +61519,13 @@ "id": "1684", "mutatorName": "LogicalOperator", "replacement": "hasWitchUsedLifePotion && drankLifePotionTargets.length && hasWitchUsedDeathPotion && drankDeathPotionTargets.length", - "status": "Timeout", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "19" + ], "coveredBy": [ "19", "20", @@ -61396,7 +61551,7 @@ "id": "1685", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -61428,9 +61583,13 @@ "id": "1686", "mutatorName": "LogicalOperator", "replacement": "hasWitchUsedLifePotion || drankLifePotionTargets.length", - "status": "Timeout", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "24" + ], "coveredBy": [ "19", "20", @@ -61456,7 +61615,7 @@ "id": "1687", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:391:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -61486,7 +61645,7 @@ "id": "1688", "mutatorName": "LogicalOperator", "replacement": "hasWitchUsedDeathPotion || drankDeathPotionTargets.length", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:433:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -61516,13 +61675,9 @@ "id": "1689", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:352:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "19" - ], + "killedBy": [], "coveredBy": [ "19", "20", @@ -61544,7 +61699,7 @@ "id": "1690", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:478:126)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:478:126)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -62174,7 +62329,7 @@ "id": "1712", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:478:126)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:478:126)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -62223,13 +62378,9 @@ "id": "1714", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:573:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "33" - ], + "killedBy": [], "coveredBy": [ "32", "33", @@ -62253,7 +62404,7 @@ "id": "1715", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:573:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:573:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -62297,11 +62448,11 @@ ], "location": { "end": { - "column": 53, + "column": 52, "line": 113 }, "start": { - "column": 35, + "column": 34, "line": 113 } } @@ -62324,11 +62475,11 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 114 }, "start": { - "column": 34, + "column": 33, "line": 114 } } @@ -62351,11 +62502,11 @@ ], "location": { "end": { - "column": 81, + "column": 80, "line": 115 }, "start": { - "column": 36, + "column": 35, "line": 115 } } @@ -62467,9 +62618,13 @@ "id": "1723", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 12, "static": false, - "killedBy": [], + "killedBy": [ + "39" + ], "coveredBy": [ "38", "39", @@ -62752,7 +62907,6 @@ "43", "44", "45", - "46", "48", "49" ], @@ -62786,7 +62940,6 @@ "43", "44", "45", - "46", "48", "49" ], @@ -62820,7 +62973,6 @@ "43", "44", "45", - "46", "48", "49" ], @@ -62839,7 +62991,7 @@ "id": "1734", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Big bad wolf can't eat this target\"], but it was called with \"Werewolves can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:663:43)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Big bad wolf can't eat this target\"], but it was called with \"Werewolves can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:663:43)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -62861,7 +63013,7 @@ ], "location": { "end": { - "column": 106, + "column": 105, "line": 132 }, "start": { @@ -62874,7 +63026,7 @@ "id": "1735", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -62896,7 +63048,7 @@ ], "location": { "end": { - "column": 106, + "column": 105, "line": 132 }, "start": { @@ -62908,8 +63060,8 @@ { "id": "1736", "mutatorName": "LogicalOperator", - "replacement": "game.currentPlay.source.name === PLAYER_GROUPS.WEREWOLVES || !isTargetedPlayerInPureWolvesTargets", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Big bad wolf can't eat this target\"], but it was called with \"Werewolves can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:663:43)", + "replacement": "game.currentPlay.source.name === PlayerGroups.WEREWOLVES || !isTargetedPlayerInPureWolvesTargets", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Big bad wolf can't eat this target\"], but it was called with \"Werewolves can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:663:43)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -62931,7 +63083,7 @@ ], "location": { "end": { - "column": 106, + "column": 105, "line": 132 }, "start": { @@ -62944,7 +63096,7 @@ "id": "1737", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Big bad wolf can't eat this target\"], but it was called with \"Werewolves can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:663:43)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Big bad wolf can't eat this target\"], but it was called with \"Werewolves can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:663:43)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -62966,7 +63118,7 @@ ], "location": { "end": { - "column": 66, + "column": 65, "line": 132 }, "start": { @@ -62978,10 +63130,14 @@ { "id": "1738", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.source.name !== PLAYER_GROUPS.WEREWOLVES", - "status": "Timeout", + "replacement": "game.currentPlay.source.name !== PlayerGroups.WEREWOLVES", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "39" + ], "coveredBy": [ "39", "40", @@ -62997,7 +63153,7 @@ ], "location": { "end": { - "column": 66, + "column": 65, "line": 132 }, "start": { @@ -63020,11 +63176,11 @@ ], "location": { "end": { - "column": 106, + "column": 105, "line": 132 }, "start": { - "column": 70, + "column": 69, "line": 132 } } @@ -63033,7 +63189,7 @@ "id": "1740", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:634:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -63050,7 +63206,7 @@ "line": 134 }, "start": { - "column": 108, + "column": 107, "line": 132 } } @@ -63059,13 +63215,9 @@ "id": "1741", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"White werewolf can't eat this target\"], but it was called with \"Big bad wolf can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:705:43)", - "status": "Killed", - "testsCompleted": 9, + "status": "Timeout", "static": false, - "killedBy": [ - "44" - ], + "killedBy": [], "coveredBy": [ "41", "42", @@ -63079,7 +63231,7 @@ ], "location": { "end": { - "column": 105, + "column": 104, "line": 135 }, "start": { @@ -63092,7 +63244,7 @@ "id": "1742", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:662:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:662:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -63112,7 +63264,7 @@ ], "location": { "end": { - "column": 105, + "column": 104, "line": 135 }, "start": { @@ -63124,8 +63276,8 @@ { "id": "1743", "mutatorName": "LogicalOperator", - "replacement": "game.currentPlay.source.name === ROLE_NAMES.BIG_BAD_WOLF || !isTargetedPlayerInPureWolvesTargets", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"White werewolf can't eat this target\"], but it was called with \"Big bad wolf can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:705:43)", + "replacement": "game.currentPlay.source.name === RoleNames.BIG_BAD_WOLF || !isTargetedPlayerInPureWolvesTargets", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"White werewolf can't eat this target\"], but it was called with \"Big bad wolf can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:705:43)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -63145,7 +63297,7 @@ ], "location": { "end": { - "column": 105, + "column": 104, "line": 135 }, "start": { @@ -63158,7 +63310,7 @@ "id": "1744", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"White werewolf can't eat this target\"], but it was called with \"Big bad wolf can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:705:43)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"White werewolf can't eat this target\"], but it was called with \"Big bad wolf can't eat this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:705:43)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -63178,7 +63330,7 @@ ], "location": { "end": { - "column": 65, + "column": 64, "line": 135 }, "start": { @@ -63190,8 +63342,8 @@ { "id": "1745", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.source.name !== ROLE_NAMES.BIG_BAD_WOLF", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:662:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.currentPlay.source.name !== RoleNames.BIG_BAD_WOLF", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:662:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -63211,7 +63363,7 @@ ], "location": { "end": { - "column": 65, + "column": 64, "line": 135 }, "start": { @@ -63239,11 +63391,11 @@ ], "location": { "end": { - "column": 105, + "column": 104, "line": 135 }, "start": { - "column": 69, + "column": 68, "line": 135 } } @@ -63252,7 +63404,7 @@ "id": "1747", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:662:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:662:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -63270,7 +63422,7 @@ "line": 137 }, "start": { - "column": 107, + "column": 106, "line": 135 } } @@ -63375,6 +63527,7 @@ "coveredBy": [ "44", "45", + "46", "47" ], "location": { @@ -63402,6 +63555,7 @@ "coveredBy": [ "44", "45", + "46", "47" ], "location": { @@ -63429,6 +63583,7 @@ "coveredBy": [ "44", "45", + "46", "47" ], "location": { @@ -63446,7 +63601,7 @@ "id": "1754", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:737:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:737:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -63463,7 +63618,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 140 }, "start": { @@ -63476,7 +63631,7 @@ "id": "1755", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:704:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:704:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -63493,7 +63648,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 140 }, "start": { @@ -63505,14 +63660,10 @@ { "id": "1756", "mutatorName": "LogicalOperator", - "replacement": "game.currentPlay.source.name === ROLE_NAMES.WHITE_WEREWOLF || !isTargetedPlayerInWhiteWerewolfTargets", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:737:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "replacement": "game.currentPlay.source.name === RoleNames.WHITE_WEREWOLF || !isTargetedPlayerInWhiteWerewolfTargets", + "status": "Timeout", "static": false, - "killedBy": [ - "47" - ], + "killedBy": [], "coveredBy": [ "44", "45", @@ -63523,7 +63674,7 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 140 }, "start": { @@ -63536,7 +63687,7 @@ "id": "1757", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:745:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:745:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -63553,7 +63704,7 @@ ], "location": { "end": { - "column": 67, + "column": 66, "line": 140 }, "start": { @@ -63565,14 +63716,10 @@ { "id": "1758", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.source.name !== ROLE_NAMES.WHITE_WEREWOLF", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:704:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "replacement": "game.currentPlay.source.name !== RoleNames.WHITE_WEREWOLF", + "status": "Timeout", "static": false, - "killedBy": [ - "44" - ], + "killedBy": [], "coveredBy": [ "44", "45", @@ -63583,7 +63730,7 @@ ], "location": { "end": { - "column": 67, + "column": 66, "line": 140 }, "start": { @@ -63611,11 +63758,11 @@ ], "location": { "end": { - "column": 110, + "column": 109, "line": 140 }, "start": { - "column": 71, + "column": 70, "line": 140 } } @@ -63624,7 +63771,7 @@ "id": "1760", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:704:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:704:128)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -63642,7 +63789,7 @@ "line": 142 }, "start": { - "column": 112, + "column": 111, "line": 140 } } @@ -63651,7 +63798,7 @@ "id": "1761", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:761:118)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:761:118)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -63778,9 +63925,13 @@ "id": "1766", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:761:118)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "50" + ], "coveredBy": [ "50" ], @@ -63799,7 +63950,7 @@ "id": "1767", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:787:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:787:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -63978,9 +64129,13 @@ "id": "1774", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:787:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "52" + ], "coveredBy": [ "52" ], @@ -63999,7 +64154,7 @@ "id": "1775", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:816:117)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:816:117)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -64178,7 +64333,7 @@ "id": "1782", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:816:117)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:816:117)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -64203,7 +64358,7 @@ "id": "1783", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:834:115)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:834:115)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -64330,7 +64485,7 @@ "id": "1788", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:834:115)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:834:115)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -64355,9 +64510,13 @@ "id": "1789", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:850:122)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "58" + ], "coveredBy": [ "58", "59", @@ -64404,7 +64563,7 @@ "id": "1791", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -64594,7 +64753,7 @@ "id": "1798", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:850:122)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:850:122)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -64620,13 +64779,9 @@ "id": "1799", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:876:117)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "61" - ], + "killedBy": [], "coveredBy": [ "61", "62", @@ -64778,7 +64933,7 @@ "id": "1805", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:876:117)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:876:117)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -64803,9 +64958,13 @@ "id": "1806", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:898:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "64" + ], "coveredBy": [ "64", "65", @@ -65033,9 +65192,13 @@ "id": "1815", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:898:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "64" + ], "coveredBy": [ "64", "65" @@ -65055,7 +65218,7 @@ "id": "1816", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:942:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:942:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -65376,7 +65539,7 @@ "id": "1828", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:942:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:942:127)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -65401,7 +65564,7 @@ "id": "1829", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:982:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:982:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -65764,9 +65927,13 @@ "id": "1843", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:982:123)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "70" + ], "coveredBy": [ "70", "71" @@ -65786,7 +65953,7 @@ "id": "1844", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1029:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1029:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -65841,9 +66008,13 @@ "id": "1846", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "74" + ], "coveredBy": [ "74", "75", @@ -65853,7 +66024,7 @@ ], "location": { "end": { - "column": 90, + "column": 88, "line": 226 }, "start": { @@ -65866,7 +66037,7 @@ "id": "1847", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1029:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1029:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -65882,7 +66053,7 @@ ], "location": { "end": { - "column": 90, + "column": 88, "line": 226 }, "start": { @@ -65894,13 +66065,13 @@ { "id": "1848", "mutatorName": "LogicalOperator", - "replacement": "game.currentPlay.action === GAME_PLAY_ACTIONS.DELEGATE || !targetedPlayer.isAlive", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.currentPlay.action === GamePlayActions.DELEGATE || !targetedPlayer.isAlive", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1037:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "74" + "76" ], "coveredBy": [ "74", @@ -65911,7 +66082,7 @@ ], "location": { "end": { - "column": 90, + "column": 88, "line": 226 }, "start": { @@ -65924,12 +66095,12 @@ "id": "1849", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"Sheriff can't break the tie in votes with this target\"], but it was called with \"Sheriff can't delegate his role to this target\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1047:43)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "77" + "74" ], "coveredBy": [ "74", @@ -65940,7 +66111,7 @@ ], "location": { "end": { - "column": 63, + "column": 61, "line": 226 }, "start": { @@ -65952,14 +66123,10 @@ { "id": "1850", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.action !== GAME_PLAY_ACTIONS.DELEGATE", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1029:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "game.currentPlay.action !== GamePlayActions.DELEGATE", + "status": "Timeout", "static": false, - "killedBy": [ - "75" - ], + "killedBy": [], "coveredBy": [ "74", "75", @@ -65969,7 +66136,7 @@ ], "location": { "end": { - "column": 63, + "column": 61, "line": 226 }, "start": { @@ -65995,11 +66162,11 @@ ], "location": { "end": { - "column": 90, + "column": 88, "line": 226 }, "start": { - "column": 67, + "column": 65, "line": 226 } } @@ -66008,13 +66175,9 @@ "id": "1852", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1029:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "75" - ], + "killedBy": [], "coveredBy": [ "75" ], @@ -66024,7 +66187,7 @@ "line": 228 }, "start": { - "column": 92, + "column": 90, "line": 226 } } @@ -66131,7 +66294,7 @@ "id": "1857", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1056:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1056:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -66159,7 +66322,7 @@ "id": "1858", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1046:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1046:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -66185,13 +66348,9 @@ "id": "1859", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1056:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "78" - ], + "killedBy": [], "coveredBy": [ "77", "78" @@ -66211,13 +66370,9 @@ "id": "1860", "mutatorName": "EqualityOperator", "replacement": "_id !== targetedPlayer._id", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1046:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "77" - ], + "killedBy": [], "coveredBy": [ "77", "78" @@ -66237,7 +66392,7 @@ "id": "1861", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -66252,7 +66407,7 @@ ], "location": { "end": { - "column": 109, + "column": 107, "line": 232 }, "start": { @@ -66265,7 +66420,7 @@ "id": "1862", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1046:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1046:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -66280,7 +66435,7 @@ ], "location": { "end": { - "column": 109, + "column": 107, "line": 232 }, "start": { @@ -66292,8 +66447,8 @@ { "id": "1863", "mutatorName": "LogicalOperator", - "replacement": "game.currentPlay.action === GAME_PLAY_ACTIONS.SETTLE_VOTES || !isSheriffTargetInLastNominatedPlayers", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.currentPlay.action === GamePlayActions.SETTLE_VOTES || !isSheriffTargetInLastNominatedPlayers", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -66308,7 +66463,7 @@ ], "location": { "end": { - "column": 109, + "column": 107, "line": 232 }, "start": { @@ -66321,7 +66476,7 @@ "id": "1864", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -66336,7 +66491,7 @@ ], "location": { "end": { - "column": 67, + "column": 65, "line": 232 }, "start": { @@ -66348,8 +66503,8 @@ { "id": "1865", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.action !== GAME_PLAY_ACTIONS.SETTLE_VOTES", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.currentPlay.action !== GamePlayActions.SETTLE_VOTES", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1022:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -66364,7 +66519,7 @@ ], "location": { "end": { - "column": 67, + "column": 65, "line": 232 }, "start": { @@ -66386,11 +66541,11 @@ ], "location": { "end": { - "column": 109, + "column": 107, "line": 232 }, "start": { - "column": 71, + "column": 69, "line": 232 } } @@ -66399,7 +66554,7 @@ "id": "1867", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1046:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1046:125)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -66415,7 +66570,7 @@ "line": 234 }, "start": { - "column": 111, + "column": 109, "line": 232 } } @@ -66424,7 +66579,7 @@ "id": "1868", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1068:142)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1068:142)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 32, "static": false, @@ -66704,7 +66859,7 @@ "id": "1873", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1068:142)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1068:142)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -66729,12 +66884,12 @@ "id": "1874", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:537:126)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 31, "static": false, "killedBy": [ - "531" + "31" ], "coveredBy": [ "31", @@ -66839,7 +66994,7 @@ "id": "1876", "mutatorName": "EqualityOperator", "replacement": "playTargets.length >= lengthBoundaries.max", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -66894,7 +67049,7 @@ "id": "1877", "mutatorName": "EqualityOperator", "replacement": "playTargets.length <= lengthBoundaries.max", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 31, "static": false, @@ -66949,7 +67104,7 @@ "id": "1878", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1079:142)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1079:142)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -66974,7 +67129,7 @@ "id": "1879", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1163:82)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1163:82)", "status": "Killed", "testsCompleted": 16, "static": false, @@ -67014,7 +67169,7 @@ "id": "1880", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1163:82)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1163:82)", "status": "Killed", "testsCompleted": 16, "static": false, @@ -67081,11 +67236,11 @@ ], "location": { "end": { - "column": 106, + "column": 104, "line": 248 }, "start": { - "column": 41, + "column": 39, "line": 248 } } @@ -67121,11 +67276,11 @@ ], "location": { "end": { - "column": 103, + "column": 102, "line": 249 }, "start": { - "column": 35, + "column": 34, "line": 249 } } @@ -67161,11 +67316,11 @@ ], "location": { "end": { - "column": 102, + "column": 101, "line": 250 }, "start": { - "column": 34, + "column": 33, "line": 250 } } @@ -67201,11 +67356,11 @@ ], "location": { "end": { - "column": 104, + "column": 103, "line": 251 }, "start": { - "column": 36, + "column": 35, "line": 251 } } @@ -67214,9 +67369,13 @@ "id": "1885", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 16, "static": false, - "killedBy": [], + "killedBy": [ + "531" + ], "coveredBy": [ "83", "84", @@ -67237,11 +67396,11 @@ ], "location": { "end": { - "column": 90, + "column": 89, "line": 252 }, "start": { - "column": 27, + "column": 26, "line": 252 } } @@ -67277,11 +67436,11 @@ ], "location": { "end": { - "column": 94, + "column": 93, "line": 253 }, "start": { - "column": 32, + "column": 31, "line": 253 } } @@ -67317,11 +67476,11 @@ ], "location": { "end": { - "column": 94, + "column": 93, "line": 254 }, "start": { - "column": 32, + "column": 31, "line": 254 } } @@ -67357,11 +67516,11 @@ ], "location": { "end": { - "column": 79, + "column": 78, "line": 255 }, "start": { - "column": 27, + "column": 26, "line": 255 } } @@ -67397,11 +67556,11 @@ ], "location": { "end": { - "column": 83, + "column": 82, "line": 256 }, "start": { - "column": 26, + "column": 25, "line": 256 } } @@ -67437,11 +67596,11 @@ ], "location": { "end": { - "column": 75, + "column": 74, "line": 257 }, "start": { - "column": 25, + "column": 24, "line": 257 } } @@ -67477,11 +67636,11 @@ ], "location": { "end": { - "column": 79, + "column": 78, "line": 258 }, "start": { - "column": 27, + "column": 26, "line": 258 } } @@ -67517,11 +67676,11 @@ ], "location": { "end": { - "column": 93, + "column": 92, "line": 259 }, "start": { - "column": 31, + "column": 30, "line": 259 } } @@ -67557,11 +67716,11 @@ ], "location": { "end": { - "column": 81, + "column": 80, "line": 260 }, "start": { - "column": 28, + "column": 27, "line": 260 } } @@ -67597,11 +67756,11 @@ ], "location": { "end": { - "column": 90, + "column": 89, "line": 261 }, "start": { - "column": 27, + "column": 26, "line": 261 } } @@ -67723,7 +67882,7 @@ "id": "1898", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -67754,7 +67913,7 @@ "id": "1899", "mutatorName": "MethodExpression", "replacement": "playTargets.every(({\n isInfected\n}) => isInfected)", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -67785,7 +67944,7 @@ "id": "1900", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -67816,9 +67975,13 @@ "id": "1901", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1453:136)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "100" + ], "coveredBy": [ "98", "99", @@ -67830,7 +67993,7 @@ ], "location": { "end": { - "column": 133, + "column": 130, "line": 272 }, "start": { @@ -67843,13 +68006,9 @@ "id": "1902", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "98" - ], + "killedBy": [], "coveredBy": [ "98", "99", @@ -67861,7 +68020,7 @@ ], "location": { "end": { - "column": 133, + "column": 130, "line": 272 }, "start": { @@ -67873,8 +68032,8 @@ { "id": "1903", "mutatorName": "LogicalOperator", - "replacement": "isSomeTargetInfected || currentPlayAction !== GAME_PLAY_ACTIONS.EAT || currentPlaySource.name !== PLAYER_GROUPS.WEREWOLVES", - "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(276,38): error TS2367: This comparison appears to be unintentional because the types 'GAME_PLAY_ACTIONS.EAT' and 'GAME_PLAY_ACTIONS.USE_POTIONS' have no overlap.\nsrc/modules/game/providers/services/game-play/game-play-validator.service.ts(276,93): error TS2367: This comparison appears to be unintentional because the types 'PLAYER_GROUPS' and 'ROLE_NAMES' have no overlap.\n", + "replacement": "isSomeTargetInfected || currentPlayAction !== GamePlayActions.EAT || currentPlaySource.name !== PlayerGroups.WEREWOLVES", + "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(276,38): error TS2367: This comparison appears to be unintentional because the types 'GamePlayActions.EAT' and 'GamePlayActions.USE_POTIONS' have no overlap.\nsrc/modules/game/providers/services/game-play/game-play-validator.service.ts(276,91): error TS2367: This comparison appears to be unintentional because the types 'PlayerGroups' and 'RoleNames' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -67889,7 +68048,7 @@ ], "location": { "end": { - "column": 133, + "column": 130, "line": 272 }, "start": { @@ -67902,7 +68061,7 @@ "id": "1904", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1453:136)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1453:136)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -67916,7 +68075,7 @@ ], "location": { "end": { - "column": 132, + "column": 129, "line": 272 }, "start": { @@ -67928,8 +68087,8 @@ { "id": "1905", "mutatorName": "LogicalOperator", - "replacement": "currentPlayAction !== GAME_PLAY_ACTIONS.EAT && currentPlaySource.name !== PLAYER_GROUPS.WEREWOLVES", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlayAction !== GamePlayActions.EAT && currentPlaySource.name !== PlayerGroups.WEREWOLVES", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -67943,7 +68102,7 @@ ], "location": { "end": { - "column": 132, + "column": 129, "line": 272 }, "start": { @@ -67956,7 +68115,7 @@ "id": "1906", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -67970,7 +68129,7 @@ ], "location": { "end": { - "column": 77, + "column": 75, "line": 272 }, "start": { @@ -67982,8 +68141,8 @@ { "id": "1907", "mutatorName": "EqualityOperator", - "replacement": "currentPlayAction === GAME_PLAY_ACTIONS.EAT", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlayAction === GamePlayActions.EAT", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -67997,7 +68156,7 @@ ], "location": { "end": { - "column": 77, + "column": 75, "line": 272 }, "start": { @@ -68010,7 +68169,7 @@ "id": "1908", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1439:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1439:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -68023,11 +68182,11 @@ ], "location": { "end": { - "column": 132, + "column": 129, "line": 272 }, "start": { - "column": 81, + "column": 79, "line": 272 } } @@ -68035,8 +68194,8 @@ { "id": "1909", "mutatorName": "EqualityOperator", - "replacement": "currentPlaySource.name === PLAYER_GROUPS.WEREWOLVES", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1439:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlaySource.name === PlayerGroups.WEREWOLVES", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1439:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -68049,11 +68208,11 @@ ], "location": { "end": { - "column": 132, + "column": 129, "line": 272 }, "start": { - "column": 81, + "column": 79, "line": 272 } } @@ -68062,7 +68221,7 @@ "id": "1910", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1425:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -68079,7 +68238,7 @@ "line": 274 }, "start": { - "column": 135, + "column": 132, "line": 272 } } @@ -68113,7 +68272,7 @@ "id": "1912", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -68142,9 +68301,13 @@ "id": "1913", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "531" + ], "coveredBy": [ "100", "101", @@ -68154,7 +68317,7 @@ ], "location": { "end": { - "column": 137, + "column": 134, "line": 276 }, "start": { @@ -68167,7 +68330,7 @@ "id": "1914", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -68183,7 +68346,7 @@ ], "location": { "end": { - "column": 137, + "column": 134, "line": 276 }, "start": { @@ -68195,13 +68358,13 @@ { "id": "1915", "mutatorName": "LogicalOperator", - "replacement": "hasSomePlayerDrankPotion || currentPlayAction !== GAME_PLAY_ACTIONS.USE_POTIONS || currentPlaySource.name !== ROLE_NAMES.WITCH", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1453:136)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "hasSomePlayerDrankPotion || currentPlayAction !== GamePlayActions.USE_POTIONS || currentPlaySource.name !== RoleNames.WITCH", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "100" + "531" ], "coveredBy": [ "100", @@ -68212,7 +68375,7 @@ ], "location": { "end": { - "column": 137, + "column": 134, "line": 276 }, "start": { @@ -68225,7 +68388,7 @@ "id": "1916", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1488:136)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1488:136)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -68239,7 +68402,7 @@ ], "location": { "end": { - "column": 136, + "column": 133, "line": 276 }, "start": { @@ -68251,10 +68414,14 @@ { "id": "1917", "mutatorName": "LogicalOperator", - "replacement": "currentPlayAction !== GAME_PLAY_ACTIONS.USE_POTIONS && currentPlaySource.name !== ROLE_NAMES.WITCH", - "status": "Timeout", + "replacement": "currentPlayAction !== GamePlayActions.USE_POTIONS && currentPlaySource.name !== RoleNames.WITCH", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "101" + ], "coveredBy": [ "101", "102", @@ -68262,7 +68429,7 @@ ], "location": { "end": { - "column": 136, + "column": 133, "line": 276 }, "start": { @@ -68275,7 +68442,7 @@ "id": "1918", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -68289,7 +68456,7 @@ ], "location": { "end": { - "column": 89, + "column": 87, "line": 276 }, "start": { @@ -68301,8 +68468,8 @@ { "id": "1919", "mutatorName": "EqualityOperator", - "replacement": "currentPlayAction === GAME_PLAY_ACTIONS.USE_POTIONS", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlayAction === GamePlayActions.USE_POTIONS", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -68316,7 +68483,7 @@ ], "location": { "end": { - "column": 89, + "column": 87, "line": 276 }, "start": { @@ -68329,7 +68496,7 @@ "id": "1920", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1476:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1476:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -68342,11 +68509,11 @@ ], "location": { "end": { - "column": 136, + "column": 133, "line": 276 }, "start": { - "column": 93, + "column": 91, "line": 276 } } @@ -68354,8 +68521,8 @@ { "id": "1921", "mutatorName": "EqualityOperator", - "replacement": "currentPlaySource.name === ROLE_NAMES.WITCH", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1476:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlaySource.name === RoleNames.WITCH", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1476:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -68368,11 +68535,11 @@ ], "location": { "end": { - "column": 136, + "column": 133, "line": 276 }, "start": { - "column": 93, + "column": 91, "line": 276 } } @@ -68381,7 +68548,7 @@ "id": "1922", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1464:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -68398,7 +68565,7 @@ "line": 278 }, "start": { - "column": 139, + "column": 136, "line": 276 } } @@ -68407,7 +68574,7 @@ "id": "1923", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1526:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1526:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -68607,12 +68774,12 @@ "id": "1930", "mutatorName": "EqualityOperator", "replacement": "playTargets.length !== 0", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1519:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "531" + "105" ], "coveredBy": [ "105", @@ -68661,12 +68828,12 @@ "id": "1932", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1512:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "530" + "104" ], "coveredBy": [ "104", @@ -68676,7 +68843,7 @@ ], "location": { "end": { - "column": 67, + "column": 68, "line": 283 }, "start": { @@ -68689,7 +68856,7 @@ "id": "1933", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1526:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1526:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -68704,7 +68871,7 @@ ], "location": { "end": { - "column": 67, + "column": 68, "line": 283 }, "start": { @@ -68717,13 +68884,9 @@ "id": "1934", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1526:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "106" - ], + "killedBy": [], "coveredBy": [ "106" ], @@ -68733,7 +68896,7 @@ "line": 285 }, "start": { - "column": 69, + "column": 70, "line": 283 } } @@ -68741,13 +68904,13 @@ { "id": "1935", "mutatorName": "BooleanLiteral", - "replacement": "[...requiredTargetsActions, ...optionalTargetsActions].includes(game.currentPlay.action)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "[...REQUIRED_TARGET_ACTIONS, ...OPTIONAL_TARGET_ACTIONS].includes(game.currentPlay.action)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1534:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "531" + "107" ], "coveredBy": [ "107", @@ -68756,7 +68919,7 @@ ], "location": { "end": { - "column": 98, + "column": 100, "line": 288 }, "start": { @@ -68780,7 +68943,7 @@ ], "location": { "end": { - "column": 98, + "column": 100, "line": 288 }, "start": { @@ -68793,7 +68956,7 @@ "id": "1937", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1534:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1534:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -68807,7 +68970,7 @@ ], "location": { "end": { - "column": 98, + "column": 100, "line": 288 }, "start": { @@ -68820,7 +68983,7 @@ "id": "1938", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(288,22): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/game-play.enum\").GAME_PLAY_ACTIONS' is not assignable to parameter of type 'never'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(288,22): error TS2345: Argument of type 'import(\"/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/src/modules/game/enums/game-play.enum\").GamePlayActions' is not assignable to parameter of type 'never'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -68831,7 +68994,7 @@ ], "location": { "end": { - "column": 64, + "column": 66, "line": 288 }, "start": { @@ -68844,7 +69007,7 @@ "id": "1939", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1534:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1534:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -68860,7 +69023,7 @@ "line": 290 }, "start": { - "column": 100, + "column": 102, "line": 288 } } @@ -68869,7 +69032,7 @@ "id": "1940", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1560:140)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1560:140)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -69226,7 +69389,7 @@ "id": "1954", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1560:140)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1560:140)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -69252,7 +69415,7 @@ "id": "1955", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -69281,7 +69444,7 @@ "id": "1956", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"One target can't be voted because he's dead\"\nReceived: \"One source is not able to vote because he's dead or doesn't have the ability to do so\"\n\nNumber of calls: 1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1647:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"One target can't be voted because he's dead\"\nReceived: \"One source is not able to vote because he's dead or doesn't have the ability to do so\"\n\nNumber of calls: 1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1647:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -69297,7 +69460,7 @@ ], "location": { "end": { - "column": 145, + "column": 143, "line": 304 }, "start": { @@ -69310,7 +69473,7 @@ "id": "1957", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -69326,7 +69489,7 @@ ], "location": { "end": { - "column": 145, + "column": 143, "line": 304 }, "start": { @@ -69338,8 +69501,8 @@ { "id": "1958", "mutatorName": "MethodExpression", - "replacement": "playVotes.every(({\n source\n}) => !source.isAlive || doesPlayerHaveActiveAttributeWithName(source, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game))", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "playVotes.every(({\n source\n}) => !source.isAlive || doesPlayerHaveActiveAttributeWithName(source, PlayerAttributeNames.CANT_VOTE, game))", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -69355,7 +69518,7 @@ ], "location": { "end": { - "column": 145, + "column": 143, "line": 304 }, "start": { @@ -69368,7 +69531,7 @@ "id": "1959", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -69384,7 +69547,7 @@ ], "location": { "end": { - "column": 144, + "column": 142, "line": 304 }, "start": { @@ -69397,12 +69560,12 @@ "id": "1960", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"One target can't be voted because he's dead\"\nReceived: \"One source is not able to vote because he's dead or doesn't have the ability to do so\"\n\nNumber of calls: 1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1647:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "530" + "114" ], "coveredBy": [ "112", @@ -69413,7 +69576,7 @@ ], "location": { "end": { - "column": 144, + "column": 142, "line": 304 }, "start": { @@ -69426,9 +69589,13 @@ "id": "1961", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "112" + ], "coveredBy": [ "112", "113", @@ -69438,7 +69605,7 @@ ], "location": { "end": { - "column": 144, + "column": 142, "line": 304 }, "start": { @@ -69450,7 +69617,7 @@ { "id": "1962", "mutatorName": "LogicalOperator", - "replacement": "!source.isAlive && doesPlayerHaveActiveAttributeWithName(source, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game)", + "replacement": "!source.isAlive && doesPlayerHaveActiveAttributeWithName(source, PlayerAttributeNames.CANT_VOTE, game)", "status": "Timeout", "static": false, "killedBy": [], @@ -69463,7 +69630,7 @@ ], "location": { "end": { - "column": 144, + "column": 142, "line": 304 }, "start": { @@ -69505,7 +69672,7 @@ "id": "1964", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1611:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -69522,7 +69689,7 @@ "line": 306 }, "start": { - "column": 147, + "column": 145, "line": 304 } } @@ -69531,12 +69698,12 @@ "id": "1965", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"One vote has the same source and target\"\nReceived: \"One target can't be voted because he's dead\"\n\nNumber of calls: 1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1664:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, "killedBy": [ - "530" + "115" ], "coveredBy": [ "114", @@ -69666,7 +69833,7 @@ "id": "1970", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1646:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1646:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -69691,7 +69858,7 @@ "id": "1971", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -69795,9 +69962,13 @@ "id": "1975", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "530" + ], "coveredBy": [ "115", "530" @@ -69843,7 +70014,7 @@ "id": "1977", "mutatorName": "EqualityOperator", "replacement": "source._id !== target._id", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -69869,7 +70040,7 @@ "id": "1978", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1663:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1663:145)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -69894,7 +70065,7 @@ "id": "1979", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -69926,7 +70097,7 @@ "id": "1980", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -69945,7 +70116,7 @@ ], "location": { "end": { - "column": 151, + "column": 147, "line": 318 }, "start": { @@ -69973,7 +70144,7 @@ ], "location": { "end": { - "column": 151, + "column": 147, "line": 318 }, "start": { @@ -69985,10 +70156,14 @@ { "id": "1982", "mutatorName": "LogicalOperator", - "replacement": "currentPlayAction === GAME_PLAY_ACTIONS.VOTE || currentPlayCause === GAME_PLAY_CAUSES.ANGEL_PRESENCE", - "status": "Timeout", + "replacement": "currentPlayAction === GamePlayActions.VOTE || currentPlayCause === GamePlayCauses.ANGEL_PRESENCE", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "117" + ], "coveredBy": [ "116", "117", @@ -70001,7 +70176,7 @@ ], "location": { "end": { - "column": 151, + "column": 147, "line": 318 }, "start": { @@ -70029,7 +70204,7 @@ ], "location": { "end": { - "column": 95, + "column": 93, "line": 318 }, "start": { @@ -70041,13 +70216,13 @@ { "id": "1984", "mutatorName": "EqualityOperator", - "replacement": "currentPlayAction !== GAME_PLAY_ACTIONS.VOTE", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1705:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlayAction !== GamePlayActions.VOTE", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "118" + "529" ], "coveredBy": [ "116", @@ -70061,7 +70236,7 @@ ], "location": { "end": { - "column": 95, + "column": 93, "line": 318 }, "start": { @@ -70074,7 +70249,7 @@ "id": "1985", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -70090,11 +70265,11 @@ ], "location": { "end": { - "column": 151, + "column": 147, "line": 318 }, "start": { - "column": 99, + "column": 97, "line": 318 } } @@ -70102,8 +70277,8 @@ { "id": "1986", "mutatorName": "EqualityOperator", - "replacement": "currentPlayCause !== GAME_PLAY_CAUSES.ANGEL_PRESENCE", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlayCause !== GamePlayCauses.ANGEL_PRESENCE", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -70119,11 +70294,11 @@ ], "location": { "end": { - "column": 151, + "column": 147, "line": 318 }, "start": { - "column": 99, + "column": 97, "line": 318 } } @@ -70132,7 +70307,7 @@ "id": "1987", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70151,7 +70326,7 @@ ], "location": { "end": { - "column": 135, + "column": 133, "line": 319 }, "start": { @@ -70164,7 +70339,7 @@ "id": "1988", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1732:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1732:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70183,7 +70358,7 @@ ], "location": { "end": { - "column": 135, + "column": 133, "line": 319 }, "start": { @@ -70195,8 +70370,8 @@ { "id": "1989", "mutatorName": "LogicalOperator", - "replacement": "currentPlayAction === GAME_PLAY_ACTIONS.ELECT_SHERIFF && isCurrentPlayVoteCauseOfAngelPresence", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1732:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlayAction === GamePlayActions.ELECT_SHERIFF && isCurrentPlayVoteCauseOfAngelPresence", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1732:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70215,7 +70390,7 @@ ], "location": { "end": { - "column": 135, + "column": 133, "line": 319 }, "start": { @@ -70228,7 +70403,7 @@ "id": "1990", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1732:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1732:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70247,7 +70422,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 319 }, "start": { @@ -70259,8 +70434,8 @@ { "id": "1991", "mutatorName": "EqualityOperator", - "replacement": "currentPlayAction !== GAME_PLAY_ACTIONS.ELECT_SHERIFF", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "currentPlayAction !== GamePlayActions.ELECT_SHERIFF", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70279,7 +70454,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 319 }, "start": { @@ -70291,10 +70466,14 @@ { "id": "1992", "mutatorName": "MethodExpression", - "replacement": "game.players.every(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game))", - "status": "Timeout", + "replacement": "game.players.every(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CANT_VOTE, game))", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 8, "static": false, - "killedBy": [], + "killedBy": [ + "119" + ], "coveredBy": [ "116", "117", @@ -70307,7 +70486,7 @@ ], "location": { "end": { - "column": 164, + "column": 162, "line": 320 }, "start": { @@ -70320,7 +70499,7 @@ "id": "1993", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70339,7 +70518,7 @@ ], "location": { "end": { - "column": 163, + "column": 161, "line": 320 }, "start": { @@ -70352,7 +70531,7 @@ "id": "1994", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70371,7 +70550,7 @@ ], "location": { "end": { - "column": 163, + "column": 161, "line": 320 }, "start": { @@ -70384,12 +70563,12 @@ "id": "1995", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "119" + "529" ], "coveredBy": [ "116", @@ -70403,7 +70582,7 @@ ], "location": { "end": { - "column": 163, + "column": 161, "line": 320 }, "start": { @@ -70415,8 +70594,8 @@ { "id": "1996", "mutatorName": "LogicalOperator", - "replacement": "player.isAlive || !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game)", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "player.isAlive || !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CANT_VOTE, game)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70435,7 +70614,7 @@ ], "location": { "end": { - "column": 163, + "column": 161, "line": 320 }, "start": { @@ -70447,13 +70626,13 @@ { "id": "1997", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CANT_VOTE, game)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "529" + "116" ], "coveredBy": [ "116", @@ -70467,7 +70646,7 @@ ], "location": { "end": { - "column": 163, + "column": 161, "line": 320 }, "start": { @@ -70480,7 +70659,7 @@ "id": "1998", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70499,7 +70678,7 @@ ], "location": { "end": { - "column": 154, + "column": 155, "line": 321 }, "start": { @@ -70512,7 +70691,7 @@ "id": "1999", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, @@ -70531,7 +70710,7 @@ ], "location": { "end": { - "column": 154, + "column": 155, "line": 321 }, "start": { @@ -70543,13 +70722,13 @@ { "id": "2000", "mutatorName": "LogicalOperator", - "replacement": "canSomePlayerVote || !canVotesBeSkipped && requiredVotesActions.includes(currentPlayAction) || canVotesBeSkipped && isCurrentPlayVoteInevitable", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1679:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "canSomePlayerVote || !canVotesBeSkipped && REQUIRED_VOTE_ACTIONS.includes(currentPlayAction) || canVotesBeSkipped && isCurrentPlayVoteInevitable", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:963:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "116" + "531" ], "coveredBy": [ "116", @@ -70563,7 +70742,7 @@ ], "location": { "end": { - "column": 154, + "column": 155, "line": 321 }, "start": { @@ -70576,9 +70755,13 @@ "id": "2001", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "117" + ], "coveredBy": [ "117", "118", @@ -70590,7 +70773,7 @@ ], "location": { "end": { - "column": 153, + "column": 154, "line": 321 }, "start": { @@ -70602,10 +70785,14 @@ { "id": "2002", "mutatorName": "LogicalOperator", - "replacement": "!canVotesBeSkipped && requiredVotesActions.includes(currentPlayAction) && canVotesBeSkipped && isCurrentPlayVoteInevitable", - "status": "Timeout", + "replacement": "!canVotesBeSkipped && REQUIRED_VOTE_ACTIONS.includes(currentPlayAction) && canVotesBeSkipped && isCurrentPlayVoteInevitable", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "119" + ], "coveredBy": [ "117", "118", @@ -70617,7 +70804,7 @@ ], "location": { "end": { - "column": 153, + "column": 154, "line": 321 }, "start": { @@ -70630,9 +70817,13 @@ "id": "2003", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "119" + ], "coveredBy": [ "117", "118", @@ -70644,7 +70835,7 @@ ], "location": { "end": { - "column": 101, + "column": 102, "line": 321 }, "start": { @@ -70656,8 +70847,8 @@ { "id": "2004", "mutatorName": "LogicalOperator", - "replacement": "!canVotesBeSkipped || requiredVotesActions.includes(currentPlayAction)", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!canVotesBeSkipped || REQUIRED_VOTE_ACTIONS.includes(currentPlayAction)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1692:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -70675,7 +70866,7 @@ ], "location": { "end": { - "column": 101, + "column": 102, "line": 321 }, "start": { @@ -70688,7 +70879,7 @@ "id": "2005", "mutatorName": "BooleanLiteral", "replacement": "canVotesBeSkipped", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -70735,11 +70926,11 @@ ], "location": { "end": { - "column": 153, + "column": 154, "line": 321 }, "start": { - "column": 105, + "column": 106, "line": 321 } } @@ -70764,11 +70955,11 @@ ], "location": { "end": { - "column": 153, + "column": 154, "line": 321 }, "start": { - "column": 105, + "column": 106, "line": 321 } } @@ -70777,12 +70968,12 @@ "id": "2008", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:869:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1718:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "529" + "119" ], "coveredBy": [ "119", @@ -70796,7 +70987,7 @@ "line": 323 }, "start": { - "column": 156, + "column": 157, "line": 321 } } @@ -70805,7 +70996,7 @@ "id": "2009", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1780:94)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1780:94)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -70987,7 +71178,7 @@ "id": "2015", "mutatorName": "EqualityOperator", "replacement": "playVotes.length !== 0", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -71041,10 +71232,14 @@ { "id": "2017", "mutatorName": "BooleanLiteral", - "replacement": "requiredVotesActions.includes(game.currentPlay.action)", - "status": "Timeout", + "replacement": "REQUIRED_VOTE_ACTIONS.includes(game.currentPlay.action)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1794:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "125" + ], "coveredBy": [ "125", "126", @@ -71053,7 +71248,7 @@ ], "location": { "end": { - "column": 64, + "column": 65, "line": 331 }, "start": { @@ -71078,7 +71273,7 @@ ], "location": { "end": { - "column": 64, + "column": 65, "line": 331 }, "start": { @@ -71091,7 +71286,7 @@ "id": "2019", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1794:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1794:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -71106,7 +71301,7 @@ ], "location": { "end": { - "column": 64, + "column": 65, "line": 331 }, "start": { @@ -71119,7 +71314,7 @@ "id": "2020", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1794:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1794:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -71135,7 +71330,7 @@ "line": 333 }, "start": { - "column": 66, + "column": 67, "line": 331 } } @@ -71144,7 +71339,7 @@ "id": "2021", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -71158,7 +71353,7 @@ ], "location": { "end": { - "column": 80, + "column": 78, "line": 335 }, "start": { @@ -71182,7 +71377,7 @@ ], "location": { "end": { - "column": 80, + "column": 78, "line": 335 }, "start": { @@ -71194,14 +71389,10 @@ { "id": "2023", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.cause !== GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 3, + "replacement": "game.currentPlay.cause !== GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES", + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "126", "127", @@ -71209,7 +71400,7 @@ ], "location": { "end": { - "column": 80, + "column": 78, "line": 335 }, "start": { @@ -71222,13 +71413,9 @@ "id": "2024", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1803:99)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "126" - ], + "killedBy": [], "coveredBy": [ "126" ], @@ -71238,7 +71425,7 @@ "line": 337 }, "start": { - "column": 82, + "column": 80, "line": 335 } } @@ -71247,13 +71434,9 @@ "id": "2025", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1819:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "128" - ], + "killedBy": [], "coveredBy": [ "128", "129", @@ -71278,12 +71461,12 @@ "id": "2026", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"`chosenSide` is required on this current game's state\"\nReceived: \"`chosenSide` can't be set on this current game's state\"\n\nNumber of calls: 1\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1820:43)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n+ \"error\": \"`chosenSide` can't be set on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "128" + "529" ], "coveredBy": [ "128", @@ -71296,7 +71479,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 341 }, "start": { @@ -71309,7 +71492,7 @@ "id": "2027", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1827:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1827:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -71327,7 +71510,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 341 }, "start": { @@ -71339,10 +71522,14 @@ { "id": "2028", "mutatorName": "LogicalOperator", - "replacement": "chosenSide !== undefined || game.currentPlay.action !== GAME_PLAY_ACTIONS.CHOOSE_SIDE", - "status": "Timeout", + "replacement": "chosenSide !== undefined || game.currentPlay.action !== GamePlayActions.CHOOSE_SIDE", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n+ \"error\": \"`chosenSide` can't be set on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "529" + ], "coveredBy": [ "128", "129", @@ -71354,7 +71541,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 341 }, "start": { @@ -71398,7 +71585,7 @@ "id": "2030", "mutatorName": "EqualityOperator", "replacement": "chosenSide === undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n+ \"error\": \"`chosenSide` can't be set on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n+ \"error\": \"`chosenSide` can't be set on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -71429,16 +71616,20 @@ "id": "2031", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1842:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "131" + ], "coveredBy": [ "129", "131" ], "location": { "end": { - "column": 94, + "column": 92, "line": 341 }, "start": { @@ -71450,8 +71641,8 @@ { "id": "2032", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.action === GAME_PLAY_ACTIONS.CHOOSE_SIDE", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1827:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.currentPlay.action === GamePlayActions.CHOOSE_SIDE", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1827:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -71464,7 +71655,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 341 }, "start": { @@ -71477,7 +71668,7 @@ "id": "2033", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1827:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1827:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -71493,7 +71684,7 @@ "line": 343 }, "start": { - "column": 96, + "column": 94, "line": 341 } } @@ -71502,7 +71693,7 @@ "id": "2034", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1835:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1835:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -71519,7 +71710,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 344 }, "start": { @@ -71532,7 +71723,7 @@ "id": "2035", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1819:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1819:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -71549,7 +71740,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 344 }, "start": { @@ -71561,13 +71752,13 @@ { "id": "2036", "mutatorName": "LogicalOperator", - "replacement": "chosenSide === undefined || game.currentPlay.action === GAME_PLAY_ACTIONS.CHOOSE_SIDE", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1835:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "chosenSide === undefined || game.currentPlay.action === GamePlayActions.CHOOSE_SIDE", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n+ \"error\": \"`chosenSide` is required on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "130" + "529" ], "coveredBy": [ "128", @@ -71579,7 +71770,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 344 }, "start": { @@ -71592,7 +71783,7 @@ "id": "2037", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1842:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1842:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -71652,7 +71843,7 @@ "id": "2039", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1835:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).not.toThrow()\n\nError message: \"\"\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1835:134)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -71668,7 +71859,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 344 }, "start": { @@ -71680,8 +71871,8 @@ { "id": "2040", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.action !== GAME_PLAY_ACTIONS.CHOOSE_SIDE", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1819:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "game.currentPlay.action !== GamePlayActions.CHOOSE_SIDE", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1819:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -71697,7 +71888,7 @@ ], "location": { "end": { - "column": 94, + "column": 92, "line": 344 }, "start": { @@ -71710,7 +71901,7 @@ "id": "2041", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1819:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected constructor: BadGamePlayPayloadException\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1819:130)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -71726,7 +71917,7 @@ "line": 346 }, "start": { - "column": 96, + "column": 94, "line": 344 } } @@ -71735,7 +71926,7 @@ "id": "2042", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1858:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1858:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, @@ -71864,9 +72055,13 @@ "id": "2046", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n+ \"error\": \"`doesJudgeRequestAnotherVote` can't be set on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "529" + ], "coveredBy": [ "132", "529", @@ -71888,7 +72083,7 @@ "id": "2047", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1921:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1921:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -71917,7 +72112,7 @@ "id": "2048", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1858:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1858:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -71945,8 +72140,8 @@ { "id": "2049", "mutatorName": "LogicalOperator", - "replacement": "(!stutteringJudgeRequestOpportunityActions.includes(game.currentPlay.action) || !stutteringJudgePlayer || !isPlayerAliveAndPowerful(stutteringJudgePlayer, game)) && gameHistoryJudgeRequestRecords.length >= voteRequestsCount", - "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"`doesJudgeRequestAnotherVote` can't be set on this current game's state\"\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1859:43)", + "replacement": "(!STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS.includes(game.currentPlay.action) || !stutteringJudgePlayer || !isPlayerAliveAndPowerful(stutteringJudgePlayer, game)) && gameHistoryJudgeRequestRecords.length >= voteRequestsCount", + "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"`doesJudgeRequestAnotherVote` can't be set on this current game's state\"\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1859:43)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -71975,7 +72170,7 @@ "id": "2050", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"`doesJudgeRequestAnotherVote` can't be set on this current game's state\"\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1859:43)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)\n\nExpected: \"`doesJudgeRequestAnotherVote` can't be set on this current game's state\"\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1859:43)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -72003,8 +72198,8 @@ { "id": "2051", "mutatorName": "LogicalOperator", - "replacement": "(!stutteringJudgeRequestOpportunityActions.includes(game.currentPlay.action) || !stutteringJudgePlayer) && !isPlayerAliveAndPowerful(stutteringJudgePlayer, game)", - "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(356,142): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "replacement": "(!STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS.includes(game.currentPlay.action) || !stutteringJudgePlayer) && !isPlayerAliveAndPowerful(stutteringJudgePlayer, game)", + "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(356,146): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -72055,8 +72250,8 @@ { "id": "2053", "mutatorName": "LogicalOperator", - "replacement": "!stutteringJudgeRequestOpportunityActions.includes(game.currentPlay.action) && !stutteringJudgePlayer", - "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(356,140): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "replacement": "!STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS.includes(game.currentPlay.action) && !stutteringJudgePlayer", + "statusReason": "src/modules/game/providers/services/game-play/game-play-validator.service.ts(356,144): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -72081,8 +72276,8 @@ { "id": "2054", "mutatorName": "BooleanLiteral", - "replacement": "stutteringJudgeRequestOpportunityActions.includes(game.currentPlay.action)", - "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1921:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS.includes(game.currentPlay.action)", + "statusReason": "Error: expect(received).toResolve()\n\nExpected promise to resolve, however it rejected.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1921:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -72098,7 +72293,7 @@ ], "location": { "end": { - "column": 84, + "column": 88, "line": 356 }, "start": { @@ -72237,7 +72432,7 @@ "id": "2060", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1858:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts:1858:132)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -72262,7 +72457,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\n\nimport { optionalTargetsActions, requiredTargetsActions, requiredVotesActions, stutteringJudgeRequestOpportunityActions } from \"@/modules/game/constants/game-play/game-play.constant\";\nimport type { MakeGamePlayTargetWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto\";\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getLeftToCharmByPiedPiperPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { isPlayerAliveAndPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\nimport { werewolvesRoles } from \"@/modules/role/constants/role.constant\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { BAD_GAME_PLAY_PAYLOAD_REASONS } from \"@/shared/exception/enums/bad-game-play-payload-error.enum\";\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { BadGamePlayPayloadException } from \"@/shared/exception/types/bad-game-play-payload-exception.type\";\n\n@Injectable()\nexport class GamePlayValidatorService {\n public constructor(private readonly gameHistoryRecordService: GameHistoryRecordService) {}\n\n public async validateGamePlayWithRelationsDto(play: MakeGamePlayWithRelationsDto, game: Game): Promise {\n if (!game.currentPlay) {\n throw createNoCurrentGamePlayUnexpectedException(\"validateGamePlayWithRelationsDto\", { gameId: game._id });\n }\n const clonedGameWithCurrentPlay = createGame(game) as GameWithCurrentPlay;\n const { votes, targets } = play;\n await this.validateGamePlayWithRelationsDtoJudgeRequest(play, clonedGameWithCurrentPlay);\n this.validateGamePlayWithRelationsDtoChosenSide(play, clonedGameWithCurrentPlay);\n await this.validateGamePlayVotesWithRelationsDto(votes, clonedGameWithCurrentPlay);\n await this.validateGamePlayTargetsWithRelationsDto(targets, clonedGameWithCurrentPlay);\n this.validateGamePlayWithRelationsDtoChosenCard(play, clonedGameWithCurrentPlay);\n }\n\n private validateGamePlayThiefChosenCard(chosenCard: GameAdditionalCard | undefined, game: GameWithCurrentPlay): void {\n const { mustChooseBetweenWerewolves } = game.options.roles.thief;\n if (!game.additionalCards || !mustChooseBetweenWerewolves) {\n return;\n }\n const areAllAdditionalCardsWerewolves = game.additionalCards.every(({ roleName }) => werewolvesRoles.find(role => role.name === roleName));\n if (areAllAdditionalCardsWerewolves && !chosenCard) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.THIEF_MUST_CHOOSE_CARD);\n }\n }\n\n private validateGamePlayWithRelationsDtoChosenCard({ chosenCard }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): void {\n if (game.currentPlay.action !== GAME_PLAY_ACTIONS.CHOOSE_CARD) {\n if (chosenCard) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_CHOSEN_CARD);\n }\n return;\n }\n this.validateGamePlayThiefChosenCard(chosenCard, game);\n }\n\n private validateDrankLifePotionTargets(drankLifePotionTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n if (drankLifePotionTargets.length > 1) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_DRANK_LIFE_POTION_TARGETS);\n }\n if (drankLifePotionTargets.length &&\n (!doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PLAYER_ATTRIBUTE_NAMES.EATEN, game) || !drankLifePotionTargets[0].player.isAlive)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_LIFE_POTION_TARGET);\n }\n }\n\n private validateDrankDeathPotionTargets(drankDeathPotionTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n if (drankDeathPotionTargets.length > 1) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_DRANK_DEATH_POTION_TARGETS);\n }\n if (drankDeathPotionTargets.length && !drankDeathPotionTargets[0].player.isAlive) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_DEATH_POTION_TARGET);\n }\n }\n\n private async validateGamePlayWitchTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): Promise {\n const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length > 0;\n const drankLifePotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WITCH_POTIONS.LIFE);\n const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length > 0;\n const drankDeathPotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WITCH_POTIONS.DEATH);\n if (hasWitchUsedLifePotion && drankLifePotionTargets.length || hasWitchUsedDeathPotion && drankDeathPotionTargets.length) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_DRANK_POTION_TARGET);\n }\n this.validateDrankLifePotionTargets(drankLifePotionTargets, game);\n this.validateDrankDeathPotionTargets(drankDeathPotionTargets);\n }\n\n private async validateGamePlayInfectedTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): Promise {\n const infectedTargets = playTargets.filter(({ isInfected }) => isInfected === true);\n if (!infectedTargets.length) {\n return;\n }\n const hasVileFatherOfWolvesInfected = (await this.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords(game._id)).length > 0;\n const vileFatherOfWolvesPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.VILE_FATHER_OF_WOLVES);\n if (!vileFatherOfWolvesPlayer || !isPlayerAliveAndPowerful(vileFatherOfWolvesPlayer, game) || hasVileFatherOfWolvesInfected) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_INFECTED_TARGET);\n }\n this.validateGamePlayTargetsBoundaries(infectedTargets, { min: 1, max: 1 });\n }\n \n private validateWerewolvesTargetsBoundaries(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): void {\n const leftToEatByWerewolvesPlayers = getLeftToEatByWerewolvesPlayers(game);\n const leftToEatByWhiteWerewolfPlayers = getLeftToEatByWhiteWerewolfPlayers(game);\n const bigBadWolfExpectedTargetsCount = leftToEatByWerewolvesPlayers.length ? 1 : 0;\n const whiteWerewolfMaxTargetsCount = leftToEatByWhiteWerewolfPlayers.length ? 1 : 0;\n const werewolvesSourceTargetsBoundaries: Partial> = {\n [PLAYER_GROUPS.WEREWOLVES]: { min: 1, max: 1 },\n [ROLE_NAMES.BIG_BAD_WOLF]: { min: bigBadWolfExpectedTargetsCount, max: bigBadWolfExpectedTargetsCount },\n [ROLE_NAMES.WHITE_WEREWOLF]: { min: 0, max: whiteWerewolfMaxTargetsCount },\n };\n const targetsBoundaries = werewolvesSourceTargetsBoundaries[game.currentPlay.source.name];\n if (!targetsBoundaries) {\n return;\n }\n this.validateGamePlayTargetsBoundaries(playTargets, targetsBoundaries);\n }\n\n private async validateGamePlayWerewolvesTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n this.validateWerewolvesTargetsBoundaries(playTargets, game);\n if (!playTargets.length) {\n return;\n }\n const targetedPlayer = playTargets[0].player;\n const pureWolvesAvailableTargets = getLeftToEatByWerewolvesPlayers(game);\n const isTargetedPlayerInPureWolvesTargets = !!pureWolvesAvailableTargets.find(({ _id }) => _id.toString() === targetedPlayer._id.toString());\n if (game.currentPlay.source.name === PLAYER_GROUPS.WEREWOLVES && !isTargetedPlayerInPureWolvesTargets) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_WEREWOLVES_TARGET);\n }\n if (game.currentPlay.source.name === ROLE_NAMES.BIG_BAD_WOLF && !isTargetedPlayerInPureWolvesTargets) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_BIG_BAD_WOLF_TARGET);\n }\n const whiteWerewolfAvailableTargets = getLeftToEatByWhiteWerewolfPlayers(game);\n const isTargetedPlayerInWhiteWerewolfTargets = !!whiteWerewolfAvailableTargets.find(({ _id }) => _id.toString() === targetedPlayer._id.toString());\n if (game.currentPlay.source.name === ROLE_NAMES.WHITE_WEREWOLF && !isTargetedPlayerInWhiteWerewolfTargets) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_WHITE_WEREWOLF_TARGET);\n }\n await this.validateGamePlayInfectedTargets(playTargets, game);\n }\n\n private validateGamePlayHunterTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_HUNTER_TARGET);\n }\n }\n\n private validateGamePlayScapegoatTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: game.players.length });\n if (playTargets.some(({ player }) => !player.isAlive)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SCAPEGOAT_TARGETS);\n }\n }\n\n private validateGamePlayCupidTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 2, max: 2 });\n if (playTargets.some(({ player }) => !player.isAlive)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_CUPID_TARGETS);\n }\n }\n\n private validateGamePlayFoxTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: 1 });\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_FOX_TARGET);\n }\n }\n\n private validateGamePlaySeerTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const seerPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.SEER);\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive || targetedPlayer._id === seerPlayer?._id) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SEER_TARGET);\n }\n }\n\n private validateGamePlayRavenTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: 1 });\n if (playTargets.length && !playTargets[0].player.isAlive) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_RAVEN_TARGET);\n }\n }\n\n private validateGamePlayWildChildTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const wildChildPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WILD_CHILD);\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive || targetedPlayer._id === wildChildPlayer?._id) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_WILD_CHILD_TARGET);\n }\n }\n\n private validateGamePlayPiedPiperTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n const { charmedPeopleCountPerNight } = game.options.roles.piedPiper;\n const leftToCharmByPiedPiperPlayers = getLeftToCharmByPiedPiperPlayers(game);\n const leftToCharmByPiedPiperPlayersCount = leftToCharmByPiedPiperPlayers.length;\n const countToCharm = Math.min(charmedPeopleCountPerNight, leftToCharmByPiedPiperPlayersCount);\n this.validateGamePlayTargetsBoundaries(playTargets, { min: countToCharm, max: countToCharm });\n if (playTargets.some(({ player }) => !leftToCharmByPiedPiperPlayers.find(({ _id }) => player._id === _id))) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_PIED_PIPER_TARGETS);\n }\n }\n\n private async validateGamePlayGuardTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): Promise {\n const { canProtectTwice } = game.options.roles.guard;\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const lastGuardHistoryRecord = await this.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord(game._id);\n const lastProtectedPlayer = lastGuardHistoryRecord?.play.targets?.[0].player;\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive || !canProtectTwice && lastProtectedPlayer?._id === targetedPlayer._id) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_GUARD_TARGET);\n }\n }\n\n private async validateGamePlaySheriffTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const targetedPlayer = playTargets[0].player;\n if (game.currentPlay.action === GAME_PLAY_ACTIONS.DELEGATE && !targetedPlayer.isAlive) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SHERIFF_DELEGATE_TARGET);\n }\n const lastTieInVotesRecord = await this.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord(game._id, game.currentPlay.action);\n const lastTieInVotesRecordNominatedPlayers = lastTieInVotesRecord?.play.voting?.nominatedPlayers ?? [];\n const isSheriffTargetInLastNominatedPlayers = lastTieInVotesRecordNominatedPlayers.find(({ _id }) => _id === targetedPlayer._id);\n if (game.currentPlay.action === GAME_PLAY_ACTIONS.SETTLE_VOTES && !isSheriffTargetInLastNominatedPlayers) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_SHERIFF_SETTLE_VOTES_TARGET);\n }\n }\n\n private validateGamePlayTargetsBoundaries(playTargets: MakeGamePlayTargetWithRelationsDto[], lengthBoundaries: { min: number; max: number }): void {\n if (playTargets.length < lengthBoundaries.min) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_LESS_TARGETS);\n }\n if (playTargets.length > lengthBoundaries.max) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_TARGETS);\n }\n }\n\n private async validateGamePlaySourceTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n const gamePlaySourceValidationMethods: Partial Promise | void>> = {\n [PLAYER_ATTRIBUTE_NAMES.SHERIFF]: async() => this.validateGamePlaySheriffTargets(playTargets, game),\n [PLAYER_GROUPS.WEREWOLVES]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game),\n [ROLE_NAMES.BIG_BAD_WOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game),\n [ROLE_NAMES.WHITE_WEREWOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game),\n [ROLE_NAMES.GUARD]: async() => this.validateGamePlayGuardTargets(playTargets, game),\n [ROLE_NAMES.PIED_PIPER]: () => this.validateGamePlayPiedPiperTargets(playTargets, game),\n [ROLE_NAMES.WILD_CHILD]: () => this.validateGamePlayWildChildTargets(playTargets, game),\n [ROLE_NAMES.RAVEN]: () => this.validateGamePlayRavenTargets(playTargets),\n [ROLE_NAMES.SEER]: () => this.validateGamePlaySeerTargets(playTargets, game),\n [ROLE_NAMES.FOX]: () => this.validateGamePlayFoxTargets(playTargets),\n [ROLE_NAMES.CUPID]: () => this.validateGamePlayCupidTargets(playTargets),\n [ROLE_NAMES.SCAPEGOAT]: () => this.validateGamePlayScapegoatTargets(playTargets, game),\n [ROLE_NAMES.HUNTER]: () => this.validateGamePlayHunterTargets(playTargets),\n [ROLE_NAMES.WITCH]: async() => this.validateGamePlayWitchTargets(playTargets, game),\n };\n const gamePlaySourceValidationMethod = gamePlaySourceValidationMethods[game.currentPlay.source.name];\n if (gamePlaySourceValidationMethod) {\n await gamePlaySourceValidationMethod();\n }\n }\n\n private validateInfectedTargetsAndPotionUsage(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): void {\n const { source: currentPlaySource, action: currentPlayAction } = game.currentPlay;\n const isSomeTargetInfected = playTargets.some(({ isInfected }) => isInfected);\n if (isSomeTargetInfected && (currentPlayAction !== GAME_PLAY_ACTIONS.EAT || currentPlaySource.name !== PLAYER_GROUPS.WEREWOLVES)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_INFECTED_TARGET);\n }\n const hasSomePlayerDrankPotion = playTargets.some(({ drankPotion }) => drankPotion);\n if (hasSomePlayerDrankPotion && (currentPlayAction !== GAME_PLAY_ACTIONS.USE_POTIONS || currentPlaySource.name !== ROLE_NAMES.WITCH)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_DRANK_POTION_TARGET);\n }\n }\n\n private async validateGamePlayTargetsWithRelationsDto(playTargets: MakeGamePlayTargetWithRelationsDto[] | undefined, game: GameWithCurrentPlay): Promise {\n if (playTargets === undefined || playTargets.length === 0) {\n if (requiredTargetsActions.includes(game.currentPlay.action)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.REQUIRED_TARGETS);\n }\n return;\n }\n if (![...requiredTargetsActions, ...optionalTargetsActions].includes(game.currentPlay.action)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_TARGETS);\n }\n this.validateInfectedTargetsAndPotionUsage(playTargets, game);\n await this.validateGamePlaySourceTargets(playTargets, game);\n }\n\n private async validateGamePlayVotesTieBreakerWithRelationsDto(playVotes: MakeGamePlayVoteWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n const lastTieInVotesRecord = await this.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord(game._id, game.currentPlay.action);\n const lastTieInVotesRecordNominatedPlayers = lastTieInVotesRecord?.play.voting?.nominatedPlayers ?? [];\n if (playVotes.some(vote => !lastTieInVotesRecordNominatedPlayers.find(player => vote.target._id.toString() === player._id.toString()))) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_VOTE_TARGET_FOR_TIE_BREAKER);\n }\n }\n \n private validateGamePlayVotesWithRelationsDtoSourceAndTarget(playVotes: MakeGamePlayVoteWithRelationsDto[], game: Game): void {\n if (playVotes.some(({ source }) => !source.isAlive || doesPlayerHaveActiveAttributeWithName(source, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game))) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_VOTE_SOURCE);\n }\n if (playVotes.some(({ target }) => !target.isAlive)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.BAD_VOTE_TARGET);\n }\n if (playVotes.some(({ source, target }) => source._id === target._id)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.SAME_SOURCE_AND_TARGET_VOTE);\n }\n }\n\n private validateUnsetGamePlayVotesWithRelationsDto(game: GameWithCurrentPlay): void {\n const { action: currentPlayAction, cause: currentPlayCause } = game.currentPlay;\n const { canBeSkipped: canVotesBeSkipped } = game.options.votes;\n const isCurrentPlayVoteCauseOfAngelPresence = currentPlayAction === GAME_PLAY_ACTIONS.VOTE && currentPlayCause === GAME_PLAY_CAUSES.ANGEL_PRESENCE;\n const isCurrentPlayVoteInevitable = currentPlayAction === GAME_PLAY_ACTIONS.ELECT_SHERIFF || isCurrentPlayVoteCauseOfAngelPresence;\n const canSomePlayerVote = game.players.some(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, game));\n if (canSomePlayerVote && (!canVotesBeSkipped && requiredVotesActions.includes(currentPlayAction) || canVotesBeSkipped && isCurrentPlayVoteInevitable)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.REQUIRED_VOTES);\n }\n }\n \n private async validateGamePlayVotesWithRelationsDto(playVotes: MakeGamePlayVoteWithRelationsDto[] | undefined, game: GameWithCurrentPlay): Promise {\n if (!playVotes || playVotes.length === 0) {\n this.validateUnsetGamePlayVotesWithRelationsDto(game);\n return;\n }\n if (!requiredVotesActions.includes(game.currentPlay.action)) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_VOTES);\n }\n this.validateGamePlayVotesWithRelationsDtoSourceAndTarget(playVotes, game);\n if (game.currentPlay.cause === GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES) {\n await this.validateGamePlayVotesTieBreakerWithRelationsDto(playVotes, game);\n }\n }\n\n private validateGamePlayWithRelationsDtoChosenSide({ chosenSide }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): void {\n if (chosenSide !== undefined && game.currentPlay.action !== GAME_PLAY_ACTIONS.CHOOSE_SIDE) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_CHOSEN_SIDE);\n }\n if (chosenSide === undefined && game.currentPlay.action === GAME_PLAY_ACTIONS.CHOOSE_SIDE) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.REQUIRED_CHOSEN_SIDE);\n }\n }\n\n private async validateGamePlayWithRelationsDtoJudgeRequest({ doesJudgeRequestAnotherVote }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n if (doesJudgeRequestAnotherVote === undefined) {\n return;\n }\n const { voteRequestsCount } = game.options.roles.stutteringJudge;\n const gameHistoryJudgeRequestRecords = await this.gameHistoryRecordService.getGameHistoryJudgeRequestRecords(game._id);\n const stutteringJudgePlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.STUTTERING_JUDGE);\n if (!stutteringJudgeRequestOpportunityActions.includes(game.currentPlay.action) ||\n !stutteringJudgePlayer || !isPlayerAliveAndPowerful(stutteringJudgePlayer, game) ||\n gameHistoryJudgeRequestRecords.length >= voteRequestsCount) {\n throw new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.UNEXPECTED_STUTTERING_JUDGE_VOTE_REQUEST);\n }\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\n\nimport { OPTIONAL_TARGET_ACTIONS, REQUIRED_TARGET_ACTIONS, REQUIRED_VOTE_ACTIONS, STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS } from \"@/modules/game/constants/game-play/game-play.constant\";\nimport type { MakeGamePlayTargetWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto\";\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GamePlayActions, GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getLeftToCharmByPiedPiperPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { isPlayerAliveAndPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\nimport { WEREWOLF_ROLES } from \"@/modules/role/constants/role.constant\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { BadGamePlayPayloadReasons } from \"@/shared/exception/enums/bad-game-play-payload-error.enum\";\nimport { createNoCurrentGamePlayUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { BadGamePlayPayloadException } from \"@/shared/exception/types/bad-game-play-payload-exception.type\";\n\n@Injectable()\nexport class GamePlayValidatorService {\n public constructor(private readonly gameHistoryRecordService: GameHistoryRecordService) {}\n\n public async validateGamePlayWithRelationsDto(play: MakeGamePlayWithRelationsDto, game: Game): Promise {\n if (!game.currentPlay) {\n throw createNoCurrentGamePlayUnexpectedException(\"validateGamePlayWithRelationsDto\", { gameId: game._id });\n }\n const clonedGameWithCurrentPlay = createGame(game) as GameWithCurrentPlay;\n const { votes, targets } = play;\n await this.validateGamePlayWithRelationsDtoJudgeRequest(play, clonedGameWithCurrentPlay);\n this.validateGamePlayWithRelationsDtoChosenSide(play, clonedGameWithCurrentPlay);\n await this.validateGamePlayVotesWithRelationsDto(votes, clonedGameWithCurrentPlay);\n await this.validateGamePlayTargetsWithRelationsDto(targets, clonedGameWithCurrentPlay);\n this.validateGamePlayWithRelationsDtoChosenCard(play, clonedGameWithCurrentPlay);\n }\n\n private validateGamePlayThiefChosenCard(chosenCard: GameAdditionalCard | undefined, game: GameWithCurrentPlay): void {\n const { mustChooseBetweenWerewolves } = game.options.roles.thief;\n if (!game.additionalCards || !mustChooseBetweenWerewolves) {\n return;\n }\n const areAllAdditionalCardsWerewolves = game.additionalCards.every(({ roleName }) => WEREWOLF_ROLES.find(role => role.name === roleName));\n if (areAllAdditionalCardsWerewolves && !chosenCard) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.THIEF_MUST_CHOOSE_CARD);\n }\n }\n\n private validateGamePlayWithRelationsDtoChosenCard({ chosenCard }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): void {\n if (game.currentPlay.action !== GamePlayActions.CHOOSE_CARD) {\n if (chosenCard) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_CHOSEN_CARD);\n }\n return;\n }\n this.validateGamePlayThiefChosenCard(chosenCard, game);\n }\n\n private validateDrankLifePotionTargets(drankLifePotionTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n if (drankLifePotionTargets.length > 1) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_DRANK_LIFE_POTION_TARGETS);\n }\n if (drankLifePotionTargets.length &&\n (!doesPlayerHaveActiveAttributeWithName(drankLifePotionTargets[0].player, PlayerAttributeNames.EATEN, game) || !drankLifePotionTargets[0].player.isAlive)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_LIFE_POTION_TARGET);\n }\n }\n\n private validateDrankDeathPotionTargets(drankDeathPotionTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n if (drankDeathPotionTargets.length > 1) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_DRANK_DEATH_POTION_TARGETS);\n }\n if (drankDeathPotionTargets.length && !drankDeathPotionTargets[0].player.isAlive) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_DEATH_POTION_TARGET);\n }\n }\n\n private async validateGamePlayWitchTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): Promise {\n const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length > 0;\n const drankLifePotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WitchPotions.LIFE);\n const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length > 0;\n const drankDeathPotionTargets = playTargets.filter(({ drankPotion }) => drankPotion === WitchPotions.DEATH);\n if (hasWitchUsedLifePotion && drankLifePotionTargets.length || hasWitchUsedDeathPotion && drankDeathPotionTargets.length) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_DRANK_POTION_TARGET);\n }\n this.validateDrankLifePotionTargets(drankLifePotionTargets, game);\n this.validateDrankDeathPotionTargets(drankDeathPotionTargets);\n }\n\n private async validateGamePlayInfectedTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): Promise {\n const infectedTargets = playTargets.filter(({ isInfected }) => isInfected === true);\n if (!infectedTargets.length) {\n return;\n }\n const hasVileFatherOfWolvesInfected = (await this.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords(game._id)).length > 0;\n const vileFatherOfWolvesPlayer = getPlayerWithCurrentRole(game, RoleNames.VILE_FATHER_OF_WOLVES);\n if (!vileFatherOfWolvesPlayer || !isPlayerAliveAndPowerful(vileFatherOfWolvesPlayer, game) || hasVileFatherOfWolvesInfected) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_INFECTED_TARGET);\n }\n this.validateGamePlayTargetsBoundaries(infectedTargets, { min: 1, max: 1 });\n }\n \n private validateWerewolvesTargetsBoundaries(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): void {\n const leftToEatByWerewolvesPlayers = getLeftToEatByWerewolvesPlayers(game);\n const leftToEatByWhiteWerewolfPlayers = getLeftToEatByWhiteWerewolfPlayers(game);\n const bigBadWolfExpectedTargetsCount = leftToEatByWerewolvesPlayers.length ? 1 : 0;\n const whiteWerewolfMaxTargetsCount = leftToEatByWhiteWerewolfPlayers.length ? 1 : 0;\n const werewolvesSourceTargetsBoundaries: Partial> = {\n [PlayerGroups.WEREWOLVES]: { min: 1, max: 1 },\n [RoleNames.BIG_BAD_WOLF]: { min: bigBadWolfExpectedTargetsCount, max: bigBadWolfExpectedTargetsCount },\n [RoleNames.WHITE_WEREWOLF]: { min: 0, max: whiteWerewolfMaxTargetsCount },\n };\n const targetsBoundaries = werewolvesSourceTargetsBoundaries[game.currentPlay.source.name];\n if (!targetsBoundaries) {\n return;\n }\n this.validateGamePlayTargetsBoundaries(playTargets, targetsBoundaries);\n }\n\n private async validateGamePlayWerewolvesTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n this.validateWerewolvesTargetsBoundaries(playTargets, game);\n if (!playTargets.length) {\n return;\n }\n const targetedPlayer = playTargets[0].player;\n const pureWolvesAvailableTargets = getLeftToEatByWerewolvesPlayers(game);\n const isTargetedPlayerInPureWolvesTargets = !!pureWolvesAvailableTargets.find(({ _id }) => _id.toString() === targetedPlayer._id.toString());\n if (game.currentPlay.source.name === PlayerGroups.WEREWOLVES && !isTargetedPlayerInPureWolvesTargets) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_WEREWOLVES_TARGET);\n }\n if (game.currentPlay.source.name === RoleNames.BIG_BAD_WOLF && !isTargetedPlayerInPureWolvesTargets) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_BIG_BAD_WOLF_TARGET);\n }\n const whiteWerewolfAvailableTargets = getLeftToEatByWhiteWerewolfPlayers(game);\n const isTargetedPlayerInWhiteWerewolfTargets = !!whiteWerewolfAvailableTargets.find(({ _id }) => _id.toString() === targetedPlayer._id.toString());\n if (game.currentPlay.source.name === RoleNames.WHITE_WEREWOLF && !isTargetedPlayerInWhiteWerewolfTargets) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_WHITE_WEREWOLF_TARGET);\n }\n await this.validateGamePlayInfectedTargets(playTargets, game);\n }\n\n private validateGamePlayHunterTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_HUNTER_TARGET);\n }\n }\n\n private validateGamePlayScapegoatTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: game.players.length });\n if (playTargets.some(({ player }) => !player.isAlive)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SCAPEGOAT_TARGETS);\n }\n }\n\n private validateGamePlayCupidTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 2, max: 2 });\n if (playTargets.some(({ player }) => !player.isAlive)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_CUPID_TARGETS);\n }\n }\n\n private validateGamePlayFoxTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: 1 });\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_FOX_TARGET);\n }\n }\n\n private validateGamePlaySeerTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const seerPlayer = getPlayerWithCurrentRole(game, RoleNames.SEER);\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive || targetedPlayer._id === seerPlayer?._id) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SEER_TARGET);\n }\n }\n\n private validateGamePlayRavenTargets(playTargets: MakeGamePlayTargetWithRelationsDto[]): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 0, max: 1 });\n if (playTargets.length && !playTargets[0].player.isAlive) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_RAVEN_TARGET);\n }\n }\n\n private validateGamePlayWildChildTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const wildChildPlayer = getPlayerWithCurrentRole(game, RoleNames.WILD_CHILD);\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive || targetedPlayer._id === wildChildPlayer?._id) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_WILD_CHILD_TARGET);\n }\n }\n\n private validateGamePlayPiedPiperTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): void {\n const { charmedPeopleCountPerNight } = game.options.roles.piedPiper;\n const leftToCharmByPiedPiperPlayers = getLeftToCharmByPiedPiperPlayers(game);\n const leftToCharmByPiedPiperPlayersCount = leftToCharmByPiedPiperPlayers.length;\n const countToCharm = Math.min(charmedPeopleCountPerNight, leftToCharmByPiedPiperPlayersCount);\n this.validateGamePlayTargetsBoundaries(playTargets, { min: countToCharm, max: countToCharm });\n if (playTargets.some(({ player }) => !leftToCharmByPiedPiperPlayers.find(({ _id }) => player._id === _id))) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_PIED_PIPER_TARGETS);\n }\n }\n\n private async validateGamePlayGuardTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: Game): Promise {\n const { canProtectTwice } = game.options.roles.guard;\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const lastGuardHistoryRecord = await this.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord(game._id);\n const lastProtectedPlayer = lastGuardHistoryRecord?.play.targets?.[0].player;\n const targetedPlayer = playTargets[0].player;\n if (!targetedPlayer.isAlive || !canProtectTwice && lastProtectedPlayer?._id === targetedPlayer._id) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_GUARD_TARGET);\n }\n }\n\n private async validateGamePlaySheriffTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n this.validateGamePlayTargetsBoundaries(playTargets, { min: 1, max: 1 });\n const targetedPlayer = playTargets[0].player;\n if (game.currentPlay.action === GamePlayActions.DELEGATE && !targetedPlayer.isAlive) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SHERIFF_DELEGATE_TARGET);\n }\n const lastTieInVotesRecord = await this.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord(game._id, game.currentPlay.action);\n const lastTieInVotesRecordNominatedPlayers = lastTieInVotesRecord?.play.voting?.nominatedPlayers ?? [];\n const isSheriffTargetInLastNominatedPlayers = lastTieInVotesRecordNominatedPlayers.find(({ _id }) => _id === targetedPlayer._id);\n if (game.currentPlay.action === GamePlayActions.SETTLE_VOTES && !isSheriffTargetInLastNominatedPlayers) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_SHERIFF_SETTLE_VOTES_TARGET);\n }\n }\n\n private validateGamePlayTargetsBoundaries(playTargets: MakeGamePlayTargetWithRelationsDto[], lengthBoundaries: { min: number; max: number }): void {\n if (playTargets.length < lengthBoundaries.min) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_LESS_TARGETS);\n }\n if (playTargets.length > lengthBoundaries.max) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_TARGETS);\n }\n }\n\n private async validateGamePlaySourceTargets(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n const gamePlaySourceValidationMethods: Partial Promise | void>> = {\n [PlayerAttributeNames.SHERIFF]: async() => this.validateGamePlaySheriffTargets(playTargets, game),\n [PlayerGroups.WEREWOLVES]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game),\n [RoleNames.BIG_BAD_WOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game),\n [RoleNames.WHITE_WEREWOLF]: async() => this.validateGamePlayWerewolvesTargets(playTargets, game),\n [RoleNames.GUARD]: async() => this.validateGamePlayGuardTargets(playTargets, game),\n [RoleNames.PIED_PIPER]: () => this.validateGamePlayPiedPiperTargets(playTargets, game),\n [RoleNames.WILD_CHILD]: () => this.validateGamePlayWildChildTargets(playTargets, game),\n [RoleNames.RAVEN]: () => this.validateGamePlayRavenTargets(playTargets),\n [RoleNames.SEER]: () => this.validateGamePlaySeerTargets(playTargets, game),\n [RoleNames.FOX]: () => this.validateGamePlayFoxTargets(playTargets),\n [RoleNames.CUPID]: () => this.validateGamePlayCupidTargets(playTargets),\n [RoleNames.SCAPEGOAT]: () => this.validateGamePlayScapegoatTargets(playTargets, game),\n [RoleNames.HUNTER]: () => this.validateGamePlayHunterTargets(playTargets),\n [RoleNames.WITCH]: async() => this.validateGamePlayWitchTargets(playTargets, game),\n };\n const gamePlaySourceValidationMethod = gamePlaySourceValidationMethods[game.currentPlay.source.name];\n if (gamePlaySourceValidationMethod) {\n await gamePlaySourceValidationMethod();\n }\n }\n\n private validateInfectedTargetsAndPotionUsage(playTargets: MakeGamePlayTargetWithRelationsDto[], game: GameWithCurrentPlay): void {\n const { source: currentPlaySource, action: currentPlayAction } = game.currentPlay;\n const isSomeTargetInfected = playTargets.some(({ isInfected }) => isInfected);\n if (isSomeTargetInfected && (currentPlayAction !== GamePlayActions.EAT || currentPlaySource.name !== PlayerGroups.WEREWOLVES)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_INFECTED_TARGET);\n }\n const hasSomePlayerDrankPotion = playTargets.some(({ drankPotion }) => drankPotion);\n if (hasSomePlayerDrankPotion && (currentPlayAction !== GamePlayActions.USE_POTIONS || currentPlaySource.name !== RoleNames.WITCH)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_DRANK_POTION_TARGET);\n }\n }\n\n private async validateGamePlayTargetsWithRelationsDto(playTargets: MakeGamePlayTargetWithRelationsDto[] | undefined, game: GameWithCurrentPlay): Promise {\n if (playTargets === undefined || playTargets.length === 0) {\n if (REQUIRED_TARGET_ACTIONS.includes(game.currentPlay.action)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.REQUIRED_TARGETS);\n }\n return;\n }\n if (![...REQUIRED_TARGET_ACTIONS, ...OPTIONAL_TARGET_ACTIONS].includes(game.currentPlay.action)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_TARGETS);\n }\n this.validateInfectedTargetsAndPotionUsage(playTargets, game);\n await this.validateGamePlaySourceTargets(playTargets, game);\n }\n\n private async validateGamePlayVotesTieBreakerWithRelationsDto(playVotes: MakeGamePlayVoteWithRelationsDto[], game: GameWithCurrentPlay): Promise {\n const lastTieInVotesRecord = await this.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord(game._id, game.currentPlay.action);\n const lastTieInVotesRecordNominatedPlayers = lastTieInVotesRecord?.play.voting?.nominatedPlayers ?? [];\n if (playVotes.some(vote => !lastTieInVotesRecordNominatedPlayers.find(player => vote.target._id.toString() === player._id.toString()))) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_VOTE_TARGET_FOR_TIE_BREAKER);\n }\n }\n \n private validateGamePlayVotesWithRelationsDtoSourceAndTarget(playVotes: MakeGamePlayVoteWithRelationsDto[], game: Game): void {\n if (playVotes.some(({ source }) => !source.isAlive || doesPlayerHaveActiveAttributeWithName(source, PlayerAttributeNames.CANT_VOTE, game))) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_VOTE_SOURCE);\n }\n if (playVotes.some(({ target }) => !target.isAlive)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.BAD_VOTE_TARGET);\n }\n if (playVotes.some(({ source, target }) => source._id === target._id)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.SAME_SOURCE_AND_TARGET_VOTE);\n }\n }\n\n private validateUnsetGamePlayVotesWithRelationsDto(game: GameWithCurrentPlay): void {\n const { action: currentPlayAction, cause: currentPlayCause } = game.currentPlay;\n const { canBeSkipped: canVotesBeSkipped } = game.options.votes;\n const isCurrentPlayVoteCauseOfAngelPresence = currentPlayAction === GamePlayActions.VOTE && currentPlayCause === GamePlayCauses.ANGEL_PRESENCE;\n const isCurrentPlayVoteInevitable = currentPlayAction === GamePlayActions.ELECT_SHERIFF || isCurrentPlayVoteCauseOfAngelPresence;\n const canSomePlayerVote = game.players.some(player => player.isAlive && !doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.CANT_VOTE, game));\n if (canSomePlayerVote && (!canVotesBeSkipped && REQUIRED_VOTE_ACTIONS.includes(currentPlayAction) || canVotesBeSkipped && isCurrentPlayVoteInevitable)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.REQUIRED_VOTES);\n }\n }\n \n private async validateGamePlayVotesWithRelationsDto(playVotes: MakeGamePlayVoteWithRelationsDto[] | undefined, game: GameWithCurrentPlay): Promise {\n if (!playVotes || playVotes.length === 0) {\n this.validateUnsetGamePlayVotesWithRelationsDto(game);\n return;\n }\n if (!REQUIRED_VOTE_ACTIONS.includes(game.currentPlay.action)) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_VOTES);\n }\n this.validateGamePlayVotesWithRelationsDtoSourceAndTarget(playVotes, game);\n if (game.currentPlay.cause === GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES) {\n await this.validateGamePlayVotesTieBreakerWithRelationsDto(playVotes, game);\n }\n }\n\n private validateGamePlayWithRelationsDtoChosenSide({ chosenSide }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): void {\n if (chosenSide !== undefined && game.currentPlay.action !== GamePlayActions.CHOOSE_SIDE) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_CHOSEN_SIDE);\n }\n if (chosenSide === undefined && game.currentPlay.action === GamePlayActions.CHOOSE_SIDE) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.REQUIRED_CHOSEN_SIDE);\n }\n }\n\n private async validateGamePlayWithRelationsDtoJudgeRequest({ doesJudgeRequestAnotherVote }: MakeGamePlayWithRelationsDto, game: GameWithCurrentPlay): Promise {\n if (doesJudgeRequestAnotherVote === undefined) {\n return;\n }\n const { voteRequestsCount } = game.options.roles.stutteringJudge;\n const gameHistoryJudgeRequestRecords = await this.gameHistoryRecordService.getGameHistoryJudgeRequestRecords(game._id);\n const stutteringJudgePlayer = getPlayerWithCurrentRole(game, RoleNames.STUTTERING_JUDGE);\n if (!STUTTERING_JUDGE_REQUEST_OPPORTUNITY_ACTIONS.includes(game.currentPlay.action) ||\n !stutteringJudgePlayer || !isPlayerAliveAndPowerful(stutteringJudgePlayer, game) ||\n gameHistoryJudgeRequestRecords.length >= voteRequestsCount) {\n throw new BadGamePlayPayloadException(BadGamePlayPayloadReasons.UNEXPECTED_STUTTERING_JUDGE_VOTE_REQUEST);\n }\n }\n}" }, "src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts": { "language": "typescript", @@ -72277,7 +72472,7 @@ "killedBy": [], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72299,11 +72494,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72326,7 +72521,7 @@ "killedBy": [], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72348,11 +72543,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72369,16 +72564,12 @@ "id": "2065", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"ebadab2ce2880de2c7fe91b3\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"9eaa6f63e15d8963604dfad1\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Saul\",\n- \"position\": 751620038066176,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"12330f9c630a1aad9dabfcea\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Rachael\",\n \"position\": 4403319571218432,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"08ea4abab2e8d15b60ceebd4\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Tyshawn\",\n- \"position\": 7753239231463424,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"ef81ffeaf54de98bbbd7cfad\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Sydney\",\n- \"position\": 2299115203461120,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 4762768699817985,\n \"turn\": 5363150132084736,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72400,11 +72591,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72421,12 +72612,16 @@ "id": "2067", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"fa46dcd7321a1676de711345\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"b257f00bf104e873bda901bf\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Layne\",\n- \"position\": 2625067303305216,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"e276abb8e8989ddbafcace0e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Nora\",\n \"position\": 6975381552758784,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"bda0baecb8ac33b9b34deaa9\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Vallie\",\n- \"position\": 5638280336900096,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"d42de699fe1b3b05f9c5dd5c\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Dewayne\",\n- \"position\": 4255026847416320,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 6318829940506625,\n \"turn\": 8905853184770048,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "530" + ], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72448,11 +72643,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72475,7 +72670,7 @@ "killedBy": [], "coveredBy": [ "530", - "714" + "715" ], "location": { "end": { @@ -72498,11 +72693,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72525,11 +72720,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72546,16 +72741,20 @@ "id": "2072", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"0f31fb8a90ce667206e2dfea\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Freeda\", \"position\": 107485736206336, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"7c28cef53ac1cdaa6fecb407\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Laverna\", \"position\": 6967058178768896, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"0f31fb8a90ce667206e2dfea\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Freeda\", \"position\": 107485736206336, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"fedfbea8aec08ddf4ea23d9c\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Garnet\", \"position\": 8003492127965184, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"7c28cef53ac1cdaa6fecb407\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Laverna\", \"position\": 6967058178768896, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, "static": false, - "killedBy": [], + "killedBy": [ + "715" + ], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72577,15 +72776,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72607,15 +72806,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72638,11 +72837,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72659,24 +72858,24 @@ "id": "2076", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"b9ca7fcbdcec68dbc868f1b3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Gregoria\", \"position\": 36969604186112, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"85ef16c710b978306da2b7da\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Nicola\", \"position\": 3620280199020544, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"b9ca7fcbdcec68dbc868f1b3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Gregoria\", \"position\": 36969604186112, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"7e36a3dfa7d9baaebc7df09c\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Evangeline\", \"position\": 7483147360927744, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"85ef16c710b978306da2b7da\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Nicola\", \"position\": 3620280199020544, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"dce09bdbd0e4e6d8457f4ed9\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Maximillia\", \"position\": 2268398111162368, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"d0f44daba5a8bcef3b633ac4\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Zelma\", \"position\": 1525799414923264, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"dce09bdbd0e4e6d8457f4ed9\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Maximillia\", \"position\": 2268398111162368, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"abff5075e03c623f9d6d38af\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Aurelie\", \"position\": 2053565390520320, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"d0f44daba5a8bcef3b633ac4\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Zelma\", \"position\": 1525799414923264, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { - "column": 128, + "column": 126, "line": 31 }, "start": { @@ -72689,24 +72888,20 @@ "id": "2077", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"7aea957db7a0de7a2d87ec0f\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Lottie\", \"position\": 2049697673904128, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"9cba3bccccbe1be84456cbb0\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Carole\", \"position\": 4171645140860928, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"9cba3bccccbe1be84456cbb0\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Carole\", \"position\": 4171645140860928, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "714" - ], + "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { - "column": 128, + "column": 126, "line": 31 }, "start": { @@ -72718,25 +72913,21 @@ { "id": "2078", "mutatorName": "LogicalOperator", - "replacement": "game.currentPlay.action === GAME_PLAY_ACTIONS.VOTE && isVoteSourceSheriff || doesSheriffHaveDoubledVote", - "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"1eba40c2ca690dadfe4e6af5\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Assunta\", \"position\": 1718012876947456, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"acb24f68cdd6d5cb4cd5b5b1\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Nova\", \"position\": 4396089119604736, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"1eba40c2ca690dadfe4e6af5\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Assunta\", \"position\": 1718012876947456, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"a81a12264afae35eee50efb6\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Cade\", \"position\": 5897691498283008, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"acb24f68cdd6d5cb4cd5b5b1\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Nova\", \"position\": 4396089119604736, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "replacement": "game.currentPlay.action === GamePlayActions.VOTE && isVoteSourceSheriff || doesSheriffHaveDoubledVote", + "status": "Timeout", "static": false, - "killedBy": [ - "714" - ], + "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { - "column": 128, + "column": 126, "line": 31 }, "start": { @@ -72749,24 +72940,20 @@ "id": "2079", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"a1118393296daa7c22daebc9\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Wilfred\", \"position\": 1647412590411776, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"afa492fb9f2bcea0559cdf5c\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Theodore\", \"position\": 5771204419911680, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"a1118393296daa7c22daebc9\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Wilfred\", \"position\": 1647412590411776, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"c7fbba52fe0d26ad5888bb36\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Celestine\", \"position\": 4859066434191360, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"afa492fb9f2bcea0559cdf5c\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Theodore\", \"position\": 5771204419911680, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "714" - ], + "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { - "column": 98, + "column": 96, "line": 31 }, "start": { @@ -72778,25 +72965,21 @@ { "id": "2080", "mutatorName": "LogicalOperator", - "replacement": "game.currentPlay.action === GAME_PLAY_ACTIONS.VOTE || isVoteSourceSheriff", - "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"951c0298ff6ad706fd5c6332\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Robyn\", \"position\": 977031942635520, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"c46df8cec439940dbf1d1bac\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Alda\", \"position\": 4850079498240000, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"951c0298ff6ad706fd5c6332\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Robyn\", \"position\": 977031942635520, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"4fd8fecb8ccdba9ccfe38255\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Edd\", \"position\": 6034557381902336, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"c46df8cec439940dbf1d1bac\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Alda\", \"position\": 4850079498240000, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "replacement": "game.currentPlay.action === GamePlayActions.VOTE || isVoteSourceSheriff", + "status": "Timeout", "static": false, - "killedBy": [ - "714" - ], + "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { - "column": 98, + "column": 96, "line": 31 }, "start": { @@ -72809,24 +72992,20 @@ "id": "2081", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [[{\"_id\": \"f20db18ff75a70409ecc98d3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dejah\", \"position\": 6476117064024064, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, 1], [{\"_id\": \"efef594fcdfaee3c02ecd0be\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Alexandra\", \"position\": 3821202904711168, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, 2]]\nReceived:\n [[{\"_id\": \"f20db18ff75a70409ecc98d3\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Dejah\", \"position\": 6476117064024064, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, 2], [{\"_id\": \"efef594fcdfaee3c02ecd0be\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"sheriff\", \"remainingPhases\": undefined, \"source\": \"all\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Alexandra\", \"position\": 3821202904711168, \"role\": {\"current\": \"ancient\", \"isRevealed\": false, \"original\": \"ancient\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, 2]]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:116:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "717" - ], + "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { - "column": 75, + "column": 73, "line": 31 }, "start": { @@ -72838,21 +73017,21 @@ { "id": "2082", "mutatorName": "EqualityOperator", - "replacement": "game.currentPlay.action !== GAME_PLAY_ACTIONS.VOTE", + "replacement": "game.currentPlay.action !== GamePlayActions.VOTE", "status": "Timeout", "static": false, "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { - "column": 75, + "column": 73, "line": 31 }, "start": { @@ -72870,11 +73049,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72896,11 +73075,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72922,11 +73101,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72948,15 +73127,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -72979,11 +73158,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -73006,11 +73185,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -73032,13 +73211,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "715" + "716" ], "coveredBy": [ - "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -73060,13 +73239,13 @@ "testsCompleted": 4, "static": false, "killedBy": [ - "715" + "716" ], "coveredBy": [ - "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -73083,20 +73262,16 @@ "id": "2091", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"b5458ffafaedb297682ee3dd\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"1b9d6a30c2cfdc4ab70acbb6\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Jamie\",\n- \"position\": 8857941480308736,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"461bd42f8e7c1682abb75ca3\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Michele\",\n \"position\": 5383018898259968,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"ff4806ddaae0adf26ffb9f8f\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Austyn\",\n- \"position\": 5006433913405440,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"2dcebdcca1ec3bf92cd4d42e\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Juanita\",\n- \"position\": 4833386663247872,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 3421123091890177,\n \"turn\": 8424917884207104,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 6, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -73119,11 +73294,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -73146,11 +73321,11 @@ "killedBy": [], "coveredBy": [ "530", - "714", "715", "716", "717", - "718" + "718", + "719" ], "location": { "end": { @@ -73173,15 +73348,15 @@ "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73204,15 +73379,15 @@ "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73235,15 +73410,15 @@ "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73259,22 +73434,22 @@ { "id": "2097", "mutatorName": "LogicalOperator", - "replacement": "(clonedGame.currentPlay.action !== GAME_PLAY_ACTIONS.VOTE || ravenPlayer?.isAlive !== true || !isPlayerPowerful(ravenPlayer, clonedGame)) && ravenMarkedPlayer?.isAlive !== true", + "replacement": "(clonedGame.currentPlay.action !== GamePlayActions.VOTE || ravenPlayer?.isAlive !== true || !isPlayerPowerful(ravenPlayer, clonedGame)) && ravenMarkedPlayer?.isAlive !== true", "statusReason": "src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(48,119): error TS18048: 'ravenMarkedPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(54,13): error TS2322: Type 'PlayerVoteCount | [Player | undefined, number]' is not assignable to type 'PlayerVoteCount'.\n Type '[Player | undefined, number]' is not assignable to type '[Player, number]'.\n Type at position 0 in source is not compatible with type at position 0 in target.\n Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(54,35): error TS2322: Type 'Player | undefined' is not assignable to type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73291,24 +73466,20 @@ "id": "2098", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 10, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73324,22 +73495,22 @@ { "id": "2099", "mutatorName": "LogicalOperator", - "replacement": "(clonedGame.currentPlay.action !== GAME_PLAY_ACTIONS.VOTE || ravenPlayer?.isAlive !== true) && !isPlayerPowerful(ravenPlayer, clonedGame)", - "statusReason": "src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(45,122): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "replacement": "(clonedGame.currentPlay.action !== GamePlayActions.VOTE || ravenPlayer?.isAlive !== true) && !isPlayerPowerful(ravenPlayer, clonedGame)", + "statusReason": "src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(45,120): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73362,19 +73533,19 @@ "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 98, + "column": 96, "line": 45 }, "start": { @@ -73386,26 +73557,26 @@ { "id": "2101", "mutatorName": "LogicalOperator", - "replacement": "clonedGame.currentPlay.action !== GAME_PLAY_ACTIONS.VOTE && ravenPlayer?.isAlive !== true", + "replacement": "clonedGame.currentPlay.action !== GamePlayActions.VOTE && ravenPlayer?.isAlive !== true", "statusReason": "src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(46,25): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 98, + "column": 96, "line": 45 }, "start": { @@ -73418,24 +73589,28 @@ "id": "2102", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 28\n\n@@ -37,6 +37,34 @@\n \"original\": \"villagers\",\n },\n },\n 2,\n ],\n+ Array [\n+ Player {\n+ \"_id\": \"7ecdbb0ba8ffcabe5dce4568\",\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"raven-marked\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"raven\",\n+ },\n+ ],\n+ \"death\": undefined,\n+ \"isAlive\": true,\n+ \"name\": \"Francisca\",\n+ \"position\": 2624072131280896,\n+ \"role\": PlayerRole {\n+ \"current\": \"werewolf\",\n+ \"isRevealed\": false,\n+ \"original\": \"werewolf\",\n+ },\n+ \"side\": PlayerSide {\n+ \"current\": \"werewolves\",\n+ \"original\": \"werewolves\",\n+ },\n+ },\n+ 5,\n+ ],\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:156:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 10, "static": false, - "killedBy": [], + "killedBy": [ + "720" + ], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 65, + "column": 63, "line": 45 }, "start": { @@ -73447,29 +73622,29 @@ { "id": "2103", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.currentPlay.action === GAME_PLAY_ACTIONS.VOTE", - "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"ddfc735f0c3220dbeea1edb2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Asia\", \"position\": 4249212969549824, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"9176bcc654f07d87d55c9de9\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Myrtice\", \"position\": 1983641297092608, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"ddfc735f0c3220dbeea1edb2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Asia\", \"position\": 4249212969549824, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "clonedGame.currentPlay.action === GamePlayActions.VOTE", + "statusReason": "Error: expect(received).toContainAllValues(expected)\n\nExpected object to contain all values:\n [{\"_id\": \"9b9f9fc3ac9037bbc7b30c1a\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Wilford\", \"position\": 6888997758435328, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"ad97afad911dda88f15c8fa5\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"raven-marked\", \"remainingPhases\": 2, \"source\": \"raven\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Ashton\", \"position\": 5393877322170368, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}]\nReceived:\n [{\"_id\": \"9b9f9fc3ac9037bbc7b30c1a\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Wilford\", \"position\": 6888997758435328, \"role\": {\"current\": \"raven\", \"isRevealed\": false, \"original\": \"raven\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts:48:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714", - "719", + "715", "720", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 65, + "column": 63, "line": 45 }, "start": { @@ -73488,22 +73663,22 @@ "killedBy": [], "coveredBy": [ "530", - "714", - "720", + "715", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 98, + "column": 96, "line": 45 }, "start": { - "column": 69, + "column": 67, "line": 45 } } @@ -73518,22 +73693,22 @@ "killedBy": [], "coveredBy": [ "530", - "714", - "720", + "715", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 98, + "column": 96, "line": 45 }, "start": { - "column": 69, + "column": 67, "line": 45 } } @@ -73542,28 +73717,28 @@ "id": "2106", "mutatorName": "OptionalChaining", "replacement": "ravenPlayer.isAlive", - "statusReason": "src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(45,69): error TS18048: 'ravenPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(46,25): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(45,67): error TS18048: 'ravenPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.ts(46,25): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "530", - "714", - "720", + "715", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 89, + "column": 87, "line": 45 }, "start": { - "column": 69, + "column": 67, "line": 45 } } @@ -73577,26 +73752,26 @@ "testsCompleted": 9, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ "530", - "714", - "720", + "715", "721", "722", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { - "column": 98, + "column": 96, "line": 45 }, "start": { - "column": 94, + "column": 92, "line": 45 } } @@ -73610,15 +73785,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ - "714", - "722", + "715", "723", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73640,11 +73815,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "723", + "715", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73666,11 +73841,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "723", + "715", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73692,11 +73867,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "723", + "715", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73717,11 +73892,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "723", + "715", "724", "725", - "726" + "726", + "727" ], "location": { "end": { @@ -73744,12 +73919,12 @@ "killedBy": [], "coveredBy": [ "530", - "719", "720", "721", "722", "723", - "724" + "724", + "725" ], "location": { "end": { @@ -73770,9 +73945,9 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "725", - "726" + "715", + "726", + "727" ], "location": { "end": { @@ -73793,9 +73968,9 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "725", - "726" + "715", + "726", + "727" ], "location": { "end": { @@ -73817,12 +73992,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "726" + "727" ], "coveredBy": [ - "714", - "725", - "726" + "715", + "726", + "727" ], "location": { "end": { @@ -73844,12 +74019,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ - "714", - "725", - "726" + "715", + "726", + "727" ], "location": { "end": { @@ -73871,9 +74046,9 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "725", - "726" + "715", + "726", + "727" ], "location": { "end": { @@ -73895,9 +74070,9 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "725", - "726" + "715", + "726", + "727" ], "location": { "end": { @@ -73919,10 +74094,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "726" + "727" ], "coveredBy": [ - "726" + "727" ], "location": { "end": { @@ -73944,10 +74119,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "726" + "727" ], "coveredBy": [ - "726" + "727" ], "location": { "end": { @@ -73969,11 +74144,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "714" + "715" ], "coveredBy": [ - "714", - "725" + "715", + "726" ], "location": { "end": { @@ -73995,8 +74170,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "714", - "725" + "715", + "726" ], "location": { "end": { @@ -74010,7 +74185,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\n\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport { GAME_PLAY_ACTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getPlayerWithActiveAttributeName, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport { isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { PlayerVoteCount } from \"@/modules/game/types/game-play.type\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\n@Injectable()\nexport class GamePlayVoteService {\n public getNominatedPlayers(votes: MakeGamePlayVoteWithRelationsDto[], game: GameWithCurrentPlay): Player[] {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n let playerVoteCounts = this.getPlayerVoteCounts(votes, clonedGame);\n playerVoteCounts = this.addRavenMarkVoteToPlayerVoteCounts(playerVoteCounts, clonedGame);\n const maxVotes = Math.max(...playerVoteCounts.map(playerVoteCount => playerVoteCount[1]));\n return playerVoteCounts.filter(playerVoteCount => playerVoteCount[1] === maxVotes).map(playerVoteCount => createPlayer(playerVoteCount[0]));\n }\n \n private getPlayerVoteCounts(votes: MakeGamePlayVoteWithRelationsDto[], game: GameWithCurrentPlay): PlayerVoteCount[] {\n const { hasDoubledVote: doesSheriffHaveDoubledVote } = game.options.roles.sheriff;\n const sheriffPlayer = getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SHERIFF);\n return votes.reduce((acc, vote) => {\n const doubledVoteValue = 2;\n const isVoteSourceSheriff = vote.source._id.toString() === sheriffPlayer?._id.toString();\n const voteValue = game.currentPlay.action === GAME_PLAY_ACTIONS.VOTE && isVoteSourceSheriff && doesSheriffHaveDoubledVote ? doubledVoteValue : 1;\n const existingPlayerVoteCount = acc.find(value => value[0]._id.toString() === vote.target._id.toString());\n if (existingPlayerVoteCount) {\n existingPlayerVoteCount[1] += voteValue;\n return acc;\n }\n return [...acc, [vote.target, voteValue]];\n }, []);\n }\n \n private addRavenMarkVoteToPlayerVoteCounts(playerVoteCounts: PlayerVoteCount[], game: GameWithCurrentPlay): PlayerVoteCount[] {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const ravenPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.RAVEN);\n const ravenMarkedPlayer = getPlayerWithActiveAttributeName(clonedGame, PLAYER_ATTRIBUTE_NAMES.RAVEN_MARKED);\n if (clonedGame.currentPlay.action !== GAME_PLAY_ACTIONS.VOTE || ravenPlayer?.isAlive !== true ||\n !isPlayerPowerful(ravenPlayer, clonedGame) || ravenMarkedPlayer?.isAlive !== true) {\n return playerVoteCounts;\n }\n const ravenMarkedPlayerVoteCount = playerVoteCounts.find(playerVoteCount => playerVoteCount[0]._id.toString() === ravenMarkedPlayer._id.toString());\n const { markPenalty } = clonedGame.options.roles.raven;\n if (ravenMarkedPlayerVoteCount) {\n ravenMarkedPlayerVoteCount[1] += markPenalty;\n return playerVoteCounts;\n }\n return [...playerVoteCounts, [ravenMarkedPlayer, markPenalty]];\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\n\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport { GamePlayActions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getPlayerWithActiveAttributeName, getPlayerWithCurrentRole } from \"@/modules/game/helpers/game.helper\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport { isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { PlayerVoteCount } from \"@/modules/game/types/game-play.type\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\n@Injectable()\nexport class GamePlayVoteService {\n public getNominatedPlayers(votes: MakeGamePlayVoteWithRelationsDto[], game: GameWithCurrentPlay): Player[] {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n let playerVoteCounts = this.getPlayerVoteCounts(votes, clonedGame);\n playerVoteCounts = this.addRavenMarkVoteToPlayerVoteCounts(playerVoteCounts, clonedGame);\n const maxVotes = Math.max(...playerVoteCounts.map(playerVoteCount => playerVoteCount[1]));\n return playerVoteCounts.filter(playerVoteCount => playerVoteCount[1] === maxVotes).map(playerVoteCount => createPlayer(playerVoteCount[0]));\n }\n \n private getPlayerVoteCounts(votes: MakeGamePlayVoteWithRelationsDto[], game: GameWithCurrentPlay): PlayerVoteCount[] {\n const { hasDoubledVote: doesSheriffHaveDoubledVote } = game.options.roles.sheriff;\n const sheriffPlayer = getPlayerWithActiveAttributeName(game, PlayerAttributeNames.SHERIFF);\n return votes.reduce((acc, vote) => {\n const doubledVoteValue = 2;\n const isVoteSourceSheriff = vote.source._id.toString() === sheriffPlayer?._id.toString();\n const voteValue = game.currentPlay.action === GamePlayActions.VOTE && isVoteSourceSheriff && doesSheriffHaveDoubledVote ? doubledVoteValue : 1;\n const existingPlayerVoteCount = acc.find(value => value[0]._id.toString() === vote.target._id.toString());\n if (existingPlayerVoteCount) {\n existingPlayerVoteCount[1] += voteValue;\n return acc;\n }\n return [...acc, [vote.target, voteValue]];\n }, []);\n }\n \n private addRavenMarkVoteToPlayerVoteCounts(playerVoteCounts: PlayerVoteCount[], game: GameWithCurrentPlay): PlayerVoteCount[] {\n const clonedGame = createGame(game) as GameWithCurrentPlay;\n const ravenPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.RAVEN);\n const ravenMarkedPlayer = getPlayerWithActiveAttributeName(clonedGame, PlayerAttributeNames.RAVEN_MARKED);\n if (clonedGame.currentPlay.action !== GamePlayActions.VOTE || ravenPlayer?.isAlive !== true ||\n !isPlayerPowerful(ravenPlayer, clonedGame) || ravenMarkedPlayer?.isAlive !== true) {\n return playerVoteCounts;\n }\n const ravenMarkedPlayerVoteCount = playerVoteCounts.find(playerVoteCount => playerVoteCount[0]._id.toString() === ravenMarkedPlayer._id.toString());\n const { markPenalty } = clonedGame.options.roles.raven;\n if (ravenMarkedPlayerVoteCount) {\n ravenMarkedPlayerVoteCount[1] += markPenalty;\n return playerVoteCounts;\n }\n return [...playerVoteCounts, [ravenMarkedPlayer, markPenalty]];\n }\n}" }, "src/modules/game/providers/services/game-play/game-play.service.ts": { "language": "typescript", @@ -74045,13 +74220,9 @@ "id": "2125", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 59\n+ Received + 4\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"0ed5c43fc353fad5d9c356a4\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"0aaeff76fb2fddfb3bdda295\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Maudie\",\n- \"position\": 1204220273360896,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"aaaca843a229f3efa1d47ae6\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Christina\",\n \"position\": 5851459734208512,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"2f5b7f36cec07bcc1c1e7a2c\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Jerrell\",\n- \"position\": 4186008549588992,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"ea1a69bf13beddb5bbc1a1db\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Gwen\",\n- \"position\": 1639333111005184,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -147,11 +98,11 @@\n },\n \"votes\": Object {\n \"canBeSkipped\": false,\n },\n },\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"players\": Array [\n Object {\n \"_id\": \"0aaeff76fb2fddfb3bdda295\",\n \"attributes\": Array [],\n \"isAlive\": true,\n@@ -216,18 +167,12 @@\n },\n },\n ],\n \"status\": \"playing\",\n \"tick\": 6592579365765121,\n- \"turn\": 3038576921018368,\n+ \"turn\": 3038576921018369,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "138", "139", @@ -74099,9 +74270,13 @@ "id": "2127", "mutatorName": "BooleanLiteral", "replacement": "clonedGame.upcomingPlays.length", - "status": "Timeout", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'source')\n at GamePlayService.proceedToNextGamePlay (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/providers/services/game-play/game-play.service.ts:99:30)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:130:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "141" + ], "coveredBy": [ "141", "142", @@ -74148,9 +74323,13 @@ "id": "2129", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "TypeError: Cannot read properties of undefined (reading 'source')\n at GamePlayService.proceedToNextGamePlay (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/providers/services/game-play/game-play.service.ts:99:30)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:130:32)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "141" + ], "coveredBy": [ "141", "142", @@ -74202,7 +74381,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "143" + "143", + "530" ], "location": { "end": { @@ -74219,7 +74399,7 @@ "id": "2132", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 1\n\n- Array [\n- GamePlay {\n- \"action\": \"vote\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:158:55)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 10\n+ Received + 1\n\n- Array [\n- GamePlay {\n- \"action\": \"vote\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- ]\n+ Array []\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:158:55)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -74227,7 +74407,8 @@ "143" ], "coveredBy": [ - "143" + "143", + "530" ], "location": { "end": { @@ -74255,7 +74436,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74287,7 +74467,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74315,7 +74494,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74333,13 +74511,9 @@ "id": "2136", "mutatorName": "EqualityOperator", "replacement": "game.turn !== 1", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 6\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea485bf34b3a536c00462d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea485bf34b3a536c00462e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea485bf34b3a536c00462f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea485bf34b3a536c004630\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea485bf34b3a536c004631\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea485bf34b3a536c004632\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -281,26 +281,14 @@\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"charm\",\n- \"source\": Object {\n- \"name\": \"cupid\",\n- },\n- },\n Object {\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n- },\n- },\n- Object {\n- \"action\": \"meet-each-other\",\n- \"source\": Object {\n- \"name\": \"lovers\",\n },\n },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "144", "145", @@ -74347,7 +74521,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74364,8 +74537,8 @@ { "id": "2137", "mutatorName": "MethodExpression", - "replacement": "gamePlaysNightOrder", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 16\n\n@@ -1,7 +1,23 @@\n Array [\n GamePlay {\n+ \"action\": \"charm\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"cupid\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n+ \"action\": \"meet-each-other\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"lovers\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"werewolves\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "GAME_PLAYS_NIGHT_ORDER", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 16\n\n@@ -1,7 +1,23 @@\n Array [\n GamePlay {\n+ \"action\": \"charm\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"cupid\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n+ \"action\": \"meet-each-other\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"lovers\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"werewolves\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -74379,12 +74552,11 @@ "517", "518", "519", - "530", "531" ], "location": { "end": { - "column": 114, + "column": 117, "line": 54 }, "start": { @@ -74411,16 +74583,15 @@ "517", "518", "519", - "530", "531" ], "location": { "end": { - "column": 113, + "column": 116, "line": 54 }, "start": { - "column": 59, + "column": 62, "line": 54 } } @@ -74443,16 +74614,15 @@ "517", "518", "519", - "530", "531" ], "location": { "end": { - "column": 113, + "column": 116, "line": 54 }, "start": { - "column": 67, + "column": 70, "line": 54 } } @@ -74461,12 +74631,12 @@ "id": "2140", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 38\n+ Received + 7\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48a86879dcdc4d1dea3a\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48a86879dcdc4d1dea3b\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48a86879dcdc4d1dea3c\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48a86879dcdc4d1dea3d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48a86879dcdc4d1dea3e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48a86879dcdc4d1dea3f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -280,39 +280,8 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n- \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"charm\",\n- \"source\": Object {\n- \"name\": \"cupid\",\n- },\n- },\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n- Object {\n- \"action\": \"meet-each-other\",\n- \"source\": Object {\n- \"name\": \"lovers\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"werewolves\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"white-werewolf\",\n- },\n- },\n- ],\n+ \"upcomingPlays\": Array [],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 16\n+ Received + 0\n\n@@ -5,22 +5,6 @@\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n ]\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "517" + "144" ], "coveredBy": [ "144", @@ -74475,16 +74645,15 @@ "517", "518", "519", - "530", "531" ], "location": { "end": { - "column": 113, + "column": 116, "line": 54 }, "start": { - "column": 67, + "column": 70, "line": 54 } } @@ -74493,12 +74662,12 @@ "id": "2141", "mutatorName": "LogicalOperator", "replacement": "isFirstNight && play.isFirstNightOnly !== true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 6\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48cf37fbb89565d1091f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48cf37fbb89565d10920\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48cf37fbb89565d10921\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48cf37fbb89565d10922\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48cf37fbb89565d10923\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea48cf37fbb89565d10924\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -281,26 +281,14 @@\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"charm\",\n- \"source\": Object {\n- \"name\": \"cupid\",\n- },\n- },\n Object {\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n- },\n- },\n- Object {\n- \"action\": \"meet-each-other\",\n- \"source\": Object {\n- \"name\": \"lovers\",\n },\n },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 56\n+ Received + 0\n\n@@ -6,42 +6,10 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"angel-presence\",\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"choose-card\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"thief\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"choose-side\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"dog-wolf\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"charm\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"cupid\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"seer\",\n \"players\": undefined,\n@@ -57,43 +25,19 @@\n },\n GamePlay {\n \"action\": \"meet-each-other\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"lovers\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"choose-sign\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"stuttering-judge\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"meet-each-other\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n \"name\": \"two-sisters\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"meet-each-other\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"three-brothers\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"choose-model\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"wild-child\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"mark\",\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "517" + "145" ], "coveredBy": [ "144", @@ -74507,16 +74676,15 @@ "517", "518", "519", - "530", "531" ], "location": { "end": { - "column": 113, + "column": 116, "line": 54 }, "start": { - "column": 67, + "column": 70, "line": 54 } } @@ -74534,16 +74702,15 @@ ], "coveredBy": [ "146", - "530", "531" ], "location": { "end": { - "column": 113, + "column": 116, "line": 54 }, "start": { - "column": 83, + "column": 86, "line": 54 } } @@ -74561,16 +74728,15 @@ ], "coveredBy": [ "146", - "530", "531" ], "location": { "end": { - "column": 113, + "column": 116, "line": 54 }, "start": { - "column": 83, + "column": 86, "line": 54 } } @@ -74588,16 +74754,15 @@ ], "coveredBy": [ "146", - "530", "531" ], "location": { "end": { - "column": 113, + "column": 116, "line": 54 }, "start": { - "column": 109, + "column": 112, "line": 54 } } @@ -74641,7 +74806,6 @@ "coveredBy": [ "146", "519", - "530", "531" ], "location": { @@ -74659,12 +74823,12 @@ "id": "2147", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 38\n+ Received + 7\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b465a240354672312e2\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b465a240354672312e3\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b465a240354672312e4\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b465a240354672312e5\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b465a240354672312e6\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b465a240354672312e7\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -280,39 +280,8 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n- \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"charm\",\n- \"source\": Object {\n- \"name\": \"cupid\",\n- },\n- },\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n- Object {\n- \"action\": \"meet-each-other\",\n- \"source\": Object {\n- \"name\": \"lovers\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"werewolves\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"white-werewolf\",\n- },\n- },\n- ],\n+ \"upcomingPlays\": Array [],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox6239974/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 16\n+ Received + 0\n\n@@ -5,22 +5,6 @@\n \"source\": GamePlaySource {\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n ]\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", - "testsCompleted": 8, + "testsCompleted": 7, "static": false, "killedBy": [ - "517" + "144" ], "coveredBy": [ "144", @@ -74673,7 +74837,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74705,7 +74868,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74723,13 +74885,9 @@ "id": "2149", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 38\n+ Received + 7\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b471891320e9c0f9a89\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b471891320e9c0f9a8a\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b471891320e9c0f9a8b\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b471891320e9c0f9a8c\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b471891320e9c0f9a8d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64eb0b471891320e9c0f9a8e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -280,39 +280,8 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n- \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"charm\",\n- \"source\": Object {\n- \"name\": \"cupid\",\n- },\n- },\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n- Object {\n- \"action\": \"meet-each-other\",\n- \"source\": Object {\n- \"name\": \"lovers\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"werewolves\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"white-werewolf\",\n- },\n- },\n- ],\n+ \"upcomingPlays\": Array [],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox6239974/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 8, + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "144", "145", @@ -74737,7 +74895,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74769,7 +74926,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -74837,12 +74993,12 @@ "id": "2153", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 59\n+ Received + 4\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"fd02d6a540c19aa39f8b59cb\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"ffa8c3fda83831b8ccbb39c2\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Gaetano\",\n- \"position\": 8968740582457344,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"cbbc3bdbbaac2d9f5fcc8af8\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Ben\",\n \"position\": 8686814730649600,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"da736fb36bf55a47af32fced\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Maria\",\n- \"position\": 3801191377010688,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"dede7cbc9873ee16da4dbef6\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Dena\",\n- \"position\": 256556805390336,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -147,11 +98,11 @@\n },\n \"votes\": Object {\n \"canBeSkipped\": true,\n },\n },\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"players\": Array [\n Object {\n \"_id\": \"ffa8c3fda83831b8ccbb39c2\",\n \"attributes\": Array [],\n \"isAlive\": true,\n@@ -216,18 +167,12 @@\n },\n },\n ],\n \"status\": \"playing\",\n \"tick\": 1002626655191041,\n- \"turn\": 4591036452044800,\n+ \"turn\": 4591036452044801,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 34\n+ Received + 1\n\n@@ -150,42 +150,9 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 5037910300557312,\n \"turn\": 7427256565628928,\n- \"upcomingPlays\": Array [\n- GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"shoot\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"use-potions\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"witch\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"eat\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n- \"players\": undefined,\n- },\n- },\n- ],\n+ \"upcomingPlays\": Array [],\n \"updatedAt\": 2023-08-27T18:26:20.893Z,\n \"victory\": undefined,\n }\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:274:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "530" + "147" ], "coveredBy": [ "147", @@ -75057,9 +75213,13 @@ "id": "2161", "mutatorName": "MethodExpression", "replacement": "game.upcomingPlays.every(gamePlay => areGamePlaysEqual(gamePlay, upcomingPlay))", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 12\n\n@@ -225,10 +225,22 @@\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n Object {\n+ \"action\": \"look\",\n+ \"source\": Object {\n+ \"name\": \"seer\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "530" + ], "coveredBy": [ "149", "150", @@ -75257,7 +75417,7 @@ "id": "2168", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 12\n\n@@ -225,10 +225,22 @@\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n Object {\n+ \"action\": \"look\",\n+ \"source\": Object {\n+ \"name\": \"seer\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 12\n\n@@ -225,10 +225,22 @@\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n Object {\n+ \"action\": \"look\",\n+ \"source\": Object {\n+ \"name\": \"seer\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -75350,13 +75510,9 @@ "id": "2171", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 12\n\n@@ -225,10 +225,22 @@\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n Object {\n+ \"action\": \"look\",\n+ \"source\": Object {\n+ \"name\": \"seer\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "149", "150", @@ -75412,12 +75568,12 @@ "id": "2173", "mutatorName": "BooleanLiteral", "replacement": "isInUpcomingPlays", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 8\n\n@@ -196,8 +196,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 8592112071213057,\n \"turn\": 7736254433067008,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:313:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, "killedBy": [ - "531" + "149" ], "coveredBy": [ "149", @@ -75443,14 +75599,19 @@ "id": "2174", "mutatorName": "BooleanLiteral", "replacement": "isAlreadyPlayed", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:344:109)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, "static": false, - "killedBy": [], + "killedBy": [ + "151" + ], "coveredBy": [ "150", "151", "152", "155", + "530", "531" ], "location": { @@ -75468,7 +75629,7 @@ "id": "2175", "mutatorName": "BooleanLiteral", "replacement": "isCurrentPlay", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 32\n+ Received + 17\n\n@@ -1,49 +1,27 @@\n Object {\n \"_id\": \"0ffe8af55da9e47aab8eb10d\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"eat\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"seer\",\n \"players\": Array [\n- Object {\n- \"_id\": \"e8ddbedc6b84b5d0b5efe61c\",\n- \"attributes\": Array [\n Object {\n- \"name\": \"seen\",\n- \"remainingPhases\": 1,\n- \"source\": \"seer\",\n- },\n- ],\n- \"isAlive\": true,\n- \"name\": \"Norene\",\n- \"position\": 7915037765140480,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n- \"_id\": \"a17ccadcfc129b1d273d7a7d\",\n+ \"_id\": \"e7eeba1eabba3d06f1dda988\",\n \"attributes\": Array [],\n \"isAlive\": true,\n- \"name\": \"Era\",\n- \"position\": 927028270333952,\n+ \"name\": \"Vallie\",\n+ \"position\": 4732527883321344,\n \"role\": Object {\n- \"current\": \"werewolf\",\n+ \"current\": \"seer\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"seer\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ],\n },\n },\n@@ -196,8 +174,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 501063027261441,\n \"turn\": 1696346362871808,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 32\n+ Received + 17\n\n@@ -1,49 +1,27 @@\n Object {\n \"_id\": \"d36b1589e549baf3fb52bc1d\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"eat\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"seer\",\n \"players\": Array [\n- Object {\n- \"_id\": \"fec9f2a5d8f7a830fc3e7c74\",\n- \"attributes\": Array [\n Object {\n- \"name\": \"seen\",\n- \"remainingPhases\": 1,\n- \"source\": \"seer\",\n- },\n- ],\n- \"isAlive\": true,\n- \"name\": \"Nestor\",\n- \"position\": 7906467667509248,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n- \"_id\": \"95abb1b116d4cc77c7c394ff\",\n+ \"_id\": \"ad3ee586de2bfc6ebb3a1a45\",\n \"attributes\": Array [],\n \"isAlive\": true,\n- \"name\": \"Josiane\",\n- \"position\": 744361818062848,\n+ \"name\": \"Ernestine\",\n+ \"position\": 5628985140576256,\n \"role\": Object {\n- \"current\": \"werewolf\",\n+ \"current\": \"seer\",\n \"isRevealed\": false,\n- \"original\": \"werewolf\",\n+ \"original\": \"seer\",\n },\n \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n ],\n },\n },\n@@ -196,8 +174,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 5413500803350529,\n \"turn\": 5541856951664640,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -75479,6 +75640,7 @@ "150", "152", "155", + "530", "531" ], "location": { @@ -75534,7 +75696,7 @@ ], "location": { "end": { - "column": 71, + "column": 70, "line": 90 }, "start": { @@ -75547,13 +75709,9 @@ "id": "2178", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 42\n\n@@ -1,12 +1,12 @@\n Object {\n \"_id\": \"5ec7a1b202e5d2f389ff8a1f\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"all\",\n \"players\": Array [\n Object {\n \"_id\": \"4bfe89d9cef7e40e078ac6bb\",\n \"attributes\": Array [\n Object {\n@@ -24,13 +24,45 @@\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"9ea34cf8f716cd75d9ecff3d\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Trudie\",\n+ \"position\": 978942594908160,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n Object {\n+ \"_id\": \"5bdec7f6bbdc9bf23408a87d\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Breanne\",\n+ \"position\": 6733313341390848,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n \"_id\": \"3b1ddc5d3b46f925dc8bfdbb\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Alycia\",\n \"position\": 2743591946420224,\n@@ -196,8 +228,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 3477016124850177,\n \"turn\": 8485140674117632,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "531" - ], + "killedBy": [], "coveredBy": [ "153", "154", @@ -75563,7 +75721,7 @@ ], "location": { "end": { - "column": 71, + "column": 70, "line": 90 }, "start": { @@ -75575,8 +75733,8 @@ { "id": "2179", "mutatorName": "EqualityOperator", - "replacement": "game.phase !== GAME_PHASES.NIGHT", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 42\n\n@@ -1,12 +1,12 @@\n Object {\n \"_id\": \"4a9206a32303cff53128d222\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"all\",\n \"players\": Array [\n Object {\n \"_id\": \"b69da8c5b6bac53c25ccb8e8\",\n \"attributes\": Array [\n Object {\n@@ -24,13 +24,45 @@\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"a437f63f8c07a2ab8049ff84\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Adolph\",\n+ \"position\": 8538170159267840,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n Object {\n+ \"_id\": \"bd7f8f4ccbbec6dfdfd1effd\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Dulce\",\n+ \"position\": 4146037233025024,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n \"_id\": \"a7ce10e3bb05f9eb3cf76051\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Durward\",\n \"position\": 859218070470656,\n@@ -196,8 +228,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 8240051563528193,\n \"turn\": 1669693708435456,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "game.phase !== GamePhases.NIGHT", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 42\n\n@@ -1,12 +1,12 @@\n Object {\n \"_id\": \"6b1dcb0f7b52c1414ffec34f\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"all\",\n \"players\": Array [\n Object {\n \"_id\": \"e67ec0505aca0cfd01c2a1f8\",\n \"attributes\": Array [\n Object {\n@@ -24,13 +24,45 @@\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"bac0ce35b8aeced4f4f3ae03\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Barrett\",\n+ \"position\": 6944995533651968,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n Object {\n+ \"_id\": \"2bd4fbcccf6b31fe45e2e7ef\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Abdullah\",\n+ \"position\": 7745283968466944,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n \"_id\": \"dae6cd0bcdebf9ddb4ec3d8d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Brannon\",\n \"position\": 5577622861905920,\n@@ -196,8 +228,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 5693737292267521,\n \"turn\": 1726435859365888,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -75592,7 +75750,7 @@ ], "location": { "end": { - "column": 71, + "column": 70, "line": 90 }, "start": { @@ -75605,12 +75763,12 @@ "id": "2180", "mutatorName": "MethodExpression", "replacement": "currentPhaseUpcomingPlays", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 12\n\n@@ -225,10 +225,22 @@\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n Object {\n+ \"action\": \"look\",\n+ \"source\": Object {\n+ \"name\": \"seer\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: {\"action\": \"elect-sheriff\", \"cause\": undefined, \"source\": {\"name\": \"all\", \"players\": undefined}}, {\"_id\": \"ac810aca46bb7816423931e7\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T11:45:45.652Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 6217131960041472}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [], \"status\": \"playing\", \"tick\": 5348275718717440, \"turn\": 3009362358435840, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T20:17:33.524Z, \"victory\": undefined}, []\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:410:75)", "status": "Killed", "testsCompleted": 5, "static": false, "killedBy": [ - "530" + "155" ], "coveredBy": [ "153", @@ -75634,7 +75792,7 @@ "id": "2181", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: {\"action\": \"elect-sheriff\", \"cause\": undefined, \"source\": {\"name\": \"all\", \"players\": undefined}}, {\"_id\": \"0c3ba388e1fdfe7eb95aaeb1\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T09:30:20.499Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 5599596707315712}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [], \"status\": \"canceled\", \"tick\": 7381108817657856, \"turn\": 8058406673842176, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T02:43:44.053Z, \"victory\": undefined}, []\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:410:75)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: {\"action\": \"elect-sheriff\", \"cause\": undefined, \"source\": {\"name\": \"all\", \"players\": undefined}}, {\"_id\": \"cde5bb2fd5e738f2c984b83f\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T14:02:05.396Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 8067519801720832}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [], \"status\": \"over\", \"tick\": 7731709963403264, \"turn\": 7302271633195008, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T21:02:57.630Z, \"victory\": undefined}, []\n\nNumber of calls: 0\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:410:75)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -75663,7 +75821,7 @@ "id": "2182", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -75693,13 +75851,9 @@ "id": "2183", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "157" - ], + "killedBy": [], "coveredBy": [ "156", "157", @@ -75722,13 +75876,9 @@ "id": "2184", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "530" - ], + "killedBy": [], "coveredBy": [ "156", "157", @@ -75751,7 +75901,7 @@ "id": "2185", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -75780,13 +75930,9 @@ "id": "2186", "mutatorName": "EqualityOperator", "replacement": "playPriorityIndex !== -1", - "statusReason": "Error: expect(received).not.toThrow()\n\nThrown value: undefined\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:424:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "156" - ], + "killedBy": [], "coveredBy": [ "156", "157", @@ -75809,7 +75955,7 @@ "id": "2187", "mutatorName": "UnaryOperator", "replacement": "+1", - "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -75838,7 +75984,7 @@ "id": "2188", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow()\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:434:87)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -75913,7 +76059,7 @@ "id": "2191", "mutatorName": "MethodExpression", "replacement": "clonedUpcomingPlays", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 20\n\n@@ -1,11 +1,11 @@\n Array [\n GamePlay {\n- \"action\": \"shoot\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"elect-sheriff\",\n@@ -14,61 +14,61 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"big-bad-wolf\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"stuttering-judge-request\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"stuttering-judge-request\",\n \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"use-potions\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n+ \"name\": \"witch\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"big-bad-wolf\",\n+ \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"use-potions\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n \"source\": GamePlaySource {\n- \"name\": \"witch\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:468:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 20\n\n@@ -1,11 +1,11 @@\n Array [\n GamePlay {\n- \"action\": \"shoot\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"elect-sheriff\",\n@@ -14,61 +14,61 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"big-bad-wolf\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"stuttering-judge-request\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"stuttering-judge-request\",\n \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"use-potions\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n+ \"name\": \"witch\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"big-bad-wolf\",\n+ \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"use-potions\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n \"source\": GamePlaySource {\n- \"name\": \"witch\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:468:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -75964,7 +76110,7 @@ "id": "2193", "mutatorName": "ArithmeticOperator", "replacement": "playAPriorityIndex + playBPriorityIndex", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 20\n\n@@ -1,11 +1,11 @@\n Array [\n GamePlay {\n- \"action\": \"shoot\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"elect-sheriff\",\n@@ -14,61 +14,61 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"big-bad-wolf\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"stuttering-judge-request\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"stuttering-judge-request\",\n \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"use-potions\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n+ \"name\": \"witch\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"big-bad-wolf\",\n+ \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"use-potions\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n \"source\": GamePlaySource {\n- \"name\": \"witch\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:468:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 20\n+ Received + 20\n\n@@ -1,11 +1,11 @@\n Array [\n GamePlay {\n- \"action\": \"shoot\",\n+ \"action\": \"vote\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n \"action\": \"elect-sheriff\",\n@@ -14,61 +14,61 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"big-bad-wolf\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"stuttering-judge-request\",\n+ \"action\": \"eat\",\n+ \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"werewolves\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n+ \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"stuttering-judge-request\",\n \"source\": GamePlaySource {\n- \"name\": \"seer\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"use-potions\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"werewolves\",\n+ \"name\": \"witch\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"eat\",\n+ \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"big-bad-wolf\",\n+ \"name\": \"hunter\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"use-potions\",\n- \"cause\": undefined,\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n \"source\": GamePlaySource {\n- \"name\": \"witch\",\n+ \"name\": \"all\",\n \"players\": undefined,\n },\n },\n ]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:468:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -75990,7 +76136,7 @@ "id": "2194", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(114,122): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(114,121): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -76005,7 +76151,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -76014,7 +76159,7 @@ "line": 117 }, "start": { - "column": 130, + "column": 129, "line": 114 } } @@ -76023,12 +76168,12 @@ "id": "2195", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 8\n\n@@ -1,11 +1,10 @@\n Object {\n \"_id\": \"00c4bfcd142cacaa2708ee7a\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n \"_id\": \"dec4ed3ba0e4fb2d4e836fcb\",\n@@ -218,10 +217,17 @@\n ],\n \"status\": \"playing\",\n \"tick\": 3228524647284737,\n \"turn\": 857694600691712,\n \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"vote\",\n+ \"cause\": \"previous-votes-were-in-ties\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ },\n+ },\n Object {\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox6239974/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 8\n\n@@ -1,7 +1,15 @@\n Array [\n GamePlay {\n+ \"action\": \"elect-sheriff\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"all\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"werewolves\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", - "testsCompleted": 12, + "testsCompleted": 11, "static": false, "killedBy": [ - "530" + "146" ], "coveredBy": [ "144", @@ -76041,7 +76186,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -76077,7 +76221,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -76113,7 +76256,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -76131,12 +76273,12 @@ "id": "2198", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 3\n+ Received + 42\n\n@@ -1,12 +1,12 @@\n Object {\n \"_id\": \"bbdea94c6badfaebb2fe78fe\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"eat\",\n+ \"action\": \"elect-sheriff\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"all\",\n \"players\": Array [\n Object {\n \"_id\": \"7930fce3674edff1ab16eba8\",\n \"attributes\": Array [\n Object {\n@@ -24,13 +24,45 @@\n \"original\": \"werewolf\",\n },\n \"side\": Object {\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n+ },\n+ },\n+ Object {\n+ \"_id\": \"567af62c3dd78d8d1cfa73c8\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Will\",\n+ \"position\": 667234378711040,\n+ \"role\": Object {\n+ \"current\": \"seer\",\n+ \"isRevealed\": false,\n+ \"original\": \"seer\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n },\n },\n Object {\n+ \"_id\": \"c0076ef004b1d5c6de8ec16a\",\n+ \"attributes\": Array [],\n+ \"isAlive\": true,\n+ \"name\": \"Carson\",\n+ \"position\": 3417722358595584,\n+ \"role\": Object {\n+ \"current\": \"villager\",\n+ \"isRevealed\": false,\n+ \"original\": \"villager\",\n+ },\n+ \"side\": Object {\n+ \"current\": \"villagers\",\n+ \"original\": \"villagers\",\n+ },\n+ },\n+ Object {\n \"_id\": \"2e20099f5e4c62edbb5daabc\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Joany\",\n \"position\": 356410208550912,\n@@ -196,8 +228,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 8759939759603713,\n \"turn\": 1017011698139136,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox6239974/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 8\n\n@@ -1,7 +1,15 @@\n Array [\n GamePlay {\n+ \"action\": \"elect-sheriff\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"all\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"werewolves\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", - "testsCompleted": 12, + "testsCompleted": 11, "static": false, "killedBy": [ - "531" + "146" ], "coveredBy": [ "144", @@ -76149,7 +76291,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -76185,7 +76326,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -76218,8 +76358,7 @@ "162", "163", "517", - "518", - "531" + "518" ], "location": { "end": { @@ -76251,8 +76390,7 @@ "162", "163", "517", - "518", - "531" + "518" ], "location": { "end": { @@ -76269,7 +76407,7 @@ "id": "2202", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:488:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:488:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -76299,9 +76437,13 @@ "id": "2203", "mutatorName": "EqualityOperator", "replacement": "electedAt.phase !== currentPhase", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -1,15 +1,7 @@\n Array [\n GamePlay {\n- \"action\": \"elect-sheriff\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"seer\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, "static": false, - "killedBy": [], + "killedBy": [ + "144" + ], "coveredBy": [ "144", "145", @@ -76452,14 +76594,10 @@ { "id": "2208", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.CUPID)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:508:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "!getPlayerDtoWithRole(game, RoleNames.CUPID)", + "status": "Timeout", "static": false, - "killedBy": [ - "164" - ], + "killedBy": [], "coveredBy": [ "164", "165", @@ -76469,7 +76607,7 @@ ], "location": { "end": { - "column": 60, + "column": 59, "line": 121 }, "start": { @@ -76481,10 +76619,14 @@ { "id": "2209", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.CUPID)", - "status": "Timeout", + "replacement": "getPlayerDtoWithRole(game, RoleNames.CUPID)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:508:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "164" + ], "coveredBy": [ "164", "165", @@ -76494,7 +76636,7 @@ ], "location": { "end": { - "column": 60, + "column": 59, "line": 121 }, "start": { @@ -77058,7 +77200,7 @@ ], "location": { "end": { - "column": 59, + "column": 57, "line": 132 }, "start": { @@ -77071,12 +77213,12 @@ "id": "2230", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:607:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"d91cc1db17cbb2e348c2964a\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"4cf6ceffdb0c16fa1c6d90f2\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Idell\",\n- \"position\": 1301134534770688,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"2b0b213d5bb0fcb2626fbbff\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Lesley\",\n \"position\": 3719491942875136,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"1f17d6117a16ff32b2ca6fbc\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Orion\",\n- \"position\": 7435650764636160,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"4cdda358bb9bdb6e1ce33da1\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Branson\",\n- \"position\": 1415364315447296,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 6835839805947905,\n \"turn\": 7611792169631744,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "172" + "530" ], "coveredBy": [ "144", @@ -77097,7 +77239,7 @@ ], "location": { "end": { - "column": 59, + "column": 57, "line": 132 }, "start": { @@ -77109,8 +77251,8 @@ { "id": "2231", "mutatorName": "EqualityOperator", - "replacement": "gamePlay.cause === GAME_PLAY_CAUSES.ANGEL_PRESENCE", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 8\n\n@@ -6,10 +6,18 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n+ \"action\": \"vote\",\n+ \"cause\": \"angel-presence\",\n+ \"source\": GamePlaySource {\n+ \"name\": \"all\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"seer\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "gamePlay.cause === GamePlayCauses.ANGEL_PRESENCE", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 8\n\n@@ -6,10 +6,18 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n+ \"action\": \"vote\",\n+ \"cause\": \"angel-presence\",\n+ \"source\": GamePlaySource {\n+ \"name\": \"all\",\n+ \"players\": undefined,\n+ },\n+ },\n+ GamePlay {\n \"action\": \"look\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"seer\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": false, @@ -77136,7 +77278,7 @@ ], "location": { "end": { - "column": 59, + "column": 57, "line": 132 }, "start": { @@ -77149,13 +77291,9 @@ "id": "2232", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:607:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "172" - ], + "killedBy": [], "coveredBy": [ "172", "173", @@ -77168,7 +77306,7 @@ "line": 134 }, "start": { - "column": 61, + "column": 59, "line": 132 } } @@ -77177,12 +77315,12 @@ "id": "2233", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 57\n+ Received + 2\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"6dc524df1ead7eda7a9dd1aa\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"dfddcccbb6dc1c0f7eda8ce3\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Bradford\",\n- \"position\": 38252325109760,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"f9c4cb39cff405dd22cfa46f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Marguerite\",\n \"position\": 2401907698040832,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"8630f2a8f4dd6baf23fc6044\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Jess\",\n- \"position\": 5736006177259520,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"0a9c4ae7cdbcbbed29bb4dea\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Kylie\",\n- \"position\": 4614447140175872,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -218,16 +169,10 @@\n ],\n \"status\": \"playing\",\n \"tick\": 6975017099198465,\n \"turn\": 789237236498432,\n \"upcomingPlays\": Array [\n- Object {\n- \"action\": \"look\",\n- \"source\": Object {\n- \"name\": \"seer\",\n- },\n- },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:607:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "530" + "172" ], "coveredBy": [ "172", @@ -77294,10 +77432,14 @@ { "id": "2237", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.ANGEL)", - "status": "Timeout", + "replacement": "!getPlayerDtoWithRole(game, RoleNames.ANGEL)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:633:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "174" + ], "coveredBy": [ "174", "175", @@ -77307,7 +77449,7 @@ ], "location": { "end": { - "column": 60, + "column": 59, "line": 136 }, "start": { @@ -77319,10 +77461,14 @@ { "id": "2238", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.ANGEL)", - "status": "Timeout", + "replacement": "getPlayerDtoWithRole(game, RoleNames.ANGEL)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 6\n+ Received + 13\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde461c0043fab98111fa\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde461c0043fab98111fb\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde461c0043fab98111fc\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde461c0043fab98111fd\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde461c0043fab98111fe\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde461c0043fab98111ff\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -281,10 +281,17 @@\n ],\n \"status\": \"playing\",\n \"tick\": 1,\n \"turn\": 1,\n \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"vote\",\n+ \"cause\": \"angel-presence\",\n+ \"source\": Object {\n+ \"name\": \"all\",\n+ },\n+ },\n Object {\n \"action\": \"charm\",\n \"source\": Object {\n \"name\": \"cupid\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "174", "175", @@ -77332,7 +77478,7 @@ ], "location": { "end": { - "column": 60, + "column": 59, "line": 136 }, "start": { @@ -77375,9 +77521,13 @@ "id": "2240", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -6,18 +6,10 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"vote\",\n- \"cause\": \"angel-presence\",\n- \"source\": GamePlaySource {\n- \"name\": \"all\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"choose-card\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"thief\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, "static": false, - "killedBy": [], + "killedBy": [ + "145" + ], "coveredBy": [ "144", "145", @@ -77521,7 +77671,7 @@ "id": "2245", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(144,11): error TS2739: Type '{}' is missing the following properties from type 'Record boolean>': all, villagers, werewolves, lovers, charmed\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(144,11): error TS2739: Type '{}' is missing the following properties from type 'Record boolean>': all, villagers, werewolves, lovers, charmed\n", "status": "CompileError", "static": false, "killedBy": [], @@ -77551,7 +77701,7 @@ "line": 150 }, "start": { - "column": 118, + "column": 117, "line": 144 } } @@ -77560,7 +77710,7 @@ "id": "2246", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(148,41): error TS2322: Type 'undefined' is not assignable to type 'boolean'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(148,40): error TS2322: Type 'undefined' is not assignable to type 'boolean'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -77586,11 +77736,11 @@ ], "location": { "end": { - "column": 164, + "column": 163, "line": 148 }, "start": { - "column": 35, + "column": 34, "line": 148 } } @@ -77623,11 +77773,11 @@ ], "location": { "end": { - "column": 164, + "column": 163, "line": 148 }, "start": { - "column": 41, + "column": 40, "line": 148 } } @@ -77636,7 +77786,7 @@ "id": "2248", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 6\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4d02b3d65d1dde1be97c\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4d02b3d65d1dde1be97d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4d02b3d65d1dde1be97e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4d02b3d65d1dde1be97f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4d02b3d65d1dde1be980\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4d02b3d65d1dde1be981\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -297,16 +297,10 @@\n },\n Object {\n \"action\": \"meet-each-other\",\n \"source\": Object {\n \"name\": \"lovers\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"werewolves\",\n },\n },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 6\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde8d8af56f1f3c04963b\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde8d8af56f1f3c04963c\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde8d8af56f1f3c04963d\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde8d8af56f1f3c04963e\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde8d8af56f1f3c04963f\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecde8d8af56f1f3c049640\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -297,16 +297,10 @@\n },\n Object {\n \"action\": \"meet-each-other\",\n \"source\": Object {\n \"name\": \"lovers\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"werewolves\",\n },\n },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 13, "static": false, @@ -77660,11 +77810,11 @@ ], "location": { "end": { - "column": 164, + "column": 163, "line": 148 }, "start": { - "column": 41, + "column": 40, "line": 148 } } @@ -77673,7 +77823,7 @@ "id": "2249", "mutatorName": "LogicalOperator", "replacement": "game instanceof CreateGameDto && getGroupOfPlayers(game, source).some(werewolf => isPlayerAliveAndPowerful(werewolf, game))", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(148,92): error TS2345: Argument of type 'CreateGameDto' is not assignable to parameter of type 'Game'.\n Type 'CreateGameDto' is missing the following properties from type 'Game': _id, tick, status, createdAt, updatedAt\nsrc/modules/game/providers/services/game-play/game-play.service.ts(148,158): error TS2345: Argument of type 'CreateGameDto' is not assignable to parameter of type 'Game'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(148,91): error TS2345: Argument of type 'CreateGameDto' is not assignable to parameter of type 'Game'.\n Type 'CreateGameDto' is missing the following properties from type 'Game': _id, tick, status, createdAt, updatedAt\nsrc/modules/game/providers/services/game-play/game-play.service.ts(148,157): error TS2345: Argument of type 'CreateGameDto' is not assignable to parameter of type 'Game'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -77694,11 +77844,11 @@ ], "location": { "end": { - "column": 164, + "column": 163, "line": 148 }, "start": { - "column": 41, + "column": 40, "line": 148 } } @@ -77727,11 +77877,11 @@ ], "location": { "end": { - "column": 164, + "column": 163, "line": 148 }, "start": { - "column": 74, + "column": 73, "line": 148 } } @@ -77740,9 +77890,13 @@ "id": "2251", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 6\n+ Received + 0\n\n@@ -224,14 +224,8 @@\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n },\n },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"werewolves\",\n- },\n- },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 9, "static": false, - "killedBy": [], + "killedBy": [ + "530" + ], "coveredBy": [ "144", "145", @@ -77756,11 +77910,11 @@ ], "location": { "end": { - "column": 163, + "column": 162, "line": 148 }, "start": { - "column": 111, + "column": 110, "line": 148 } } @@ -77769,7 +77923,7 @@ "id": "2252", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(149,40): error TS2322: Type 'undefined' is not assignable to type 'boolean'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(149,39): error TS2322: Type 'undefined' is not assignable to type 'boolean'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -77795,11 +77949,11 @@ ], "location": { "end": { - "column": 45, + "column": 44, "line": 149 }, "start": { - "column": 34, + "column": 33, "line": 149 } } @@ -77808,7 +77962,7 @@ "id": "2253", "mutatorName": "BooleanLiteral", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:756:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:756:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -77820,11 +77974,11 @@ ], "location": { "end": { - "column": 45, + "column": 44, "line": 149 }, "start": { - "column": 40, + "column": 39, "line": 149 } } @@ -77957,21 +78111,17 @@ { "id": "2258", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.WITCH)", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:796:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "replacement": "!getPlayerDtoWithRole(game, RoleNames.WITCH)", + "status": "Timeout", "static": false, - "killedBy": [ - "187" - ], + "killedBy": [], "coveredBy": [ "187", "519" ], "location": { "end": { - "column": 60, + "column": 59, "line": 156 }, "start": { @@ -77983,8 +78133,8 @@ { "id": "2259", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.WITCH)", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:796:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "getPlayerDtoWithRole(game, RoleNames.WITCH)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:796:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -77997,7 +78147,7 @@ ], "location": { "end": { - "column": 60, + "column": 59, "line": 156 }, "start": { @@ -78010,7 +78160,7 @@ "id": "2260", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:875:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:875:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -78032,7 +78182,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 158 }, "start": { @@ -78045,9 +78195,13 @@ "id": "2261", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:846:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "191" + ], "coveredBy": [ "145", "146", @@ -78063,7 +78217,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 158 }, "start": { @@ -78075,7 +78229,7 @@ { "id": "2262", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length >= 0", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length >= 0", "status": "Timeout", "static": false, "killedBy": [], @@ -78094,7 +78248,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 158 }, "start": { @@ -78106,8 +78260,8 @@ { "id": "2263", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length <= 0", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:846:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length <= 0", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:846:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -78129,7 +78283,7 @@ ], "location": { "end": { - "column": 159, + "column": 158, "line": 158 }, "start": { @@ -78142,13 +78296,9 @@ "id": "2264", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:890:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 11, + "status": "Timeout", "static": false, - "killedBy": [ - "194" - ], + "killedBy": [], "coveredBy": [ "145", "146", @@ -78164,7 +78314,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 159 }, "start": { @@ -78177,7 +78327,7 @@ "id": "2265", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:846:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:846:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -78199,7 +78349,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 159 }, "start": { @@ -78211,8 +78361,8 @@ { "id": "2266", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length >= 0", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:890:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length >= 0", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:890:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -78234,7 +78384,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 159 }, "start": { @@ -78246,8 +78396,8 @@ { "id": "2267", "mutatorName": "EqualityOperator", - "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length <= 0", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:846:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length <= 0", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:846:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -78269,7 +78419,7 @@ ], "location": { "end": { - "column": 161, + "column": 160, "line": 159 }, "start": { @@ -78282,9 +78432,13 @@ "id": "2268", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 0\n+ Received + 8\n\n@@ -5,6 +5,14 @@\n \"source\": GamePlaySource {\n \"name\": \"werewolves\",\n \"players\": undefined,\n },\n },\n+ GamePlay {\n+ \"action\": \"use-potions\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"witch\",\n+ \"players\": undefined,\n+ },\n+ },\n ]\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "146" + ], "coveredBy": [ "145", "146", @@ -78574,9 +78728,13 @@ "id": "2277", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:860:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 6, "static": false, - "killedBy": [], + "killedBy": [ + "192" + ], "coveredBy": [ "145", "147", @@ -78668,6 +78826,7 @@ "191" ], "coveredBy": [ + "147", "191", "193", "194" @@ -78748,7 +78907,7 @@ "id": "2283", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:917:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:917:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 14, "static": false, @@ -78824,9 +78983,13 @@ "id": "2285", "mutatorName": "EqualityOperator", "replacement": "(game.turn - 1) % wakingUpInterval !== 0", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 12\n+ Received + 6\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecdf9e46d630f24853d014\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecdf9e46d630f24853d015\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecdf9e46d630f24853d016\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecdf9e46d630f24853d017\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecdf9e46d630f24853d018\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ecdf9e46d630f24853d019\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -303,16 +303,10 @@\n },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"werewolves\",\n- },\n- },\n- Object {\n- \"action\": \"eat\",\n- \"source\": Object {\n- \"name\": \"white-werewolf\",\n },\n },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 14, "static": false, - "killedBy": [], + "killedBy": [ + "517" + ], "coveredBy": [ "145", "195", @@ -78858,7 +79021,7 @@ "id": "2286", "mutatorName": "ArithmeticOperator", "replacement": "(game.turn - 1) * wakingUpInterval", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:917:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:917:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 14, "static": false, @@ -78896,9 +79059,13 @@ "id": "2287", "mutatorName": "ArithmeticOperator", "replacement": "game.turn + 1", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1008:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 14, "static": false, - "killedBy": [], + "killedBy": [ + "203" + ], "coveredBy": [ "145", "195", @@ -79026,7 +79193,7 @@ "id": "2291", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:904:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:904:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -79042,7 +79209,7 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 169 }, "start": { @@ -79055,7 +79222,7 @@ "id": "2292", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:930:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:930:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -79071,7 +79238,7 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 169 }, "start": { @@ -79083,8 +79250,8 @@ { "id": "2293", "mutatorName": "LogicalOperator", - "replacement": "shouldWhiteWerewolfBeCalledOnCurrentTurn || !!getPlayerDtoWithRole(game, ROLE_NAMES.WHITE_WEREWOLF)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:904:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "shouldWhiteWerewolfBeCalledOnCurrentTurn || !!getPlayerDtoWithRole(game, RoleNames.WHITE_WEREWOLF)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:904:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -79100,7 +79267,7 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 169 }, "start": { @@ -79112,8 +79279,8 @@ { "id": "2294", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.WHITE_WEREWOLF)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:904:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!getPlayerDtoWithRole(game, RoleNames.WHITE_WEREWOLF)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:904:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -79128,7 +79295,7 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 169 }, "start": { @@ -79140,10 +79307,14 @@ { "id": "2295", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.WHITE_WEREWOLF)", - "status": "Timeout", + "replacement": "getPlayerDtoWithRole(game, RoleNames.WHITE_WEREWOLF)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:904:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "195" + ], "coveredBy": [ "195", "197", @@ -79152,7 +79323,7 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 169 }, "start": { @@ -79586,7 +79757,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -79620,7 +79790,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -79654,7 +79823,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -79697,8 +79865,8 @@ { "id": "2314", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.PIED_PIPER)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1049:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!getPlayerDtoWithRole(game, RoleNames.PIED_PIPER)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1049:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -79714,7 +79882,7 @@ ], "location": { "end": { - "column": 65, + "column": 64, "line": 180 }, "start": { @@ -79726,14 +79894,10 @@ { "id": "2315", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.PIED_PIPER)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 6\n+ Received + 12\n\n@@ -5,11 +5,11 @@\n \"action\": \"elect-sheriff\",\n \"source\": Object {\n \"name\": \"all\",\n \"players\": Array [\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4f3ac532c3fa62ec86db\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Antoine\",\n \"position\": 0,\n \"role\": Object {\n@@ -21,11 +21,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4f3ac532c3fa62ec86dc\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Mathis\",\n \"position\": 1,\n \"role\": Object {\n@@ -37,11 +37,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4f3ac532c3fa62ec86dd\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Virgil\",\n \"position\": 2,\n \"role\": Object {\n@@ -53,11 +53,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4f3ac532c3fa62ec86de\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"JB\",\n \"position\": 3,\n \"role\": Object {\n@@ -69,11 +69,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4f3ac532c3fa62ec86df\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Doudou\",\n \"position\": 4,\n \"role\": Object {\n@@ -85,11 +85,11 @@\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n Object {\n- \"_id\": Any,\n+ \"_id\": \"64ea4f3ac532c3fa62ec86e0\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Juju\",\n \"position\": 5,\n \"role\": Object {\n@@ -309,10 +309,16 @@\n },\n Object {\n \"action\": \"eat\",\n \"source\": Object {\n \"name\": \"white-werewolf\",\n+ },\n+ },\n+ Object {\n+ \"action\": \"meet-each-other\",\n+ \"source\": Object {\n+ \"name\": \"charmed\",\n },\n },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:575:31)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "getPlayerDtoWithRole(game, RoleNames.PIED_PIPER)", + "status": "Timeout", "static": false, - "killedBy": [ - "517" - ], + "killedBy": [], "coveredBy": [ "206", "207", @@ -79743,7 +79907,7 @@ ], "location": { "end": { - "column": 65, + "column": 64, "line": 180 }, "start": { @@ -79756,9 +79920,9 @@ "id": "2316", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 8\n\n@@ -196,8 +196,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 6134843414937601,\n \"turn\": 2189185056243712,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"meet-each-other\",\n+ \"source\": Object {\n+ \"name\": \"charmed\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox6239974/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 8\n\n@@ -196,8 +196,15 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 2256307503497217,\n \"turn\": 4429964564758528,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"meet-each-other\",\n+ \"source\": Object {\n+ \"name\": \"charmed\",\n+ },\n+ },\n+ ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:964:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", - "testsCompleted": 8, + "testsCompleted": 7, "static": false, "killedBy": [ "531" @@ -79770,7 +79934,6 @@ "208", "209", "210", - "530", "531" ], "location": { @@ -79802,7 +79965,6 @@ "208", "209", "210", - "530", "531" ], "location": { @@ -79831,7 +79993,6 @@ "208", "209", "210", - "530", "531" ], "location": { @@ -79860,7 +80021,6 @@ "208", "209", "210", - "530", "531" ], "location": { @@ -79889,7 +80049,6 @@ "208", "209", "210", - "530", "531" ], "location": { @@ -80025,8 +80184,8 @@ { "id": "2325", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.BIG_BAD_WOLF)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1114:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!getPlayerDtoWithRole(game, RoleNames.BIG_BAD_WOLF)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1114:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -80039,7 +80198,7 @@ ], "location": { "end": { - "column": 67, + "column": 66, "line": 188 }, "start": { @@ -80051,8 +80210,8 @@ { "id": "2326", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.BIG_BAD_WOLF)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1114:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "getPlayerDtoWithRole(game, RoleNames.BIG_BAD_WOLF)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1114:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -80065,7 +80224,7 @@ ], "location": { "end": { - "column": 67, + "column": 66, "line": 188 }, "start": { @@ -80611,7 +80770,7 @@ "id": "2345", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1264:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1264:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 10, "static": false, @@ -80645,9 +80804,13 @@ "id": "2346", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -78,18 +78,10 @@\n \"name\": \"two-sisters\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"meet-each-other\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"three-brothers\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"choose-model\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"wild-child\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 10, "static": false, - "killedBy": [], + "killedBy": [ + "145" + ], "coveredBy": [ "145", "221", @@ -80825,7 +80988,7 @@ "id": "2352", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -80839,7 +81002,7 @@ ], "location": { "end": { - "column": 100, + "column": 99, "line": 202 }, "start": { @@ -80862,7 +81025,7 @@ ], "location": { "end": { - "column": 100, + "column": 99, "line": 202 }, "start": { @@ -80874,8 +81037,8 @@ { "id": "2354", "mutatorName": "LogicalOperator", - "replacement": "shouldThreeBrothersBeCalled || !!getPlayerDtoWithRole(game, ROLE_NAMES.THREE_BROTHERS)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "shouldThreeBrothersBeCalled || !!getPlayerDtoWithRole(game, RoleNames.THREE_BROTHERS)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -80889,7 +81052,7 @@ ], "location": { "end": { - "column": 100, + "column": 99, "line": 202 }, "start": { @@ -80901,8 +81064,8 @@ { "id": "2355", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.THREE_BROTHERS)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!getPlayerDtoWithRole(game, RoleNames.THREE_BROTHERS)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -80915,7 +81078,7 @@ ], "location": { "end": { - "column": 100, + "column": 99, "line": 202 }, "start": { @@ -80927,8 +81090,8 @@ { "id": "2356", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.THREE_BROTHERS)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "getPlayerDtoWithRole(game, RoleNames.THREE_BROTHERS)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1251:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -80941,7 +81104,7 @@ ], "location": { "end": { - "column": 100, + "column": 99, "line": 202 }, "start": { @@ -81215,45 +81378,41 @@ "id": "2366", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1381:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Timeout", + "static": false, + "killedBy": [], + "coveredBy": [ + "145", + "230", + "231", + "232", + "233", + "234", + "235", + "236", + "237" + ], + "location": { + "end": { + "column": 58, + "line": 211 + }, + "start": { + "column": 38, + "line": 211 + } + } + }, + { + "id": "2367", + "mutatorName": "ConditionalExpression", + "replacement": "false", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -73,18 +73,10 @@\n },\n GamePlay {\n \"action\": \"meet-each-other\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"two-sisters\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"meet-each-other\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n \"name\": \"three-brothers\",\n \"players\": undefined,\n },\n },\n GamePlay {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 9, "static": false, "killedBy": [ - "231" - ], - "coveredBy": [ - "145", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237" - ], - "location": { - "end": { - "column": 58, - "line": 211 - }, - "start": { - "column": 38, - "line": 211 - } - } - }, - { - "id": "2367", - "mutatorName": "ConditionalExpression", - "replacement": "false", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -73,18 +73,10 @@\n },\n GamePlay {\n \"action\": \"meet-each-other\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n- \"name\": \"two-sisters\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n- \"action\": \"meet-each-other\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n \"name\": \"three-brothers\",\n \"players\": undefined,\n },\n },\n GamePlay {\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 9, - "static": false, - "killedBy": [ - "145" + "145" ], "coveredBy": [ "145", @@ -81281,13 +81440,9 @@ "id": "2368", "mutatorName": "EqualityOperator", "replacement": "wakingUpInterval >= 0", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1381:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 9, + "status": "Timeout", "static": false, - "killedBy": [ - "231" - ], + "killedBy": [], "coveredBy": [ "145", "230", @@ -81431,9 +81586,13 @@ "id": "2373", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1368:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "230" + ], "coveredBy": [ "230", "231", @@ -81441,7 +81600,7 @@ ], "location": { "end": { - "column": 94, + "column": 93, "line": 213 }, "start": { @@ -81454,7 +81613,7 @@ "id": "2374", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1394:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1394:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -81468,7 +81627,7 @@ ], "location": { "end": { - "column": 94, + "column": 93, "line": 213 }, "start": { @@ -81480,14 +81639,10 @@ { "id": "2375", "mutatorName": "LogicalOperator", - "replacement": "shouldTwoSistersBeCalled || !!getPlayerDtoWithRole(game, ROLE_NAMES.TWO_SISTERS)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1368:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "replacement": "shouldTwoSistersBeCalled || !!getPlayerDtoWithRole(game, RoleNames.TWO_SISTERS)", + "status": "Timeout", "static": false, - "killedBy": [ - "230" - ], + "killedBy": [], "coveredBy": [ "230", "231", @@ -81495,7 +81650,7 @@ ], "location": { "end": { - "column": 94, + "column": 93, "line": 213 }, "start": { @@ -81507,21 +81662,17 @@ { "id": "2376", "mutatorName": "BooleanLiteral", - "replacement": "!getPlayerDtoWithRole(game, ROLE_NAMES.TWO_SISTERS)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1368:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "replacement": "!getPlayerDtoWithRole(game, RoleNames.TWO_SISTERS)", + "status": "Timeout", "static": false, - "killedBy": [ - "230" - ], + "killedBy": [], "coveredBy": [ "230", "232" ], "location": { "end": { - "column": 94, + "column": 93, "line": 213 }, "start": { @@ -81533,17 +81684,21 @@ { "id": "2377", "mutatorName": "BooleanLiteral", - "replacement": "getPlayerDtoWithRole(game, ROLE_NAMES.TWO_SISTERS)", - "status": "Timeout", + "replacement": "getPlayerDtoWithRole(game, RoleNames.TWO_SISTERS)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1368:89)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "230" + ], "coveredBy": [ "230", "232" ], "location": { "end": { - "column": 94, + "column": 93, "line": 213 }, "start": { @@ -81890,7 +82045,7 @@ "id": "2389", "mutatorName": "BooleanLiteral", "replacement": "player", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,34): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(232,92): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,37): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,95): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,12): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,78): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Player'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,33): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(232,91): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,36): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,94): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,12): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,78): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -81939,7 +82094,7 @@ "id": "2390", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,92): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,95): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,78): error TS2345: Argument of type 'Player | CreateGamePlayerDto | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,91): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,94): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,78): error TS2345: Argument of type 'Player | CreateGamePlayerDto | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -81988,7 +82143,7 @@ "id": "2391", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,92): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,95): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,78): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,91): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(233,94): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(238,78): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82037,7 +82192,7 @@ "id": "2392", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(230,92): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(231,95): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(236,78): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(230,91): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(231,94): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/game-play/game-play.service.ts(236,78): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82049,7 +82204,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -82082,7 +82236,6 @@ "517", "518", "519", - "530", "531" ], "location": { @@ -82100,7 +82253,7 @@ "id": "2394", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -160,18 +160,10 @@\n \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"shoot\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"use-potions\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"witch\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:274:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -160,18 +160,10 @@\n \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"shoot\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"use-potions\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"witch\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:274:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 26, "static": false, @@ -82141,7 +82294,7 @@ "line": 234 }, "start": { - "column": 96, + "column": 95, "line": 225 } } @@ -82150,7 +82303,7 @@ "id": "2395", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(226,33): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(226,32): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82184,11 +82337,11 @@ ], "location": { "end": { - "column": 93, + "column": 92, "line": 226 }, "start": { - "column": 33, + "column": 32, "line": 226 } } @@ -82197,7 +82350,7 @@ "id": "2396", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(227,36): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(227,35): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82231,11 +82384,11 @@ ], "location": { "end": { - "column": 99, + "column": 98, "line": 227 }, "start": { - "column": 36, + "column": 35, "line": 227 } } @@ -82244,7 +82397,7 @@ "id": "2397", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(228,34): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(228,33): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82278,11 +82431,11 @@ ], "location": { "end": { - "column": 94, + "column": 93, "line": 228 }, "start": { - "column": 34, + "column": 33, "line": 228 } } @@ -82291,7 +82444,7 @@ "id": "2398", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(229,32): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(229,31): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82325,11 +82478,11 @@ ], "location": { "end": { - "column": 91, + "column": 90, "line": 229 }, "start": { - "column": 32, + "column": 31, "line": 229 } } @@ -82338,7 +82491,7 @@ "id": "2399", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(230,36): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(230,35): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82372,11 +82525,11 @@ ], "location": { "end": { - "column": 99, + "column": 98, "line": 230 }, "start": { - "column": 36, + "column": 35, "line": 230 } } @@ -82385,7 +82538,7 @@ "id": "2400", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(231,27): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(231,26): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82419,11 +82572,11 @@ ], "location": { "end": { - "column": 87, + "column": 86, "line": 231 }, "start": { - "column": 27, + "column": 26, "line": 231 } } @@ -82432,7 +82585,7 @@ "id": "2401", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,28): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,27): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82466,11 +82619,11 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 232 }, "start": { - "column": 28, + "column": 27, "line": 232 } } @@ -82495,11 +82648,11 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 232 }, "start": { - "column": 34, + "column": 33, "line": 232 } } @@ -82524,11 +82677,11 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 232 }, "start": { - "column": 34, + "column": 33, "line": 232 } } @@ -82537,7 +82690,7 @@ "id": "2404", "mutatorName": "LogicalOperator", "replacement": "player instanceof CreateGamePlayerDto && isPlayerPowerful(player, (game as Game))", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,92): error TS2345: Argument of type 'CreateGamePlayerDto' is not assignable to parameter of type 'Player'.\n Type 'CreateGamePlayerDto' is missing the following properties from type 'Player': _id, attributes, isAlive\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(232,91): error TS2345: Argument of type 'CreateGamePlayerDto' is not assignable to parameter of type 'Player'.\n Type 'CreateGamePlayerDto' is missing the following properties from type 'Player': _id, attributes, isAlive\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82550,11 +82703,11 @@ ], "location": { "end": { - "column": 113, + "column": 112, "line": 232 }, "start": { - "column": 34, + "column": 33, "line": 232 } } @@ -82563,7 +82716,7 @@ "id": "2405", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(233,31): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(233,30): error TS2322: Type '() => undefined' is not assignable to type '() => boolean | Promise'.\n Type 'undefined' is not assignable to type 'boolean | Promise'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82597,11 +82750,11 @@ ], "location": { "end": { - "column": 116, + "column": 115, "line": 233 }, "start": { - "column": 31, + "column": 30, "line": 233 } } @@ -82624,11 +82777,11 @@ ], "location": { "end": { - "column": 116, + "column": 115, "line": 233 }, "start": { - "column": 37, + "column": 36, "line": 233 } } @@ -82637,7 +82790,7 @@ "id": "2407", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1634:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1634:108)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -82651,11 +82804,11 @@ ], "location": { "end": { - "column": 116, + "column": 115, "line": 233 }, "start": { - "column": 37, + "column": 36, "line": 233 } } @@ -82664,7 +82817,7 @@ "id": "2408", "mutatorName": "LogicalOperator", "replacement": "player instanceof CreateGamePlayerDto && isPlayerPowerful(player, (game as Game))", - "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(233,95): error TS2345: Argument of type 'CreateGamePlayerDto' is not assignable to parameter of type 'Player'.\n Type 'CreateGamePlayerDto' is missing the following properties from type 'Player': _id, attributes, isAlive\n", + "statusReason": "src/modules/game/providers/services/game-play/game-play.service.ts(233,94): error TS2345: Argument of type 'CreateGamePlayerDto' is not assignable to parameter of type 'Player'.\n Type 'CreateGamePlayerDto' is missing the following properties from type 'Player': _id, attributes, isAlive\n", "status": "CompileError", "static": false, "killedBy": [], @@ -82675,11 +82828,11 @@ ], "location": { "end": { - "column": 116, + "column": 115, "line": 233 }, "start": { - "column": 37, + "column": 36, "line": 233 } } @@ -82835,9 +82988,13 @@ "id": "2412", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -160,18 +160,10 @@\n \"name\": \"seer\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"shoot\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"use-potions\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"witch\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:274:85)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 19, "static": false, - "killedBy": [], + "killedBy": [ + "147" + ], "coveredBy": [ "145", "146", @@ -83124,9 +83281,13 @@ "id": "2419", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -6,18 +6,10 @@\n \"name\": \"all\",\n \"players\": undefined,\n },\n },\n GamePlay {\n- \"action\": \"look\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"seer\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"eat\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"werewolves\",\n \"players\": undefined,\n at Object.toStrictEqual (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:254:76\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 14, "static": false, - "killedBy": [], + "killedBy": [ + "144" + ], "coveredBy": [ "144", "145", @@ -83476,9 +83637,13 @@ "id": "2432", "mutatorName": "BooleanLiteral", "replacement": "sheriffPlayer", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1741:83)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "257" + ], "coveredBy": [ "257", "258" @@ -83641,9 +83806,13 @@ "id": "2437", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "TypeError: specificGroupMethods[source] is not a function\n at GamePlayService.isGroupGamePlaySuitableForCurrentPhase (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/providers/services/game-play/game-play.service.ts:343:42)\n at GamePlayService.isGamePlaySuitableForCurrentPhase (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/providers/services/game-play/game-play.service.ts:555:23)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts:1763:67)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 12, "static": false, - "killedBy": [], + "killedBy": [ + "259" + ], "coveredBy": [ "144", "145", @@ -83741,7 +83910,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\n\nimport { gamePlaysNightOrder } from \"@/modules/game/constants/game.constant\";\nimport { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlay, createGamePlayAllElectSheriff, createGamePlayAllVote } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { areGamePlaysEqual, findPlayPriorityIndex } from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { areAllWerewolvesAlive, getExpectedPlayersToPlay, getGroupOfPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getPlayerDtoWithRole, getPlayersWithActiveAttributeName, getPlayersWithCurrentRole, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole, isGameSourceGroup, isGameSourceRole } from \"@/modules/game/helpers/game.helper\";\nimport { canPiedPiperCharm, isPlayerAliveAndPowerful, isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport type { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { SheriffGameOptions } from \"@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createNoGamePlayPriorityUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\n@Injectable()\nexport class GamePlayService {\n public constructor(private readonly gameHistoryRecordService: GameHistoryRecordService) {}\n\n public async refreshUpcomingPlays(game: Game): Promise {\n let clonedGame = createGame(game);\n clonedGame = await this.removeObsoleteUpcomingPlays(clonedGame);\n const currentPhaseNewUpcomingPlays = await this.getNewUpcomingPlaysForCurrentPhase(clonedGame);\n const upcomingPlaysToSort = [...clonedGame.upcomingPlays, ...currentPhaseNewUpcomingPlays];\n clonedGame.upcomingPlays = this.sortUpcomingPlaysByPriority(upcomingPlaysToSort);\n return clonedGame;\n }\n\n public proceedToNextGamePlay(game: Game): Game {\n const clonedGame = createGame(game);\n if (!clonedGame.upcomingPlays.length) {\n clonedGame.currentPlay = null;\n return clonedGame;\n }\n clonedGame.currentPlay = clonedGame.upcomingPlays[0];\n clonedGame.currentPlay.source.players = getExpectedPlayersToPlay(clonedGame);\n clonedGame.upcomingPlays.shift();\n return clonedGame;\n }\n\n public getUpcomingDayPlays(): GamePlay[] {\n return [createGamePlayAllVote()];\n }\n\n public async getUpcomingNightPlays(game: CreateGameDto | Game): Promise {\n const isFirstNight = game.turn === 1;\n const eligibleNightPlays = gamePlaysNightOrder.filter(play => isFirstNight || play.isFirstNightOnly !== true);\n const isSheriffElectionTime = this.isSheriffElectionTime(game.options.roles.sheriff, game.turn, game.phase);\n const upcomingNightPlays: GamePlay[] = isSheriffElectionTime ? [createGamePlayAllElectSheriff()] : [];\n for (const eligibleNightPlay of eligibleNightPlays) {\n if (await this.isGamePlaySuitableForCurrentPhase(game, eligibleNightPlay)) {\n upcomingNightPlays.push(createGamePlay(eligibleNightPlay));\n }\n }\n return upcomingNightPlays;\n }\n\n private async removeObsoleteUpcomingPlays(game: Game): Promise {\n const clonedGame = createGame(game);\n const validUpcomingPlays: GamePlay[] = [];\n for (const upcomingPlay of clonedGame.upcomingPlays) {\n if (await this.isGamePlaySuitableForCurrentPhase(clonedGame, upcomingPlay)) {\n validUpcomingPlays.push(upcomingPlay);\n }\n }\n clonedGame.upcomingPlays = validUpcomingPlays;\n return clonedGame;\n }\n\n private isUpcomingPlayNewForCurrentPhase(upcomingPlay: GamePlay, game: Game, gameHistoryPhaseRecords: GameHistoryRecord[]): boolean {\n const { currentPlay } = game;\n const isAlreadyPlayed = gameHistoryPhaseRecords.some(({ play }) => {\n const { source, action, cause } = play;\n return areGamePlaysEqual({ source, action, cause }, upcomingPlay);\n });\n const isInUpcomingPlays = game.upcomingPlays.some(gamePlay => areGamePlaysEqual(gamePlay, upcomingPlay));\n const isCurrentPlay = !!currentPlay && areGamePlaysEqual(currentPlay, upcomingPlay);\n return !isInUpcomingPlays && !isAlreadyPlayed && !isCurrentPlay;\n }\n\n private async getNewUpcomingPlaysForCurrentPhase(game: Game): Promise {\n const { _id, turn, phase } = game;\n const currentPhaseUpcomingPlays = game.phase === GAME_PHASES.NIGHT ? await this.getUpcomingNightPlays(game) : this.getUpcomingDayPlays();\n const gameHistoryPhaseRecords = await this.gameHistoryRecordService.getGameHistoryPhaseRecords(_id, turn, phase);\n return currentPhaseUpcomingPlays.filter(gamePlay => this.isUpcomingPlayNewForCurrentPhase(gamePlay, game, gameHistoryPhaseRecords));\n }\n\n private validateUpcomingPlaysPriority(upcomingPlays: GamePlay[]): void {\n for (const upcomingPlay of upcomingPlays) {\n const playPriorityIndex = findPlayPriorityIndex(upcomingPlay);\n if (playPriorityIndex === -1) {\n throw createNoGamePlayPriorityUnexpectedException(this.validateUpcomingPlaysPriority.name, upcomingPlay);\n }\n }\n }\n\n private sortUpcomingPlaysByPriority(upcomingPlays: GamePlay[]): GamePlay[] {\n const clonedUpcomingPlays = upcomingPlays.map(upcomingPlay => createGamePlay(upcomingPlay));\n this.validateUpcomingPlaysPriority(clonedUpcomingPlays);\n return clonedUpcomingPlays.sort((playA, playB) => {\n const playAPriorityIndex = findPlayPriorityIndex(playA);\n const playBPriorityIndex = findPlayPriorityIndex(playB);\n return playAPriorityIndex - playBPriorityIndex;\n });\n }\n\n private isSheriffElectionTime(sheriffGameOptions: SheriffGameOptions, currentTurn: number, currentPhase: GAME_PHASES): boolean {\n const { electedAt, isEnabled } = sheriffGameOptions;\n return isEnabled && electedAt.turn === currentTurn && electedAt.phase === currentPhase;\n }\n\n private isLoversGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, ROLE_NAMES.CUPID);\n }\n const cupidPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.CUPID);\n if (!cupidPlayer) {\n return false;\n }\n const inLovePlayers = getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.IN_LOVE);\n return !inLovePlayers.length && isPlayerAliveAndPowerful(cupidPlayer, game) || inLovePlayers.length > 0 && inLovePlayers.every(player => player.isAlive);\n }\n\n private isAllGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): boolean {\n if (gamePlay.cause !== GAME_PLAY_CAUSES.ANGEL_PRESENCE) {\n return true;\n }\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, ROLE_NAMES.ANGEL);\n }\n const angelPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.ANGEL);\n return !!angelPlayer && isPlayerAliveAndPowerful(angelPlayer, game);\n }\n\n private isGroupGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): boolean {\n const source = gamePlay.source.name as PLAYER_GROUPS;\n const specificGroupMethods: Record boolean> = {\n [PLAYER_GROUPS.ALL]: this.isAllGamePlaySuitableForCurrentPhase,\n [PLAYER_GROUPS.LOVERS]: this.isLoversGamePlaySuitableForCurrentPhase,\n [PLAYER_GROUPS.CHARMED]: this.isPiedPiperGamePlaySuitableForCurrentPhase,\n [PLAYER_GROUPS.WEREWOLVES]: () => game instanceof CreateGameDto || getGroupOfPlayers(game, source).some(werewolf => isPlayerAliveAndPowerful(werewolf, game)),\n [PLAYER_GROUPS.VILLAGERS]: () => false,\n };\n return specificGroupMethods[source](game, gamePlay);\n }\n\n private async isWitchGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): Promise {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, ROLE_NAMES.WITCH);\n }\n const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.LIFE)).length > 0;\n const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WITCH_POTIONS.DEATH)).length > 0;\n const { doSkipCallIfNoTarget } = game.options.roles;\n const witchPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WITCH);\n return !!witchPlayer && isPlayerAliveAndPowerful(witchPlayer, game) && (!doSkipCallIfNoTarget || !hasWitchUsedLifePotion || !hasWitchUsedDeathPotion);\n }\n\n private isWhiteWerewolfGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n const { wakingUpInterval } = game.options.roles.whiteWerewolf;\n const shouldWhiteWerewolfBeCalledOnCurrentTurn = (game.turn - 1) % wakingUpInterval === 0;\n if (game instanceof CreateGameDto) {\n return shouldWhiteWerewolfBeCalledOnCurrentTurn && !!getPlayerDtoWithRole(game, ROLE_NAMES.WHITE_WEREWOLF);\n }\n const { doSkipCallIfNoTarget } = game.options.roles;\n const availableTargets = getLeftToEatByWhiteWerewolfPlayers(game);\n const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.WHITE_WEREWOLF);\n return shouldWhiteWerewolfBeCalledOnCurrentTurn && !!whiteWerewolfPlayer && isPlayerAliveAndPowerful(whiteWerewolfPlayer, game) &&\n (!doSkipCallIfNoTarget || !!availableTargets.length);\n }\n\n private isPiedPiperGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, ROLE_NAMES.PIED_PIPER);\n }\n const piedPiperPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.PIED_PIPER);\n return !!piedPiperPlayer && canPiedPiperCharm(piedPiperPlayer, game);\n }\n\n private isBigBadWolfGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, ROLE_NAMES.BIG_BAD_WOLF);\n }\n const { doSkipCallIfNoTarget } = game.options.roles;\n const availableTargets = getLeftToEatByWerewolvesPlayers(game);\n const { isPowerlessIfWerewolfDies } = game.options.roles.bigBadWolf;\n const bigBadWolfPlayer = getPlayerWithCurrentRole(game, ROLE_NAMES.BIG_BAD_WOLF);\n return !!bigBadWolfPlayer && isPlayerAliveAndPowerful(bigBadWolfPlayer, game) &&\n (!isPowerlessIfWerewolfDies || areAllWerewolvesAlive(game) && (!doSkipCallIfNoTarget || !!availableTargets.length));\n }\n\n private isThreeBrothersGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n const { wakingUpInterval } = game.options.roles.threeBrothers;\n const shouldThreeBrothersBeCalled = wakingUpInterval > 0;\n if (game instanceof CreateGameDto) {\n return shouldThreeBrothersBeCalled && !!getPlayerDtoWithRole(game, ROLE_NAMES.THREE_BROTHERS);\n }\n const threeBrothersPlayers = getPlayersWithCurrentRole(game, ROLE_NAMES.THREE_BROTHERS);\n const minimumBrotherCountToCall = 2;\n return shouldThreeBrothersBeCalled && threeBrothersPlayers.filter(brother => brother.isAlive).length >= minimumBrotherCountToCall;\n }\n\n private isTwoSistersGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n const { wakingUpInterval } = game.options.roles.twoSisters;\n const shouldTwoSistersBeCalled = wakingUpInterval > 0;\n if (game instanceof CreateGameDto) {\n return shouldTwoSistersBeCalled && !!getPlayerDtoWithRole(game, ROLE_NAMES.TWO_SISTERS);\n }\n const twoSistersPlayers = getPlayersWithCurrentRole(game, ROLE_NAMES.TWO_SISTERS);\n return shouldTwoSistersBeCalled && twoSistersPlayers.length > 0 && twoSistersPlayers.every(sister => sister.isAlive);\n }\n\n private async isRoleGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): Promise {\n const source = gamePlay.source.name as ROLE_NAMES;\n const player = game instanceof CreateGameDto ? getPlayerDtoWithRole(game, source) : getPlayerWithCurrentRole(game, source);\n if (!player) {\n return false;\n }\n const specificRoleMethods: Partial Promise | boolean>> = {\n [ROLE_NAMES.TWO_SISTERS]: () => this.isTwoSistersGamePlaySuitableForCurrentPhase(game),\n [ROLE_NAMES.THREE_BROTHERS]: () => this.isThreeBrothersGamePlaySuitableForCurrentPhase(game),\n [ROLE_NAMES.BIG_BAD_WOLF]: () => this.isBigBadWolfGamePlaySuitableForCurrentPhase(game),\n [ROLE_NAMES.PIED_PIPER]: () => this.isPiedPiperGamePlaySuitableForCurrentPhase(game),\n [ROLE_NAMES.WHITE_WEREWOLF]: () => this.isWhiteWerewolfGamePlaySuitableForCurrentPhase(game),\n [ROLE_NAMES.WITCH]: async() => this.isWitchGamePlaySuitableForCurrentPhase(game),\n [ROLE_NAMES.HUNTER]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game),\n [ROLE_NAMES.SCAPEGOAT]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game),\n };\n if (specificRoleMethods[source] !== undefined) {\n return await specificRoleMethods[source]?.() === true;\n }\n return player instanceof CreateGamePlayerDto || isPlayerAliveAndPowerful(player, game as Game);\n }\n\n private isSheriffGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (!game.options.roles.sheriff.isEnabled) {\n return false;\n }\n if (game instanceof CreateGameDto) {\n return true;\n }\n const sheriffPlayer = getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SHERIFF);\n return !!sheriffPlayer;\n }\n\n private async isGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): Promise {\n if (isGameSourceRole(gamePlay.source.name)) {\n return this.isRoleGamePlaySuitableForCurrentPhase(game, gamePlay);\n } else if (isGameSourceGroup(gamePlay.source.name)) {\n return this.isGroupGamePlaySuitableForCurrentPhase(game, gamePlay);\n }\n return this.isSheriffGamePlaySuitableForCurrentPhase(game);\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\n\nimport { GAME_PLAYS_NIGHT_ORDER } from \"@/modules/game/constants/game.constant\";\nimport { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport { GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlay, createGamePlayAllElectSheriff, createGamePlayAllVote } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { areGamePlaysEqual, findPlayPriorityIndex } from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { areAllWerewolvesAlive, getExpectedPlayersToPlay, getGroupOfPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getPlayerDtoWithRole, getPlayersWithActiveAttributeName, getPlayersWithCurrentRole, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole, isGameSourceGroup, isGameSourceRole } from \"@/modules/game/helpers/game.helper\";\nimport { canPiedPiperCharm, isPlayerAliveAndPowerful, isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport type { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { SheriffGameOptions } from \"@/modules/game/schemas/game-options/roles-game-options/sheriff-game-options/sheriff-game-options.schema\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createNoGamePlayPriorityUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\n@Injectable()\nexport class GamePlayService {\n public constructor(private readonly gameHistoryRecordService: GameHistoryRecordService) {}\n\n public async refreshUpcomingPlays(game: Game): Promise {\n let clonedGame = createGame(game);\n clonedGame = await this.removeObsoleteUpcomingPlays(clonedGame);\n const currentPhaseNewUpcomingPlays = await this.getNewUpcomingPlaysForCurrentPhase(clonedGame);\n const upcomingPlaysToSort = [...clonedGame.upcomingPlays, ...currentPhaseNewUpcomingPlays];\n clonedGame.upcomingPlays = this.sortUpcomingPlaysByPriority(upcomingPlaysToSort);\n return clonedGame;\n }\n\n public proceedToNextGamePlay(game: Game): Game {\n const clonedGame = createGame(game);\n if (!clonedGame.upcomingPlays.length) {\n clonedGame.currentPlay = null;\n return clonedGame;\n }\n clonedGame.currentPlay = clonedGame.upcomingPlays[0];\n clonedGame.currentPlay.source.players = getExpectedPlayersToPlay(clonedGame);\n clonedGame.upcomingPlays.shift();\n return clonedGame;\n }\n\n public getUpcomingDayPlays(): GamePlay[] {\n return [createGamePlayAllVote()];\n }\n\n public async getUpcomingNightPlays(game: CreateGameDto | Game): Promise {\n const isFirstNight = game.turn === 1;\n const eligibleNightPlays = GAME_PLAYS_NIGHT_ORDER.filter(play => isFirstNight || play.isFirstNightOnly !== true);\n const isSheriffElectionTime = this.isSheriffElectionTime(game.options.roles.sheriff, game.turn, game.phase);\n const upcomingNightPlays: GamePlay[] = isSheriffElectionTime ? [createGamePlayAllElectSheriff()] : [];\n for (const eligibleNightPlay of eligibleNightPlays) {\n if (await this.isGamePlaySuitableForCurrentPhase(game, eligibleNightPlay)) {\n upcomingNightPlays.push(createGamePlay(eligibleNightPlay));\n }\n }\n return upcomingNightPlays;\n }\n\n private async removeObsoleteUpcomingPlays(game: Game): Promise {\n const clonedGame = createGame(game);\n const validUpcomingPlays: GamePlay[] = [];\n for (const upcomingPlay of clonedGame.upcomingPlays) {\n if (await this.isGamePlaySuitableForCurrentPhase(clonedGame, upcomingPlay)) {\n validUpcomingPlays.push(upcomingPlay);\n }\n }\n clonedGame.upcomingPlays = validUpcomingPlays;\n return clonedGame;\n }\n\n private isUpcomingPlayNewForCurrentPhase(upcomingPlay: GamePlay, game: Game, gameHistoryPhaseRecords: GameHistoryRecord[]): boolean {\n const { currentPlay } = game;\n const isAlreadyPlayed = gameHistoryPhaseRecords.some(({ play }) => {\n const { source, action, cause } = play;\n return areGamePlaysEqual({ source, action, cause }, upcomingPlay);\n });\n const isInUpcomingPlays = game.upcomingPlays.some(gamePlay => areGamePlaysEqual(gamePlay, upcomingPlay));\n const isCurrentPlay = !!currentPlay && areGamePlaysEqual(currentPlay, upcomingPlay);\n return !isInUpcomingPlays && !isAlreadyPlayed && !isCurrentPlay;\n }\n\n private async getNewUpcomingPlaysForCurrentPhase(game: Game): Promise {\n const { _id, turn, phase } = game;\n const currentPhaseUpcomingPlays = game.phase === GamePhases.NIGHT ? await this.getUpcomingNightPlays(game) : this.getUpcomingDayPlays();\n const gameHistoryPhaseRecords = await this.gameHistoryRecordService.getGameHistoryPhaseRecords(_id, turn, phase);\n return currentPhaseUpcomingPlays.filter(gamePlay => this.isUpcomingPlayNewForCurrentPhase(gamePlay, game, gameHistoryPhaseRecords));\n }\n\n private validateUpcomingPlaysPriority(upcomingPlays: GamePlay[]): void {\n for (const upcomingPlay of upcomingPlays) {\n const playPriorityIndex = findPlayPriorityIndex(upcomingPlay);\n if (playPriorityIndex === -1) {\n throw createNoGamePlayPriorityUnexpectedException(this.validateUpcomingPlaysPriority.name, upcomingPlay);\n }\n }\n }\n\n private sortUpcomingPlaysByPriority(upcomingPlays: GamePlay[]): GamePlay[] {\n const clonedUpcomingPlays = upcomingPlays.map(upcomingPlay => createGamePlay(upcomingPlay));\n this.validateUpcomingPlaysPriority(clonedUpcomingPlays);\n return clonedUpcomingPlays.sort((playA, playB) => {\n const playAPriorityIndex = findPlayPriorityIndex(playA);\n const playBPriorityIndex = findPlayPriorityIndex(playB);\n return playAPriorityIndex - playBPriorityIndex;\n });\n }\n\n private isSheriffElectionTime(sheriffGameOptions: SheriffGameOptions, currentTurn: number, currentPhase: GamePhases): boolean {\n const { electedAt, isEnabled } = sheriffGameOptions;\n return isEnabled && electedAt.turn === currentTurn && electedAt.phase === currentPhase;\n }\n\n private isLoversGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, RoleNames.CUPID);\n }\n const cupidPlayer = getPlayerWithCurrentRole(game, RoleNames.CUPID);\n if (!cupidPlayer) {\n return false;\n }\n const inLovePlayers = getPlayersWithActiveAttributeName(game, PlayerAttributeNames.IN_LOVE);\n return !inLovePlayers.length && isPlayerAliveAndPowerful(cupidPlayer, game) || inLovePlayers.length > 0 && inLovePlayers.every(player => player.isAlive);\n }\n\n private isAllGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): boolean {\n if (gamePlay.cause !== GamePlayCauses.ANGEL_PRESENCE) {\n return true;\n }\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, RoleNames.ANGEL);\n }\n const angelPlayer = getPlayerWithCurrentRole(game, RoleNames.ANGEL);\n return !!angelPlayer && isPlayerAliveAndPowerful(angelPlayer, game);\n }\n\n private isGroupGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): boolean {\n const source = gamePlay.source.name as PlayerGroups;\n const specificGroupMethods: Record boolean> = {\n [PlayerGroups.ALL]: this.isAllGamePlaySuitableForCurrentPhase,\n [PlayerGroups.LOVERS]: this.isLoversGamePlaySuitableForCurrentPhase,\n [PlayerGroups.CHARMED]: this.isPiedPiperGamePlaySuitableForCurrentPhase,\n [PlayerGroups.WEREWOLVES]: () => game instanceof CreateGameDto || getGroupOfPlayers(game, source).some(werewolf => isPlayerAliveAndPowerful(werewolf, game)),\n [PlayerGroups.VILLAGERS]: () => false,\n };\n return specificGroupMethods[source](game, gamePlay);\n }\n\n private async isWitchGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): Promise {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, RoleNames.WITCH);\n }\n const hasWitchUsedLifePotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.LIFE)).length > 0;\n const hasWitchUsedDeathPotion = (await this.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords(game._id, WitchPotions.DEATH)).length > 0;\n const { doSkipCallIfNoTarget } = game.options.roles;\n const witchPlayer = getPlayerWithCurrentRole(game, RoleNames.WITCH);\n return !!witchPlayer && isPlayerAliveAndPowerful(witchPlayer, game) && (!doSkipCallIfNoTarget || !hasWitchUsedLifePotion || !hasWitchUsedDeathPotion);\n }\n\n private isWhiteWerewolfGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n const { wakingUpInterval } = game.options.roles.whiteWerewolf;\n const shouldWhiteWerewolfBeCalledOnCurrentTurn = (game.turn - 1) % wakingUpInterval === 0;\n if (game instanceof CreateGameDto) {\n return shouldWhiteWerewolfBeCalledOnCurrentTurn && !!getPlayerDtoWithRole(game, RoleNames.WHITE_WEREWOLF);\n }\n const { doSkipCallIfNoTarget } = game.options.roles;\n const availableTargets = getLeftToEatByWhiteWerewolfPlayers(game);\n const whiteWerewolfPlayer = getPlayerWithCurrentRole(game, RoleNames.WHITE_WEREWOLF);\n return shouldWhiteWerewolfBeCalledOnCurrentTurn && !!whiteWerewolfPlayer && isPlayerAliveAndPowerful(whiteWerewolfPlayer, game) &&\n (!doSkipCallIfNoTarget || !!availableTargets.length);\n }\n\n private isPiedPiperGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, RoleNames.PIED_PIPER);\n }\n const piedPiperPlayer = getPlayerWithCurrentRole(game, RoleNames.PIED_PIPER);\n return !!piedPiperPlayer && canPiedPiperCharm(piedPiperPlayer, game);\n }\n\n private isBigBadWolfGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (game instanceof CreateGameDto) {\n return !!getPlayerDtoWithRole(game, RoleNames.BIG_BAD_WOLF);\n }\n const { doSkipCallIfNoTarget } = game.options.roles;\n const availableTargets = getLeftToEatByWerewolvesPlayers(game);\n const { isPowerlessIfWerewolfDies } = game.options.roles.bigBadWolf;\n const bigBadWolfPlayer = getPlayerWithCurrentRole(game, RoleNames.BIG_BAD_WOLF);\n return !!bigBadWolfPlayer && isPlayerAliveAndPowerful(bigBadWolfPlayer, game) &&\n (!isPowerlessIfWerewolfDies || areAllWerewolvesAlive(game) && (!doSkipCallIfNoTarget || !!availableTargets.length));\n }\n\n private isThreeBrothersGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n const { wakingUpInterval } = game.options.roles.threeBrothers;\n const shouldThreeBrothersBeCalled = wakingUpInterval > 0;\n if (game instanceof CreateGameDto) {\n return shouldThreeBrothersBeCalled && !!getPlayerDtoWithRole(game, RoleNames.THREE_BROTHERS);\n }\n const threeBrothersPlayers = getPlayersWithCurrentRole(game, RoleNames.THREE_BROTHERS);\n const minimumBrotherCountToCall = 2;\n return shouldThreeBrothersBeCalled && threeBrothersPlayers.filter(brother => brother.isAlive).length >= minimumBrotherCountToCall;\n }\n\n private isTwoSistersGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n const { wakingUpInterval } = game.options.roles.twoSisters;\n const shouldTwoSistersBeCalled = wakingUpInterval > 0;\n if (game instanceof CreateGameDto) {\n return shouldTwoSistersBeCalled && !!getPlayerDtoWithRole(game, RoleNames.TWO_SISTERS);\n }\n const twoSistersPlayers = getPlayersWithCurrentRole(game, RoleNames.TWO_SISTERS);\n return shouldTwoSistersBeCalled && twoSistersPlayers.length > 0 && twoSistersPlayers.every(sister => sister.isAlive);\n }\n\n private async isRoleGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): Promise {\n const source = gamePlay.source.name as RoleNames;\n const player = game instanceof CreateGameDto ? getPlayerDtoWithRole(game, source) : getPlayerWithCurrentRole(game, source);\n if (!player) {\n return false;\n }\n const specificRoleMethods: Partial Promise | boolean>> = {\n [RoleNames.TWO_SISTERS]: () => this.isTwoSistersGamePlaySuitableForCurrentPhase(game),\n [RoleNames.THREE_BROTHERS]: () => this.isThreeBrothersGamePlaySuitableForCurrentPhase(game),\n [RoleNames.BIG_BAD_WOLF]: () => this.isBigBadWolfGamePlaySuitableForCurrentPhase(game),\n [RoleNames.PIED_PIPER]: () => this.isPiedPiperGamePlaySuitableForCurrentPhase(game),\n [RoleNames.WHITE_WEREWOLF]: () => this.isWhiteWerewolfGamePlaySuitableForCurrentPhase(game),\n [RoleNames.WITCH]: async() => this.isWitchGamePlaySuitableForCurrentPhase(game),\n [RoleNames.HUNTER]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game),\n [RoleNames.SCAPEGOAT]: () => player instanceof CreateGamePlayerDto || isPlayerPowerful(player, game as Game),\n };\n if (specificRoleMethods[source] !== undefined) {\n return await specificRoleMethods[source]?.() === true;\n }\n return player instanceof CreateGamePlayerDto || isPlayerAliveAndPowerful(player, game as Game);\n }\n\n private isSheriffGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game): boolean {\n if (!game.options.roles.sheriff.isEnabled) {\n return false;\n }\n if (game instanceof CreateGameDto) {\n return true;\n }\n const sheriffPlayer = getPlayerWithActiveAttributeName(game, PlayerAttributeNames.SHERIFF);\n return !!sheriffPlayer;\n }\n\n private async isGamePlaySuitableForCurrentPhase(game: CreateGameDto | Game, gamePlay: GamePlay): Promise {\n if (isGameSourceRole(gamePlay.source.name)) {\n return this.isRoleGamePlaySuitableForCurrentPhase(game, gamePlay);\n } else if (isGameSourceGroup(gamePlay.source.name)) {\n return this.isGroupGamePlaySuitableForCurrentPhase(game, gamePlay);\n }\n return this.isSheriffGamePlaySuitableForCurrentPhase(game);\n }\n}" }, "src/modules/game/providers/services/game-random-composition.service.ts": { "language": "typescript", @@ -83756,11 +83925,11 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", - "731" + "731", + "732" ], "location": { "end": { @@ -83782,15 +83951,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "729" + "730" ], "coveredBy": [ "493", - "727", "728", "729", "730", - "731" + "731", + "732" ], "location": { "end": { @@ -83813,11 +83982,11 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", - "731" + "731", + "732" ], "location": { "end": { @@ -83840,11 +84009,11 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", - "731" + "731", + "732" ], "location": { "end": { @@ -83866,15 +84035,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", - "731" + "731", + "732" ], "location": { "end": { @@ -83900,11 +84069,11 @@ ], "coveredBy": [ "493", - "727", "728", "729", "730", - "731" + "731", + "732" ], "location": { "end": { @@ -83921,13 +84090,12 @@ "id": "2446", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/game-random-composition.service.ts(30,102): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/game-random-composition.service.ts(30,101): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -83938,7 +84106,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -83946,7 +84115,7 @@ "line": 51 }, "start": { - "column": 109, + "column": 108, "line": 30 } } @@ -83961,7 +84130,6 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -83972,7 +84140,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -83989,16 +84158,15 @@ "id": "2448", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:51:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:51:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "732" + "733" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84009,11 +84177,12 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { - "column": 59, + "column": 58, "line": 33 }, "start": { @@ -84026,16 +84195,15 @@ "id": "2449", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:58:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:58:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "733" + "734" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84046,11 +84214,12 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { - "column": 59, + "column": 58, "line": 33 }, "start": { @@ -84062,17 +84231,16 @@ { "id": "2450", "mutatorName": "EqualityOperator", - "replacement": "side !== ROLE_SIDES.VILLAGERS", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:51:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "side !== RoleSides.VILLAGERS", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:51:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "732" + "733" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84083,11 +84251,12 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { - "column": 59, + "column": 58, "line": 33 }, "start": { @@ -84106,7 +84275,6 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84117,7 +84285,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84139,11 +84308,10 @@ "testsCompleted": 13, "static": false, "killedBy": [ - "728" + "729" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84154,7 +84322,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84180,7 +84349,6 @@ ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84191,7 +84359,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84214,7 +84383,6 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84225,7 +84393,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84251,7 +84420,6 @@ ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84262,7 +84430,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84279,16 +84448,15 @@ "id": "2456", "mutatorName": "ArithmeticOperator", "replacement": "rolesToPickCount + i", - "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 90\nReceived length: 108\nReceived array: [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:91:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 90\nReceived length: 108\nReceived array: [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:91:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "735" + "736" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84299,7 +84467,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84321,11 +84490,10 @@ "testsCompleted": 13, "static": false, "killedBy": [ - "728" + "729" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84336,7 +84504,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84353,16 +84522,15 @@ "id": "2458", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "734" + "735" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84373,7 +84541,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84395,20 +84564,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "728" + "729" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84425,25 +84594,25 @@ "id": "2460", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "734" + "735" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84465,20 +84634,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84495,25 +84664,25 @@ "id": "2462", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 90\nReceived length: 101\nReceived array: [{\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:91:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 90\nReceived length: 99\nReceived array: [{\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:91:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "735" + "736" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84536,16 +84705,16 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84568,16 +84737,16 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84600,16 +84769,16 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84626,22 +84795,22 @@ "id": "2466", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:100:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:100:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "736" + "737" ], "coveredBy": [ "493", - "728", "729", "730", "731", - "735", + "732", "736", - "737" + "737", + "738" ], "location": { "end": { @@ -84658,22 +84827,22 @@ "id": "2467", "mutatorName": "EqualityOperator", "replacement": "role.minInGame < leftRolesToPickCount", - "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:100:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"minInGame\": 3, \"name\": \"three-brothers\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:100:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "736" + "737" ], "coveredBy": [ "493", - "728", "729", "730", "731", - "735", + "732", "736", - "737" + "737", + "738" ], "location": { "end": { @@ -84690,22 +84859,22 @@ "id": "2468", "mutatorName": "EqualityOperator", "replacement": "role.minInGame > leftRolesToPickCount", - "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 90\nReceived length: 101\nReceived array: [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:91:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 90\nReceived length: 99\nReceived array: [{\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": -98, \"minInGame\": 99, \"name\": \"fox\", \"side\": \"villagers\", \"type\": \"villager\"}, …]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:91:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "735" + "736" ], "coveredBy": [ "493", - "728", "729", "730", "731", - "735", + "732", "736", - "737" + "737", + "738" ], "location": { "end": { @@ -84728,7 +84897,6 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84739,7 +84907,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84762,7 +84931,6 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84773,7 +84941,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84796,7 +84965,6 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -84807,7 +84975,8 @@ "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84829,17 +84998,17 @@ "testsCompleted": 8, "static": false, "killedBy": [ - "728" + "729" ], "coveredBy": [ - "728", "729", "730", "731", "732", "733", "734", - "735" + "735", + "736" ], "location": { "end": { @@ -84861,20 +85030,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84897,16 +85066,16 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84929,16 +85098,16 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84960,20 +85129,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -84995,20 +85164,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -85031,16 +85200,16 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -85066,16 +85235,16 @@ ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -85097,20 +85266,20 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "728" + "729" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", - "738" + "738", + "739" ], "location": { "end": { @@ -85133,17 +85302,17 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "739", + "732", "740", "741", "742", "743", - "744" + "744", + "745" ], "location": { "end": { @@ -85165,21 +85334,21 @@ "testsCompleted": 12, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "739", + "732", "740", "741", "742", "743", - "744" + "744", + "745" ], "location": { "end": { @@ -85202,18 +85371,18 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85229,25 +85398,25 @@ { "id": "2484", "mutatorName": "MethodExpression", - "replacement": "roles", + "replacement": "ROLES", "statusReason": "src/modules/game/providers/services/game-random-composition.service.ts(66,5): error TS4104: The type 'readonly Role[]' is 'readonly' and cannot be assigned to the mutable type 'Role[]'.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85264,27 +85433,27 @@ "id": "2485", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "746" + "747" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85307,22 +85476,22 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { - "column": 44, + "column": 43, "line": 67 }, "start": { @@ -85335,31 +85504,31 @@ "id": "2487", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:177:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:177:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "747" + "748" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { - "column": 44, + "column": 43, "line": 67 }, "start": { @@ -85371,29 +85540,29 @@ { "id": "2488", "mutatorName": "EqualityOperator", - "replacement": "role.name !== ROLE_NAMES.VILLAGER", - "statusReason": "src/modules/game/providers/services/game-random-composition.service.ts(69,18): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.VILLAGER' and 'ROLE_NAMES.WEREWOLF' have no overlap.\n", + "replacement": "role.name !== RoleNames.VILLAGER", + "statusReason": "src/modules/game/providers/services/game-random-composition.service.ts(69,18): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.VILLAGER' and 'RoleNames.WEREWOLF' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { - "column": 44, + "column": 43, "line": 67 }, "start": { @@ -85406,27 +85575,27 @@ "id": "2489", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:177:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:177:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "747" + "748" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85434,7 +85603,7 @@ "line": 69 }, "start": { - "column": 46, + "column": 45, "line": 67 } } @@ -85443,27 +85612,27 @@ "id": "2490", "mutatorName": "BooleanLiteral", "replacement": "arePowerfulVillagerRolesPrioritized", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "746" + "747" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85486,22 +85655,22 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { - "column": 51, + "column": 50, "line": 69 }, "start": { @@ -85514,31 +85683,31 @@ "id": "2492", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:191:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:191:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "749" + "750" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { - "column": 51, + "column": 50, "line": 69 }, "start": { @@ -85550,32 +85719,32 @@ { "id": "2493", "mutatorName": "EqualityOperator", - "replacement": "role.name !== ROLE_NAMES.WEREWOLF", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "role.name !== RoleNames.WEREWOLF", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "745" + "746" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { - "column": 51, + "column": 50, "line": 69 }, "start": { @@ -85588,27 +85757,27 @@ "id": "2494", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:191:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:191:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "749" + "750" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85616,7 +85785,7 @@ "line": 71 }, "start": { - "column": 53, + "column": 52, "line": 69 } } @@ -85625,27 +85794,27 @@ "id": "2495", "mutatorName": "BooleanLiteral", "replacement": "arePowerfulWerewolfRolesPrioritized", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:184:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:184:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "748" + "749" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85662,27 +85831,27 @@ "id": "2496", "mutatorName": "BooleanLiteral", "replacement": "excludedRoles.includes(role.name)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "745" + "746" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85699,27 +85868,27 @@ "id": "2497", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:203:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:203:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "750" + "751" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85736,27 +85905,27 @@ "id": "2498", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "751" + "752" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85779,18 +85948,18 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85813,18 +85982,18 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85847,18 +86016,18 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85875,27 +86044,27 @@ "id": "2502", "mutatorName": "BooleanLiteral", "replacement": "areRecommendedMinPlayersRespected", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:203:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:203:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "750" + "751" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85918,18 +86087,18 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85952,18 +86121,18 @@ "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -85980,27 +86149,27 @@ "id": "2505", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "751" + "752" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -86017,27 +86186,27 @@ "id": "2506", "mutatorName": "EqualityOperator", "replacement": "role.recommendedMinPlayers < players.length", - "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "751" + "752" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -86054,27 +86223,27 @@ "id": "2507", "mutatorName": "EqualityOperator", "replacement": "role.recommendedMinPlayers > players.length", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:203:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:203:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "750" + "751" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -86091,27 +86260,27 @@ "id": "2508", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "745" + "746" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -86128,27 +86297,27 @@ "id": "2509", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveLength(expected)\n\nExpected length: 6\nReceived length: 1\nReceived array: [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"werewolf\", \"recommendedMinPlayers\": undefined, \"side\": \"werewolves\", \"type\": \"werewolf\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:222:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "751" + "752" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -86165,27 +86334,27 @@ "id": "2510", "mutatorName": "LogicalOperator", "replacement": "isRolePermitted || isRoleMinInGameRespected", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:163:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "745" + "746" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "745", + "732", "746", "747", "748", "749", "750", - "751" + "751", + "752" ], "location": { "end": { @@ -86199,7 +86368,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport { plainToInstance } from \"class-transformer\";\nimport { sample, shuffle } from \"lodash\";\n\nimport { GetGameRandomCompositionPlayerResponseDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition-player-response/get-game-random-composition-player-response.dto\";\nimport type { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport { defaultVillagerRole, defaultWerewolfRole, roles } from \"@/modules/role/constants/role.constant\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\nimport { getRolesWithSide } from \"@/modules/role/helpers/role.helper\";\nimport { Role } from \"@/modules/role/types/role.type\";\n\n@Injectable()\nexport class GameRandomCompositionService {\n public getGameRandomComposition(getGameRandomCompositionDto: GetGameRandomCompositionDto): GetGameRandomCompositionPlayerResponseDto[] {\n const availableRoles = plainToInstance(Role, this.getAvailableRolesForGameRandomComposition(getGameRandomCompositionDto));\n const werewolfRolesCount = this.getWerewolfCountForComposition(getGameRandomCompositionDto.players.length);\n const villagerRolesCount = getGameRandomCompositionDto.players.length - werewolfRolesCount;\n const randomRoles = [\n ...this.getRandomRolesForSide(availableRoles, werewolfRolesCount, ROLE_SIDES.WEREWOLVES),\n ...this.getRandomRolesForSide(availableRoles, villagerRolesCount, ROLE_SIDES.VILLAGERS),\n ];\n const shuffledRandomRoles = shuffle(randomRoles);\n return getGameRandomCompositionDto.players.map((player, index) => plainToInstance(GetGameRandomCompositionPlayerResponseDto, {\n name: player.name,\n role: { name: shuffledRandomRoles[index].name },\n side: {},\n }));\n }\n\n private getRandomRolesForSide(availableRoles: Role[], rolesToPickCount: number, side: ROLE_SIDES): Role[] {\n const randomRoles: Role[] = [];\n const availableSidedRoles = getRolesWithSide(availableRoles, side);\n const defaultSidedRole = side === ROLE_SIDES.VILLAGERS ? defaultVillagerRole : defaultWerewolfRole;\n let randomRolesToPickCount = 1;\n for (let i = 0; i < rolesToPickCount; i += randomRolesToPickCount) {\n const leftRolesToPickCount = rolesToPickCount - i;\n const leftRolesToPick = availableSidedRoles.filter(role => role.maxInGame && (role.minInGame === undefined || role.minInGame <= leftRolesToPickCount));\n const randomRole = sample(leftRolesToPick);\n if (randomRole === undefined) {\n randomRolesToPickCount = 1;\n randomRoles.push(defaultSidedRole);\n } else {\n randomRolesToPickCount = randomRole.minInGame ?? 1;\n for (let j = 0; j < randomRolesToPickCount; j++) {\n randomRole.maxInGame--;\n randomRoles.push(randomRole);\n }\n }\n }\n return randomRoles;\n }\n\n private getWerewolfCountForComposition(playerCount: number): number {\n const werewolvesRatio = 6;\n return Math.ceil(playerCount / werewolvesRatio);\n }\n\n private getAvailableRolesForGameRandomComposition(getGameRandomCompositionDto: GetGameRandomCompositionDto): Role[] {\n const {\n players,\n excludedRoles,\n areRecommendedMinPlayersRespected,\n arePowerfulVillagerRolesPrioritized,\n arePowerfulWerewolfRolesPrioritized,\n } = getGameRandomCompositionDto;\n return roles.filter(role => {\n if (role.name === ROLE_NAMES.VILLAGER) {\n return !arePowerfulVillagerRolesPrioritized;\n } else if (role.name === ROLE_NAMES.WEREWOLF) {\n return !arePowerfulWerewolfRolesPrioritized;\n }\n const isRolePermitted = !excludedRoles.includes(role.name);\n const isRoleMinInGameRespected = !areRecommendedMinPlayersRespected || role.recommendedMinPlayers === undefined || role.recommendedMinPlayers <= players.length;\n return isRolePermitted && isRoleMinInGameRespected;\n });\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport { plainToInstance } from \"class-transformer\";\nimport { sample, shuffle } from \"lodash\";\n\nimport { GetGameRandomCompositionPlayerResponseDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition-player-response/get-game-random-composition-player-response.dto\";\nimport type { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport { DEFAULT_VILLAGER_ROLE, DEFAULT_WEREWOLF_ROLE, ROLES } from \"@/modules/role/constants/role.constant\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\nimport { getRolesWithSide } from \"@/modules/role/helpers/role.helper\";\nimport { Role } from \"@/modules/role/types/role.type\";\n\n@Injectable()\nexport class GameRandomCompositionService {\n public getGameRandomComposition(getGameRandomCompositionDto: GetGameRandomCompositionDto): GetGameRandomCompositionPlayerResponseDto[] {\n const availableRoles = plainToInstance(Role, this.getAvailableRolesForGameRandomComposition(getGameRandomCompositionDto));\n const werewolfRolesCount = this.getWerewolfCountForComposition(getGameRandomCompositionDto.players.length);\n const villagerRolesCount = getGameRandomCompositionDto.players.length - werewolfRolesCount;\n const randomRoles = [\n ...this.getRandomRolesForSide(availableRoles, werewolfRolesCount, RoleSides.WEREWOLVES),\n ...this.getRandomRolesForSide(availableRoles, villagerRolesCount, RoleSides.VILLAGERS),\n ];\n const shuffledRandomRoles = shuffle(randomRoles);\n return getGameRandomCompositionDto.players.map((player, index) => plainToInstance(GetGameRandomCompositionPlayerResponseDto, {\n name: player.name,\n role: { name: shuffledRandomRoles[index].name },\n side: {},\n }));\n }\n\n private getRandomRolesForSide(availableRoles: Role[], rolesToPickCount: number, side: RoleSides): Role[] {\n const randomRoles: Role[] = [];\n const availableSidedRoles = getRolesWithSide(availableRoles, side);\n const defaultSidedRole = side === RoleSides.VILLAGERS ? DEFAULT_VILLAGER_ROLE : DEFAULT_WEREWOLF_ROLE;\n let randomRolesToPickCount = 1;\n for (let i = 0; i < rolesToPickCount; i += randomRolesToPickCount) {\n const leftRolesToPickCount = rolesToPickCount - i;\n const leftRolesToPick = availableSidedRoles.filter(role => role.maxInGame && (role.minInGame === undefined || role.minInGame <= leftRolesToPickCount));\n const randomRole = sample(leftRolesToPick);\n if (randomRole === undefined) {\n randomRolesToPickCount = 1;\n randomRoles.push(defaultSidedRole);\n } else {\n randomRolesToPickCount = randomRole.minInGame ?? 1;\n for (let j = 0; j < randomRolesToPickCount; j++) {\n randomRole.maxInGame--;\n randomRoles.push(randomRole);\n }\n }\n }\n return randomRoles;\n }\n\n private getWerewolfCountForComposition(playerCount: number): number {\n const werewolvesRatio = 6;\n return Math.ceil(playerCount / werewolvesRatio);\n }\n\n private getAvailableRolesForGameRandomComposition(getGameRandomCompositionDto: GetGameRandomCompositionDto): Role[] {\n const {\n players,\n excludedRoles,\n areRecommendedMinPlayersRespected,\n arePowerfulVillagerRolesPrioritized,\n arePowerfulWerewolfRolesPrioritized,\n } = getGameRandomCompositionDto;\n return ROLES.filter(role => {\n if (role.name === RoleNames.VILLAGER) {\n return !arePowerfulVillagerRolesPrioritized;\n } else if (role.name === RoleNames.WEREWOLF) {\n return !arePowerfulWerewolfRolesPrioritized;\n }\n const isRolePermitted = !excludedRoles.includes(role.name);\n const isRoleMinInGameRespected = !areRecommendedMinPlayersRespected || role.recommendedMinPlayers === undefined || role.recommendedMinPlayers <= players.length;\n return isRolePermitted && isRoleMinInGameRespected;\n });\n }\n}" }, "src/modules/game/providers/services/game.service.ts": { "language": "typescript", @@ -86215,7 +86384,7 @@ "coveredBy": [ "482", "483", - "691" + "692" ], "location": { "end": { @@ -86240,9 +86409,9 @@ "517", "518", "519", - "692", "693", - "694" + "694", + "695" ], "location": { "end": { @@ -86259,7 +86428,7 @@ "id": "2513", "mutatorName": "BooleanLiteral", "replacement": "upcomingPlays.length", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -86270,9 +86439,9 @@ "517", "518", "519", - "692", "693", - "694" + "694", + "695" ], "location": { "end": { @@ -86289,7 +86458,7 @@ "id": "2514", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -86300,9 +86469,9 @@ "517", "518", "519", - "692", "693", - "694" + "694", + "695" ], "location": { "end": { @@ -86319,20 +86488,20 @@ "id": "2515", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"e400c7920bf6a4cd84e8bc27\", \"createdAt\": 2023-08-26T15:55:30.033Z, \"currentPlay\": {\"action\": \"use-potions\", \"cause\": undefined, \"source\": {\"name\": \"sheriff\", \"players\": []}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 8458070529146880}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [], \"status\": \"over\", \"tick\": 974764728385536, \"turn\": 130496809926656, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T16:46:32.173Z}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"b50c55f22e7fe3e4b08e1c94\", \"createdAt\": 2023-08-28T06:44:39.434Z, \"currentPlay\": {\"action\": \"choose-side\", \"cause\": undefined, \"source\": {\"name\": \"thief\", \"players\": []}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 4}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 1771721403138048}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [], \"status\": \"canceled\", \"tick\": 3309861620154368, \"turn\": 1174482532171776, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T10:21:55.673Z}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, "killedBy": [ - "692" + "693" ], "coveredBy": [ "517", "518", "519", - "692", "693", - "694" + "694", + "695" ], "location": { "end": { @@ -86349,15 +86518,15 @@ "id": "2516", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"eae128bc9c6c8f0c9f1d8ecf\", \"createdAt\": 2023-08-26T14:32:54.824Z, \"currentPlay\": {\"action\": \"choose-card\", \"cause\": undefined, \"source\": {\"name\": \"wild-child\", \"players\": []}}, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 1657666977923072}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 1}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [], \"status\": \"over\", \"tick\": 4854452758511616, \"turn\": 1520519098662912, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T17:55:06.344Z}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"cf1cc5c359a3572ea3c6f462\", \"createdAt\": 2023-08-27T20:06:02.022Z, \"currentPlay\": {\"action\": \"look\", \"cause\": undefined, \"source\": {\"name\": \"thief\", \"players\": []}}, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 6359560067481600}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [], \"status\": \"playing\", \"tick\": 7544144895410176, \"turn\": 6141154145861632, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T13:58:15.779Z}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "692" + "693" ], "coveredBy": [ - "692" + "693" ], "location": { "end": { @@ -86374,15 +86543,15 @@ "id": "2517", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).rejects.toThrow(expected)\n\nExpected message: \"Unexpected exception in createGame\"\nReceived message: \"Unexpected exception in \"\n\n 91 | } else {\n 92 | stryCov_9fa48(\"2877\");\n > 93 | return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.CANT_GENERATE_GAME_PLAYS);\n | ^\n 94 | }\n 95 | }\n 96 | function createNoCurrentGamePlayUnexpectedException(scope: string, interpolations: {\n\n at createCantGenerateGamePlaysUnexpectedException (src/shared/exception/helpers/unexpected-exception.factory.ts:93:12)\n at GameService.createGame (src/modules/game/providers/services/game.service.ts:95:63)\n at async Object. (tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:7)\n at Object.toThrow (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:218:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:68)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).rejects.toThrow(expected)\n\nExpected message: \"Unexpected exception in createGame\"\nReceived message: \"Unexpected exception in \"\n\n 91 | } else {\n 92 | stryCov_9fa48(\"2877\");\n > 93 | return new UnexpectedException(scope, UnexpectedExceptionReasons.CANT_GENERATE_GAME_PLAYS);\n | ^\n 94 | }\n 95 | }\n 96 | function createNoCurrentGamePlayUnexpectedException(scope: string, interpolations: {\n\n at createCantGenerateGamePlaysUnexpectedException (src/shared/exception/helpers/unexpected-exception.factory.ts:93:12)\n at GameService.createGame (src/modules/game/providers/services/game.service.ts:95:63)\n at async Object. (tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:7)\n at Object.toThrow (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:218:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:171:68)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "692" + "693" ], "coveredBy": [ - "692" + "693" ], "location": { "end": { @@ -86399,7 +86568,7 @@ "id": "2518", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 201\nReceived: 500\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:574:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -86410,8 +86579,8 @@ "517", "518", "519", - "693", - "694" + "694", + "695" ], "location": { "end": { @@ -86435,8 +86604,8 @@ "coveredBy": [ "522", "523", - "695", - "696" + "696", + "697" ], "location": { "end": { @@ -86453,22 +86622,22 @@ "id": "2520", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: thrown: BadResourceMutationException {\n \"getResponse\": [Function getResponse],\n \"getStatus\": [Function getStatus],\n \"initCause\": [Function initCause],\n \"initMessage\": [Function initMessage],\n \"initName\": [Function initName],\n \"toString\": [Function toString],\n}\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:218:5\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:203:3\n at _dispatchDescribe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:91:26)\n at describe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/index.js:55:5)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:41:1)\n at Runtime._execModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1439:24)\n at Runtime._loadModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:1022:12)\n at Runtime.requireModule (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runtime/build/index.js:882:12)\n at jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:756:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 4, "static": false, "killedBy": [ - "696" + "523" ], "coveredBy": [ "522", "523", - "695", - "696" + "696", + "697" ], "location": { "end": { - "column": 46, + "column": 45, "line": 63 }, "start": { @@ -86481,7 +86650,7 @@ "id": "2521", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 200\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:740:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 200\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:740:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -86491,12 +86660,12 @@ "coveredBy": [ "522", "523", - "695", - "696" + "696", + "697" ], "location": { "end": { - "column": 46, + "column": 45, "line": 63 }, "start": { @@ -86508,8 +86677,8 @@ { "id": "2522", "mutatorName": "EqualityOperator", - "replacement": "game.status === GAME_STATUSES.PLAYING", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 200\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:740:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "game.status === GameStatuses.PLAYING", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:740:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -86519,12 +86688,12 @@ "coveredBy": [ "522", "523", - "695", - "696" + "696", + "697" ], "location": { "end": { - "column": 46, + "column": 45, "line": 63 }, "start": { @@ -86537,16 +86706,16 @@ "id": "2523", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 400\nReceived: 200\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:740:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:214:60)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "522" + "696" ], "coveredBy": [ "522", - "695" + "696" ], "location": { "end": { @@ -86554,7 +86723,7 @@ "line": 65 }, "start": { - "column": 48, + "column": 47, "line": 63 } } @@ -86563,7 +86732,7 @@ "id": "2524", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -82,11 +82,11 @@\n \"canBeSkipped\": true,\n },\n },\n \"phase\": \"day\",\n \"players\": Array [],\n- \"status\": \"canceled\",\n+ \"status\": \"playing\",\n \"tick\": 2007774366007296,\n \"turn\": 678134699524096,\n \"upcomingPlays\": Array [],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:757:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -82,11 +82,11 @@\n \"canBeSkipped\": false,\n },\n },\n \"phase\": \"day\",\n \"players\": Array [],\n- \"status\": \"canceled\",\n+ \"status\": \"playing\",\n \"tick\": 7761662480220160,\n \"turn\": 5540767734956032,\n \"upcomingPlays\": Array [],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:757:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -86572,11 +86741,11 @@ ], "coveredBy": [ "523", - "696" + "697" ], "location": { "end": { - "column": 72, + "column": 71, "line": 66 }, "start": { @@ -86598,7 +86767,6 @@ "529", "530", "531", - "697", "698", "699", "700", @@ -86607,7 +86775,8 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { @@ -86624,7 +86793,7 @@ "id": "2526", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 404\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:839:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 404\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:839:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 14, "static": false, @@ -86636,7 +86805,6 @@ "529", "530", "531", - "697", "698", "699", "700", @@ -86645,11 +86813,12 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { - "column": 52, + "column": 51, "line": 71 }, "start": { @@ -86662,19 +86831,18 @@ "id": "2527", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:261:79)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:261:79)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 14, "static": false, "killedBy": [ - "697" + "698" ], "coveredBy": [ "528", "529", "530", "531", - "697", "698", "699", "700", @@ -86683,11 +86851,12 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { - "column": 52, + "column": 51, "line": 71 }, "start": { @@ -86699,8 +86868,8 @@ { "id": "2528", "mutatorName": "EqualityOperator", - "replacement": "clonedGame.status === GAME_STATUSES.PLAYING", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 404\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:839:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "replacement": "clonedGame.status === GameStatuses.PLAYING", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 404\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:839:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 14, "static": false, @@ -86712,7 +86881,6 @@ "529", "530", "531", - "697", "698", "699", "700", @@ -86721,11 +86889,12 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { - "column": 52, + "column": 51, "line": 71 }, "start": { @@ -86738,15 +86907,15 @@ "id": "2529", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:261:79)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toReject()\n\nExpected promise to reject, however it resolved.\n\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:261:79)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, "killedBy": [ - "697" + "698" ], "coveredBy": [ - "697" + "698" ], "location": { "end": { @@ -86754,7 +86923,7 @@ "line": 73 }, "start": { - "column": 54, + "column": 53, "line": 71 } } @@ -86763,7 +86932,7 @@ "id": "2530", "mutatorName": "UpdateOperator", "replacement": "clonedGame.tick--", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -215,11 +215,11 @@\n \"original\": \"werewolves\",\n },\n },\n ],\n \"status\": \"playing\",\n- \"tick\": 4404666366427137,\n+ \"tick\": 4404666366427135,\n \"turn\": 4932843010523136,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n \"source\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -215,11 +215,11 @@\n \"original\": \"werewolves\",\n },\n },\n ],\n \"status\": \"playing\",\n- \"tick\": 5551976997715969,\n+ \"tick\": 5551976997715967,\n \"turn\": 7180060832301056,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n \"source\": Object {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -86773,7 +86942,6 @@ "coveredBy": [ "530", "531", - "698", "699", "700", "701", @@ -86781,7 +86949,8 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { @@ -86798,7 +86967,7 @@ "id": "2531", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 56\n+ Received + 7\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"e91b052cbaeee4cea048dfbc\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"40b6197343fd0a74efabc957\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Sheila\",\n- \"position\": 6295381264564224,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"d1f0cb3df7de8c14a1e98dab\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Trisha\",\n \"position\": 7307239507361792,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"0c1a71a701b7b0a3d2e5bccf\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Laurianne\",\n- \"position\": 7550809296338944,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"8260ddba37de0fdc4bde15bc\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Elian\",\n- \"position\": 2019400951529472,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -147,11 +98,11 @@\n },\n \"votes\": Object {\n \"canBeSkipped\": true,\n },\n },\n- \"phase\": \"night\",\n+ \"phase\": \"day\",\n \"players\": Array [\n Object {\n \"_id\": \"40b6197343fd0a74efabc957\",\n \"attributes\": Array [],\n \"isAlive\": true,\n@@ -219,19 +170,19 @@\n \"status\": \"playing\",\n \"tick\": 1529831552450561,\n \"turn\": 6776386633072640,\n \"upcomingPlays\": Array [\n Object {\n- \"action\": \"look\",\n+ \"action\": \"eat\",\n \"source\": Object {\n- \"name\": \"seer\",\n+ \"name\": \"werewolves\",\n },\n },\n Object {\n- \"action\": \"eat\",\n+ \"action\": \"vote\",\n \"source\": Object {\n- \"name\": \"werewolves\",\n+ \"name\": \"all\",\n },\n },\n ],\n \"updatedAt\": Any,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 53\n+ Received + 10\n\n@@ -1,31 +1,14 @@\n Object {\n \"_id\": \"70046afb7c9bf3ead85133d1\",\n \"createdAt\": Any,\n \"currentPlay\": Object {\n- \"action\": \"vote\",\n- \"cause\": \"previous-votes-were-in-ties\",\n+ \"action\": \"look\",\n \"source\": Object {\n- \"name\": \"all\",\n+ \"name\": \"seer\",\n \"players\": Array [\n Object {\n- \"_id\": \"859af5433fa516ba22c2c6df\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Carlos\",\n- \"position\": 56663482564608,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n- Object {\n \"_id\": \"e16dd23daaa9ccbbc8ddbdf8\",\n \"attributes\": Array [],\n \"isAlive\": true,\n \"name\": \"Simeon\",\n \"position\": 379772364390400,\n@@ -37,42 +20,10 @@\n \"side\": Object {\n \"current\": \"villagers\",\n \"original\": \"villagers\",\n },\n },\n- Object {\n- \"_id\": \"9c0c3d52cbd0d1fa6c5aeefd\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Fidel\",\n- \"position\": 285489525424128,\n- \"role\": Object {\n- \"current\": \"villager\",\n- \"isRevealed\": false,\n- \"original\": \"villager\",\n- },\n- \"side\": Object {\n- \"current\": \"villagers\",\n- \"original\": \"villagers\",\n- },\n- },\n- Object {\n- \"_id\": \"ddcac709fea4d4ba8abba62d\",\n- \"attributes\": Array [],\n- \"isAlive\": true,\n- \"name\": \"Mattie\",\n- \"position\": 4731745878409216,\n- \"role\": Object {\n- \"current\": \"werewolf\",\n- \"isRevealed\": false,\n- \"original\": \"werewolf\",\n- },\n- \"side\": Object {\n- \"current\": \"werewolves\",\n- \"original\": \"werewolves\",\n- },\n- },\n ],\n },\n },\n \"options\": Object {\n \"composition\": Object {\n@@ -147,11 +98,11 @@\n },\n \"votes\": Object {\n \"canBeSkipped\": true,\n },\n },\n- \"phase\": \"day\",\n+ \"phase\": \"night\",\n \"players\": Array [\n Object {\n \"_id\": \"859af5433fa516ba22c2c6df\",\n \"attributes\": Array [],\n \"isAlive\": true,\n@@ -216,12 +167,18 @@\n },\n },\n ],\n \"status\": \"playing\",\n \"tick\": 3642701081739265,\n- \"turn\": 3405406827184128,\n+ \"turn\": 3405406827184129,\n \"upcomingPlays\": Array [\n+ Object {\n+ \"action\": \"eat\",\n+ \"source\": Object {\n+ \"name\": \"werewolves\",\n+ },\n+ },\n Object {\n \"action\": \"look\",\n \"source\": Object {\n \"name\": \"seer\",\n },\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 11, "static": false, @@ -86808,7 +86977,6 @@ "coveredBy": [ "530", "531", - "698", "699", "700", "701", @@ -86816,7 +86984,8 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { @@ -86838,12 +87007,11 @@ "testsCompleted": 11, "static": false, "killedBy": [ - "702" + "703" ], "coveredBy": [ "530", "531", - "698", "699", "700", "701", @@ -86851,7 +87019,8 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { @@ -86873,10 +87042,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "702" + "703" ], "coveredBy": [ - "702" + "703" ], "location": { "end": { @@ -86893,13 +87062,16 @@ "id": "2534", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -214,11 +214,11 @@\n \"current\": \"werewolves\",\n \"original\": \"werewolves\",\n },\n },\n ],\n- \"status\": \"playing\",\n+ \"status\": \"over\",\n \"tick\": 684872530132993,\n \"turn\": 1184211492929536,\n \"upcomingPlays\": Array [\n Object {\n \"action\": \"look\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:916:37)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 11, "static": false, - "killedBy": [], + "killedBy": [ + "530" + ], "coveredBy": [ "530", "531", - "698", "699", "700", "701", @@ -86907,7 +87079,8 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { @@ -86924,17 +87097,16 @@ "id": "2535", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 404\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:915:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:341:52)", "status": "Killed", "testsCompleted": 11, "static": false, "killedBy": [ - "530" + "707" ], "coveredBy": [ "530", "531", - "698", "699", "700", "701", @@ -86942,7 +87114,8 @@ "703", "704", "705", - "706" + "706", + "707" ], "location": { "end": { @@ -86964,10 +87137,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "706" + "707" ], "coveredBy": [ - "706" + "707" ], "location": { "end": { @@ -86989,10 +87162,10 @@ "static": false, "killedBy": [], "coveredBy": [ - "707", "708", "709", - "710" + "710", + "711" ], "location": { "end": { @@ -87020,8 +87193,8 @@ "523", "530", "531", - "711", - "712" + "712", + "713" ], "location": { "end": { @@ -87038,12 +87211,12 @@ "id": "2539", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"e2511cb0d4bf9666df8e568f\"}, {\"status\": \"over\"}], but it was called with {}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:395:46)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [{\"_id\": \"25876948a1abdc0972e398a5\"}, {\"status\": \"over\"}], but it was called with {}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game.service.spec.ts:395:46)", "status": "Killed", "testsCompleted": 8, "static": false, "killedBy": [ - "712" + "713" ], "coveredBy": [ "517", @@ -87052,8 +87225,8 @@ "523", "530", "531", - "711", - "712" + "712", + "713" ], "location": { "end": { @@ -87081,8 +87254,8 @@ "523", "530", "531", - "711", - "712" + "712", + "713" ], "location": { "end": { @@ -87110,8 +87283,8 @@ "523", "530", "531", - "711", - "712" + "712", + "713" ], "location": { "end": { @@ -87139,8 +87312,8 @@ "523", "530", "531", - "711", - "712" + "712", + "713" ], "location": { "end": { @@ -87162,7 +87335,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "711" + "712" ], "location": { "end": { @@ -87184,7 +87357,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "713" + "714" ], "location": { "end": { @@ -87198,7 +87371,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport { plainToInstance } from \"class-transformer\";\nimport type { Types } from \"mongoose\";\n\nimport { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport type { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { GAME_STATUSES } from \"@/modules/game/enums/game.enum\";\nimport { isGamePhaseOver } from \"@/modules/game/helpers/game-phase/game-phase.helper\";\nimport { createMakeGamePlayDtoWithRelations } from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport { generateGameVictoryData, isGameOver } from \"@/modules/game/helpers/game-victory/game-victory.helper\";\nimport { createGame as createGameFromFactory } from \"@/modules/game/helpers/game.factory\";\nimport { getExpectedPlayersToPlay } from \"@/modules/game/helpers/game.helper\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePhaseService } from \"@/modules/game/providers/services/game-phase/game-phase.service\";\nimport { GamePlayMakerService } from \"@/modules/game/providers/services/game-play/game-play-maker.service\";\nimport { GamePlayValidatorService } from \"@/modules/game/providers/services/game-play/game-play-validator.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { BAD_RESOURCE_MUTATION_REASONS } from \"@/shared/exception/enums/bad-resource-mutation-error.enum\";\nimport { createCantGenerateGamePlaysUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { BadResourceMutationException } from \"@/shared/exception/types/bad-resource-mutation-exception.type\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\n@Injectable()\nexport class GameService {\n public constructor(\n private readonly gamePlayService: GamePlayService,\n private readonly gamePlayValidatorService: GamePlayValidatorService,\n private readonly gamePlayMakerService: GamePlayMakerService,\n private readonly gamePhaseService: GamePhaseService,\n private readonly gameRepository: GameRepository,\n private readonly playerAttributeService: PlayerAttributeService,\n private readonly gameHistoryRecordService: GameHistoryRecordService,\n ) {}\n\n public async getGames(): Promise {\n return this.gameRepository.find();\n }\n\n public async createGame(game: CreateGameDto): Promise {\n const upcomingPlays = await this.gamePlayService.getUpcomingNightPlays(game);\n if (!upcomingPlays.length) {\n throw createCantGenerateGamePlaysUnexpectedException(\"createGame\");\n }\n const currentPlay = upcomingPlays[0];\n upcomingPlays.shift();\n const gameToCreate = plainToInstance(CreateGameDto, {\n ...game,\n currentPlay,\n upcomingPlays,\n });\n const createdGame = await this.gameRepository.create(gameToCreate) as GameWithCurrentPlay;\n createdGame.currentPlay.source.players = getExpectedPlayersToPlay(createdGame);\n return this.updateGame(createdGame._id, createdGame);\n }\n\n public async cancelGame(game: Game): Promise {\n if (game.status !== GAME_STATUSES.PLAYING) {\n throw new BadResourceMutationException(API_RESOURCES.GAMES, game._id.toString(), BAD_RESOURCE_MUTATION_REASONS.GAME_NOT_PLAYING);\n }\n return this.updateGame(game._id, { status: GAME_STATUSES.CANCELED });\n }\n\n public async makeGamePlay(game: Game, makeGamePlayDto: MakeGamePlayDto): Promise {\n let clonedGame = createGameFromFactory(game);\n if (clonedGame.status !== GAME_STATUSES.PLAYING) {\n throw new BadResourceMutationException(API_RESOURCES.GAMES, clonedGame._id.toString(), BAD_RESOURCE_MUTATION_REASONS.GAME_NOT_PLAYING);\n }\n const play = createMakeGamePlayDtoWithRelations(makeGamePlayDto, clonedGame);\n await this.gamePlayValidatorService.validateGamePlayWithRelationsDto(play, clonedGame);\n clonedGame = await this.gamePlayMakerService.makeGamePlay(play, clonedGame);\n clonedGame = await this.gamePlayService.refreshUpcomingPlays(clonedGame);\n clonedGame = this.gamePlayService.proceedToNextGamePlay(clonedGame);\n clonedGame.tick++;\n if (isGamePhaseOver(clonedGame)) {\n clonedGame = await this.handleGamePhaseCompletion(clonedGame);\n }\n const gameHistoryRecordToInsert = this.gameHistoryRecordService.generateCurrentGameHistoryRecordToInsert(game, clonedGame, play);\n await this.gameHistoryRecordService.createGameHistoryRecord(gameHistoryRecordToInsert);\n if (isGameOver(clonedGame)) {\n clonedGame = this.setGameAsOver(clonedGame);\n }\n return this.updateGame(clonedGame._id, clonedGame);\n }\n\n private async handleGamePhaseCompletion(game: Game): Promise {\n let clonedGame = createGameFromFactory(game);\n clonedGame = await this.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayers(clonedGame);\n clonedGame = this.playerAttributeService.decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes(clonedGame);\n clonedGame = await this.gamePhaseService.switchPhaseAndAppendGamePhaseUpcomingPlays(clonedGame);\n return this.gamePlayService.proceedToNextGamePlay(clonedGame);\n }\n\n private async updateGame(gameId: Types.ObjectId, gameDataToUpdate: Partial): Promise {\n const updatedGame = await this.gameRepository.updateOne({ _id: gameId }, gameDataToUpdate);\n if (updatedGame === null) {\n throw new ResourceNotFoundException(API_RESOURCES.GAMES, gameId.toString());\n }\n return updatedGame;\n }\n\n private setGameAsOver(game: Game): Game {\n const clonedGame = createGameFromFactory(game);\n clonedGame.status = GAME_STATUSES.OVER;\n clonedGame.victory = generateGameVictoryData(clonedGame);\n return clonedGame;\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport { plainToInstance } from \"class-transformer\";\nimport type { Types } from \"mongoose\";\n\nimport { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport type { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { GameStatuses } from \"@/modules/game/enums/game.enum\";\nimport { isGamePhaseOver } from \"@/modules/game/helpers/game-phase/game-phase.helper\";\nimport { createMakeGamePlayDtoWithRelations } from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport { generateGameVictoryData, isGameOver } from \"@/modules/game/helpers/game-victory/game-victory.helper\";\nimport { createGame as createGameFromFactory } from \"@/modules/game/helpers/game.factory\";\nimport { getExpectedPlayersToPlay } from \"@/modules/game/helpers/game.helper\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePhaseService } from \"@/modules/game/providers/services/game-phase/game-phase.service\";\nimport { GamePlayMakerService } from \"@/modules/game/providers/services/game-play/game-play-maker.service\";\nimport { GamePlayValidatorService } from \"@/modules/game/providers/services/game-play/game-play-validator.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { GameWithCurrentPlay } from \"@/modules/game/types/game-with-current-play\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { BadResourceMutationReasons } from \"@/shared/exception/enums/bad-resource-mutation-error.enum\";\nimport { createCantGenerateGamePlaysUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { BadResourceMutationException } from \"@/shared/exception/types/bad-resource-mutation-exception.type\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\n@Injectable()\nexport class GameService {\n public constructor(\n private readonly gamePlayService: GamePlayService,\n private readonly gamePlayValidatorService: GamePlayValidatorService,\n private readonly gamePlayMakerService: GamePlayMakerService,\n private readonly gamePhaseService: GamePhaseService,\n private readonly gameRepository: GameRepository,\n private readonly playerAttributeService: PlayerAttributeService,\n private readonly gameHistoryRecordService: GameHistoryRecordService,\n ) {}\n\n public async getGames(): Promise {\n return this.gameRepository.find();\n }\n\n public async createGame(game: CreateGameDto): Promise {\n const upcomingPlays = await this.gamePlayService.getUpcomingNightPlays(game);\n if (!upcomingPlays.length) {\n throw createCantGenerateGamePlaysUnexpectedException(\"createGame\");\n }\n const currentPlay = upcomingPlays[0];\n upcomingPlays.shift();\n const gameToCreate = plainToInstance(CreateGameDto, {\n ...game,\n currentPlay,\n upcomingPlays,\n });\n const createdGame = await this.gameRepository.create(gameToCreate) as GameWithCurrentPlay;\n createdGame.currentPlay.source.players = getExpectedPlayersToPlay(createdGame);\n return this.updateGame(createdGame._id, createdGame);\n }\n\n public async cancelGame(game: Game): Promise {\n if (game.status !== GameStatuses.PLAYING) {\n throw new BadResourceMutationException(ApiResources.GAMES, game._id.toString(), BadResourceMutationReasons.GAME_NOT_PLAYING);\n }\n return this.updateGame(game._id, { status: GameStatuses.CANCELED });\n }\n\n public async makeGamePlay(game: Game, makeGamePlayDto: MakeGamePlayDto): Promise {\n let clonedGame = createGameFromFactory(game);\n if (clonedGame.status !== GameStatuses.PLAYING) {\n throw new BadResourceMutationException(ApiResources.GAMES, clonedGame._id.toString(), BadResourceMutationReasons.GAME_NOT_PLAYING);\n }\n const play = createMakeGamePlayDtoWithRelations(makeGamePlayDto, clonedGame);\n await this.gamePlayValidatorService.validateGamePlayWithRelationsDto(play, clonedGame);\n clonedGame = await this.gamePlayMakerService.makeGamePlay(play, clonedGame);\n clonedGame = await this.gamePlayService.refreshUpcomingPlays(clonedGame);\n clonedGame = this.gamePlayService.proceedToNextGamePlay(clonedGame);\n clonedGame.tick++;\n if (isGamePhaseOver(clonedGame)) {\n clonedGame = await this.handleGamePhaseCompletion(clonedGame);\n }\n const gameHistoryRecordToInsert = this.gameHistoryRecordService.generateCurrentGameHistoryRecordToInsert(game, clonedGame, play);\n await this.gameHistoryRecordService.createGameHistoryRecord(gameHistoryRecordToInsert);\n if (isGameOver(clonedGame)) {\n clonedGame = this.setGameAsOver(clonedGame);\n }\n return this.updateGame(clonedGame._id, clonedGame);\n }\n\n private async handleGamePhaseCompletion(game: Game): Promise {\n let clonedGame = createGameFromFactory(game);\n clonedGame = await this.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayers(clonedGame);\n clonedGame = this.playerAttributeService.decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes(clonedGame);\n clonedGame = await this.gamePhaseService.switchPhaseAndAppendGamePhaseUpcomingPlays(clonedGame);\n return this.gamePlayService.proceedToNextGamePlay(clonedGame);\n }\n\n private async updateGame(gameId: Types.ObjectId, gameDataToUpdate: Partial): Promise {\n const updatedGame = await this.gameRepository.updateOne({ _id: gameId }, gameDataToUpdate);\n if (updatedGame === null) {\n throw new ResourceNotFoundException(ApiResources.GAMES, gameId.toString());\n }\n return updatedGame;\n }\n\n private setGameAsOver(game: Game): Game {\n const clonedGame = createGameFromFactory(game);\n clonedGame.status = GameStatuses.OVER;\n clonedGame.victory = generateGameVictoryData(clonedGame);\n return clonedGame;\n }\n}" }, "src/modules/game/providers/services/player/player-attribute.service.ts": { "language": "typescript", @@ -87212,7 +87385,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "864" + "865" ], "location": { "end": { @@ -87234,10 +87407,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "864" + "865" ], "coveredBy": [ - "864" + "865" ], "location": { "end": { @@ -87259,7 +87432,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "865" + "866" ], "location": { "end": { @@ -87281,7 +87454,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "866" + "867" ], "location": { "end": { @@ -87303,7 +87476,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "872" + "873" ], "location": { "end": { @@ -87325,7 +87498,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "872" + "873" ], "location": { "end": { @@ -87347,11 +87520,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "867", "868", "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87373,11 +87546,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "867", "868", "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87399,11 +87572,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "867", "868", "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87425,11 +87598,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "867", "868", "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87451,11 +87624,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "867", "868", "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87477,11 +87650,11 @@ "static": false, "killedBy": [], "coveredBy": [ - "867", "868", "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87503,12 +87676,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "869" + "870" ], "coveredBy": [ - "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87530,12 +87703,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "869" + "870" ], "coveredBy": [ - "869", - "871", - "872" + "870", + "872", + "873" ], "location": { "end": { @@ -87557,9 +87730,9 @@ "static": false, "killedBy": [], "coveredBy": [ - "870", "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87581,12 +87754,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "870" + "871" ], "coveredBy": [ - "870", "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87607,9 +87780,9 @@ "static": false, "killedBy": [], "coveredBy": [ - "870", "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87631,12 +87804,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "870" + "871" ], "coveredBy": [ - "870", "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87658,10 +87831,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "870" + "871" ], "coveredBy": [ - "870" + "871" ], "location": { "end": { @@ -87683,8 +87856,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87706,11 +87879,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "871" + "872" ], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87732,11 +87905,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "871" + "872" ], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87758,8 +87931,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87781,8 +87954,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87804,8 +87977,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87827,11 +88000,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "871" + "872" ], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87853,11 +88026,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "871" + "872" ], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87879,11 +88052,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "871" + "872" ], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87905,11 +88078,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "871" + "872" ], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87931,11 +88104,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "871" + "872" ], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -87957,8 +88130,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "871", - "872" + "872", + "873" ], "location": { "end": { @@ -88157,7 +88330,7 @@ "id": "2583", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(38,75): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(38,73): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -88173,7 +88346,7 @@ "line": 44 }, "start": { - "column": 92, + "column": 90, "line": 38 } } @@ -88182,9 +88355,13 @@ "id": "2584", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:212:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "362" + ], "coveredBy": [ "361", "362", @@ -88193,7 +88370,7 @@ ], "location": { "end": { - "column": 44, + "column": 42, "line": 39 }, "start": { @@ -88206,7 +88383,7 @@ "id": "2585", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:102)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -88221,7 +88398,7 @@ ], "location": { "end": { - "column": 44, + "column": 42, "line": 39 }, "start": { @@ -88233,8 +88410,8 @@ { "id": "2586", "mutatorName": "EqualityOperator", - "replacement": "cause === PLAYER_DEATH_CAUSES.EATEN", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:102)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "cause === PlayerDeathCauses.EATEN", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -88249,7 +88426,7 @@ ], "location": { "end": { - "column": 44, + "column": 42, "line": 39 }, "start": { @@ -88262,7 +88439,7 @@ "id": "2587", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:102)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -88278,7 +88455,7 @@ "line": 41 }, "start": { - "column": 46, + "column": 44, "line": 39 } } @@ -88287,7 +88464,7 @@ "id": "2588", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:102)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:205:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -88312,13 +88489,9 @@ "id": "2589", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:212:103)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "362" - ], + "killedBy": [], "coveredBy": [ "362", "363", @@ -88339,9 +88512,13 @@ "id": "2590", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:219:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "363" + ], "coveredBy": [ "362", "363", @@ -88362,7 +88539,7 @@ "id": "2591", "mutatorName": "EqualityOperator", "replacement": "ancientLivesCountAgainstWerewolves - 1 < 0", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:219:103)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:219:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -88389,7 +88566,7 @@ "id": "2592", "mutatorName": "EqualityOperator", "replacement": "ancientLivesCountAgainstWerewolves - 1 > 0", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:212:103)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:212:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -88416,7 +88593,7 @@ "id": "2593", "mutatorName": "ArithmeticOperator", "replacement": "ancientLivesCountAgainstWerewolves + 1", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:219:103)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:219:101)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -88468,13 +88645,9 @@ "id": "2595", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"de8eccd0d6eac0bbf91237ab\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"cant-vote\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"all\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Fae\",\n \"position\": 7075439468085248,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:196:97)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "360" - ], + "killedBy": [], "coveredBy": [ "358", "359", @@ -88483,7 +88656,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 48 }, "start": { @@ -88507,7 +88680,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 48 }, "start": { @@ -88519,8 +88692,8 @@ { "id": "2597", "mutatorName": "EqualityOperator", - "replacement": "revealedPlayer.role.current !== ROLE_NAMES.IDIOT", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -80,19 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"21eb18a283cfee5e8fd12bde\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"cant-vote\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Clotilde\",\n \"position\": 2460467316391936,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:184:97)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "revealedPlayer.role.current !== RoleNames.IDIOT", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -80,19 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"94cee0bdb15fad1f9d324dca\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"cant-vote\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Liza\",\n \"position\": 8772972697354240,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:184:97)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -88535,7 +88708,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 48 }, "start": { @@ -88548,7 +88721,7 @@ "id": "2598", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -80,19 +80,11 @@\n },\n \"phase\": \"night\",\n \"players\": Array [\n Player {\n \"_id\": \"358cf997d0e1c468b7aef7fe\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"cant-vote\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Domenico\",\n \"position\": 6085689896599552,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:184:97)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 9\n+ Received + 1\n\n@@ -80,19 +80,11 @@\n },\n \"phase\": \"day\",\n \"players\": Array [\n Player {\n \"_id\": \"e4a46ecba2fc8b81630fe76e\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": undefined,\n- \"name\": \"cant-vote\",\n- \"remainingPhases\": undefined,\n- \"source\": \"all\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Julia\",\n \"position\": 5665127105822720,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:184:97)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -88564,7 +88737,7 @@ "line": 50 }, "start": { - "column": 59, + "column": 58, "line": 48 } } @@ -88597,13 +88770,9 @@ "id": "2600", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"revealPlayerRole\", {\"gameId\": \"a23cd9be0ec1aacdc2de7c94\", \"playerId\": \"f8aeb1bbc5a0d2fb1aa8cb30\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:246:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "365" - ], + "killedBy": [], "coveredBy": [ "358", "365", @@ -88701,7 +88870,7 @@ "id": "2604", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:280:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:280:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -88717,7 +88886,7 @@ ], "location": { "end": { - "column": 89, + "column": 87, "line": 66 }, "start": { @@ -88730,13 +88899,9 @@ "id": "2605", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:312:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "371" - ], + "killedBy": [], "coveredBy": [ "367", "368", @@ -88746,7 +88911,7 @@ ], "location": { "end": { - "column": 89, + "column": 87, "line": 66 }, "start": { @@ -88758,8 +88923,8 @@ { "id": "2606", "mutatorName": "LogicalOperator", - "replacement": "!playerToReveal.role.isRevealed && playerToReveal.role.current === ROLE_NAMES.IDIOT && isPlayerPowerful(playerToReveal, game) || death.cause === PLAYER_DEATH_CAUSES.VOTE", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:280:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!playerToReveal.role.isRevealed && playerToReveal.role.current === RoleNames.IDIOT && isPlayerPowerful(playerToReveal, game) || death.cause === PlayerDeathCauses.VOTE", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:280:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -88775,7 +88940,7 @@ ], "location": { "end": { - "column": 89, + "column": 87, "line": 66 }, "start": { @@ -88788,9 +88953,13 @@ "id": "2607", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:280:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "367" + ], "coveredBy": [ "367", "368", @@ -88812,7 +88981,7 @@ { "id": "2608", "mutatorName": "LogicalOperator", - "replacement": "!playerToReveal.role.isRevealed && playerToReveal.role.current === ROLE_NAMES.IDIOT || isPlayerPowerful(playerToReveal, game)", + "replacement": "!playerToReveal.role.isRevealed && playerToReveal.role.current === RoleNames.IDIOT || isPlayerPowerful(playerToReveal, game)", "status": "Timeout", "static": false, "killedBy": [], @@ -88838,13 +89007,9 @@ "id": "2609", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:280:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "367" - ], + "killedBy": [], "coveredBy": [ "367", "368", @@ -88854,7 +89019,7 @@ ], "location": { "end": { - "column": 95, + "column": 94, "line": 65 }, "start": { @@ -88866,14 +89031,10 @@ { "id": "2610", "mutatorName": "LogicalOperator", - "replacement": "!playerToReveal.role.isRevealed || playerToReveal.role.current === ROLE_NAMES.IDIOT", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:288:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "!playerToReveal.role.isRevealed || playerToReveal.role.current === RoleNames.IDIOT", + "status": "Timeout", "static": false, - "killedBy": [ - "368" - ], + "killedBy": [], "coveredBy": [ "367", "368", @@ -88883,7 +89044,7 @@ ], "location": { "end": { - "column": 95, + "column": 94, "line": 65 }, "start": { @@ -88921,7 +89082,7 @@ "id": "2612", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:288:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:288:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -88936,7 +89097,7 @@ ], "location": { "end": { - "column": 95, + "column": 94, "line": 65 }, "start": { @@ -88948,10 +89109,14 @@ { "id": "2613", "mutatorName": "EqualityOperator", - "replacement": "playerToReveal.role.current !== ROLE_NAMES.IDIOT", - "status": "Timeout", + "replacement": "playerToReveal.role.current !== RoleNames.IDIOT", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:288:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "368" + ], "coveredBy": [ "368", "369", @@ -88960,7 +89125,7 @@ ], "location": { "end": { - "column": 95, + "column": 94, "line": 65 }, "start": { @@ -88973,7 +89138,7 @@ "id": "2614", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:304:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:304:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -88986,7 +89151,7 @@ ], "location": { "end": { - "column": 89, + "column": 87, "line": 66 }, "start": { @@ -88998,17 +89163,21 @@ { "id": "2615", "mutatorName": "EqualityOperator", - "replacement": "death.cause !== PLAYER_DEATH_CAUSES.VOTE", - "status": "Timeout", + "replacement": "death.cause !== PlayerDeathCauses.VOTE", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:304:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "370" + ], "coveredBy": [ "370", "371" ], "location": { "end": { - "column": 89, + "column": 87, "line": 66 }, "start": { @@ -89239,7 +89408,7 @@ "id": "2625", "mutatorName": "BooleanLiteral", "replacement": "!ancientProtectedFromWerewolvesRecords.find(({\n turn\n}) => turn === werewolvesEatAncientRecord.turn)", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 1\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 1\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -89265,13 +89434,9 @@ "id": "2626", "mutatorName": "BooleanLiteral", "replacement": "ancientProtectedFromWerewolvesRecords.find(({\n turn\n}) => turn === werewolvesEatAncientRecord.turn)", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 1\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "374" - ], + "killedBy": [], "coveredBy": [ "374", "375" @@ -89291,7 +89456,7 @@ "id": "2627", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 0\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 0\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -89317,7 +89482,7 @@ "id": "2628", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 3\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 3\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -89342,7 +89507,7 @@ "id": "2629", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 0\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 0\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -89367,7 +89532,7 @@ "id": "2630", "mutatorName": "EqualityOperator", "replacement": "turn !== werewolvesEatAncientRecord.turn", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 3\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 3\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -89392,13 +89557,9 @@ "id": "2631", "mutatorName": "BooleanLiteral", "replacement": "wasAncientProtectedFromWerewolves", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 1\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "374" - ], + "killedBy": [], "coveredBy": [ "374", "375" @@ -89418,7 +89579,7 @@ "id": "2632", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 0\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 0\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -89444,9 +89605,13 @@ "id": "2633", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 3\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "374" + ], "coveredBy": [ "374", "375" @@ -89466,9 +89631,13 @@ "id": "2634", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 3\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "374" + ], "coveredBy": [ "374", "375" @@ -89488,9 +89657,13 @@ "id": "2635", "mutatorName": "ArithmeticOperator", "replacement": "acc + 1", - "status": "Timeout", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: 2\nReceived: 4\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:389:99)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "374" + ], "coveredBy": [ "374", "375" @@ -89510,7 +89683,7 @@ "id": "2636", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(88,89): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(88,87): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -89526,7 +89699,7 @@ "line": 91 }, "start": { - "column": 97, + "column": 95, "line": 88 } } @@ -89535,7 +89708,7 @@ "id": "2637", "mutatorName": "BooleanLiteral", "replacement": "isPlayerPowerful(idiotPlayer, game)", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:430:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:430:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -89563,13 +89736,9 @@ "id": "2638", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:437:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "379" - ], + "killedBy": [], "coveredBy": [ "376", "377", @@ -89578,7 +89747,7 @@ ], "location": { "end": { - "column": 97, + "column": 95, "line": 90 }, "start": { @@ -89591,9 +89760,13 @@ "id": "2639", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:416:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "376" + ], "coveredBy": [ "376", "377", @@ -89602,7 +89775,7 @@ ], "location": { "end": { - "column": 97, + "column": 95, "line": 90 }, "start": { @@ -89614,8 +89787,8 @@ { "id": "2640", "mutatorName": "LogicalOperator", - "replacement": "(idiotPlayer.role.isRevealed || cause !== PLAYER_DEATH_CAUSES.VOTE) && isIdiotPowerless", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:416:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(idiotPlayer.role.isRevealed || cause !== PlayerDeathCauses.VOTE) && isIdiotPowerless", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:416:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -89630,7 +89803,7 @@ ], "location": { "end": { - "column": 97, + "column": 95, "line": 90 }, "start": { @@ -89643,7 +89816,7 @@ "id": "2641", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:416:96)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:416:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -89658,7 +89831,7 @@ ], "location": { "end": { - "column": 77, + "column": 75, "line": 90 }, "start": { @@ -89670,7 +89843,7 @@ { "id": "2642", "mutatorName": "LogicalOperator", - "replacement": "idiotPlayer.role.isRevealed && cause !== PLAYER_DEATH_CAUSES.VOTE", + "replacement": "idiotPlayer.role.isRevealed && cause !== PlayerDeathCauses.VOTE", "status": "Timeout", "static": false, "killedBy": [], @@ -89682,7 +89855,7 @@ ], "location": { "end": { - "column": 77, + "column": 75, "line": 90 }, "start": { @@ -89695,13 +89868,9 @@ "id": "2643", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:423:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "377" - ], + "killedBy": [], "coveredBy": [ "377", "378", @@ -89709,7 +89878,7 @@ ], "location": { "end": { - "column": 77, + "column": 75, "line": 90 }, "start": { @@ -89721,14 +89890,10 @@ { "id": "2644", "mutatorName": "EqualityOperator", - "replacement": "cause === PLAYER_DEATH_CAUSES.VOTE", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:423:104)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "replacement": "cause === PlayerDeathCauses.VOTE", + "status": "Timeout", "static": false, - "killedBy": [ - "377" - ], + "killedBy": [], "coveredBy": [ "377", "378", @@ -89736,7 +89901,7 @@ ], "location": { "end": { - "column": 77, + "column": 75, "line": 90 }, "start": { @@ -89775,7 +89940,7 @@ "id": "2646", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:446:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:446:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -89791,7 +89956,7 @@ ], "location": { "end": { - "column": 152, + "column": 151, "line": 97 }, "start": { @@ -89804,7 +89969,7 @@ "id": "2647", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:470:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:470:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -89820,7 +89985,7 @@ ], "location": { "end": { - "column": 152, + "column": 151, "line": 97 }, "start": { @@ -89832,10 +89997,14 @@ { "id": "2648", "mutatorName": "LogicalOperator", - "replacement": "!isPlayerSavedByWitch || !isPlayerProtectedByGuard || eatenPlayer.role.current === ROLE_NAMES.LITTLE_GIRL && !isLittleGirlProtectedByGuard", - "status": "Timeout", + "replacement": "!isPlayerSavedByWitch || !isPlayerProtectedByGuard || eatenPlayer.role.current === RoleNames.LITTLE_GIRL && !isLittleGirlProtectedByGuard", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:446:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "380" + ], "coveredBy": [ "380", "381", @@ -89845,7 +90014,7 @@ ], "location": { "end": { - "column": 152, + "column": 151, "line": 97 }, "start": { @@ -89887,9 +90056,13 @@ "id": "2650", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:454:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "381" + ], "coveredBy": [ "381", "382", @@ -89898,7 +90071,7 @@ ], "location": { "end": { - "column": 151, + "column": 150, "line": 97 }, "start": { @@ -89910,8 +90083,8 @@ { "id": "2651", "mutatorName": "LogicalOperator", - "replacement": "!isPlayerProtectedByGuard && eatenPlayer.role.current === ROLE_NAMES.LITTLE_GIRL && !isLittleGirlProtectedByGuard", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:470:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "!isPlayerProtectedByGuard && eatenPlayer.role.current === RoleNames.LITTLE_GIRL && !isLittleGirlProtectedByGuard", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:470:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -89926,7 +90099,7 @@ ], "location": { "end": { - "column": 151, + "column": 150, "line": 97 }, "start": { @@ -89967,7 +90140,7 @@ "id": "2653", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:470:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:470:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -89981,7 +90154,7 @@ ], "location": { "end": { - "column": 151, + "column": 150, "line": 97 }, "start": { @@ -89993,14 +90166,10 @@ { "id": "2654", "mutatorName": "LogicalOperator", - "replacement": "eatenPlayer.role.current === ROLE_NAMES.LITTLE_GIRL || !isLittleGirlProtectedByGuard", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:454:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "replacement": "eatenPlayer.role.current === RoleNames.LITTLE_GIRL || !isLittleGirlProtectedByGuard", + "status": "Timeout", "static": false, - "killedBy": [ - "381" - ], + "killedBy": [], "coveredBy": [ "381", "382", @@ -90008,7 +90177,7 @@ ], "location": { "end": { - "column": 151, + "column": 150, "line": 97 }, "start": { @@ -90021,7 +90190,7 @@ "id": "2655", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:454:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:454:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -90035,7 +90204,7 @@ ], "location": { "end": { - "column": 118, + "column": 117, "line": 97 }, "start": { @@ -90047,10 +90216,14 @@ { "id": "2656", "mutatorName": "EqualityOperator", - "replacement": "eatenPlayer.role.current !== ROLE_NAMES.LITTLE_GIRL", - "status": "Timeout", + "replacement": "eatenPlayer.role.current !== RoleNames.LITTLE_GIRL", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:454:71)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "381" + ], "coveredBy": [ "381", "382", @@ -90058,7 +90231,7 @@ ], "location": { "end": { - "column": 118, + "column": 117, "line": 97 }, "start": { @@ -90084,11 +90257,11 @@ ], "location": { "end": { - "column": 151, + "column": 150, "line": 97 }, "start": { - "column": 122, + "column": 121, "line": 97 } } @@ -90097,7 +90270,7 @@ "id": "2658", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(100,91): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(100,89): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -90116,7 +90289,7 @@ "line": 111 }, "start": { - "column": 108, + "column": 106, "line": 100 } } @@ -90125,7 +90298,7 @@ "id": "2659", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:505:35)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:505:35)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -90143,7 +90316,7 @@ ], "location": { "end": { - "column": 84, + "column": 82, "line": 101 }, "start": { @@ -90156,7 +90329,7 @@ "id": "2660", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:487:113)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:487:111)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -90174,7 +90347,7 @@ ], "location": { "end": { - "column": 84, + "column": 82, "line": 101 }, "start": { @@ -90186,8 +90359,8 @@ { "id": "2661", "mutatorName": "LogicalOperator", - "replacement": "cause === PLAYER_DEATH_CAUSES.EATEN || !this.canPlayerBeEaten(player, game)", - "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalled()\n\nExpected number of calls: 0\nReceived number of calls: 1\n\n1: {\"_id\": \"16e7dae48ada0edd4af6cdd4\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Estefania\", \"position\": 711403625250816, \"role\": {\"current\": \"ancient\", \"isRevealed\": true, \"original\": \"stuttering-judge\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"a33d1fab65830c7e1bff3fca\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T10:48:52.278Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 3690620505817088}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [], \"status\": \"over\", \"tick\": 5930060861145088, \"turn\": 6419985515675648, \"upcomingPlays\": [], \"updatedAt\": 2023-08-25T20:34:43.914Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:496:40)", + "replacement": "cause === PlayerDeathCauses.EATEN || !this.canPlayerBeEaten(player, game)", + "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalled()\n\nExpected number of calls: 0\nReceived number of calls: 1\n\n1: {\"_id\": \"eb3a00737dbffdf824d77a39\", \"attributes\": [], \"death\": undefined, \"isAlive\": false, \"name\": \"Corine\", \"position\": 1123263809847296, \"role\": {\"current\": \"little-girl\", \"isRevealed\": true, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"werewolves\"}}, {\"_id\": \"c5baf2a2ee8eae886eeedecf\", \"additionalCards\": undefined, \"createdAt\": 2023-08-27T20:01:43.609Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 1137473023377408}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [], \"status\": \"playing\", \"tick\": 1805923861397504, \"turn\": 6842159166652416, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T00:56:33.100Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:496:40)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -90205,7 +90378,7 @@ ], "location": { "end": { - "column": 84, + "column": 82, "line": 101 }, "start": { @@ -90218,9 +90391,13 @@ "id": "2662", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalled()\n\nExpected number of calls: 0\nReceived number of calls: 1\n\n1: {\"_id\": \"12eaefaa3caa5a9ae5e8bc01\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Raymundo\", \"position\": 6463537381638144, \"role\": {\"current\": \"villager\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"villagers\"}}, {\"_id\": \"f4ce5c8ca7bac2f50417037e\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T00:39:46.624Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 1044438889529344}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [], \"status\": \"over\", \"tick\": 7255785790767104, \"turn\": 2195903475613696, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T14:15:05.171Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:496:40)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "386" + ], "coveredBy": [ "385", "386", @@ -90232,7 +90409,7 @@ ], "location": { "end": { - "column": 44, + "column": 42, "line": 101 }, "start": { @@ -90244,7 +90421,7 @@ { "id": "2663", "mutatorName": "EqualityOperator", - "replacement": "cause !== PLAYER_DEATH_CAUSES.EATEN", + "replacement": "cause !== PlayerDeathCauses.EATEN", "status": "Timeout", "static": false, "killedBy": [], @@ -90259,7 +90436,7 @@ ], "location": { "end": { - "column": 44, + "column": 42, "line": 101 }, "start": { @@ -90280,11 +90457,11 @@ ], "location": { "end": { - "column": 84, + "column": 82, "line": 101 }, "start": { - "column": 48, + "column": 46, "line": 101 } } @@ -90293,13 +90470,9 @@ "id": "2665", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:487:113)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "385" - ], + "killedBy": [], "coveredBy": [ "385" ], @@ -90309,7 +90482,7 @@ "line": 103 }, "start": { - "column": 86, + "column": 84, "line": 101 } } @@ -90318,7 +90491,7 @@ "id": "2666", "mutatorName": "BooleanLiteral", "replacement": "true", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:487:113)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:487:111)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -90343,7 +90516,7 @@ "id": "2667", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalled()\n\nExpected number of calls: 0\nReceived number of calls: 1\n\n1: {\"_id\": \"786eb619ef5a40ebb2e557ba\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Erin\", \"position\": 5576046678114304, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, \"vote\", {\"_id\": \"a7116cc1ee6f8057bf4afacc\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T07:04:59.087Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 3988409328599040}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [], \"status\": \"over\", \"tick\": 1948021273133056, \"turn\": 4280540440035328, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T04:47:05.130Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:514:39)", + "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalled()\n\nExpected number of calls: 0\nReceived number of calls: 1\n\n1: {\"_id\": \"47aa8f4c0dbef083fb4e2b83\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Deron\", \"position\": 2845783887970304, \"role\": {\"current\": \"seer\", \"isRevealed\": false, \"original\": \"seer\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, \"vote\", {\"_id\": \"ed4d4f6defbfd05c0820cd01\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T12:13:53.915Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 969035265081344}, \"hasDoubledVote\": false, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 0}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [], \"status\": \"playing\", \"tick\": 6583304188854272, \"turn\": 632496710483968, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T20:53:54.382Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:514:39)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -90360,7 +90533,7 @@ ], "location": { "end": { - "column": 49, + "column": 48, "line": 104 }, "start": { @@ -90373,7 +90546,7 @@ "id": "2668", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:505:35)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:505:35)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -90390,7 +90563,7 @@ ], "location": { "end": { - "column": 49, + "column": 48, "line": 104 }, "start": { @@ -90402,8 +90575,8 @@ { "id": "2669", "mutatorName": "EqualityOperator", - "replacement": "player.role.current !== ROLE_NAMES.IDIOT", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(107,9): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.IDIOT' and 'ROLE_NAMES.ANCIENT' have no overlap.\n", + "replacement": "player.role.current !== RoleNames.IDIOT", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(107,9): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.IDIOT' and 'RoleNames.ANCIENT' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -90417,7 +90590,7 @@ ], "location": { "end": { - "column": 49, + "column": 48, "line": 104 }, "start": { @@ -90442,7 +90615,7 @@ "line": 106 }, "start": { - "column": 51, + "column": 50, "line": 104 } } @@ -90451,13 +90624,9 @@ "id": "2671", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalled()\n\nExpected number of calls: 0\nReceived number of calls: 1\n\n1: {\"_id\": \"97cf6dcafaaa2fd5ef13e25d\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T19:17:40.615Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 5160484344954880}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 5}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [], \"status\": \"canceled\", \"tick\": 1550250621796352, \"turn\": 4680982552641536, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T16:13:57.262Z, \"victory\": undefined}, \"vote\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:532:41)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "390" - ], + "killedBy": [], "coveredBy": [ "386", "388", @@ -90467,7 +90636,7 @@ ], "location": { "end": { - "column": 51, + "column": 50, "line": 107 }, "start": { @@ -90480,7 +90649,7 @@ "id": "2672", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:523:37)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:523:37)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -90496,7 +90665,7 @@ ], "location": { "end": { - "column": 51, + "column": 50, "line": 107 }, "start": { @@ -90508,14 +90677,10 @@ { "id": "2673", "mutatorName": "EqualityOperator", - "replacement": "player.role.current !== ROLE_NAMES.ANCIENT", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:523:37)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "player.role.current !== RoleNames.ANCIENT", + "status": "Timeout", "static": false, - "killedBy": [ - "389" - ], + "killedBy": [], "coveredBy": [ "386", "388", @@ -90525,7 +90690,7 @@ ], "location": { "end": { - "column": 51, + "column": 50, "line": 107 }, "start": { @@ -90538,7 +90703,7 @@ "id": "2674", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:523:37)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:523:37)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -90554,7 +90719,7 @@ "line": 109 }, "start": { - "column": 53, + "column": 52, "line": 107 } } @@ -90563,7 +90728,7 @@ "id": "2675", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:539:112)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).resolves.toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object.toBe (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:174:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:539:110)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -90668,8 +90833,8 @@ { "id": "2679", "mutatorName": "LogicalOperator", - "replacement": "(!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame) || wildChildPlayer === undefined || !wildChildPlayer.isAlive) && !isPlayerPowerful(wildChildPlayer, clonedGame)", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(116,192): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(119,5): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,31): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,52): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "replacement": "(!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.WORSHIPED, clonedGame) || wildChildPlayer === undefined || !wildChildPlayer.isAlive) && !isPlayerPowerful(wildChildPlayer, clonedGame)", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(116,190): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(119,5): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,31): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,52): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -90720,8 +90885,8 @@ { "id": "2681", "mutatorName": "LogicalOperator", - "replacement": "(!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame) || wildChildPlayer === undefined) && !wildChildPlayer.isAlive", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(116,147): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(116,192): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(119,5): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,31): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,52): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "replacement": "(!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.WORSHIPED, clonedGame) || wildChildPlayer === undefined) && !wildChildPlayer.isAlive", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(116,145): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(116,190): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(119,5): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,31): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,52): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -90772,8 +90937,8 @@ { "id": "2683", "mutatorName": "LogicalOperator", - "replacement": "!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame) && wildChildPlayer === undefined", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(116,145): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(116,190): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(119,5): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,31): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,52): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", + "replacement": "!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.WORSHIPED, clonedGame) && wildChildPlayer === undefined", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(116,143): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(116,188): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(119,5): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,31): error TS18048: 'wildChildPlayer' is possibly 'undefined'.\nsrc/modules/game/providers/services/player/player-killer.service.ts(120,52): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Partial'.\n Type 'undefined' is not assignable to type 'Partial'.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -90798,8 +90963,8 @@ { "id": "2684", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -108,11 +108,11 @@\n \"current\": \"wild-child\",\n \"isRevealed\": false,\n \"original\": \"wild-child\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"f9bf3d37aec0c301ebeca3e5\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:553:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.WORSHIPED, clonedGame)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n@@ -108,11 +108,11 @@\n \"current\": \"wild-child\",\n \"isRevealed\": false,\n \"original\": \"wild-child\",\n },\n \"side\": PlayerSide {\n- \"current\": \"villagers\",\n+ \"current\": \"werewolves\",\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"bfa9efd29f963a9488c14aa9\",\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:553:92)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -90815,7 +90980,7 @@ ], "location": { "end": { - "column": 107, + "column": 105, "line": 116 }, "start": { @@ -90981,9 +91146,13 @@ "id": "2691", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:665:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "400" + ], "coveredBy": [ "397", "398", @@ -91030,9 +91199,13 @@ "id": "2693", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:665:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "400" + ], "coveredBy": [ "397", "398", @@ -91053,8 +91226,7 @@ { "id": "2694", "mutatorName": "LogicalOperator", - "replacement": "doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game) && player.isAlive || player._id !== killedPlayer._id", - "statusReason": "Hit limit reached (1302/1300)", + "replacement": "doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game) && player.isAlive || player._id !== killedPlayer._id", "status": "Timeout", "static": false, "killedBy": [], @@ -91079,7 +91251,6 @@ "id": "2695", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Hit limit reached (1302/1300)", "status": "Timeout", "static": false, "killedBy": [], @@ -91103,8 +91274,7 @@ { "id": "2696", "mutatorName": "LogicalOperator", - "replacement": "doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game) || player.isAlive", - "statusReason": "Hit limit reached (1302/1300)", + "replacement": "doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game) || player.isAlive", "status": "Timeout", "static": false, "killedBy": [], @@ -91195,7 +91365,7 @@ ], "location": { "end": { - "column": 127, + "column": 125, "line": 129 }, "start": { @@ -91220,7 +91390,7 @@ ], "location": { "end": { - "column": 127, + "column": 125, "line": 129 }, "start": { @@ -91232,7 +91402,7 @@ { "id": "2701", "mutatorName": "LogicalOperator", - "replacement": "!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, clonedGame) && !otherPlayerInLove", + "replacement": "!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.IN_LOVE, clonedGame) && !otherPlayerInLove", "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(132,28): error TS2345: Argument of type 'Player | undefined' is not assignable to parameter of type 'Player'.\n Type 'undefined' is not assignable to type 'Player'.\n", "status": "CompileError", "static": false, @@ -91245,7 +91415,7 @@ ], "location": { "end": { - "column": 127, + "column": 125, "line": 129 }, "start": { @@ -91257,8 +91427,8 @@ { "id": "2702", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, clonedGame)", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:665:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.IN_LOVE, clonedGame)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:665:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -91273,7 +91443,7 @@ ], "location": { "end": { - "column": 105, + "column": 103, "line": 129 }, "start": { @@ -91297,11 +91467,11 @@ ], "location": { "end": { - "column": 127, + "column": 125, "line": 129 }, "start": { - "column": 109, + "column": 107, "line": 129 } } @@ -91325,7 +91495,7 @@ "line": 131 }, "start": { - "column": 129, + "column": 127, "line": 129 } } @@ -91359,7 +91529,7 @@ "id": "2706", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -175,18 +175,10 @@\n \"status\": \"playing\",\n \"tick\": 4850341612879872,\n \"turn\": 4704760326258688,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"delegate\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"sheriff\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:704:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -175,18 +175,10 @@\n \"status\": \"playing\",\n \"tick\": 3428199216185344,\n \"turn\": 7956134616891392,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"delegate\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"sheriff\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:704:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -91374,7 +91544,7 @@ ], "location": { "end": { - "column": 99, + "column": 98, "line": 138 }, "start": { @@ -91387,7 +91557,7 @@ "id": "2707", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 6507374244265984,\n \"turn\": 1450172101951488,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T18:42:27.569Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:679:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 8396071252262912,\n \"turn\": 7646665825583104,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T00:20:22.686Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:679:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -91402,7 +91572,7 @@ ], "location": { "end": { - "column": 99, + "column": 98, "line": 138 }, "start": { @@ -91414,14 +91584,10 @@ { "id": "2708", "mutatorName": "LogicalOperator", - "replacement": "!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.SHERIFF, game) && killedPlayer.role.current === ROLE_NAMES.IDIOT && isPlayerPowerful(killedPlayer, clonedGame)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 2583000038506496,\n \"turn\": 1053688206458880,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-25T20:11:52.109Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:679:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "replacement": "!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.SHERIFF, game) && killedPlayer.role.current === RoleNames.IDIOT && isPlayerPowerful(killedPlayer, clonedGame)", + "status": "Timeout", "static": false, - "killedBy": [ - "401" - ], + "killedBy": [], "coveredBy": [ "401", "402", @@ -91430,7 +91596,7 @@ ], "location": { "end": { - "column": 99, + "column": 98, "line": 138 }, "start": { @@ -91442,14 +91608,10 @@ { "id": "2709", "mutatorName": "BooleanLiteral", - "replacement": "doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.SHERIFF, game)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 5346697905438720,\n \"turn\": 159192144936960,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T14:49:16.746Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:679:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "replacement": "doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.SHERIFF, game)", + "status": "Timeout", "static": false, - "killedBy": [ - "401" - ], + "killedBy": [], "coveredBy": [ "401", "402", @@ -91458,7 +91620,7 @@ ], "location": { "end": { - "column": 99, + "column": 97, "line": 137 }, "start": { @@ -91471,9 +91633,13 @@ "id": "2710", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 5095925338865664,\n \"turn\": 1878326775906304,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T12:37:00.216Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:691:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "402" + ], "coveredBy": [ "402", "403", @@ -91481,7 +91647,7 @@ ], "location": { "end": { - "column": 99, + "column": 98, "line": 138 }, "start": { @@ -91493,10 +91659,14 @@ { "id": "2711", "mutatorName": "LogicalOperator", - "replacement": "killedPlayer.role.current === ROLE_NAMES.IDIOT || isPlayerPowerful(killedPlayer, clonedGame)", - "status": "Timeout", + "replacement": "killedPlayer.role.current === RoleNames.IDIOT || isPlayerPowerful(killedPlayer, clonedGame)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -175,18 +175,10 @@\n \"status\": \"canceled\",\n \"tick\": 5200555481759744,\n \"turn\": 1442868902232064,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"delegate\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"sheriff\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:704:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "403" + ], "coveredBy": [ "402", "403", @@ -91504,7 +91674,7 @@ ], "location": { "end": { - "column": 99, + "column": 98, "line": 138 }, "start": { @@ -91517,7 +91687,7 @@ "id": "2712", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -168,18 +168,10 @@\n \"status\": \"canceled\",\n \"tick\": 8188678608257024,\n \"turn\": 1425753770033152,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"delegate\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"sheriff\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:720:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -168,18 +168,10 @@\n \"status\": \"canceled\",\n \"tick\": 6698558172430336,\n \"turn\": 3967001376587776,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"delegate\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"sheriff\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:720:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -91531,7 +91701,7 @@ ], "location": { "end": { - "column": 53, + "column": 52, "line": 138 }, "start": { @@ -91543,8 +91713,8 @@ { "id": "2713", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.IDIOT", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 278273317666816,\n \"turn\": 8004207533621248,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T09:09:38.585Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:691:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "killedPlayer.role.current !== RoleNames.IDIOT", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 4270822854230016,\n \"turn\": 4346431362039808,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T03:41:03.888Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:691:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -91558,7 +91728,7 @@ ], "location": { "end": { - "column": 53, + "column": 52, "line": 138 }, "start": { @@ -91571,13 +91741,9 @@ "id": "2714", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -166,9 +166,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 8129374337368064,\n \"turn\": 8012232923283456,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"delegate\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"sheriff\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-25T20:12:55.260Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:679:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "401" - ], + "killedBy": [], "coveredBy": [ "401", "402" @@ -91588,7 +91754,7 @@ "line": 140 }, "start": { - "column": 101, + "column": 100, "line": 138 } } @@ -91621,13 +91787,9 @@ "id": "2716", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"applyPlayerAttributesDeathOutcomes\", {\"gameId\": \"ba29b36fa1de8adb4a1d45b7\", \"playerId\": \"a4ccd053ddd5db7fb74bf5fb\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:769:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "406" - ], + "killedBy": [], "coveredBy": [ "357", "405", @@ -91672,13 +91834,9 @@ "id": "2718", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "TypeError: Cannot destructure property 'attributes' of 'undefined' as it is undefined.\n at getActivePlayerAttributeWithName (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts:85:3)\n at doesPlayerHaveActiveAttributeWithName (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts:99:246)\n at PlayerKillerService.applyPlayerAttributesDeathOutcomes (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/providers/services/player/player-killer.service.ts:342:149)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:744:66)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "405" - ], + "killedBy": [], "coveredBy": [ "357", "405", @@ -91686,7 +91844,7 @@ ], "location": { "end": { - "column": 104, + "column": 102, "line": 148 }, "start": { @@ -91699,7 +91857,7 @@ "id": "2719", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:770:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:770:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -91713,7 +91871,7 @@ ], "location": { "end": { - "column": 104, + "column": 102, "line": 148 }, "start": { @@ -91726,9 +91884,13 @@ "id": "2720", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:770:73)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "406" + ], "coveredBy": [ "406" ], @@ -91738,7 +91900,7 @@ "line": 151 }, "start": { - "column": 106, + "column": 104, "line": 148 } } @@ -91747,7 +91909,7 @@ "id": "2721", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "TypeError: Cannot destructure property 'attributes' of 'undefined' as it is undefined.\n at getActivePlayerAttributeWithName (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts:85:3)\n at doesPlayerHaveActiveAttributeWithName (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts:99:246)\n at PlayerKillerService.applyPlayerAttributesDeathOutcomes (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/src/modules/game/providers/services/player/player-killer.service.ts:342:149)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:744:66)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "TypeError: Cannot destructure property 'attributes' of 'undefined' as it is undefined.\n at getActivePlayerAttributeWithName (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts:85:3)\n at doesPlayerHaveActiveAttributeWithName (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/helpers/player/player-attribute/player-attribute.helper.ts:99:246)\n at PlayerKillerService.applyPlayerAttributesDeathOutcomes (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/src/modules/game/providers/services/player/player-killer.service.ts:342:149)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:744:66)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -91761,7 +91923,7 @@ ], "location": { "end": { - "column": 104, + "column": 102, "line": 152 }, "start": { @@ -91774,7 +91936,7 @@ "id": "2722", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:771:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:771:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -91788,7 +91950,7 @@ ], "location": { "end": { - "column": 104, + "column": 102, "line": 152 }, "start": { @@ -91801,13 +91963,9 @@ "id": "2723", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:771:72)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "406" - ], + "killedBy": [], "coveredBy": [ "406" ], @@ -91817,7 +91975,7 @@ "line": 155 }, "start": { - "column": 106, + "column": 104, "line": 152 } } @@ -91826,13 +91984,9 @@ "id": "2724", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(jest.fn()).not.toHaveBeenCalled()\n\nExpected number of calls: 0\nReceived number of calls: 1\n\n1: {\"_id\": \"25e669f526a63c53fff9be00\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Antonina\", \"position\": 6295651312730112, \"role\": {\"current\": \"idiot\", \"isRevealed\": false, \"original\": \"idiot\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"e80bad4fe1ad6bdea24bb271\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T15:30:20.259Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 3963815674773504}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 4, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"25e669f526a63c53fff9be00\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": true, \"name\": \"powerless\", \"remainingPhases\": undefined, \"source\": \"ancient\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Antonina\", \"position\": 6295651312730112, \"role\": {\"current\": \"idiot\", \"isRevealed\": false, \"original\": \"idiot\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"9cfc67ba499eeeeb89462e0e\", \"attributes\": [{\"activeAt\": undefined, \"doesRemainAfterDeath\": undefined, \"name\": \"in-love\", \"remainingPhases\": undefined, \"source\": \"cupid\"}], \"death\": undefined, \"isAlive\": true, \"name\": \"Wilma\", \"position\": 6700546595487744, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"eecfce4d117ac4fbbedec01b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Julia\", \"position\": 5527836381151232, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"79d1fbc872b77ecafca5a183\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Cole\", \"position\": 5604529131225088, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"canceled\", \"tick\": 7692588979060736, \"turn\": 3976671405277184, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T15:30:00.735Z, \"victory\": undefined}\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:747:79)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "405" - ], + "killedBy": [], "coveredBy": [ "357", "405", @@ -91840,7 +91994,7 @@ ], "location": { "end": { - "column": 112, + "column": 110, "line": 156 }, "start": { @@ -91853,7 +92007,7 @@ "id": "2725", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:772:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:772:75)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -91867,7 +92021,7 @@ ], "location": { "end": { - "column": 112, + "column": 110, "line": 156 }, "start": { @@ -91892,7 +92046,7 @@ "line": 158 }, "start": { - "column": 114, + "column": 112, "line": 156 } } @@ -91940,7 +92094,7 @@ ], "location": { "end": { - "column": 149, + "column": 148, "line": 164 }, "start": { @@ -91992,7 +92146,7 @@ ], "location": { "end": { - "column": 78, + "column": 76, "line": 166 }, "start": { @@ -92018,7 +92172,7 @@ ], "location": { "end": { - "column": 78, + "column": 76, "line": 166 }, "start": { @@ -92030,7 +92184,7 @@ { "id": "2732", "mutatorName": "LogicalOperator", - "replacement": "(killedPlayer.role.current !== ROLE_NAMES.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame) || death.cause !== PLAYER_DEATH_CAUSES.EATEN) && !leftAliveWerewolfNeighbor", + "replacement": "(killedPlayer.role.current !== RoleNames.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame) || death.cause !== PlayerDeathCauses.EATEN) && !leftAliveWerewolfNeighbor", "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(168,37): error TS18048: 'leftAliveWerewolfNeighbor' is possibly 'undefined'.\n", "status": "CompileError", "static": false, @@ -92044,7 +92198,7 @@ ], "location": { "end": { - "column": 78, + "column": 76, "line": 166 }, "start": { @@ -92057,9 +92211,13 @@ "id": "2733", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"6c4cc12e35db19dc4d06ff42\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Bonnie\",\n \"position\": 8509878502948864,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "407" + ], "coveredBy": [ "407", "408", @@ -92069,7 +92227,7 @@ ], "location": { "end": { - "column": 48, + "column": 46, "line": 166 }, "start": { @@ -92081,10 +92239,14 @@ { "id": "2734", "mutatorName": "LogicalOperator", - "replacement": "(killedPlayer.role.current !== ROLE_NAMES.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame)) && death.cause !== PLAYER_DEATH_CAUSES.EATEN", - "status": "Timeout", + "replacement": "(killedPlayer.role.current !== RoleNames.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame)) && death.cause !== PlayerDeathCauses.EATEN", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"a81b93ce09bf6b7f5be8c0a9\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Triston\",\n \"position\": 6162578040422400,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "407" + ], "coveredBy": [ "407", "408", @@ -92094,7 +92256,7 @@ ], "location": { "end": { - "column": 48, + "column": 46, "line": 166 }, "start": { @@ -92107,7 +92269,7 @@ "id": "2735", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"feaa684dfdc1b7b0df265ba5\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Joanny\",\n \"position\": 7850747496497152,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"8d191eceeb1effcef67027dc\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Elliott\",\n \"position\": 7277536562118656,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -92123,7 +92285,7 @@ ], "location": { "end": { - "column": 115, + "column": 114, "line": 165 }, "start": { @@ -92135,8 +92297,8 @@ { "id": "2736", "mutatorName": "LogicalOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.RUSTY_SWORD_KNIGHT && !isPlayerPowerful(killedPlayer, clonedGame)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -114,11 +114,19 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"3a42dac1ba9a03d1616d1020\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Francis\",\n \"position\": 8910721997864960,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "killedPlayer.role.current !== RoleNames.RUSTY_SWORD_KNIGHT && !isPlayerPowerful(killedPlayer, clonedGame)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -114,11 +114,19 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"4a1b3eeff22de5daf99240fa\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Neil\",\n \"position\": 1953197421756416,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -92152,7 +92314,7 @@ ], "location": { "end": { - "column": 115, + "column": 114, "line": 165 }, "start": { @@ -92165,13 +92327,9 @@ "id": "2737", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"954fc1bbd4e7bbf09770a3f9\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Kiley\",\n \"position\": 1805039561605120,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "status": "Timeout", "static": false, - "killedBy": [ - "407" - ], + "killedBy": [], "coveredBy": [ "407", "408", @@ -92181,7 +92339,7 @@ ], "location": { "end": { - "column": 68, + "column": 67, "line": 165 }, "start": { @@ -92193,14 +92351,10 @@ { "id": "2738", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current === ROLE_NAMES.RUSTY_SWORD_KNIGHT", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"6b4f9fdf1feaec7f76e23cc3\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Brenna\",\n \"position\": 317146601095168,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:789:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 5, + "replacement": "killedPlayer.role.current === RoleNames.RUSTY_SWORD_KNIGHT", + "status": "Timeout", "static": false, - "killedBy": [ - "407" - ], + "killedBy": [], "coveredBy": [ "407", "408", @@ -92210,7 +92364,7 @@ ], "location": { "end": { - "column": 68, + "column": 67, "line": 165 }, "start": { @@ -92238,11 +92392,11 @@ ], "location": { "end": { - "column": 115, + "column": 114, "line": 165 }, "start": { - "column": 72, + "column": 71, "line": 165 } } @@ -92251,13 +92405,9 @@ "id": "2740", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"97bd4fb1d05166df88ceb5ee\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Mitchell\",\n \"position\": 2282956095750144,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:815:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "409" - ], + "killedBy": [], "coveredBy": [ "409", "410", @@ -92265,7 +92415,7 @@ ], "location": { "end": { - "column": 48, + "column": 46, "line": 166 }, "start": { @@ -92277,8 +92427,8 @@ { "id": "2741", "mutatorName": "EqualityOperator", - "replacement": "death.cause === PLAYER_DEATH_CAUSES.EATEN", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"2c3fe5f8fbfbe04cdd20fbbd\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Cathrine\",\n \"position\": 3000443122745344,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:815:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "death.cause === PlayerDeathCauses.EATEN", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 9\n\n@@ -97,11 +97,19 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"5aea50675bd87a0464eccdff\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": undefined,\n+ \"name\": \"contaminated\",\n+ \"remainingPhases\": 2,\n+ \"source\": \"rusty-sword-knight\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Lilian\",\n \"position\": 6160497128767488,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:815:100)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -92292,7 +92442,7 @@ ], "location": { "end": { - "column": 48, + "column": 46, "line": 166 }, "start": { @@ -92315,11 +92465,11 @@ ], "location": { "end": { - "column": 78, + "column": 76, "line": 166 }, "start": { - "column": 52, + "column": 50, "line": 166 } } @@ -92344,7 +92494,7 @@ "line": 168 }, "start": { - "column": 80, + "column": 78, "line": 166 } } @@ -92378,7 +92528,7 @@ "id": "2745", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -152,18 +152,10 @@\n \"status\": \"playing\",\n \"tick\": 5618025579413504,\n \"turn\": 6512023263248384,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"ban-voting\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"scapegoat\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:909:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -152,18 +152,10 @@\n \"status\": \"over\",\n \"tick\": 7526352689299456,\n \"turn\": 8357056339771392,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"ban-voting\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"scapegoat\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"shoot\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"hunter\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:909:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -92393,7 +92543,7 @@ ], "location": { "end": { - "column": 162, + "column": 159, "line": 174 }, "start": { @@ -92406,7 +92556,7 @@ "id": "2746", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 2296877647134720,\n \"turn\": 7046426081099776,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-25T22:21:17.431Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 7887878130499584,\n \"turn\": 4345442250784768,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T01:40:57.626Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -92421,7 +92571,7 @@ ], "location": { "end": { - "column": 162, + "column": 159, "line": 174 }, "start": { @@ -92433,8 +92583,8 @@ { "id": "2747", "mutatorName": "LogicalOperator", - "replacement": "(killedPlayer.role.current !== ROLE_NAMES.SCAPEGOAT || !isPlayerPowerful(killedPlayer, clonedGame)) && death.cause !== PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 7022651300118528,\n \"turn\": 2480748802080768,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T12:15:34.645Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "(killedPlayer.role.current !== RoleNames.SCAPEGOAT || !isPlayerPowerful(killedPlayer, clonedGame)) && death.cause !== PlayerDeathCauses.VOTE_SCAPEGOATED", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 4069406791434240,\n \"turn\": 8959682695659520,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T14:06:20.902Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -92449,7 +92599,7 @@ ], "location": { "end": { - "column": 162, + "column": 159, "line": 174 }, "start": { @@ -92462,7 +92612,7 @@ "id": "2748", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 748226422505472,\n \"turn\": 6292231671513088,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T02:47:39.781Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 1914195056525312,\n \"turn\": 2791082628743168,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T04:57:44.444Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -92477,7 +92627,7 @@ ], "location": { "end": { - "column": 106, + "column": 105, "line": 174 }, "start": { @@ -92489,14 +92639,10 @@ { "id": "2749", "mutatorName": "LogicalOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.SCAPEGOAT && !isPlayerPowerful(killedPlayer, clonedGame)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 7471849464135680,\n \"turn\": 4328727473291264,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-25T20:51:40.508Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "replacement": "killedPlayer.role.current !== RoleNames.SCAPEGOAT && !isPlayerPowerful(killedPlayer, clonedGame)", + "status": "Timeout", "static": false, - "killedBy": [ - "412" - ], + "killedBy": [], "coveredBy": [ "412", "413", @@ -92505,7 +92651,7 @@ ], "location": { "end": { - "column": 106, + "column": 105, "line": 174 }, "start": { @@ -92518,13 +92664,9 @@ "id": "2750", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 8191439089434624,\n \"turn\": 7016275549093888,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T13:54:09.582Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "status": "Timeout", "static": false, - "killedBy": [ - "412" - ], + "killedBy": [], "coveredBy": [ "412", "413", @@ -92533,7 +92675,7 @@ ], "location": { "end": { - "column": 59, + "column": 58, "line": 174 }, "start": { @@ -92545,14 +92687,10 @@ { "id": "2751", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current === ROLE_NAMES.SCAPEGOAT", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 6249735662862336,\n \"turn\": 3806788398874624,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T19:00:17.177Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 4, + "replacement": "killedPlayer.role.current === RoleNames.SCAPEGOAT", + "status": "Timeout", "static": false, - "killedBy": [ - "412" - ], + "killedBy": [], "coveredBy": [ "412", "413", @@ -92561,7 +92699,7 @@ ], "location": { "end": { - "column": 59, + "column": 58, "line": 174 }, "start": { @@ -92584,11 +92722,11 @@ ], "location": { "end": { - "column": 106, + "column": 105, "line": 174 }, "start": { - "column": 63, + "column": 62, "line": 174 } } @@ -92597,24 +92735,20 @@ "id": "2753", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 4250830152663040,\n \"turn\": 6742358683025408,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T01:59:25.783Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:891:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "414" - ], + "killedBy": [], "coveredBy": [ "414", "415" ], "location": { "end": { - "column": 162, + "column": 159, "line": 174 }, "start": { - "column": 110, + "column": 109, "line": 174 } } @@ -92622,8 +92756,8 @@ { "id": "2754", "mutatorName": "EqualityOperator", - "replacement": "death.cause === PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 7268569651871744,\n \"turn\": 6839140763041792,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-25T21:00:58.874Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:891:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "death.cause === PlayerDeathCauses.VOTE_SCAPEGOATED", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 1183945970417664,\n \"turn\": 4642188610764800,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T14:14:42.803Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:891:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -92636,11 +92770,11 @@ ], "location": { "end": { - "column": 162, + "column": 159, "line": 174 }, "start": { - "column": 110, + "column": 109, "line": 174 } } @@ -92649,9 +92783,13 @@ "id": "2755", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 4550275272540160,\n \"turn\": 7623877282758656,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"ban-voting\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"scapegoat\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-28T16:49:47.281Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:865:93)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "412" + ], "coveredBy": [ "412", "413", @@ -92663,7 +92801,7 @@ "line": 176 }, "start": { - "column": 164, + "column": 161, "line": 174 } } @@ -92700,7 +92838,7 @@ "id": "2757", "mutatorName": "ArrayDeclaration", "replacement": "[]", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 2\n\n@@ -97,19 +97,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"fcc7d5a30b43fcc149666d48\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Teresa\",\n \"position\": 6081084433367040,\n \"role\": PlayerRole {\n@@ -139,19 +131,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"fef3639be514ed8ee49e8cbf\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Mossie\",\n \"position\": 5562319576760320,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 18\n+ Received + 2\n\n@@ -97,19 +97,11 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"ec6a823f282949d6fa46d5f8\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Josiah\",\n \"position\": 1138424182472704,\n \"role\": PlayerRole {\n@@ -139,19 +131,11 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"ad5ac8eccce8b11da7fdfbe7\",\n- \"attributes\": Array [\n- PlayerAttribute {\n- \"activeAt\": undefined,\n- \"doesRemainAfterDeath\": true,\n- \"name\": \"powerless\",\n- \"remainingPhases\": undefined,\n- \"source\": \"ancient\",\n- },\n- ],\n+ \"attributes\": Array [],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Libby\",\n \"position\": 6150113456029696,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:995:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 7, "static": false, @@ -92718,11 +92856,11 @@ ], "location": { "end": { - "column": 148, + "column": 140, "line": 182 }, "start": { - "column": 62, + "column": 60, "line": 182 } } @@ -92746,7 +92884,7 @@ ], "location": { "end": { - "column": 98, + "column": 97, "line": 184 }, "start": { @@ -92759,13 +92897,9 @@ "id": "2759", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 5\n\n@@ -98,12 +98,15 @@\n },\n },\n Player {\n \"_id\": \"57f54b21dadf673a8cbce71a\",\n \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n+ \"death\": PlayerDeath {\n+ \"cause\": \"reconsider-pardon\",\n+ \"source\": \"all\",\n+ },\n+ \"isAlive\": false,\n \"name\": \"Chelsey\",\n \"position\": 8574975585812480,\n \"role\": PlayerRole {\n \"current\": \"idiot\",\n \"isRevealed\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:927:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 7, + "status": "Timeout", "static": false, - "killedBy": [ - "416" - ], + "killedBy": [], "coveredBy": [ "416", "417", @@ -92777,7 +92911,7 @@ ], "location": { "end": { - "column": 98, + "column": 97, "line": 184 }, "start": { @@ -92789,10 +92923,14 @@ { "id": "2760", "mutatorName": "LogicalOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.ANCIENT && !isPlayerPowerful(killedPlayer, game)", - "status": "Timeout", + "replacement": "killedPlayer.role.current !== RoleNames.ANCIENT && !isPlayerPowerful(killedPlayer, game)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 5\n\n@@ -98,12 +98,15 @@\n },\n },\n Player {\n \"_id\": \"a5c5b075e3ed5df3c9a3e9fb\",\n \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n+ \"death\": PlayerDeath {\n+ \"cause\": \"reconsider-pardon\",\n+ \"source\": \"all\",\n+ },\n+ \"isAlive\": false,\n \"name\": \"Donald\",\n \"position\": 1434851079094272,\n \"role\": PlayerRole {\n \"current\": \"idiot\",\n \"isRevealed\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:927:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "416" + ], "coveredBy": [ "416", "417", @@ -92804,7 +92942,7 @@ ], "location": { "end": { - "column": 98, + "column": 97, "line": 184 }, "start": { @@ -92817,9 +92955,13 @@ "id": "2761", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 5\n\n@@ -98,12 +98,15 @@\n },\n },\n Player {\n \"_id\": \"a5a0576a0aa0baf7adc4ec66\",\n \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n+ \"death\": PlayerDeath {\n+ \"cause\": \"reconsider-pardon\",\n+ \"source\": \"all\",\n+ },\n+ \"isAlive\": false,\n \"name\": \"Dangelo\",\n \"position\": 2521122908143616,\n \"role\": PlayerRole {\n \"current\": \"idiot\",\n \"isRevealed\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:927:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "416" + ], "coveredBy": [ "416", "417", @@ -92831,7 +92973,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 184 }, "start": { @@ -92843,10 +92985,14 @@ { "id": "2762", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current === ROLE_NAMES.ANCIENT", - "status": "Timeout", + "replacement": "killedPlayer.role.current === RoleNames.ANCIENT", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 5\n\n@@ -98,12 +98,15 @@\n },\n },\n Player {\n \"_id\": \"72f56cf52ef962bd7b3f41f4\",\n \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n+ \"death\": PlayerDeath {\n+ \"cause\": \"reconsider-pardon\",\n+ \"source\": \"all\",\n+ },\n+ \"isAlive\": false,\n \"name\": \"Arvel\",\n \"position\": 1585360582737920,\n \"role\": PlayerRole {\n \"current\": \"idiot\",\n \"isRevealed\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:927:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 7, "static": false, - "killedBy": [], + "killedBy": [ + "416" + ], "coveredBy": [ "416", "417", @@ -92858,7 +93004,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 184 }, "start": { @@ -92871,7 +93017,7 @@ "id": "2763", "mutatorName": "BooleanLiteral", "replacement": "isPlayerPowerful(killedPlayer, game)", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 4\n+ Received + 30\n\n@@ -88,10 +88,17 @@\n \"doesRemainAfterDeath\": true,\n \"name\": \"powerless\",\n \"remainingPhases\": undefined,\n \"source\": \"ancient\",\n },\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Felicita\",\n \"position\": 2813266701058048,\n@@ -105,13 +112,24 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"242cfdc208eca7adda3e8c83\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n+ \"death\": PlayerDeath {\n+ \"cause\": \"reconsider-pardon\",\n+ \"source\": \"all\",\n+ },\n+ \"isAlive\": false,\n \"name\": \"Tyrel\",\n \"position\": 4671001101074432,\n \"role\": PlayerRole {\n \"current\": \"idiot\",\n \"isRevealed\": true,\n@@ -156,11 +174,19 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"bec7a55c66b849a883bd0eb3\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Vernice\",\n \"position\": 166097674305536,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:943:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 4\n+ Received + 30\n\n@@ -88,10 +88,17 @@\n \"doesRemainAfterDeath\": true,\n \"name\": \"powerless\",\n \"remainingPhases\": undefined,\n \"source\": \"ancient\",\n },\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Lynn\",\n \"position\": 3704866289483776,\n@@ -105,13 +112,24 @@\n \"original\": \"villagers\",\n },\n },\n Player {\n \"_id\": \"3310268be6f4ddccecd5efab\",\n- \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n+ \"death\": PlayerDeath {\n+ \"cause\": \"reconsider-pardon\",\n+ \"source\": \"all\",\n+ },\n+ \"isAlive\": false,\n \"name\": \"Maritza\",\n \"position\": 6655590145196032,\n \"role\": PlayerRole {\n \"current\": \"idiot\",\n \"isRevealed\": true,\n@@ -156,11 +174,19 @@\n \"original\": \"werewolves\",\n },\n },\n Player {\n \"_id\": \"671f9274632d8d16595c1149\",\n- \"attributes\": Array [],\n+ \"attributes\": Array [\n+ PlayerAttribute {\n+ \"activeAt\": undefined,\n+ \"doesRemainAfterDeath\": true,\n+ \"name\": \"powerless\",\n+ \"remainingPhases\": undefined,\n+ \"source\": \"ancient\",\n+ },\n+ ],\n \"death\": undefined,\n \"isAlive\": true,\n \"name\": \"Morton\",\n \"position\": 5669202182537216,\n \"role\": PlayerRole {\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:943:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -92888,11 +93034,11 @@ ], "location": { "end": { - "column": 98, + "column": 97, "line": 184 }, "start": { - "column": 61, + "column": 60, "line": 184 } } @@ -92901,9 +93047,13 @@ "id": "2764", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 5\n\n@@ -98,12 +98,15 @@\n },\n },\n Player {\n \"_id\": \"5a528fb6ebeeac1a3dffa159\",\n \"attributes\": Array [],\n- \"death\": undefined,\n- \"isAlive\": true,\n+ \"death\": PlayerDeath {\n+ \"cause\": \"reconsider-pardon\",\n+ \"source\": \"all\",\n+ },\n+ \"isAlive\": false,\n \"name\": \"Trenton\",\n \"position\": 3157210058194944,\n \"role\": PlayerRole {\n \"current\": \"idiot\",\n \"isRevealed\": true,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:927:91)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "416" + ], "coveredBy": [ "416", "417" @@ -92914,7 +93064,7 @@ "line": 186 }, "start": { - "column": 100, + "column": 99, "line": 184 } } @@ -93265,9 +93415,13 @@ "id": "2778", "mutatorName": "BooleanLiteral", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1033:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 5, "static": false, - "killedBy": [], + "killedBy": [ + "422" + ], "coveredBy": [ "418", "419", @@ -93290,7 +93444,7 @@ "id": "2779", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1033:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1033:52)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -93339,9 +93493,13 @@ "id": "2781", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 8\n+ Received + 0\n\n@@ -152,18 +152,10 @@\n \"status\": \"playing\",\n \"tick\": 501302092103680,\n \"turn\": 8801658563723264,\n \"upcomingPlays\": Array [\n GamePlay {\n- \"action\": \"shoot\",\n- \"cause\": undefined,\n- \"source\": GamePlaySource {\n- \"name\": \"hunter\",\n- \"players\": undefined,\n- },\n- },\n- GamePlay {\n \"action\": \"ban-voting\",\n \"cause\": undefined,\n \"source\": GamePlaySource {\n \"name\": \"scapegoat\",\n \"players\": undefined,\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1076:83)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "425" + ], "coveredBy": [ "423", "424", @@ -93349,7 +93507,7 @@ ], "location": { "end": { - "column": 97, + "column": 96, "line": 200 }, "start": { @@ -93362,13 +93520,9 @@ "id": "2782", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"over\",\n \"tick\": 6599779289137152,\n \"turn\": 4473065706618880,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"shoot\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"hunter\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-25T22:30:56.797Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1047:83)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "423" - ], + "killedBy": [], "coveredBy": [ "423", "424", @@ -93376,7 +93530,7 @@ ], "location": { "end": { - "column": 97, + "column": 96, "line": 200 }, "start": { @@ -93388,7 +93542,7 @@ { "id": "2783", "mutatorName": "LogicalOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.HUNTER && !isPlayerPowerful(killedPlayer, game)", + "replacement": "killedPlayer.role.current !== RoleNames.HUNTER && !isPlayerPowerful(killedPlayer, game)", "status": "Timeout", "static": false, "killedBy": [], @@ -93399,7 +93553,7 @@ ], "location": { "end": { - "column": 97, + "column": 96, "line": 200 }, "start": { @@ -93412,13 +93566,9 @@ "id": "2784", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"playing\",\n \"tick\": 4701100588400640,\n \"turn\": 1850715177746432,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"shoot\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"hunter\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T06:17:34.191Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1047:83)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "423" - ], + "killedBy": [], "coveredBy": [ "423", "424", @@ -93426,7 +93576,7 @@ ], "location": { "end": { - "column": 56, + "column": 55, "line": 200 }, "start": { @@ -93438,7 +93588,7 @@ { "id": "2785", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current === ROLE_NAMES.HUNTER", + "replacement": "killedPlayer.role.current === RoleNames.HUNTER", "status": "Timeout", "static": false, "killedBy": [], @@ -93449,7 +93599,7 @@ ], "location": { "end": { - "column": 56, + "column": 55, "line": 200 }, "start": { @@ -93475,11 +93625,11 @@ ], "location": { "end": { - "column": 97, + "column": 96, "line": 200 }, "start": { - "column": 60, + "column": 59, "line": 200 } } @@ -93488,13 +93638,9 @@ "id": "2787", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 10\n\n@@ -150,9 +150,18 @@\n },\n ],\n \"status\": \"canceled\",\n \"tick\": 7804483128000512,\n \"turn\": 1256577216544768,\n- \"upcomingPlays\": Array [],\n+ \"upcomingPlays\": Array [\n+ GamePlay {\n+ \"action\": \"shoot\",\n+ \"cause\": undefined,\n+ \"source\": GamePlaySource {\n+ \"name\": \"hunter\",\n+ \"players\": undefined,\n+ },\n+ },\n+ ],\n \"updatedAt\": 2023-08-26T02:53:29.980Z,\n \"victory\": undefined,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1047:83)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "423" - ], + "killedBy": [], "coveredBy": [ "423", "424" @@ -93505,7 +93651,7 @@ "line": 202 }, "start": { - "column": 99, + "column": 98, "line": 200 } } @@ -93541,7 +93687,7 @@ "id": "2789", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"9d0cdaa94196b2c9d651e7b9\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T19:12:27.170Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 6789299739557888}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"dbf8804f8c9f2f951a214c40\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Kaelyn\", \"position\": 8887644079521792, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"02b4e3859f8e54453bc0abca\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Retta\", \"position\": 4966533644156928, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"bb3cc079ff37fba7f7d38acb\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Kylie\", \"position\": 1772726465331200, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"c8e6b4f083b6f0d66dfaca5c\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Ozella\", \"position\": 5224310467723264, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 8539615210242048, \"turn\": 124065884930048, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T05:01:36.610Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"cc0fb310b5d1b1cfafbffefd\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T17:19:34.912Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 3}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 1134353008558080}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 3}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [{\"_id\": \"dcaf7ed9d41d4c547f7e8882\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Barbara\", \"position\": 3077654404136960, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"6bcea6e8af8a4e60723cfc24\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Octavia\", \"position\": 3486392755683328, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"da92cc26ffa7daa77dfcd99c\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Bridie\", \"position\": 8475276566593536, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"b6af391bd76baaafa84b696b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Skyla\", \"position\": 8181713867898880, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 857721926582272, \"turn\": 6687241441116160, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T00:57:05.651Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -93558,7 +93704,7 @@ ], "location": { "end": { - "column": 56, + "column": 55, "line": 208 }, "start": { @@ -93571,7 +93717,7 @@ "id": "2790", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1116:66)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1116:66)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 6, "static": false, @@ -93588,7 +93734,7 @@ ], "location": { "end": { - "column": 56, + "column": 55, "line": 208 }, "start": { @@ -93600,8 +93746,8 @@ { "id": "2791", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.HUNTER", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(211,9): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.HUNTER' and 'ROLE_NAMES.ANCIENT' have no overlap.\nsrc/modules/game/providers/services/player/player-killer.service.ts(214,9): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.HUNTER' and 'ROLE_NAMES.SCAPEGOAT' have no overlap.\nsrc/modules/game/providers/services/player/player-killer.service.ts(217,9): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.HUNTER' and 'ROLE_NAMES.RUSTY_SWORD_KNIGHT' have no overlap.\n", + "replacement": "killedPlayer.role.current !== RoleNames.HUNTER", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(211,9): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.HUNTER' and 'RoleNames.ANCIENT' have no overlap.\nsrc/modules/game/providers/services/player/player-killer.service.ts(214,9): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.HUNTER' and 'RoleNames.SCAPEGOAT' have no overlap.\nsrc/modules/game/providers/services/player/player-killer.service.ts(217,9): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.HUNTER' and 'RoleNames.RUSTY_SWORD_KNIGHT' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -93615,7 +93761,7 @@ ], "location": { "end": { - "column": 56, + "column": 55, "line": 208 }, "start": { @@ -93628,7 +93774,7 @@ "id": "2792", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1116:66)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1116:66)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -93644,7 +93790,7 @@ "line": 210 }, "start": { - "column": 58, + "column": 57, "line": 208 } } @@ -93653,7 +93799,7 @@ "id": "2793", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"a6a6dcf8da7d0fdd0e51afd8\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T13:54:35.061Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 4, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 8633709018218496}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 0}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"afcdf7ece74f50f13a168a56\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Alexandria\", \"position\": 2498599912996864, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"6fa558a4298d087af28ceca4\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Freddie\", \"position\": 2252598736322560, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"00ea2ba3b8fef1e39a5b1fd9\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Rosendo\", \"position\": 4974721380646912, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"f3ec43aca04c7ced9dbbcfac\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Gustave\", \"position\": 8423104466386944, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"playing\", \"tick\": 7082986755325952, \"turn\": 8550873030459392, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T03:56:33.405Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"f2936d8e30f41b23feeb2ac4\", \"additionalCards\": undefined, \"createdAt\": 2023-08-27T21:53:24.976Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 2}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 4}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 7185325359104000}, \"hasDoubledVote\": false, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 2}, \"twoSisters\": {\"wakingUpInterval\": 4}, \"whiteWerewolf\": {\"wakingUpInterval\": 5}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [{\"_id\": \"fa7fa6935da83ff1a3f1c9ae\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Oscar\", \"position\": 1583921558978560, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"ef03e44cb076c8ca38b75e3c\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Jaylan\", \"position\": 3524640620150784, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"e8ba379c6f00db995d7e8f02\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Prudence\", \"position\": 8286872600051712, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"eaeafe36dcfe60c2c501ef27\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Nikki\", \"position\": 7176123664302080, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 3359727335505920, \"turn\": 6521435856044032, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T04:21:17.745Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -93669,7 +93815,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 211 }, "start": { @@ -93682,7 +93828,7 @@ "id": "2794", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1132:67)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1132:67)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 5, "static": false, @@ -93698,7 +93844,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 211 }, "start": { @@ -93710,8 +93856,8 @@ { "id": "2795", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.ANCIENT", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(214,9): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.ANCIENT' and 'ROLE_NAMES.SCAPEGOAT' have no overlap.\nsrc/modules/game/providers/services/player/player-killer.service.ts(217,9): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.ANCIENT' and 'ROLE_NAMES.RUSTY_SWORD_KNIGHT' have no overlap.\n", + "replacement": "killedPlayer.role.current !== RoleNames.ANCIENT", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(214,9): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.ANCIENT' and 'RoleNames.SCAPEGOAT' have no overlap.\nsrc/modules/game/providers/services/player/player-killer.service.ts(217,9): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.ANCIENT' and 'RoleNames.RUSTY_SWORD_KNIGHT' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -93724,7 +93870,7 @@ ], "location": { "end": { - "column": 57, + "column": 56, "line": 211 }, "start": { @@ -93737,7 +93883,7 @@ "id": "2796", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1132:67)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1132:67)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -93753,7 +93899,7 @@ "line": 213 }, "start": { - "column": 59, + "column": 58, "line": 211 } } @@ -93762,7 +93908,7 @@ "id": "2797", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"ad1e1a654da456fdc49493ae\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T10:09:12.644Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 3, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 8928519161643008}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 2}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 5}, \"twoSisters\": {\"wakingUpInterval\": 0}, \"whiteWerewolf\": {\"wakingUpInterval\": 4}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"6a6dda3ed7d9ca5423af416f\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Isai\", \"position\": 1613991042351104, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"cbf5e97bbbc8dbafdede6310\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Kathryne\", \"position\": 301230758821888, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"83ec2ddf2aaf7b3e88aea8bc\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Alisha\", \"position\": 711111489880064, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a60333ddaebafea877a74838\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Easter\", \"position\": 8367244518096896, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"playing\", \"tick\": 7763486065033216, \"turn\": 3625379573006336, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T10:42:50.182Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"bdcaf22ea31f203dcbd64c2c\", \"additionalCards\": undefined, \"createdAt\": 2023-08-27T22:18:49.378Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 5}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 2, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 8595243226103808}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 3, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"night\", \"players\": [{\"_id\": \"e4dddbd2f0cdc74c67dff1ec\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Madyson\", \"position\": 6532273348280320, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"eac6ef27fecd4bda9cfca1ea\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Rhett\", \"position\": 2172214686253056, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"826f5a5db7dcccecd049fedf\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Pauline\", \"position\": 6442930233409536, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"2f0addf519b6cbad72cab303\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Daisy\", \"position\": 8387382080438272, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 617746664521728, \"turn\": 3895658547249152, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T20:10:11.582Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 4, "static": false, @@ -93777,7 +93923,7 @@ ], "location": { "end": { - "column": 59, + "column": 58, "line": 214 }, "start": { @@ -93790,9 +93936,13 @@ "id": "2798", "mutatorName": "ConditionalExpression", "replacement": "false", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1149:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 4, "static": false, - "killedBy": [], + "killedBy": [ + "429" + ], "coveredBy": [ "357", "426", @@ -93801,7 +93951,7 @@ ], "location": { "end": { - "column": 59, + "column": 58, "line": 214 }, "start": { @@ -93813,8 +93963,8 @@ { "id": "2799", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.SCAPEGOAT", - "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(217,9): error TS2367: This comparison appears to be unintentional because the types 'ROLE_NAMES.SCAPEGOAT' and 'ROLE_NAMES.RUSTY_SWORD_KNIGHT' have no overlap.\n", + "replacement": "killedPlayer.role.current !== RoleNames.SCAPEGOAT", + "statusReason": "src/modules/game/providers/services/player/player-killer.service.ts(217,9): error TS2367: This comparison appears to be unintentional because the types 'RoleNames.SCAPEGOAT' and 'RoleNames.RUSTY_SWORD_KNIGHT' have no overlap.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -93826,7 +93976,7 @@ ], "location": { "end": { - "column": 59, + "column": 58, "line": 214 }, "start": { @@ -93839,9 +93989,13 @@ "id": "2800", "mutatorName": "BlockStatement", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1149:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 1, "static": false, - "killedBy": [], + "killedBy": [ + "429" + ], "coveredBy": [ "429" ], @@ -93851,7 +94005,7 @@ "line": 216 }, "start": { - "column": 61, + "column": 60, "line": 214 } } @@ -93860,9 +94014,13 @@ "id": "2801", "mutatorName": "ConditionalExpression", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"ff5dbe4b161a0ddbfd938934\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T13:15:16.877Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": true}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 4}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": true}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 6988444465102848}, \"hasDoubledVote\": true, \"isEnabled\": false}, \"stutteringJudge\": {\"voteRequestsCount\": 5}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [{\"_id\": \"dd510be0fbb9df9ce0fed23d\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Emmalee\", \"position\": 1266149398413312, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a9d99358528eb7ba2d80252f\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Aric\", \"position\": 8487497508061184, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"2e3000d77ccea0dc542fd7a2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Marge\", \"position\": 2935373028130816, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"d3961e2fa53fc784bff9d4ce\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Janelle\", \"position\": 6112473782419456, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"canceled\", \"tick\": 3032652915408896, \"turn\": 7195321331351552, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T18:38:01.578Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 3, "static": false, - "killedBy": [], + "killedBy": [ + "426" + ], "coveredBy": [ "357", "426", @@ -93870,7 +94028,7 @@ ], "location": { "end": { - "column": 68, + "column": 67, "line": 217 }, "start": { @@ -93883,13 +94041,9 @@ "id": "2802", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1166:76)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "status": "Timeout", "static": false, - "killedBy": [ - "430" - ], + "killedBy": [], "coveredBy": [ "357", "426", @@ -93897,7 +94051,7 @@ ], "location": { "end": { - "column": 68, + "column": 67, "line": 217 }, "start": { @@ -93909,14 +94063,10 @@ { "id": "2803", "mutatorName": "EqualityOperator", - "replacement": "killedPlayer.role.current !== ROLE_NAMES.RUSTY_SWORD_KNIGHT", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\nExpected: {\"_id\": \"f23edd2ac292e6f9f5ea7daf\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T14:41:23.586Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 3}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": true}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 1, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 3097599978504192}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 1, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 3}, \"wildChild\": {\"isTransformationRevealed\": false}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"night\", \"players\": [{\"_id\": \"4a55aef6a3fae0a1caef8c27\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Albert\", \"position\": 1002743212802048, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"f32ed4f3e6e91f14e27eb8ba\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Lincoln\", \"position\": 2357380035641344, \"role\": {\"current\": \"hunter\", \"isRevealed\": false, \"original\": \"hunter\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"ce8bdf12ddb8fbbf16efb6e7\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Damien\", \"position\": 5495936753074176, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"7b577c7ac8bff74fd2d77e63\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Bulah\", \"position\": 2137966034026496, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 4221506666102784, \"turn\": 3414989652099072, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T03:20:12.288Z, \"victory\": undefined}\nReceived: undefined\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1098:94)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 3, + "replacement": "killedPlayer.role.current !== RoleNames.RUSTY_SWORD_KNIGHT", + "status": "Timeout", "static": false, - "killedBy": [ - "426" - ], + "killedBy": [], "coveredBy": [ "357", "426", @@ -93924,7 +94074,7 @@ ], "location": { "end": { - "column": 68, + "column": 67, "line": 217 }, "start": { @@ -93937,13 +94087,9 @@ "id": "2804", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once, but it was called 0 times\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1166:76)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 1, + "status": "Timeout", "static": false, - "killedBy": [ - "430" - ], + "killedBy": [], "coveredBy": [ "430" ], @@ -93953,7 +94099,7 @@ "line": 219 }, "start": { - "column": 70, + "column": 69, "line": 217 } } @@ -93985,13 +94131,9 @@ "id": "2806", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"applyPlayerDeathOutcomes\", {\"gameId\": \"047bc190a0fd9cf90ff73e0e\", \"playerId\": \"c7f5ef99ce9dab051fff1ab2\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1191:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "431" - ], + "killedBy": [], "coveredBy": [ "357", "431" @@ -94057,13 +94199,9 @@ "id": "2809", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"killPlayer\", {\"gameId\": \"cefc4bc11b3ac75c4b4304e1\", \"playerId\": \"b474ccfcceeb3c0d5c3eeaab\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1218:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 2, + "status": "Timeout", "static": false, - "killedBy": [ - "432" - ], + "killedBy": [], "coveredBy": [ "357", "432" @@ -94106,9 +94244,13 @@ "id": "2811", "mutatorName": "BooleanLiteral", "replacement": "true", - "status": "Timeout", + "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: \"4dfbad6129faece31eaa6ae0\", {\"_id\": \"4dfbad6129faece31eaa6ae0\", \"attributes\": [], \"death\": {\"cause\": \"death-potion\", \"source\": \"witch\"}, \"isAlive\": false, \"name\": \"Isabell\", \"position\": 1911985719476224, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": true, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"d5b61dc21ccde94bfd6e600a\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T03:58:36.482Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 8335544511627264}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"4dfbad6129faece31eaa6ae0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Isabell\", \"position\": 1911985719476224, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"0cfbe25c67cbdc5adb59c0a2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Marcelle\", \"position\": 1186593761132544, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"ea09ee23f11956febba9bbf5\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Trent\", \"position\": 2343688028028928, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a515074fc3ca184af3b0fab8\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Immanuel\", \"position\": 4560007332888576, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 83239681130496, \"turn\": 759233402372096, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T04:48:42.518Z, \"victory\": undefined}\nReceived\n-> 1\n \"4dfbad6129faece31eaa6ae0\",\n @@ -3,11 +3,11 @@\n \"attributes\": Array [],\n \"death\": PlayerDeath {\n \"cause\": \"death-potion\",\n \"source\": \"witch\",\n },\n - \"isAlive\": false,\n + \"isAlive\": true,\n \"name\": \"Isabell\",\n \"position\": 1911985719476224,\n \"role\": PlayerRole {\n \"current\": \"rusty-sword-knight\",\n \"isRevealed\": true,,\n {\"_id\": \"d5b61dc21ccde94bfd6e600a\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T03:58:36.482Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 8335544511627264}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"4dfbad6129faece31eaa6ae0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Isabell\", \"position\": 1911985719476224, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"0cfbe25c67cbdc5adb59c0a2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Marcelle\", \"position\": 1186593761132544, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"ea09ee23f11956febba9bbf5\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Trent\", \"position\": 2343688028028928, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a515074fc3ca184af3b0fab8\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Immanuel\", \"position\": 4560007332888576, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 83239681130496, \"turn\": 759233402372096, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T04:48:42.518Z, \"victory\": undefined},\n 2: \"4dfbad6129faece31eaa6ae0\", {\"_id\": \"4dfbad6129faece31eaa6ae0\", \"attributes\": [], \"death\": {\"cause\": \"death-potion\", \"source\": \"witch\"}, \"isAlive\": false, \"name\": \"Isabell\", \"position\": 1911985719476224, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": true, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"d5b61dc21ccde94bfd6e600a\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T03:58:36.482Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": false}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": true}, \"doSkipCallIfNoTarget\": false, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": false}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 5}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 8335544511627264}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 4}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": true}, \"threeBrothers\": {\"wakingUpInterval\": 0}, \"twoSisters\": {\"wakingUpInterval\": 5}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"4dfbad6129faece31eaa6ae0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Isabell\", \"position\": 1911985719476224, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"0cfbe25c67cbdc5adb59c0a2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Marcelle\", \"position\": 1186593761132544, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"ea09ee23f11956febba9bbf5\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Trent\", \"position\": 2343688028028928, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"a515074fc3ca184af3b0fab8\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Immanuel\", \"position\": 4560007332888576, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 83239681130496, \"turn\": 759233402372096, \"upcomingPlays\": [], \"updatedAt\": 2023-08-28T04:48:42.518Z, \"victory\": undefined}\n\nNumber of calls: 2\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1219:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "432" + ], "coveredBy": [ "357", "432" @@ -94128,7 +94270,7 @@ "id": "2812", "mutatorName": "BooleanLiteral", "replacement": "false", - "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: \"5cfee4d5db9c651cdfccc8be\", {\"_id\": \"5cfee4d5db9c651cdfccc8be\", \"attributes\": [], \"death\": {\"cause\": \"death-potion\", \"source\": \"witch\"}, \"isAlive\": false, \"name\": \"Pearl\", \"position\": 5956743139950592, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": true, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"dea2c90fcdb2fbf51d4a4ded\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T15:16:06.741Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 3355803335524352}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"5cfee4d5db9c651cdfccc8be\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Pearl\", \"position\": 5956743139950592, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"daad125fce21c3a8bb8c4182\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Bernard\", \"position\": 1025798263799808, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"b1f7fb6c5f03aaae06ceeea0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Carmine\", \"position\": 706258963267584, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"ef9ccfe1d60edc6dec4aee59\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Glenda\", \"position\": 354855948386304, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"canceled\", \"tick\": 1118902524313600, \"turn\": 8072544099762176, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T00:04:05.565Z, \"victory\": undefined}\nReceived\n-> 1\n \"5cfee4d5db9c651cdfccc8be\",\n @@ -8,11 +8,11 @@\n \"isAlive\": false,\n \"name\": \"Pearl\",\n \"position\": 5956743139950592,\n \"role\": PlayerRole {\n \"current\": \"rusty-sword-knight\",\n - \"isRevealed\": true,\n + \"isRevealed\": false,\n \"original\": \"rusty-sword-knight\",\n },\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",,\n {\"_id\": \"dea2c90fcdb2fbf51d4a4ded\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T15:16:06.741Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 3355803335524352}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"5cfee4d5db9c651cdfccc8be\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Pearl\", \"position\": 5956743139950592, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"daad125fce21c3a8bb8c4182\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Bernard\", \"position\": 1025798263799808, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"b1f7fb6c5f03aaae06ceeea0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Carmine\", \"position\": 706258963267584, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"ef9ccfe1d60edc6dec4aee59\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Glenda\", \"position\": 354855948386304, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"canceled\", \"tick\": 1118902524313600, \"turn\": 8072544099762176, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T00:04:05.565Z, \"victory\": undefined},\n 2: \"5cfee4d5db9c651cdfccc8be\", {\"_id\": \"5cfee4d5db9c651cdfccc8be\", \"attributes\": [], \"death\": {\"cause\": \"death-potion\", \"source\": \"witch\"}, \"isAlive\": false, \"name\": \"Pearl\", \"position\": 5956743139950592, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": true, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"dea2c90fcdb2fbf51d4a4ded\", \"additionalCards\": undefined, \"createdAt\": 2023-08-26T15:16:06.741Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": false}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": false, \"livesCountAgainstWerewolves\": 4}, \"areRevealedOnDeath\": true, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": true}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": true}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": false}, \"raven\": {\"markPenalty\": 2}, \"seer\": {\"canSeeRoles\": true, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"day\", \"turn\": 3355803335524352}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 3}, \"thief\": {\"additionalCardsCount\": 5, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 1}, \"twoSisters\": {\"wakingUpInterval\": 3}, \"whiteWerewolf\": {\"wakingUpInterval\": 2}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": false}}, \"phase\": \"day\", \"players\": [{\"_id\": \"5cfee4d5db9c651cdfccc8be\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Pearl\", \"position\": 5956743139950592, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"daad125fce21c3a8bb8c4182\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Bernard\", \"position\": 1025798263799808, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"b1f7fb6c5f03aaae06ceeea0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Carmine\", \"position\": 706258963267584, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"ef9ccfe1d60edc6dec4aee59\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Glenda\", \"position\": 354855948386304, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"canceled\", \"tick\": 1118902524313600, \"turn\": 8072544099762176, \"upcomingPlays\": [], \"updatedAt\": 2023-08-26T00:04:05.565Z, \"victory\": undefined}\n\nNumber of calls: 2\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1219:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(jest.fn()).toHaveBeenNthCalledWith(n, ...expected)\n\nn: 1\nExpected: \"abaffd7edc7de330bafbc62b\", {\"_id\": \"abaffd7edc7de330bafbc62b\", \"attributes\": [], \"death\": {\"cause\": \"death-potion\", \"source\": \"witch\"}, \"isAlive\": false, \"name\": \"Hyman\", \"position\": 951293101211648, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": true, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"e58c9be51792680a59afdc25\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T08:12:03.622Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 5724660289241088}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [{\"_id\": \"abaffd7edc7de330bafbc62b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Hyman\", \"position\": 951293101211648, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"088b9b3a3c5358fbf2aed371\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"August\", \"position\": 2708820751024128, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"d0ba3e3c42c309a056a015e2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Cordia\", \"position\": 7906263874666496, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"f32e4b3c079eebdf6d6c46d0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Stone\", \"position\": 4265912261672960, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 1253671862009856, \"turn\": 3409777396809728, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T18:42:34.246Z, \"victory\": undefined}\nReceived\n-> 1\n \"abaffd7edc7de330bafbc62b\",\n @@ -8,11 +8,11 @@\n \"isAlive\": false,\n \"name\": \"Hyman\",\n \"position\": 951293101211648,\n \"role\": PlayerRole {\n \"current\": \"rusty-sword-knight\",\n - \"isRevealed\": true,\n + \"isRevealed\": false,\n \"original\": \"rusty-sword-knight\",\n },\n \"side\": PlayerSide {\n \"current\": \"villagers\",\n \"original\": \"villagers\",,\n {\"_id\": \"e58c9be51792680a59afdc25\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T08:12:03.622Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 5724660289241088}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [{\"_id\": \"abaffd7edc7de330bafbc62b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Hyman\", \"position\": 951293101211648, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"088b9b3a3c5358fbf2aed371\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"August\", \"position\": 2708820751024128, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"d0ba3e3c42c309a056a015e2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Cordia\", \"position\": 7906263874666496, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"f32e4b3c079eebdf6d6c46d0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Stone\", \"position\": 4265912261672960, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 1253671862009856, \"turn\": 3409777396809728, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T18:42:34.246Z, \"victory\": undefined},\n 2: \"abaffd7edc7de330bafbc62b\", {\"_id\": \"abaffd7edc7de330bafbc62b\", \"attributes\": [], \"death\": {\"cause\": \"death-potion\", \"source\": \"witch\"}, \"isAlive\": false, \"name\": \"Hyman\", \"position\": 951293101211648, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": true, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"e58c9be51792680a59afdc25\", \"additionalCards\": undefined, \"createdAt\": 2023-08-28T08:12:03.622Z, \"currentPlay\": null, \"options\": {\"composition\": {\"isHidden\": true}, \"roles\": {\"ancient\": {\"doesTakeHisRevenge\": true, \"livesCountAgainstWerewolves\": 1}, \"areRevealedOnDeath\": false, \"bearTamer\": {\"doesGrowlIfInfected\": true}, \"bigBadWolf\": {\"isPowerlessIfWerewolfDies\": false}, \"doSkipCallIfNoTarget\": true, \"dogWolf\": {\"isChosenSideRevealed\": false}, \"fox\": {\"isPowerlessIfMissesWerewolf\": false}, \"guard\": {\"canProtectTwice\": false}, \"idiot\": {\"doesDieOnAncientDeath\": false}, \"littleGirl\": {\"isProtectedByGuard\": true}, \"piedPiper\": {\"charmedPeopleCountPerNight\": 5, \"isPowerlessIfInfected\": true}, \"raven\": {\"markPenalty\": 1}, \"seer\": {\"canSeeRoles\": false, \"isTalkative\": false}, \"sheriff\": {\"electedAt\": {\"phase\": \"night\", \"turn\": 5724660289241088}, \"hasDoubledVote\": true, \"isEnabled\": true}, \"stutteringJudge\": {\"voteRequestsCount\": 1}, \"thief\": {\"additionalCardsCount\": 2, \"mustChooseBetweenWerewolves\": false}, \"threeBrothers\": {\"wakingUpInterval\": 4}, \"twoSisters\": {\"wakingUpInterval\": 2}, \"whiteWerewolf\": {\"wakingUpInterval\": 1}, \"wildChild\": {\"isTransformationRevealed\": true}}, \"votes\": {\"canBeSkipped\": true}}, \"phase\": \"day\", \"players\": [{\"_id\": \"abaffd7edc7de330bafbc62b\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Hyman\", \"position\": 951293101211648, \"role\": {\"current\": \"rusty-sword-knight\", \"isRevealed\": false, \"original\": \"rusty-sword-knight\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}, {\"_id\": \"088b9b3a3c5358fbf2aed371\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"August\", \"position\": 2708820751024128, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"d0ba3e3c42c309a056a015e2\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Cordia\", \"position\": 7906263874666496, \"role\": {\"current\": \"werewolf\", \"isRevealed\": false, \"original\": \"werewolf\"}, \"side\": {\"current\": \"werewolves\", \"original\": \"werewolves\"}}, {\"_id\": \"f32e4b3c079eebdf6d6c46d0\", \"attributes\": [], \"death\": undefined, \"isAlive\": true, \"name\": \"Stone\", \"position\": 4265912261672960, \"role\": {\"current\": \"guard\", \"isRevealed\": false, \"original\": \"guard\"}, \"side\": {\"current\": \"villagers\", \"original\": \"villagers\"}}], \"status\": \"over\", \"tick\": 1253671862009856, \"turn\": 3409777396809728, \"upcomingPlays\": [], \"updatedAt\": 2023-08-27T18:42:34.246Z, \"victory\": undefined}\n\nNumber of calls: 2\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1219:38)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -94200,7 +94342,7 @@ "id": "2815", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"getPlayerToKillInGame\", {\"gameId\": \"8c727dbc3eede4fcec752ec4\", \"playerId\": \"124dd3a8863c3f6dcd6cdb8f\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1244:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"getPlayerToKillInGame\", {\"gameId\": \"10950117ffaf05db52d7dcb1\", \"playerId\": \"582febbfb23838aabdbf8d92\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1244:88)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -94226,9 +94368,13 @@ "id": "2816", "mutatorName": "BooleanLiteral", "replacement": "playerToKill.isAlive", - "status": "Timeout", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in getPlayerToKillInGame\"\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1243:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 2, "static": false, - "killedBy": [], + "killedBy": [ + "433" + ], "coveredBy": [ "433", "434" @@ -94274,7 +94420,7 @@ "id": "2818", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in getPlayerToKillInGame\"\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1243:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in getPlayerToKillInGame\"\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1243:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -94300,7 +94446,7 @@ "id": "2819", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in getPlayerToKillInGame\"\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1243:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toThrow(expected)\n\nExpected message: \"Unexpected exception in getPlayerToKillInGame\"\n\nReceived function did not throw\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1243:90)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -94325,7 +94471,7 @@ "id": "2820", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"getPlayerToKillInGame\", {\"gameId\": \"aa2478fbc6ccaf13c1fbfd0d\", \"playerId\": \"776dd70e56eea5e2f8207a1a\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1245:57)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toHaveBeenCalledExactlyOnceWith(expected)\n\nExpected mock function to have been called exactly once with [\"getPlayerToKillInGame\", {\"gameId\": \"ac634fdb6baea4092f5b8bd3\", \"playerId\": \"d08a2c84c5a7112ae6f7b2bd\"}], but it was called with \"\"\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts:1245:57)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 1, "static": false, @@ -94347,7 +94493,7 @@ } } ], - "source": "import { Injectable } from \"@nestjs/common\";\nimport type { Types } from \"mongoose\";\n\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlayHunterShoots, createGamePlayScapegoatBansVoting, createGamePlaySheriffDelegates } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getAliveVillagerSidedPlayers, getNearestAliveNeighbor, getPlayerWithCurrentRole, getPlayerWithIdOrThrow } from \"@/modules/game/helpers/game.helper\";\nimport { addPlayerAttributeInGame, addPlayersAttributeInGame, prependUpcomingPlayInGame, updatePlayerInGame } from \"@/modules/game/helpers/game.mutator\";\nimport { createCantVoteByAllPlayerAttribute, createContaminatedByRustySwordKnightPlayerAttribute, createPowerlessByAncientPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { createPlayerBrokenHeartByCupidDeath, createPlayerDeath, createPlayerReconsiderPardonByAllDeath } from \"@/modules/game/helpers/player/player-death/player-death.factory\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport { isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerDeath } from \"@/modules/game/schemas/player/player-death.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { createCantFindPlayerUnexpectedException, createPlayerIsDeadUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\n@Injectable()\nexport class PlayerKillerService {\n public constructor(private readonly gameHistoryRecordService: GameHistoryRecordService) {}\n \n public async killOrRevealPlayer(playerId: Types.ObjectId, game: Game, death: PlayerDeath): Promise {\n const clonedGame = createGame(game);\n const playerToKill = this.getPlayerToKillInGame(playerId, clonedGame);\n if (await this.isPlayerKillable(playerToKill, clonedGame, death.cause)) {\n return this.killPlayer(playerToKill, clonedGame, death);\n }\n if (this.doesPlayerRoleMustBeRevealed(playerToKill, death, game)) {\n return this.revealPlayerRole(playerToKill, clonedGame);\n }\n return clonedGame;\n }\n\n public async isAncientKillable(game: Game, cause: PLAYER_DEATH_CAUSES): Promise {\n if (cause !== PLAYER_DEATH_CAUSES.EATEN) {\n return true;\n }\n const ancientLivesCountAgainstWerewolves = await this.getAncientLivesCountAgainstWerewolves(game);\n return ancientLivesCountAgainstWerewolves - 1 <= 0;\n }\n\n private applyPlayerRoleRevelationOutcomes(revealedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n if (revealedPlayer.role.current === ROLE_NAMES.IDIOT) {\n return addPlayerAttributeInGame(revealedPlayer._id, clonedGame, createCantVoteByAllPlayerAttribute());\n }\n return clonedGame;\n }\n\n private revealPlayerRole(playerToReveal: Player, game: Game): Game {\n let clonedGame = createGame(game);\n let clonedPlayerToReveal = createPlayer(playerToReveal);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"revealPlayerRole\", { gameId: game._id, playerId: playerToReveal._id });\n clonedPlayerToReveal.role.isRevealed = true;\n clonedGame = updatePlayerInGame(playerToReveal._id, clonedPlayerToReveal, clonedGame);\n clonedPlayerToReveal = getPlayerWithIdOrThrow(playerToReveal._id, clonedGame, cantFindPlayerException);\n return this.applyPlayerRoleRevelationOutcomes(clonedPlayerToReveal, clonedGame);\n }\n\n private doesPlayerRoleMustBeRevealed(playerToReveal: Player, death: PlayerDeath, game: Game): boolean {\n return !playerToReveal.role.isRevealed && playerToReveal.role.current === ROLE_NAMES.IDIOT &&\n isPlayerPowerful(playerToReveal, game) && death.cause === PLAYER_DEATH_CAUSES.VOTE;\n }\n\n private removePlayerAttributesAfterDeath(player: Player): Player {\n const clonedPlayer = createPlayer(player);\n clonedPlayer.attributes = clonedPlayer.attributes.filter(({ doesRemainAfterDeath }) => doesRemainAfterDeath === true);\n return clonedPlayer;\n }\n\n private async getAncientLivesCountAgainstWerewolves(game: Game): Promise {\n const { livesCountAgainstWerewolves } = game.options.roles.ancient;\n const werewolvesEatAncientRecords = await this.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords(game._id);\n const ancientProtectedFromWerewolvesRecords = await this.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords(game._id);\n return werewolvesEatAncientRecords.reduce((acc, werewolvesEatAncientRecord) => {\n const wasAncientProtectedFromWerewolves = !!ancientProtectedFromWerewolvesRecords.find(({ turn }) => turn === werewolvesEatAncientRecord.turn);\n if (!wasAncientProtectedFromWerewolves) {\n return acc - 1;\n }\n return acc;\n }, livesCountAgainstWerewolves);\n }\n\n private isIdiotKillable(idiotPlayer: Player, cause: PLAYER_DEATH_CAUSES, game: Game): boolean {\n const isIdiotPowerless = !isPlayerPowerful(idiotPlayer, game);\n return idiotPlayer.role.isRevealed || cause !== PLAYER_DEATH_CAUSES.VOTE || isIdiotPowerless;\n }\n\n private canPlayerBeEaten(eatenPlayer: Player, game: Game): boolean {\n const { isProtectedByGuard: isLittleGirlProtectedByGuard } = game.options.roles.littleGirl;\n const isPlayerSavedByWitch = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PLAYER_ATTRIBUTE_NAMES.DRANK_LIFE_POTION, game);\n const isPlayerProtectedByGuard = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PLAYER_ATTRIBUTE_NAMES.PROTECTED, game);\n return !isPlayerSavedByWitch && (!isPlayerProtectedByGuard || eatenPlayer.role.current === ROLE_NAMES.LITTLE_GIRL && !isLittleGirlProtectedByGuard);\n }\n\n private async isPlayerKillable(player: Player, game: Game, cause: PLAYER_DEATH_CAUSES): Promise {\n if (cause === PLAYER_DEATH_CAUSES.EATEN && !this.canPlayerBeEaten(player, game)) {\n return false;\n }\n if (player.role.current === ROLE_NAMES.IDIOT) {\n return this.isIdiotKillable(player, cause, game);\n }\n if (player.role.current === ROLE_NAMES.ANCIENT) {\n return this.isAncientKillable(game, cause);\n }\n return true;\n }\n\n private applyWorshipedPlayerDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n const wildChildPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.WILD_CHILD);\n if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame) ||\n wildChildPlayer === undefined || !wildChildPlayer.isAlive || !isPlayerPowerful(wildChildPlayer, clonedGame)) {\n return clonedGame;\n }\n wildChildPlayer.side.current = ROLE_SIDES.WEREWOLVES;\n return updatePlayerInGame(wildChildPlayer._id, wildChildPlayer, clonedGame);\n }\n\n private applyInLovePlayerDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n const otherLoverFinder = (player: Player): boolean => doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game) &&\n player.isAlive && player._id !== killedPlayer._id;\n const otherPlayerInLove = clonedGame.players.find(otherLoverFinder);\n if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, clonedGame) || !otherPlayerInLove) {\n return clonedGame;\n }\n return this.killPlayer(otherPlayerInLove, clonedGame, createPlayerBrokenHeartByCupidDeath());\n }\n\n private applySheriffPlayerDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.SHERIFF, game) ||\n killedPlayer.role.current === ROLE_NAMES.IDIOT && isPlayerPowerful(killedPlayer, clonedGame)) {\n return clonedGame;\n }\n return prependUpcomingPlayInGame(createGamePlaySheriffDelegates(), clonedGame);\n }\n\n private applyPlayerAttributesDeathOutcomes(killedPlayer: Player, game: Game): Game {\n let clonedGame = createGame(game);\n let clonedKilledPlayer = createPlayer(killedPlayer);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"applyPlayerAttributesDeathOutcomes\", { gameId: game._id, playerId: killedPlayer._id });\n if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.SHERIFF, clonedGame)) {\n clonedGame = this.applySheriffPlayerDeathOutcomes(clonedKilledPlayer, clonedGame);\n clonedKilledPlayer = getPlayerWithIdOrThrow(clonedKilledPlayer._id, clonedGame, cantFindPlayerException);\n }\n if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, clonedGame)) {\n clonedGame = this.applyInLovePlayerDeathOutcomes(clonedKilledPlayer, clonedGame);\n clonedKilledPlayer = getPlayerWithIdOrThrow(clonedKilledPlayer._id, clonedGame, cantFindPlayerException);\n }\n if (doesPlayerHaveActiveAttributeWithName(clonedKilledPlayer, PLAYER_ATTRIBUTE_NAMES.WORSHIPED, clonedGame)) {\n clonedGame = this.applyWorshipedPlayerDeathOutcomes(clonedKilledPlayer, clonedGame);\n }\n return clonedGame;\n }\n\n private applyRustySwordKnightDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n const clonedGame = createGame(game);\n const leftAliveWerewolfNeighbor = getNearestAliveNeighbor(killedPlayer._id, clonedGame, { direction: \"left\", playerSide: ROLE_SIDES.WEREWOLVES });\n if (killedPlayer.role.current !== ROLE_NAMES.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame) ||\n death.cause !== PLAYER_DEATH_CAUSES.EATEN || !leftAliveWerewolfNeighbor) {\n return clonedGame;\n }\n return addPlayerAttributeInGame(leftAliveWerewolfNeighbor._id, clonedGame, createContaminatedByRustySwordKnightPlayerAttribute());\n }\n\n private applyScapegoatDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n const clonedGame = createGame(game);\n if (killedPlayer.role.current !== ROLE_NAMES.SCAPEGOAT || !isPlayerPowerful(killedPlayer, clonedGame) || death.cause !== PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED) {\n return clonedGame;\n }\n return prependUpcomingPlayInGame(createGamePlayScapegoatBansVoting(), clonedGame);\n }\n\n private applyAncientDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n let clonedGame = createGame(game);\n const ancientRevengeDeathCauses: PLAYER_DEATH_CAUSES[] = [PLAYER_DEATH_CAUSES.VOTE, PLAYER_DEATH_CAUSES.SHOT, PLAYER_DEATH_CAUSES.DEATH_POTION];\n const { idiot: idiotOptions, ancient: ancientOptions } = clonedGame.options.roles;\n if (killedPlayer.role.current !== ROLE_NAMES.ANCIENT || !isPlayerPowerful(killedPlayer, game)) {\n return clonedGame;\n }\n if (ancientRevengeDeathCauses.includes(death.cause) && ancientOptions.doesTakeHisRevenge) {\n const aliveVillagerSidedPlayersIds = getAliveVillagerSidedPlayers(clonedGame).map(({ _id }) => _id);\n clonedGame = addPlayersAttributeInGame(aliveVillagerSidedPlayersIds, clonedGame, createPowerlessByAncientPlayerAttribute());\n }\n const idiotPlayer = getPlayerWithCurrentRole(clonedGame, ROLE_NAMES.IDIOT);\n if (idiotPlayer?.isAlive === true && idiotPlayer.role.isRevealed && idiotOptions.doesDieOnAncientDeath) {\n return this.killPlayer(idiotPlayer, clonedGame, createPlayerReconsiderPardonByAllDeath());\n }\n return clonedGame;\n }\n\n private applyHunterDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n if (killedPlayer.role.current !== ROLE_NAMES.HUNTER || !isPlayerPowerful(killedPlayer, game)) {\n return clonedGame;\n }\n return prependUpcomingPlayInGame(createGamePlayHunterShoots(), clonedGame);\n }\n\n private applyPlayerRoleDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n const clonedGame = createGame(game);\n if (killedPlayer.role.current === ROLE_NAMES.HUNTER) {\n return this.applyHunterDeathOutcomes(killedPlayer, clonedGame);\n }\n if (killedPlayer.role.current === ROLE_NAMES.ANCIENT) {\n return this.applyAncientDeathOutcomes(killedPlayer, clonedGame, death);\n }\n if (killedPlayer.role.current === ROLE_NAMES.SCAPEGOAT) {\n return this.applyScapegoatDeathOutcomes(killedPlayer, clonedGame, death);\n }\n if (killedPlayer.role.current === ROLE_NAMES.RUSTY_SWORD_KNIGHT) {\n return this.applyRustySwordKnightDeathOutcomes(killedPlayer, clonedGame, death);\n }\n return clonedGame;\n }\n\n private applyPlayerDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n let clonedGame = createGame(game);\n let clonedPlayerToKill = createPlayer(killedPlayer);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"applyPlayerDeathOutcomes\", { gameId: game._id, playerId: killedPlayer._id });\n clonedGame = this.applyPlayerRoleDeathOutcomes(clonedPlayerToKill, clonedGame, death);\n clonedPlayerToKill = getPlayerWithIdOrThrow(clonedPlayerToKill._id, clonedGame, cantFindPlayerException);\n return this.applyPlayerAttributesDeathOutcomes(clonedPlayerToKill, clonedGame);\n }\n\n private killPlayer(playerToKill: Player, game: Game, death: PlayerDeath): Game {\n let clonedGame = createGame(game);\n let clonedPlayerToKill = createPlayer(playerToKill);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"killPlayer\", { gameId: game._id, playerId: playerToKill._id });\n clonedPlayerToKill.isAlive = false;\n clonedPlayerToKill.role.isRevealed = true;\n clonedPlayerToKill.death = createPlayerDeath(death);\n clonedGame = updatePlayerInGame(clonedPlayerToKill._id, clonedPlayerToKill, clonedGame);\n clonedPlayerToKill = getPlayerWithIdOrThrow(clonedPlayerToKill._id, clonedGame, cantFindPlayerException);\n clonedGame = this.applyPlayerDeathOutcomes(clonedPlayerToKill, clonedGame, death);\n clonedPlayerToKill = getPlayerWithIdOrThrow(clonedPlayerToKill._id, clonedGame, cantFindPlayerException);\n return updatePlayerInGame(clonedPlayerToKill._id, this.removePlayerAttributesAfterDeath(clonedPlayerToKill), clonedGame);\n }\n\n private getPlayerToKillInGame(playerId: Types.ObjectId, game: Game): Player {\n const exceptionInterpolations = { gameId: game._id, playerId };\n const playerToKill = getPlayerWithIdOrThrow(playerId, game, createCantFindPlayerUnexpectedException(\"getPlayerToKillInGame\", exceptionInterpolations));\n if (!playerToKill.isAlive) {\n throw createPlayerIsDeadUnexpectedException(\"getPlayerToKillInGame\", exceptionInterpolations);\n }\n return playerToKill;\n }\n}" + "source": "import { Injectable } from \"@nestjs/common\";\nimport type { Types } from \"mongoose\";\n\nimport { PlayerAttributeNames, PlayerDeathCauses } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlayHunterShoots, createGamePlayScapegoatBansVoting, createGamePlaySheriffDelegates } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport { getAliveVillagerSidedPlayers, getNearestAliveNeighbor, getPlayerWithCurrentRole, getPlayerWithIdOrThrow } from \"@/modules/game/helpers/game.helper\";\nimport { addPlayerAttributeInGame, addPlayersAttributeInGame, prependUpcomingPlayInGame, updatePlayerInGame } from \"@/modules/game/helpers/game.mutator\";\nimport { createCantVoteByAllPlayerAttribute, createContaminatedByRustySwordKnightPlayerAttribute, createPowerlessByAncientPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { doesPlayerHaveActiveAttributeWithName } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport { createPlayerBrokenHeartByCupidDeath, createPlayerDeath, createPlayerReconsiderPardonByAllDeath } from \"@/modules/game/helpers/player/player-death/player-death.factory\";\nimport { createPlayer } from \"@/modules/game/helpers/player/player.factory\";\nimport { isPlayerPowerful } from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { PlayerDeath } from \"@/modules/game/schemas/player/player-death.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { createCantFindPlayerUnexpectedException, createPlayerIsDeadUnexpectedException } from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\n@Injectable()\nexport class PlayerKillerService {\n public constructor(private readonly gameHistoryRecordService: GameHistoryRecordService) {}\n \n public async killOrRevealPlayer(playerId: Types.ObjectId, game: Game, death: PlayerDeath): Promise {\n const clonedGame = createGame(game);\n const playerToKill = this.getPlayerToKillInGame(playerId, clonedGame);\n if (await this.isPlayerKillable(playerToKill, clonedGame, death.cause)) {\n return this.killPlayer(playerToKill, clonedGame, death);\n }\n if (this.doesPlayerRoleMustBeRevealed(playerToKill, death, game)) {\n return this.revealPlayerRole(playerToKill, clonedGame);\n }\n return clonedGame;\n }\n\n public async isAncientKillable(game: Game, cause: PlayerDeathCauses): Promise {\n if (cause !== PlayerDeathCauses.EATEN) {\n return true;\n }\n const ancientLivesCountAgainstWerewolves = await this.getAncientLivesCountAgainstWerewolves(game);\n return ancientLivesCountAgainstWerewolves - 1 <= 0;\n }\n\n private applyPlayerRoleRevelationOutcomes(revealedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n if (revealedPlayer.role.current === RoleNames.IDIOT) {\n return addPlayerAttributeInGame(revealedPlayer._id, clonedGame, createCantVoteByAllPlayerAttribute());\n }\n return clonedGame;\n }\n\n private revealPlayerRole(playerToReveal: Player, game: Game): Game {\n let clonedGame = createGame(game);\n let clonedPlayerToReveal = createPlayer(playerToReveal);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"revealPlayerRole\", { gameId: game._id, playerId: playerToReveal._id });\n clonedPlayerToReveal.role.isRevealed = true;\n clonedGame = updatePlayerInGame(playerToReveal._id, clonedPlayerToReveal, clonedGame);\n clonedPlayerToReveal = getPlayerWithIdOrThrow(playerToReveal._id, clonedGame, cantFindPlayerException);\n return this.applyPlayerRoleRevelationOutcomes(clonedPlayerToReveal, clonedGame);\n }\n\n private doesPlayerRoleMustBeRevealed(playerToReveal: Player, death: PlayerDeath, game: Game): boolean {\n return !playerToReveal.role.isRevealed && playerToReveal.role.current === RoleNames.IDIOT &&\n isPlayerPowerful(playerToReveal, game) && death.cause === PlayerDeathCauses.VOTE;\n }\n\n private removePlayerAttributesAfterDeath(player: Player): Player {\n const clonedPlayer = createPlayer(player);\n clonedPlayer.attributes = clonedPlayer.attributes.filter(({ doesRemainAfterDeath }) => doesRemainAfterDeath === true);\n return clonedPlayer;\n }\n\n private async getAncientLivesCountAgainstWerewolves(game: Game): Promise {\n const { livesCountAgainstWerewolves } = game.options.roles.ancient;\n const werewolvesEatAncientRecords = await this.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords(game._id);\n const ancientProtectedFromWerewolvesRecords = await this.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords(game._id);\n return werewolvesEatAncientRecords.reduce((acc, werewolvesEatAncientRecord) => {\n const wasAncientProtectedFromWerewolves = !!ancientProtectedFromWerewolvesRecords.find(({ turn }) => turn === werewolvesEatAncientRecord.turn);\n if (!wasAncientProtectedFromWerewolves) {\n return acc - 1;\n }\n return acc;\n }, livesCountAgainstWerewolves);\n }\n\n private isIdiotKillable(idiotPlayer: Player, cause: PlayerDeathCauses, game: Game): boolean {\n const isIdiotPowerless = !isPlayerPowerful(idiotPlayer, game);\n return idiotPlayer.role.isRevealed || cause !== PlayerDeathCauses.VOTE || isIdiotPowerless;\n }\n\n private canPlayerBeEaten(eatenPlayer: Player, game: Game): boolean {\n const { isProtectedByGuard: isLittleGirlProtectedByGuard } = game.options.roles.littleGirl;\n const isPlayerSavedByWitch = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PlayerAttributeNames.DRANK_LIFE_POTION, game);\n const isPlayerProtectedByGuard = doesPlayerHaveActiveAttributeWithName(eatenPlayer, PlayerAttributeNames.PROTECTED, game);\n return !isPlayerSavedByWitch && (!isPlayerProtectedByGuard || eatenPlayer.role.current === RoleNames.LITTLE_GIRL && !isLittleGirlProtectedByGuard);\n }\n\n private async isPlayerKillable(player: Player, game: Game, cause: PlayerDeathCauses): Promise {\n if (cause === PlayerDeathCauses.EATEN && !this.canPlayerBeEaten(player, game)) {\n return false;\n }\n if (player.role.current === RoleNames.IDIOT) {\n return this.isIdiotKillable(player, cause, game);\n }\n if (player.role.current === RoleNames.ANCIENT) {\n return this.isAncientKillable(game, cause);\n }\n return true;\n }\n\n private applyWorshipedPlayerDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n const wildChildPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.WILD_CHILD);\n if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.WORSHIPED, clonedGame) ||\n wildChildPlayer === undefined || !wildChildPlayer.isAlive || !isPlayerPowerful(wildChildPlayer, clonedGame)) {\n return clonedGame;\n }\n wildChildPlayer.side.current = RoleSides.WEREWOLVES;\n return updatePlayerInGame(wildChildPlayer._id, wildChildPlayer, clonedGame);\n }\n\n private applyInLovePlayerDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n const otherLoverFinder = (player: Player): boolean => doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game) &&\n player.isAlive && player._id !== killedPlayer._id;\n const otherPlayerInLove = clonedGame.players.find(otherLoverFinder);\n if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.IN_LOVE, clonedGame) || !otherPlayerInLove) {\n return clonedGame;\n }\n return this.killPlayer(otherPlayerInLove, clonedGame, createPlayerBrokenHeartByCupidDeath());\n }\n\n private applySheriffPlayerDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n if (!doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.SHERIFF, game) ||\n killedPlayer.role.current === RoleNames.IDIOT && isPlayerPowerful(killedPlayer, clonedGame)) {\n return clonedGame;\n }\n return prependUpcomingPlayInGame(createGamePlaySheriffDelegates(), clonedGame);\n }\n\n private applyPlayerAttributesDeathOutcomes(killedPlayer: Player, game: Game): Game {\n let clonedGame = createGame(game);\n let clonedKilledPlayer = createPlayer(killedPlayer);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"applyPlayerAttributesDeathOutcomes\", { gameId: game._id, playerId: killedPlayer._id });\n if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.SHERIFF, clonedGame)) {\n clonedGame = this.applySheriffPlayerDeathOutcomes(clonedKilledPlayer, clonedGame);\n clonedKilledPlayer = getPlayerWithIdOrThrow(clonedKilledPlayer._id, clonedGame, cantFindPlayerException);\n }\n if (doesPlayerHaveActiveAttributeWithName(killedPlayer, PlayerAttributeNames.IN_LOVE, clonedGame)) {\n clonedGame = this.applyInLovePlayerDeathOutcomes(clonedKilledPlayer, clonedGame);\n clonedKilledPlayer = getPlayerWithIdOrThrow(clonedKilledPlayer._id, clonedGame, cantFindPlayerException);\n }\n if (doesPlayerHaveActiveAttributeWithName(clonedKilledPlayer, PlayerAttributeNames.WORSHIPED, clonedGame)) {\n clonedGame = this.applyWorshipedPlayerDeathOutcomes(clonedKilledPlayer, clonedGame);\n }\n return clonedGame;\n }\n\n private applyRustySwordKnightDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n const clonedGame = createGame(game);\n const leftAliveWerewolfNeighbor = getNearestAliveNeighbor(killedPlayer._id, clonedGame, { direction: \"left\", playerSide: RoleSides.WEREWOLVES });\n if (killedPlayer.role.current !== RoleNames.RUSTY_SWORD_KNIGHT || !isPlayerPowerful(killedPlayer, clonedGame) ||\n death.cause !== PlayerDeathCauses.EATEN || !leftAliveWerewolfNeighbor) {\n return clonedGame;\n }\n return addPlayerAttributeInGame(leftAliveWerewolfNeighbor._id, clonedGame, createContaminatedByRustySwordKnightPlayerAttribute());\n }\n\n private applyScapegoatDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n const clonedGame = createGame(game);\n if (killedPlayer.role.current !== RoleNames.SCAPEGOAT || !isPlayerPowerful(killedPlayer, clonedGame) || death.cause !== PlayerDeathCauses.VOTE_SCAPEGOATED) {\n return clonedGame;\n }\n return prependUpcomingPlayInGame(createGamePlayScapegoatBansVoting(), clonedGame);\n }\n\n private applyAncientDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n let clonedGame = createGame(game);\n const ancientRevengeDeathCauses: PlayerDeathCauses[] = [PlayerDeathCauses.VOTE, PlayerDeathCauses.SHOT, PlayerDeathCauses.DEATH_POTION];\n const { idiot: idiotOptions, ancient: ancientOptions } = clonedGame.options.roles;\n if (killedPlayer.role.current !== RoleNames.ANCIENT || !isPlayerPowerful(killedPlayer, game)) {\n return clonedGame;\n }\n if (ancientRevengeDeathCauses.includes(death.cause) && ancientOptions.doesTakeHisRevenge) {\n const aliveVillagerSidedPlayersIds = getAliveVillagerSidedPlayers(clonedGame).map(({ _id }) => _id);\n clonedGame = addPlayersAttributeInGame(aliveVillagerSidedPlayersIds, clonedGame, createPowerlessByAncientPlayerAttribute());\n }\n const idiotPlayer = getPlayerWithCurrentRole(clonedGame, RoleNames.IDIOT);\n if (idiotPlayer?.isAlive === true && idiotPlayer.role.isRevealed && idiotOptions.doesDieOnAncientDeath) {\n return this.killPlayer(idiotPlayer, clonedGame, createPlayerReconsiderPardonByAllDeath());\n }\n return clonedGame;\n }\n\n private applyHunterDeathOutcomes(killedPlayer: Player, game: Game): Game {\n const clonedGame = createGame(game);\n if (killedPlayer.role.current !== RoleNames.HUNTER || !isPlayerPowerful(killedPlayer, game)) {\n return clonedGame;\n }\n return prependUpcomingPlayInGame(createGamePlayHunterShoots(), clonedGame);\n }\n\n private applyPlayerRoleDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n const clonedGame = createGame(game);\n if (killedPlayer.role.current === RoleNames.HUNTER) {\n return this.applyHunterDeathOutcomes(killedPlayer, clonedGame);\n }\n if (killedPlayer.role.current === RoleNames.ANCIENT) {\n return this.applyAncientDeathOutcomes(killedPlayer, clonedGame, death);\n }\n if (killedPlayer.role.current === RoleNames.SCAPEGOAT) {\n return this.applyScapegoatDeathOutcomes(killedPlayer, clonedGame, death);\n }\n if (killedPlayer.role.current === RoleNames.RUSTY_SWORD_KNIGHT) {\n return this.applyRustySwordKnightDeathOutcomes(killedPlayer, clonedGame, death);\n }\n return clonedGame;\n }\n\n private applyPlayerDeathOutcomes(killedPlayer: Player, game: Game, death: PlayerDeath): Game {\n let clonedGame = createGame(game);\n let clonedPlayerToKill = createPlayer(killedPlayer);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"applyPlayerDeathOutcomes\", { gameId: game._id, playerId: killedPlayer._id });\n clonedGame = this.applyPlayerRoleDeathOutcomes(clonedPlayerToKill, clonedGame, death);\n clonedPlayerToKill = getPlayerWithIdOrThrow(clonedPlayerToKill._id, clonedGame, cantFindPlayerException);\n return this.applyPlayerAttributesDeathOutcomes(clonedPlayerToKill, clonedGame);\n }\n\n private killPlayer(playerToKill: Player, game: Game, death: PlayerDeath): Game {\n let clonedGame = createGame(game);\n let clonedPlayerToKill = createPlayer(playerToKill);\n const cantFindPlayerException = createCantFindPlayerUnexpectedException(\"killPlayer\", { gameId: game._id, playerId: playerToKill._id });\n clonedPlayerToKill.isAlive = false;\n clonedPlayerToKill.role.isRevealed = true;\n clonedPlayerToKill.death = createPlayerDeath(death);\n clonedGame = updatePlayerInGame(clonedPlayerToKill._id, clonedPlayerToKill, clonedGame);\n clonedPlayerToKill = getPlayerWithIdOrThrow(clonedPlayerToKill._id, clonedGame, cantFindPlayerException);\n clonedGame = this.applyPlayerDeathOutcomes(clonedPlayerToKill, clonedGame, death);\n clonedPlayerToKill = getPlayerWithIdOrThrow(clonedPlayerToKill._id, clonedGame, cantFindPlayerException);\n return updatePlayerInGame(clonedPlayerToKill._id, this.removePlayerAttributesAfterDeath(clonedPlayerToKill), clonedGame);\n }\n\n private getPlayerToKillInGame(playerId: Types.ObjectId, game: Game): Player {\n const exceptionInterpolations = { gameId: game._id, playerId };\n const playerToKill = getPlayerWithIdOrThrow(playerId, game, createCantFindPlayerUnexpectedException(\"getPlayerToKillInGame\", exceptionInterpolations));\n if (!playerToKill.isAlive) {\n throw createPlayerIsDeadUnexpectedException(\"getPlayerToKillInGame\", exceptionInterpolations);\n }\n return playerToKill;\n }\n}" }, "src/modules/game/types/game-with-current-play.ts": { "language": "typescript", @@ -94405,7 +94551,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "1025" + "1026" ], "location": { "end": { @@ -94427,10 +94573,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "1025" + "1026" ], "coveredBy": [ - "1025" + "1026" ], "location": { "end": { @@ -94452,7 +94598,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "1025" + "1026" ], "location": { "end": { @@ -94474,10 +94620,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "1025" + "1026" ], "coveredBy": [ - "1025" + "1026" ], "location": { "end": { @@ -94491,7 +94637,7 @@ } } ], - "source": "import { Controller, Get } from \"@nestjs/common\";\nimport { ApiOperation, ApiTags } from \"@nestjs/swagger\";\nimport { HealthCheck, HealthCheckService, MongooseHealthIndicator } from \"@nestjs/terminus\";\nimport type { HealthCheckResult, HealthIndicatorResult } from \"@nestjs/terminus\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\n\n@ApiTags(\"❤️ Health\")\n@Controller(API_RESOURCES.HEALTH)\nexport class HealthController {\n public constructor(\n private readonly health: HealthCheckService,\n private readonly mongoose: MongooseHealthIndicator,\n ) {}\n\n @Get()\n @ApiOperation({\n summary: \"Get health's status of the API\",\n description: \"The health will be defined against the MongoDB connection instance\",\n })\n @HealthCheck()\n private async check(): Promise {\n return this.health.check([async(): Promise => this.mongoose.pingCheck(\"mongoose\")]);\n }\n}" + "source": "import { Controller, Get } from \"@nestjs/common\";\nimport { ApiOperation, ApiTags } from \"@nestjs/swagger\";\nimport { HealthCheck, HealthCheckService, MongooseHealthIndicator } from \"@nestjs/terminus\";\nimport type { HealthCheckResult, HealthIndicatorResult } from \"@nestjs/terminus\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\n\n@ApiTags(\"❤️ Health\")\n@Controller(ApiResources.HEALTH)\nexport class HealthController {\n public constructor(\n private readonly health: HealthCheckService,\n private readonly mongoose: MongooseHealthIndicator,\n ) {}\n\n @Get()\n @ApiOperation({\n summary: \"Get health's status of the API\",\n description: \"The health will be defined against the MongoDB connection instance\",\n })\n @HealthCheck()\n private async check(): Promise {\n return this.health.check([async(): Promise => this.mongoose.pingCheck(\"mongoose\")]);\n }\n}" }, "src/modules/role/controllers/role.controller.ts": { "language": "typescript", @@ -94505,7 +94651,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "1026" + "1027" ], "location": { "end": { @@ -94519,7 +94665,7 @@ } } ], - "source": "import { Controller, Get, HttpStatus } from \"@nestjs/common\";\nimport { ApiOperation, ApiResponse, ApiTags } from \"@nestjs/swagger\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport { Role } from \"@/modules/role/types/role.type\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\n\n@ApiTags(\"🃏 Roles\")\n@Controller(API_RESOURCES.ROLES)\nexport class RoleController {\n @Get()\n @ApiOperation({ summary: \"Get all available roles for games\" })\n @ApiResponse({ status: HttpStatus.OK, type: Role, isArray: true })\n private getRoles(): readonly Role[] {\n return roles;\n }\n}" + "source": "import { Controller, Get, HttpStatus } from \"@nestjs/common\";\nimport { ApiOperation, ApiResponse, ApiTags } from \"@nestjs/swagger\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport { Role } from \"@/modules/role/types/role.type\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\n\n@ApiTags(\"🃏 Roles\")\n@Controller(ApiResources.ROLES)\nexport class RoleController {\n @Get()\n @ApiOperation({ summary: \"Get all available roles for games\" })\n @ApiResponse({ status: HttpStatus.OK, type: Role, isArray: true })\n private getRoles(): readonly Role[] {\n return ROLES;\n }\n}" }, "src/modules/role/helpers/role.factory.ts": { "language": "typescript", @@ -94533,7 +94679,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "1048" + "1049" ], "location": { "end": { @@ -94547,7 +94693,7 @@ } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { Role } from \"@/modules/role/types/role.type\";\n\nimport { plainToInstanceDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createRole(role: Role): Role {\n return plainToInstance(Role, toJSON(role), plainToInstanceDefaultOptions);\n}\n\nexport { createRole };" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { Role } from \"@/modules/role/types/role.type\";\n\nimport { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\n\nfunction createRole(role: Role): Role {\n return plainToInstance(Role, toJSON(role), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS);\n}\n\nexport { createRole };" }, "src/modules/role/helpers/role.helper.ts": { "language": "typescript", @@ -94556,13 +94702,12 @@ "id": "2829", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/modules/role/helpers/role.helper.ts(4,61): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/modules/role/helpers/role.helper.ts(4,60): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -94574,8 +94719,9 @@ "736", "737", "738", - "1005", - "1006" + "739", + "1006", + "1007" ], "location": { "end": { @@ -94583,7 +94729,7 @@ "line": 6 }, "start": { - "column": 68, + "column": 67, "line": 4 } } @@ -94597,11 +94743,10 @@ "testsCompleted": 15, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -94613,8 +94758,9 @@ "736", "737", "738", - "1005", - "1006" + "739", + "1006", + "1007" ], "location": { "end": { @@ -94631,16 +94777,15 @@ "id": "2831", "mutatorName": "ArrowFunction", "replacement": "() => undefined", - "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": false, "killedBy": [ - "734" + "735" ], "coveredBy": [ "493", - "727", "728", "729", "730", @@ -94652,8 +94797,9 @@ "736", "737", "738", - "1005", - "1006" + "739", + "1006", + "1007" ], "location": { "end": { @@ -94675,22 +94821,22 @@ "testsCompleted": 13, "static": false, "killedBy": [ - "727" + "728" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", "738", - "1005", - "1006" + "739", + "1006", + "1007" ], "location": { "end": { @@ -94707,27 +94853,27 @@ "id": "2833", "mutatorName": "ConditionalExpression", "replacement": "false", - "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "734" + "735" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", "738", - "1005", - "1006" + "739", + "1006", + "1007" ], "location": { "end": { @@ -94744,27 +94890,27 @@ "id": "2834", "mutatorName": "EqualityOperator", "replacement": "role.side !== side", - "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toIncludeAllMembers(expected)\n\nExpected list to have all of the following members:\n [{\"maxInGame\": 0, \"name\": \"seer\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"witch\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 0, \"name\": \"pied-piper\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"name\": \"villager\", \"side\": \"villagers\", \"type\": \"villager\"}]\nReceived:\n [{\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}, {\"maxInGame\": 99, \"minInGame\": undefined, \"name\": \"villager\", \"recommendedMinPlayers\": undefined, \"side\": \"villagers\", \"type\": \"villager\"}]\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:69:22)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 13, "static": false, "killedBy": [ - "734" + "735" ], "coveredBy": [ "493", - "727", "728", "729", "730", "731", - "734", + "732", "735", "736", "737", "738", - "1005", - "1006" + "739", + "1006", + "1007" ], "location": { "end": { @@ -94778,7 +94924,7 @@ } } ], - "source": "import type { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nfunction getRolesWithSide(roles: Role[], side: ROLE_SIDES): Role[] {\n return roles.filter(role => role.side === side);\n}\n\nexport { getRolesWithSide };" + "source": "import type { RoleSides } from \"@/modules/role/enums/role.enum\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nfunction getRolesWithSide(roles: Role[], side: RoleSides): Role[] {\n return roles.filter(role => role.side === side);\n}\n\nexport { getRolesWithSide };" }, "src/server/helpers/server.helper.ts": { "language": "typescript", @@ -94846,10 +94992,10 @@ "533", "534", "535", - "1025", "1026", - "1051", - "1052" + "1027", + "1052", + "1053" ], "location": { "end": { @@ -94928,10 +95074,10 @@ "533", "534", "535", - "1025", "1026", - "1051", - "1052" + "1027", + "1052", + "1053" ], "location": { "end": { @@ -94959,12 +95105,12 @@ "static": false, "killedBy": [], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -94986,15 +95132,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "930" + "931" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95016,12 +95162,12 @@ "static": false, "killedBy": [], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95043,15 +95189,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "929" + "930" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95073,15 +95219,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "929" + "930" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95103,15 +95249,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "926" + "927" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95133,15 +95279,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "930" + "931" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95163,15 +95309,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "930" + "931" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95193,15 +95339,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "930" + "931" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95223,15 +95369,15 @@ "testsCompleted": 6, "static": false, "killedBy": [ - "930" + "931" ], "coveredBy": [ - "925", "926", "927", "928", "929", - "930" + "930", + "931" ], "location": { "end": { @@ -95245,7 +95391,7 @@ } } ], - "source": "import { Logger, ValidationPipe } from \"@nestjs/common\";\nimport { NestFactory } from \"@nestjs/core\";\nimport { FastifyAdapter } from \"@nestjs/platform-fastify\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { fastifyServerDefaultOptions } from \"@/server/constants/server.constant\";\nimport { createSwaggerDocument } from \"@/server/swagger/swagger\";\n\nimport { validationPipeDefaultOptions } from \"@/shared/validation/constants/validation.constant\";\n\nimport { AppModule } from \"@/app.module\";\n\nasync function bootstrap(port = 3000): Promise {\n const app = await NestFactory.create(AppModule, new FastifyAdapter(fastifyServerDefaultOptions));\n app.useGlobalPipes(new ValidationPipe(validationPipeDefaultOptions));\n const documentationPath = \"docs\";\n createSwaggerDocument(documentationPath, app);\n app.useStaticAssets({\n root: `${process.cwd()}/public`,\n prefix: \"/public/\",\n });\n await app.listen(port, \"127.0.0.1\");\n const appUrl = await app.getUrl();\n Logger.log(`🐺 App is available at ${appUrl}`, \"NestApplication\");\n Logger.log(`📖 API Documentation is available at ${appUrl}/${documentationPath}`, \"NestApplication\");\n return app;\n}\n\nexport { bootstrap };" + "source": "import { Logger, ValidationPipe } from \"@nestjs/common\";\nimport { NestFactory } from \"@nestjs/core\";\nimport { FastifyAdapter } from \"@nestjs/platform-fastify\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { FASTIFY_SERVER_DEFAULT_OPTIONS } from \"@/server/constants/server.constant\";\nimport { createSwaggerDocument } from \"@/server/swagger/swagger\";\n\nimport { VALIDATION_PIPE_DEFAULT_OPTIONS } from \"@/shared/validation/constants/validation.constant\";\n\nimport { AppModule } from \"@/app.module\";\n\nasync function bootstrap(port = 3000): Promise {\n const app = await NestFactory.create(AppModule, new FastifyAdapter(FASTIFY_SERVER_DEFAULT_OPTIONS));\n app.useGlobalPipes(new ValidationPipe(VALIDATION_PIPE_DEFAULT_OPTIONS));\n const documentationPath = \"docs\";\n createSwaggerDocument(documentationPath, app);\n app.useStaticAssets({\n root: `${process.cwd()}/public`,\n prefix: \"/public/\",\n });\n await app.listen(port, \"127.0.0.1\");\n const appUrl = await app.getUrl();\n Logger.log(`🐺 App is available at ${appUrl}`, \"NestApplication\");\n Logger.log(`📖 API Documentation is available at ${appUrl}/${documentationPath}`, \"NestApplication\");\n return app;\n}\n\nexport { bootstrap };" }, "src/server/swagger/swagger.ts": { "language": "typescript", @@ -95259,12 +95405,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "931" + "932" ], "coveredBy": [ - "931", "932", - "933" + "933", + "934" ], "location": { "end": { @@ -95286,12 +95432,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "931" + "932" ], "coveredBy": [ - "931", "932", - "933" + "933", + "934" ], "location": { "end": { @@ -95313,9 +95459,9 @@ "static": false, "killedBy": [], "coveredBy": [ - "931", "932", - "933" + "933", + "934" ], "location": { "end": { @@ -95337,10 +95483,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "932" + "933" ], "coveredBy": [ - "932" + "933" ], "location": { "end": { @@ -95362,12 +95508,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "931" + "932" ], "coveredBy": [ - "931", "932", - "933" + "933", + "934" ], "location": { "end": { @@ -95389,12 +95535,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "933" + "934" ], "coveredBy": [ - "931", "932", - "933" + "933", + "934" ], "location": { "end": { @@ -95416,12 +95562,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "933" + "934" ], "coveredBy": [ - "931", "932", - "933" + "933", + "934" ], "location": { "end": { @@ -95443,12 +95589,12 @@ "testsCompleted": 3, "static": false, "killedBy": [ - "933" + "934" ], "coveredBy": [ - "931", "932", - "933" + "933", + "934" ], "location": { "end": { @@ -95471,7 +95617,7 @@ "id": "2855", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "src/shared/api/helpers/api.helper.ts(3,60): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", + "statusReason": "src/shared/api/helpers/api.helper.ts(3,59): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, "killedBy": [], @@ -95479,21 +95625,20 @@ "495", "521", "522", - "525", "526", "527", "528", "533", - "986", - "1014", + "987", "1015", "1016", "1017", - "1039", + "1018", "1040", "1041", "1042", - "1043" + "1043", + "1044" ], "location": { "end": { @@ -95501,7 +95646,7 @@ "line": 12 }, "start": { - "column": 67, + "column": 66, "line": 3 } } @@ -95510,7 +95655,7 @@ "id": "2856", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "src/shared/api/helpers/api.helper.ts(4,9): error TS2739: Type '{}' is missing the following properties from type 'Record': games, players, \"game-additional-cards\", roles, health\n", + "statusReason": "src/shared/api/helpers/api.helper.ts(4,9): error TS2739: Type '{}' is missing the following properties from type 'Record': games, players, \"game-additional-cards\", roles, health\n", "status": "CompileError", "static": false, "killedBy": [], @@ -95518,21 +95663,20 @@ "495", "521", "522", - "525", "526", "527", "528", "533", - "986", - "1014", + "987", "1015", "1016", "1017", - "1039", + "1018", "1040", "1041", "1042", - "1043" + "1043", + "1044" ], "location": { "end": { @@ -95540,7 +95684,7 @@ "line": 10 }, "start": { - "column": 64, + "column": 63, "line": 4 } } @@ -95560,29 +95704,28 @@ "495", "521", "522", - "525", "526", "527", "528", "533", - "986", - "1014", + "987", "1015", "1016", "1017", - "1039", + "1018", "1040", "1041", "1042", - "1043" + "1043", + "1044" ], "location": { "end": { - "column": 34, + "column": 33, "line": 5 }, "start": { - "column": 28, + "column": 27, "line": 5 } } @@ -95591,36 +95734,39 @@ "id": "2858", "mutatorName": "StringLiteral", "replacement": "\"\"", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n \"error\": \"Game Play - Player in `targets.player` is not in the game players\",\n- \"message\": \"Player with id \\\"416a1c1bae8c3dca888aef5f\\\" not found\",\n+ \"message\": \" with id \\\"416a1c1bae8c3dca888aef5f\\\" not found\",\n \"statusCode\": 404,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:840:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 17, "static": false, - "killedBy": [], + "killedBy": [ + "528" + ], "coveredBy": [ "495", "521", "522", - "525", "526", "527", "528", "533", - "986", - "1014", + "987", "1015", "1016", "1017", - "1039", + "1018", "1040", "1041", "1042", - "1043" + "1043", + "1044" ], "location": { "end": { - "column": 38, + "column": 37, "line": 6 }, "start": { - "column": 30, + "column": 29, "line": 6 } } @@ -95634,35 +95780,34 @@ "testsCompleted": 18, "static": false, "killedBy": [ - "1041" + "1042" ], "coveredBy": [ "495", "521", "522", - "525", "526", "527", "528", "533", - "986", - "1014", + "987", "1015", "1016", "1017", - "1039", + "1018", "1040", "1041", "1042", - "1043" + "1043", + "1044" ], "location": { "end": { - "column": 61, + "column": 60, "line": 7 }, "start": { - "column": 44, + "column": 43, "line": 7 } } @@ -95676,35 +95821,34 @@ "testsCompleted": 18, "static": false, "killedBy": [ - "1042" + "1043" ], "coveredBy": [ "495", "521", "522", - "525", "526", "527", "528", "533", - "986", - "1014", + "987", "1015", "1016", "1017", - "1039", + "1018", "1040", "1041", "1042", - "1043" + "1043", + "1044" ], "location": { "end": { - "column": 34, + "column": 33, "line": 8 }, "start": { - "column": 28, + "column": 27, "line": 8 } } @@ -95718,41 +95862,40 @@ "testsCompleted": 18, "static": false, "killedBy": [ - "1043" + "1044" ], "coveredBy": [ "495", "521", "522", - "525", "526", "527", "528", "533", - "986", - "1014", + "987", "1015", "1016", "1017", - "1039", + "1018", "1040", "1041", "1042", - "1043" + "1043", + "1044" ], "location": { "end": { - "column": 37, + "column": 36, "line": 9 }, "start": { - "column": 29, + "column": 28, "line": 9 } } } ], - "source": "import { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\n\nfunction getResourceSingularForm(resource: API_RESOURCES): string {\n const resourceSingularForms: Record = {\n [API_RESOURCES.GAMES]: \"game\",\n [API_RESOURCES.PLAYERS]: \"player\",\n [API_RESOURCES.GAME_ADDITIONAL_CARDS]: \"additional card\",\n [API_RESOURCES.ROLES]: \"role\",\n [API_RESOURCES.HEALTH]: \"health\",\n };\n return resourceSingularForms[resource];\n}\n\nexport { getResourceSingularForm };" + "source": "import { ApiResources } from \"@/shared/api/enums/api.enum\";\n\nfunction getResourceSingularForm(resource: ApiResources): string {\n const resourceSingularForms: Record = {\n [ApiResources.GAMES]: \"game\",\n [ApiResources.PLAYERS]: \"player\",\n [ApiResources.GAME_ADDITIONAL_CARDS]: \"additional card\",\n [ApiResources.ROLES]: \"role\",\n [ApiResources.HEALTH]: \"health\",\n };\n return resourceSingularForms[resource];\n}\n\nexport { getResourceSingularForm };" }, "src/shared/api/pipes/validate-mongo-id.pipe.ts": { "language": "typescript", @@ -95785,13 +95928,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -95832,13 +95975,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -95879,13 +96022,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -95926,13 +96069,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -95973,13 +96116,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -96020,13 +96163,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -96070,13 +96213,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -96117,13 +96260,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -96164,13 +96307,13 @@ "533", "534", "535", - "985", "986", "987", - "1007", + "988", "1008", "1009", - "1010" + "1010", + "1011" ], "location": { "end": { @@ -96187,12 +96330,12 @@ "id": "2871", "mutatorName": "BlockStatement", "replacement": "{}", - "statusReason": "Error: expect(received).rejects.toThrow(expected)\n\nExpected message: \"Game with id \\\"b7efc2eefd601e3bbc8b85fc\\\" not found\"\nReceived message: \"Validation failed (Mongo ObjectId is expected)\"\n\n 64 | }\n 65 | }\n > 66 | throw new BadRequestException(stryMutAct_9fa48(\"2872\") ? \"\" : (stryCov_9fa48(\"2872\"), \"Validation failed (Mongo ObjectId is expected)\"));\n | ^\n 67 | }\n 68 | }\n 69 | }\n\n at ValidateMongoId.transform (src/shared/api/pipes/validate-mongo-id.pipe.ts:66:13)\n at GetGameByIdPipe.transform (src/modules/game/controllers/pipes/get-game-by-id.pipe.ts:64:44)\n at Object. (tests/unit/specs/modules/game/controllers/pipes/get-game-by-id.pipe.spec.ts:51:36)\n at Object.toThrow (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:218:22)\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/controllers/pipes/get-game-by-id.pipe.spec.ts:51:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 404\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:257:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 19, "static": false, "killedBy": [ - "986" + "495" ], "coveredBy": [ "495", @@ -96210,10 +96353,10 @@ "533", "534", "535", - "986", "987", - "1007", - "1008" + "988", + "1008", + "1009" ], "location": { "end": { @@ -96242,9 +96385,9 @@ "520", "524", "532", - "985", - "1009", - "1010" + "986", + "1010", + "1011" ], "location": { "end": { @@ -96296,7 +96439,7 @@ "596", "597", "598", - "934" + "935" ], "location": { "end": { @@ -96313,9 +96456,13 @@ "id": "2874", "mutatorName": "ObjectLiteral", "replacement": "{}", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 1\n\n Object {\n- \"error\": \"Can't find player with id \\\"d8b964fa4ac5ae6d0bb1b87e\\\" in game \\\"fe41cc1829f5ea54cca32dfa\\\"\",\n+ \"error\": \"Can't find player with id \\\"undefined\\\" in game \\\"undefined\\\"\",\n \"message\": \"Unexpected exception in werewolvesEat\",\n \"statusCode\": 500,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/shared/exception/helpers/unexpected-exception.factory.spec.ts:14:39)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 25, "static": false, - "killedBy": [], + "killedBy": [ + "935" + ], "coveredBy": [ "328", "329", @@ -96341,15 +96488,15 @@ "596", "597", "598", - "934" + "935" ], "location": { "end": { - "column": 164, + "column": 162, "line": 10 }, "start": { - "column": 104, + "column": 102, "line": 10 } } @@ -96363,7 +96510,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "935" + "936" ], "location": { "end": { @@ -96385,18 +96532,18 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "935" + "936" ], "coveredBy": [ - "935" + "936" ], "location": { "end": { - "column": 146, + "column": 144, "line": 15 }, "start": { - "column": 86, + "column": 84, "line": 15 } } @@ -96410,8 +96557,8 @@ "static": false, "killedBy": [], "coveredBy": [ - "692", - "936" + "693", + "937" ], "location": { "end": { @@ -96433,7 +96580,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "937" + "938" ], "location": { "end": { @@ -96455,18 +96602,18 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "937" + "938" ], "coveredBy": [ - "937" + "938" ], "location": { "end": { - "column": 121, + "column": 119, "line": 24 }, "start": { - "column": 92, + "column": 90, "line": 24 } } @@ -96480,7 +96627,7 @@ "static": false, "killedBy": [], "coveredBy": [ - "938" + "939" ], "location": { "end": { @@ -96502,24 +96649,24 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "938" + "939" ], "coveredBy": [ - "938" + "939" ], "location": { "end": { - "column": 131, + "column": 129, "line": 28 }, "start": { - "column": 93, + "column": 91, "line": 28 } } } ], - "source": "import type { Types } from \"mongoose\";\n\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\n\nimport { UNEXPECTED_EXCEPTION_REASONS } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nfunction createCantFindPlayerUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId; playerId: Types.ObjectId }): UnexpectedException {\n const { gameId, playerId } = interpolations;\n return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: gameId.toString(), playerId: playerId.toString() });\n}\n\nfunction createPlayerIsDeadUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId; playerId: Types.ObjectId }): UnexpectedException {\n const { gameId, playerId } = interpolations;\n return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.PLAYER_IS_DEAD, { gameId: gameId.toString(), playerId: playerId.toString() });\n}\n\nfunction createCantGenerateGamePlaysUnexpectedException(scope: string): UnexpectedException {\n return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.CANT_GENERATE_GAME_PLAYS);\n}\n\nfunction createNoCurrentGamePlayUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId }): UnexpectedException {\n const { gameId } = interpolations;\n return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.NO_CURRENT_GAME_PLAY, { gameId: gameId.toString() });\n}\n\nfunction createNoGamePlayPriorityUnexpectedException(scope: string, gamePlay: GamePlay): UnexpectedException {\n return new UnexpectedException(scope, UNEXPECTED_EXCEPTION_REASONS.NO_GAME_PLAY_PRIORITY, { gamePlay: JSON.stringify(gamePlay) });\n}\n\nexport {\n createCantFindPlayerUnexpectedException,\n createPlayerIsDeadUnexpectedException,\n createCantGenerateGamePlaysUnexpectedException,\n createNoCurrentGamePlayUnexpectedException,\n createNoGamePlayPriorityUnexpectedException,\n};" + "source": "import type { Types } from \"mongoose\";\n\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\n\nimport { UnexpectedExceptionReasons } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nfunction createCantFindPlayerUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId; playerId: Types.ObjectId }): UnexpectedException {\n const { gameId, playerId } = interpolations;\n return new UnexpectedException(scope, UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: gameId.toString(), playerId: playerId.toString() });\n}\n\nfunction createPlayerIsDeadUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId; playerId: Types.ObjectId }): UnexpectedException {\n const { gameId, playerId } = interpolations;\n return new UnexpectedException(scope, UnexpectedExceptionReasons.PLAYER_IS_DEAD, { gameId: gameId.toString(), playerId: playerId.toString() });\n}\n\nfunction createCantGenerateGamePlaysUnexpectedException(scope: string): UnexpectedException {\n return new UnexpectedException(scope, UnexpectedExceptionReasons.CANT_GENERATE_GAME_PLAYS);\n}\n\nfunction createNoCurrentGamePlayUnexpectedException(scope: string, interpolations: { gameId: Types.ObjectId }): UnexpectedException {\n const { gameId } = interpolations;\n return new UnexpectedException(scope, UnexpectedExceptionReasons.NO_CURRENT_GAME_PLAY, { gameId: gameId.toString() });\n}\n\nfunction createNoGamePlayPriorityUnexpectedException(scope: string, gamePlay: GamePlay): UnexpectedException {\n return new UnexpectedException(scope, UnexpectedExceptionReasons.NO_GAME_PLAY_PRIORITY, { gamePlay: JSON.stringify(gamePlay) });\n}\n\nexport {\n createCantFindPlayerUnexpectedException,\n createPlayerIsDeadUnexpectedException,\n createCantGenerateGamePlaysUnexpectedException,\n createNoCurrentGamePlayUnexpectedException,\n createNoGamePlayPriorityUnexpectedException,\n};" }, "src/shared/exception/types/bad-game-play-payload-exception.type.ts": { "language": "typescript", @@ -96534,7 +96681,7 @@ "killedBy": [], "coveredBy": [ "529", - "1038" + "1039" ], "location": { "end": { @@ -96542,7 +96689,7 @@ "line": 9 }, "start": { - "column": 61, + "column": 57, "line": 6 } } @@ -96551,16 +96698,16 @@ "id": "2883", "mutatorName": "StringLiteral", "replacement": "``", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 1\n\n Object {\n- \"error\": \"There are too much targets for this current game's state\",\n- \"message\": \"Bad game play payload\",\n+ \"message\": \"There are too much targets for this current game's state\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/shared/exception/types/bad-game-play-payload-exception.type.spec.ts:12:39)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 1\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n- \"message\": \"Bad game play payload\",\n+ \"message\": \"`votes` is required on this current game's state\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 2, "static": false, "killedBy": [ - "1038" + "529" ], "coveredBy": [ "529", - "1038" + "1039" ], "location": { "end": { @@ -96577,7 +96724,7 @@ "id": "2884", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 0\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 0\n\n Object {\n- \"error\": \"`votes` is required on this current game's state\",\n \"message\": \"Bad game play payload\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:870:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 2, "static": false, @@ -96586,7 +96733,7 @@ ], "coveredBy": [ "529", - "1038" + "1039" ], "location": { "end": { @@ -96600,7 +96747,7 @@ } } ], - "source": "import { BadRequestException } from \"@nestjs/common\";\n\nimport type { BAD_GAME_PLAY_PAYLOAD_REASONS } from \"@/shared/exception/enums/bad-game-play-payload-error.enum\";\n\nclass BadGamePlayPayloadException extends BadRequestException {\n public constructor(reason: BAD_GAME_PLAY_PAYLOAD_REASONS) {\n const message = `Bad game play payload`;\n super(message, { description: reason });\n }\n}\n\nexport { BadGamePlayPayloadException };" + "source": "import { BadRequestException } from \"@nestjs/common\";\n\nimport type { BadGamePlayPayloadReasons } from \"@/shared/exception/enums/bad-game-play-payload-error.enum\";\n\nclass BadGamePlayPayloadException extends BadRequestException {\n public constructor(reason: BadGamePlayPayloadReasons) {\n const message = `Bad game play payload`;\n super(message, { description: reason });\n }\n}\n\nexport { BadGamePlayPayloadException };" }, "src/shared/exception/types/bad-resource-mutation-exception.type.ts": { "language": "typescript", @@ -96615,8 +96762,8 @@ "killedBy": [], "coveredBy": [ "522", - "1016", - "1017" + "1017", + "1018" ], "location": { "end": { @@ -96624,7 +96771,7 @@ "line": 13 }, "start": { - "column": 99, + "column": 95, "line": 9 } } @@ -96633,7 +96780,7 @@ "id": "2886", "mutatorName": "StringLiteral", "replacement": "``", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 1\n\n Object {\n- \"error\": \"Game doesn't have status with value \\\"playing\\\"\",\n- \"message\": \"Bad mutation for Game with id \\\"acacce0bebc12d3e3f6ccbf2\\\"\",\n+ \"message\": \"Game doesn't have status with value \\\"playing\\\"\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:741:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 1\n\n Object {\n- \"error\": \"Game doesn't have status with value \\\"playing\\\"\",\n- \"message\": \"Bad mutation for Game with id \\\"6fab325e1dfbded00c572d63\\\"\",\n+ \"message\": \"Game doesn't have status with value \\\"playing\\\"\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:741:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -96642,8 +96789,8 @@ ], "coveredBy": [ "522", - "1016", - "1017" + "1017", + "1018" ], "location": { "end": { @@ -96660,7 +96807,7 @@ "id": "2887", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 0\n\n Object {\n- \"error\": \"Game doesn't have status with value \\\"playing\\\"\",\n \"message\": \"Bad mutation for Game with id \\\"4d92bb22b4f2af8e992534ae\\\"\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:741:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 0\n\n Object {\n- \"error\": \"Game doesn't have status with value \\\"playing\\\"\",\n \"message\": \"Bad mutation for Game with id \\\"cec14ea3bef5ab494f0a9882\\\"\",\n \"statusCode\": 400,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:741:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", "testsCompleted": 3, "static": false, @@ -96669,8 +96816,8 @@ ], "coveredBy": [ "522", - "1016", - "1017" + "1017", + "1018" ], "location": { "end": { @@ -96684,7 +96831,7 @@ } } ], - "source": "import { BadRequestException } from \"@nestjs/common\";\nimport { upperFirst } from \"lodash\";\n\nimport type { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport type { BAD_RESOURCE_MUTATION_REASONS } from \"@/shared/exception/enums/bad-resource-mutation-error.enum\";\nimport { getResourceSingularForm } from \"@/shared/api/helpers/api.helper\";\n\nclass BadResourceMutationException extends BadRequestException {\n public constructor(resource: API_RESOURCES, id: string, reason?: BAD_RESOURCE_MUTATION_REASONS) {\n const resourceSingularForm = getResourceSingularForm(resource);\n const message = `Bad mutation for ${upperFirst(resourceSingularForm)} with id \"${id}\"`;\n super(message, { description: reason });\n }\n}\n\nexport { BadResourceMutationException };" + "source": "import { BadRequestException } from \"@nestjs/common\";\nimport { upperFirst } from \"lodash\";\n\nimport type { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport type { BadResourceMutationReasons } from \"@/shared/exception/enums/bad-resource-mutation-error.enum\";\nimport { getResourceSingularForm } from \"@/shared/api/helpers/api.helper\";\n\nclass BadResourceMutationException extends BadRequestException {\n public constructor(resource: ApiResources, id: string, reason?: BadResourceMutationReasons) {\n const resourceSingularForm = getResourceSingularForm(resource);\n const message = `Bad mutation for ${upperFirst(resourceSingularForm)} with id \"${id}\"`;\n super(message, { description: reason });\n }\n}\n\nexport { BadResourceMutationException };" }, "src/shared/exception/types/resource-not-found-exception.type.ts": { "language": "typescript", @@ -96700,14 +96847,13 @@ "coveredBy": [ "495", "521", - "525", "526", "527", "528", "533", - "986", - "1014", - "1015" + "987", + "1015", + "1016" ], "location": { "end": { @@ -96715,7 +96861,7 @@ "line": 13 }, "start": { - "column": 96, + "column": 92, "line": 9 } } @@ -96734,14 +96880,13 @@ "coveredBy": [ "495", "521", - "525", "526", "527", "528", "533", - "986", - "1014", - "1015" + "987", + "1015", + "1016" ], "location": { "end": { @@ -96758,9 +96903,9 @@ "id": "2890", "mutatorName": "ObjectLiteral", "replacement": "{}", - "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 0\n\n Object {\n- \"error\": \"Game Play - Player in `targets.player` is not in the game players\",\n \"message\": \"Player with id \\\"caccfccc3c327b06d27bfcf1\\\" not found\",\n \"statusCode\": 404,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:840:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 1\n+ Received + 0\n\n Object {\n- \"error\": \"Game Play - Player in `targets.player` is not in the game players\",\n \"message\": \"Player with id \\\"ef34c3fdd2bc71ea5d83ec25\\\" not found\",\n \"statusCode\": 404,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:840:50)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", "status": "Killed", - "testsCompleted": 10, + "testsCompleted": 9, "static": false, "killedBy": [ "528" @@ -96768,14 +96913,13 @@ "coveredBy": [ "495", "521", - "525", "526", "527", "528", "533", - "986", - "1014", - "1015" + "987", + "1015", + "1016" ], "location": { "end": { @@ -96789,7 +96933,7 @@ } } ], - "source": "import { NotFoundException } from \"@nestjs/common\";\nimport { upperFirst } from \"lodash\";\n\nimport type { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport type { RESOURCE_NOT_FOUND_REASONS } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { getResourceSingularForm } from \"@/shared/api/helpers/api.helper\";\n\nclass ResourceNotFoundException extends NotFoundException {\n public constructor(resource: API_RESOURCES, id: string, reason?: RESOURCE_NOT_FOUND_REASONS) {\n const resourceSingularForm = getResourceSingularForm(resource);\n const message = `${upperFirst(resourceSingularForm)} with id \"${id}\" not found`;\n super(message, { description: reason });\n }\n}\n\nexport { ResourceNotFoundException };" + "source": "import { NotFoundException } from \"@nestjs/common\";\nimport { upperFirst } from \"lodash\";\n\nimport type { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport type { ResourceNotFoundReasons } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { getResourceSingularForm } from \"@/shared/api/helpers/api.helper\";\n\nclass ResourceNotFoundException extends NotFoundException {\n public constructor(resource: ApiResources, id: string, reason?: ResourceNotFoundReasons) {\n const resourceSingularForm = getResourceSingularForm(resource);\n const message = `${upperFirst(resourceSingularForm)} with id \"${id}\" not found`;\n super(message, { description: reason });\n }\n}\n\nexport { ResourceNotFoundException };" }, "src/shared/exception/types/unexpected-exception.type.ts": { "language": "typescript", @@ -96836,14 +96980,14 @@ "596", "597", "598", - "692", - "934", + "693", "935", "936", "937", "938", - "1012", - "1013" + "939", + "1013", + "1014" ], "location": { "end": { @@ -96851,7 +96995,7 @@ "line": 11 }, "start": { - "column": 121, + "column": 119, "line": 8 } } @@ -96860,9 +97004,13 @@ "id": "2892", "mutatorName": "StringLiteral", "replacement": "``", - "status": "Timeout", + "statusReason": "Error: expect(received).toStrictEqual(expected) // deep equality\n\n- Expected - 2\n+ Received + 1\n\n Object {\n- \"error\": \"Can't find player with id \\\"320fc45babf1789cc9bc7d9b\\\" in game \\\"eabcbd984f1f27bceaa46d28\\\"\",\n- \"message\": \"Unexpected exception in werewolvesEat\",\n+ \"message\": \"Can't find player with id \\\"320fc45babf1789cc9bc7d9b\\\" in game \\\"eabcbd984f1f27bceaa46d28\\\"\",\n \"statusCode\": 500,\n }\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/shared/exception/helpers/unexpected-exception.factory.spec.ts:14:39)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 41, "static": false, - "killedBy": [], + "killedBy": [ + "935" + ], "coveredBy": [ "328", "329", @@ -96897,14 +97045,14 @@ "596", "597", "598", - "692", - "934", + "693", "935", "936", "937", "938", - "1012", - "1013" + "939", + "1013", + "1014" ], "location": { "end": { @@ -96958,14 +97106,14 @@ "596", "597", "598", - "692", - "934", + "693", "935", "936", "937", "938", - "1012", - "1013" + "939", + "1013", + "1014" ], "location": { "end": { @@ -96979,19 +97127,22 @@ } } ], - "source": "import { InternalServerErrorException } from \"@nestjs/common\";\nimport { template } from \"radash\";\n\nimport type { UNEXPECTED_EXCEPTION_REASONS } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport type { ExceptionInterpolations } from \"@/shared/exception/types/exception.type\";\n\nclass UnexpectedException extends InternalServerErrorException {\n public constructor(scope: string, reason: UNEXPECTED_EXCEPTION_REASONS, interpolations: ExceptionInterpolations = {}) {\n const message = `Unexpected exception in ${scope}`;\n super(message, { description: template(reason, interpolations) });\n }\n}\n\nexport { UnexpectedException };" + "source": "import { InternalServerErrorException } from \"@nestjs/common\";\nimport { template } from \"radash\";\n\nimport type { UnexpectedExceptionReasons } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport type { ExceptionInterpolations } from \"@/shared/exception/types/exception.type\";\n\nclass UnexpectedException extends InternalServerErrorException {\n public constructor(scope: string, reason: UnexpectedExceptionReasons, interpolations: ExceptionInterpolations = {}) {\n const message = `Unexpected exception in ${scope}`;\n super(message, { description: template(reason, interpolations) });\n }\n}\n\nexport { UnexpectedException };" }, "src/shared/validation/helpers/validation.helper.ts": { "language": "typescript", "mutants": [ { - "id": "2894", - "mutatorName": "BlockStatement", - "replacement": "{}", - "statusReason": "src/shared/validation/helpers/validation.helper.ts(3,102): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", - "status": "CompileError", + "id": "2895", + "mutatorName": "ConditionalExpression", + "replacement": "true", + "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"64ea3837bdb4914367c99fac\", \"createdAt\": 2023-08-26T17:36:55.040Z, \"gameId\": \"12cac92c79fc6ccaf0bafd57\", \"phase\": \"night\", \"play\": {\"action\": \"sniff\", \"source\": {\"name\": \"sheriff\", \"players\": []}}, \"tick\": 6838134383837184, \"turn\": 7183320001544192}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:114:13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 39, "static": false, - "killedBy": [], + "killedBy": [ + "611" + ], "coveredBy": [ "530", "531", @@ -97028,32 +97179,33 @@ "635", "636", "637", - "1034", + "638", "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { - "column": 2, - "line": 6 + "column": 128, + "line": 5 }, "start": { - "column": 110, - "line": 3 + "column": 10, + "line": 5 } } }, { - "id": "2895", + "id": "2896", "mutatorName": "ConditionalExpression", - "replacement": "true", - "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"64ea3837bdb4914367c99fac\", \"createdAt\": 2023-08-26T17:36:55.040Z, \"gameId\": \"12cac92c79fc6ccaf0bafd57\", \"phase\": \"night\", \"play\": {\"action\": \"sniff\", \"source\": {\"name\": \"sheriff\", \"players\": []}}, \"tick\": 6838134383837184, \"turn\": 7183320001544192}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:114:13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "replacement": "false", + "statusReason": "ValidationError: GameHistoryRecord validation failed: play.source.players: Path `play.source.players` length is less than minimum allowed value (1).\n at model.Object..Document.invalidate (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/mongoose/lib/document.js:3162:32)\n at SingleNested.Object..Subdocument.invalidate (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/mongoose/lib/types/subdocument.js:229:12)\n at SingleNested.Object..Subdocument.invalidate (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/mongoose/lib/types/subdocument.js:229:12)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/mongoose/lib/document.js:2955:17\n at cb (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/mongoose/lib/schema/documentarray.js:235:14)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/mongoose/lib/schematype.js:1368:9\n at processTicksAndRejections (node:internal/process/task_queues:77:11)", "status": "Killed", "testsCompleted": 39, "static": false, "killedBy": [ - "611" + "607" ], "coveredBy": [ "530", @@ -97091,10 +97243,11 @@ "635", "636", "637", - "1034", + "638", "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { @@ -97108,12 +97261,16 @@ } }, { - "id": "2896", - "mutatorName": "ConditionalExpression", - "replacement": "false", - "status": "Timeout", + "id": "2897", + "mutatorName": "LogicalOperator", + "replacement": "minItems === undefined || arrayMinSize(array, minItems) || maxItems === undefined || arrayMaxSize(array, maxItems)", + "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"64ea3846682a459e28b7212f\", \"createdAt\": 2023-08-26T17:37:10.230Z, \"gameId\": \"fa276ee36f0571a0bc96495c\", \"phase\": \"day\", \"play\": {\"action\": \"settle-votes\", \"source\": {\"name\": \"sheriff\", \"players\": []}}, \"tick\": 8119484208381952, \"turn\": 2526908321366016}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:114:13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "status": "Killed", + "testsCompleted": 39, "static": false, - "killedBy": [], + "killedBy": [ + "611" + ], "coveredBy": [ "530", "531", @@ -97150,10 +97307,11 @@ "635", "636", "637", - "1034", + "638", "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { @@ -97167,10 +97325,10 @@ } }, { - "id": "2897", - "mutatorName": "LogicalOperator", - "replacement": "minItems === undefined || arrayMinSize(array, minItems) || maxItems === undefined || arrayMaxSize(array, maxItems)", - "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"64ea3846682a459e28b7212f\", \"createdAt\": 2023-08-26T17:37:10.230Z, \"gameId\": \"fa276ee36f0571a0bc96495c\", \"phase\": \"day\", \"play\": {\"action\": \"settle-votes\", \"source\": {\"name\": \"sheriff\", \"players\": []}}, \"tick\": 8119484208381952, \"turn\": 2526908321366016}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:114:13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "id": "2898", + "mutatorName": "ConditionalExpression", + "replacement": "true", + "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"64ea384fa42b88154b434c60\", \"createdAt\": 2023-08-26T17:37:19.977Z, \"gameId\": \"eae1b413e002a533aa18fea3\", \"phase\": \"day\", \"play\": {\"action\": \"eat\", \"source\": {\"name\": \"sheriff\", \"players\": []}}, \"tick\": 2187952935403520, \"turn\": 6778484728791040}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:114:13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 39, "static": false, @@ -97213,32 +97371,33 @@ "635", "636", "637", - "1034", + "638", "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { - "column": 128, + "column": 66, "line": 5 }, "start": { - "column": 10, + "column": 11, "line": 5 } } }, { - "id": "2898", + "id": "2902", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).rejects.toThrow()\n\nReceived promise resolved instead of rejected\nResolved to value: {\"_id\": \"64ea384fa42b88154b434c60\", \"createdAt\": 2023-08-26T17:37:19.977Z, \"gameId\": \"eae1b413e002a533aa18fea3\", \"phase\": \"day\", \"play\": {\"action\": \"eat\", \"source\": {\"name\": \"sheriff\", \"players\": []}}, \"tick\": 2187952935403520, \"turn\": 6778484728791040}\n at expect (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/expect/build/index.js:113:15)\n at /Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts:114:13\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-each/build/bind.js:81:13)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/shared/validation/helpers/validation.helper.spec.ts:15:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", - "testsCompleted": 39, + "testsCompleted": 37, "static": false, "killedBy": [ - "611" + "1037" ], "coveredBy": [ "530", @@ -97249,7 +97408,6 @@ "608", "609", "610", - "611", "612", "613", "614", @@ -97276,30 +97434,29 @@ "635", "636", "637", - "1034", + "638", "1035", - "1036", - "1037" + "1037", + "1038" ], "location": { "end": { - "column": 66, + "column": 127, "line": 5 }, "start": { - "column": 11, + "column": 72, "line": 5 } } }, { - "id": "2899", - "mutatorName": "LogicalOperator", - "replacement": "minItems === undefined && arrayMinSize(array, minItems)", - "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,57): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.\n", + "id": "2894", + "mutatorName": "BlockStatement", + "replacement": "{}", + "statusReason": "src/shared/validation/helpers/validation.helper.ts(3,102): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\n", "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ "530", "531", @@ -97336,30 +97493,30 @@ "635", "636", "637", - "1034", + "638", "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { - "column": 66, - "line": 5 + "column": 2, + "line": 6 }, "start": { - "column": 11, - "line": 5 + "column": 110, + "line": 3 } } }, { - "id": "2900", - "mutatorName": "ConditionalExpression", - "replacement": "false", - "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,40): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.\n Type 'undefined' is not assignable to type 'number'.\n", + "id": "2903", + "mutatorName": "LogicalOperator", + "replacement": "maxItems === undefined && arrayMaxSize(array, maxItems)", + "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,118): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.\n", "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ "530", "531", @@ -97369,7 +97526,6 @@ "608", "609", "610", - "611", "612", "613", "614", @@ -97396,30 +97552,29 @@ "635", "636", "637", - "1034", + "638", "1035", - "1036", - "1037" + "1037", + "1038" ], "location": { "end": { - "column": 33, + "column": 127, "line": 5 }, "start": { - "column": 11, + "column": 72, "line": 5 } } }, { - "id": "2901", - "mutatorName": "EqualityOperator", - "replacement": "minItems !== undefined", - "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,57): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.\n", + "id": "2900", + "mutatorName": "ConditionalExpression", + "replacement": "false", + "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,40): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.\n Type 'undefined' is not assignable to type 'number'.\n", "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ "530", "531", @@ -97456,10 +97611,11 @@ "635", "636", "637", - "1034", + "638", "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { @@ -97473,16 +97629,12 @@ } }, { - "id": "2902", - "mutatorName": "ConditionalExpression", - "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: false\nReceived: true\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/shared/validation/helpers/validation.helper.spec.ts:15:63)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "Killed", - "testsCompleted": 37, + "id": "2899", + "mutatorName": "LogicalOperator", + "replacement": "minItems === undefined && arrayMinSize(array, minItems)", + "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,57): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.\n", + "status": "CompileError", "static": false, - "killedBy": [ - "1036" - ], "coveredBy": [ "530", "531", @@ -97492,6 +97644,7 @@ "608", "609", "610", + "611", "612", "613", "614", @@ -97518,29 +97671,30 @@ "635", "636", "637", - "1034", + "638", + "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { - "column": 127, + "column": 66, "line": 5 }, "start": { - "column": 72, + "column": 11, "line": 5 } } }, { - "id": "2903", - "mutatorName": "LogicalOperator", - "replacement": "maxItems === undefined && arrayMaxSize(array, maxItems)", - "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,118): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.\n", + "id": "2901", + "mutatorName": "EqualityOperator", + "replacement": "minItems !== undefined", + "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,57): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.\n", "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ "530", "531", @@ -97550,6 +97704,7 @@ "608", "609", "610", + "611", "612", "613", "614", @@ -97576,17 +97731,19 @@ "635", "636", "637", - "1034", + "638", + "1035", "1036", - "1037" + "1037", + "1038" ], "location": { "end": { - "column": 127, + "column": 33, "line": 5 }, "start": { - "column": 72, + "column": 11, "line": 5 } } @@ -97598,7 +97755,6 @@ "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,101): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.\n Type 'undefined' is not assignable to type 'number'.\n", "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ "530", "531", @@ -97634,9 +97790,10 @@ "635", "636", "637", - "1034", - "1036", - "1037" + "638", + "1035", + "1037", + "1038" ], "location": { "end": { @@ -97656,7 +97813,6 @@ "statusReason": "src/shared/validation/helpers/validation.helper.ts(5,118): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.\n", "status": "CompileError", "static": false, - "killedBy": [], "coveredBy": [ "530", "531", @@ -97692,9 +97848,10 @@ "635", "636", "637", - "1034", - "1036", - "1037" + "638", + "1035", + "1037", + "1038" ], "location": { "end": { @@ -97723,20 +97880,20 @@ "killedBy": [], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1027", + "752", "1028", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -97753,29 +97910,29 @@ "id": "2907", "mutatorName": "ConditionalExpression", "replacement": "true", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": true, "killedBy": [ - "746" + "747" ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1027", + "752", "1028", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -97797,24 +97954,24 @@ "testsCompleted": 15, "static": true, "killedBy": [ - "1027" + "1028" ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1027", + "752", "1028", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -97831,29 +97988,29 @@ "id": "2909", "mutatorName": "EqualityOperator", "replacement": "value !== \"true\"", - "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:70)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: true\nReceived: false\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts:170:69)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:316:40)\n at async _runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:252:3)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:126:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", "status": "Killed", "testsCompleted": 15, "static": true, "killedBy": [ - "746" + "747" ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1027", + "752", "1028", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -97875,24 +98032,24 @@ "testsCompleted": 15, "static": true, "killedBy": [ - "1027" + "1028" ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1027", + "752", "1028", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -97914,10 +98071,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "1027" + "1028" ], "coveredBy": [ - "1027" + "1028" ], "location": { "end": { @@ -97939,10 +98096,10 @@ "testsCompleted": 1, "static": false, "killedBy": [ - "1027" + "1028" ], "coveredBy": [ - "1027" + "1028" ], "location": { "end": { @@ -97964,23 +98121,23 @@ "testsCompleted": 14, "static": true, "killedBy": [ - "1029" + "1030" ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1028", + "752", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -98002,23 +98159,23 @@ "testsCompleted": 14, "static": true, "killedBy": [ - "1028" + "1029" ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1028", + "752", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -98040,23 +98197,23 @@ "testsCompleted": 14, "static": true, "killedBy": [ - "1028" + "1029" ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1028", + "752", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -98073,25 +98230,28 @@ "id": "2916", "mutatorName": "StringLiteral", "replacement": "\"\"", - "statusReason": "undefined TypeError: Cannot read properties of undefined (reading 'close')\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox513917/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:74:15)\n at Promise.then.completed (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:298:28)\n at new Promise ()\n at callAsyncCircusFn (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/utils.js:231:10)\n at _callCircusHook (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:281:40)\n at runNextTicks (node:internal/process/task_queues:60:5)\n at processTimers (node:internal/timers:511:9)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:154:7)\n at async _runTestsForDescribeBlock (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:121:9)\n at async run (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/run.js:71:3)\n at async runAndTransformResultsToJestFormat (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)\n at async jestAdapter (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)\n at async runTestInternal (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:367:16)\n at async runTest (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/node_modules/jest-runner/build/runTest.js:444:34)", - "status": "RuntimeError", + "statusReason": "Error: expect(received).toBe(expected) // Object.is equality\n\nExpected: 200\nReceived: 400\n at Object. (/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next/.stryker-tmp/sandbox7220148/tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts:232:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)", + "status": "Killed", + "testsCompleted": 14, "static": true, - "killedBy": [], + "killedBy": [ + "493" + ], "coveredBy": [ "493", - "745", "746", "747", "748", "749", "750", "751", - "1028", + "752", "1029", "1030", "1031", "1032", - "1033" + "1033", + "1034" ], "location": { "end": { @@ -98113,11 +98273,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "1028" + "1029" ], "coveredBy": [ "493", - "1028" + "1029" ], "location": { "end": { @@ -98139,11 +98299,11 @@ "testsCompleted": 2, "static": false, "killedBy": [ - "1028" + "1029" ], "coveredBy": [ "493", - "1028" + "1029" ], "location": { "end": { @@ -99550,7 +99710,7 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport { when } from \"jest-when\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GAME_HISTORY_RECORD_VOTING_RESULTS } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePlayValidatorService } from \"@/modules/game/providers/services/game-play/game-play-validator.service\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { BadGamePlayPayloadException } from \"@/shared/exception/types/bad-game-play-payload-exception.type\";\n\nimport { createFakeMakeGamePlayTargetWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayVoteWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordAllVotePlay, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlayVoting, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakePiedPiperGameOptions, createFakeRolesGameOptions, createFakeThiefGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeVotesGameOptions } from \"@tests/factories/game/schemas/game-options/votes-game-options.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGamePlay, createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayBigBadWolfEats, createFakeGamePlayCupidCharms, createFakeGamePlayDogWolfChoosesSide, createFakeGamePlayFoxSniffs, createFakeGamePlayGuardProtects, createFakeGamePlayHunterShoots, createFakeGamePlayPiedPiperCharms, createFakeGamePlayRavenMarks, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySeerLooks, createFakeGamePlaySheriffDelegates, createFakeGamePlaySheriffSettlesVotes, createFakeGamePlayThiefChoosesCard, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats, createFakeGamePlayWildChildChoosesModel, createFakeGamePlayWitchUsesPotions } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCantVoteByAllPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeDogWolfAlivePlayer, createFakeIdiotAlivePlayer, createFakeSeerAlivePlayer, createFakeStutteringJudgeAlivePlayer, createFakeVileFatherOfWolvesAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer, createFakeWildChildAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\njest.mock(\"@/shared/exception/types/bad-game-play-payload-exception.type\");\n\ndescribe(\"Game Play Validator Service\", () => {\n let mocks: {\n gameRepository: {\n find: jest.SpyInstance;\n findOne: jest.SpyInstance;\n create: jest.SpyInstance;\n updateOne: jest.SpyInstance;\n };\n gameHistoryRecordRepository: {\n find: jest.SpyInstance;\n create: jest.SpyInstance;\n };\n gameHistoryRecordService: {\n getLastGameHistoryGuardProtectsRecord: jest.SpyInstance;\n getLastGameHistoryTieInVotesRecord: jest.SpyInstance;\n getGameHistoryWitchUsesSpecificPotionRecords: jest.SpyInstance;\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.SpyInstance;\n getGameHistoryJudgeRequestRecords: jest.SpyInstance;\n };\n };\n let services: { gamePlayValidator: GamePlayValidatorService };\n\n beforeEach(async() => {\n mocks = {\n gameRepository: {\n find: jest.fn(),\n findOne: jest.fn(),\n create: jest.fn(),\n updateOne: jest.fn(),\n },\n gameHistoryRecordRepository: {\n find: jest.fn(),\n create: jest.fn(),\n },\n gameHistoryRecordService: {\n getLastGameHistoryGuardProtectsRecord: jest.fn(),\n getLastGameHistoryTieInVotesRecord: jest.fn(),\n getGameHistoryWitchUsesSpecificPotionRecords: jest.fn(),\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.fn(),\n getGameHistoryJudgeRequestRecords: jest.fn(),\n },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GamePlayValidatorService,\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n {\n provide: GameHistoryRecordRepository,\n useValue: mocks.gameHistoryRecordRepository,\n },\n ],\n }).compile();\n \n services = { gamePlayValidator: module.get(GamePlayValidatorService) };\n });\n \n describe(\"validateGamePlayWithRelationsDto\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlayWithRelationsDtoJudgeRequest: jest.SpyInstance;\n validateGamePlayWithRelationsDtoChosenSide: jest.SpyInstance;\n validateGamePlayVotesWithRelationsDto: jest.SpyInstance;\n validateGamePlayTargetsWithRelationsDto: jest.SpyInstance;\n validateGamePlayWithRelationsDtoChosenCard: jest.SpyInstance;\n };\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.SpyInstance };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateGamePlayWithRelationsDtoJudgeRequest: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWithRelationsDtoJudgeRequest }, \"validateGamePlayWithRelationsDtoJudgeRequest\").mockImplementation(),\n validateGamePlayWithRelationsDtoChosenSide: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWithRelationsDtoChosenSide }, \"validateGamePlayWithRelationsDtoChosenSide\").mockImplementation(),\n validateGamePlayVotesWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayVotesWithRelationsDto }, \"validateGamePlayVotesWithRelationsDto\").mockImplementation(),\n validateGamePlayTargetsWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayTargetsWithRelationsDto }, \"validateGamePlayTargetsWithRelationsDto\").mockImplementation(),\n validateGamePlayWithRelationsDtoChosenCard: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWithRelationsDtoChosenCard }, \"validateGamePlayWithRelationsDtoChosenCard\").mockImplementation(),\n },\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() },\n };\n });\n \n it(\"should throw error when game's current play is not set.\", async() => {\n const game = createFakeGame();\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n const interpolations = { gameId: game._id };\n \n await expect(services.gamePlayValidator.validateGamePlayWithRelationsDto(makeGamePlayWithRelationsDto, game)).toReject();\n expect(localMocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"validateGamePlayWithRelationsDto\", interpolations);\n });\n\n it(\"should call validators when called.\", async() => {\n const game = createFakeGame({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n await services.gamePlayValidator.validateGamePlayWithRelationsDto(makeGamePlayWithRelationsDto, game);\n \n expect(localMocks.gamePlayValidatorService.validateGamePlayWithRelationsDtoJudgeRequest).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWithRelationsDtoChosenSide).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayVotesWithRelationsDto).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsWithRelationsDto).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWithRelationsDtoChosenCard).toHaveBeenCalledOnce();\n });\n });\n\n describe(\"validateGamePlayThiefChosenCard\", () => {\n it(\"should do nothing when game additional cards are not set.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const game = createFakeGameWithCurrentPlay({ options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n \n it(\"should do nothing when game additional cards are set but thief can skip even if all cards are werewolves.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: false }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WHITE_WEREWOLF }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n\n it(\"should do nothing when thief can't skip if all cards are werewolves but they are not so he can skip.\", () => {\n const chosenCard = undefined;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.SEER }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n\n it(\"should do nothing when thief can't skip if all cards are werewolves but he chose one anyway.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WHITE_WEREWOLF }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n\n it(\"should throw error when all additional cards are werewolves and thief didn't choose a card.\", () => {\n const chosenCard = undefined;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WHITE_WEREWOLF }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Thief must choose a card (`chosenCard`)\");\n });\n });\n\n describe(\"validateGamePlayWithRelationsDtoChosenCard\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlayThiefChosenCard: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = { gamePlayValidatorService: { validateGamePlayThiefChosenCard: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayThiefChosenCard }, \"validateGamePlayThiefChosenCard\").mockImplementation() } };\n });\n\n it(\"should do nothing when chosen card is not defined and not expected.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n \n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenCard\"](makeGamePlayWithRelationsDto, game)).not.toThrow();\n });\n\n it(\"should throw error when chosen card is defined but not expected.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenCard: createFakeGameAdditionalCard() });\n \n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenCard\"](makeGamePlayWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`chosenCard` can't be set on this current game's state\");\n });\n\n it(\"should call validateGamePlayThiefChosenCard method when action is choose card.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayThiefChoosesCard() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenCard });\n services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenCard\"](makeGamePlayWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayThiefChosenCard).toHaveBeenCalledExactlyOnceWith(chosenCard, game);\n });\n });\n\n describe(\"validateDrankLifePotionTargets\", () => {\n it(\"should throw error when there are too much targets for life potion.\", () => {\n const drankLifePotionTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n ];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too much targets which drank life potion (`targets.drankPotion`)\");\n });\n\n it(\"should throw error when life potion target is not alive.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: false, attributes: [createFakeEatenByWerewolvesPlayerAttribute()] });\n const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.LIFE })];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Life potion can't be applied to this target (`targets.drankPotion`)\");\n });\n\n it(\"should throw error when life potion target is not eaten by werewolves.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: true, attributes: [] });\n const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.LIFE })];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Life potion can't be applied to this target (`targets.drankPotion`)\");\n });\n\n it(\"should do nothing when there is no life potion target.\", () => {\n const game = createFakeGame();\n\n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"]([], game)).not.toThrow();\n });\n\n it(\"should do nothing when life potion target is applied on valid target.\", () => {\n const targetedPlayer = createFakePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()], isAlive: true });\n const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.LIFE })];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).not.toThrow();\n });\n });\n\n describe(\"validateDrankDeathPotionTargets\", () => {\n it(\"should throw error when there are too much targets for death potion.\", () => {\n const drankDeathPotionTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n ];\n \n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"](drankDeathPotionTargets)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too much targets which drank death potion (`targets.drankPotion`)\");\n });\n\n it(\"should throw error when death potion target is not alive.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: false });\n const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.DEATH })];\n \n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"](drankDeathPotionTargets)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Death potion can't be applied to this target (`targets.drankPotion`)\");\n });\n\n it(\"should do nothing when there is no death potion target.\", () => {\n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"]([])).not.toThrow();\n });\n\n it(\"should do nothing when death potion target is applied on valid target.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: true });\n const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.DEATH })];\n \n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"](drankDeathPotionTargets)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayWitchTargets\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateDrankLifePotionTargets: jest.SpyInstance;\n validateDrankDeathPotionTargets: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateDrankLifePotionTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateDrankLifePotionTargets }, \"validateDrankLifePotionTargets\").mockImplementation(),\n validateDrankDeathPotionTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateDrankDeathPotionTargets }, \"validateDrankDeathPotionTargets\").mockImplementation(),\n },\n };\n });\n \n it(\"should throw error when witch targeted someone with life potion but already used it with death potion before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n const gameHistoryRecordTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n ];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when witch targeted someone with life potion but already used it alone before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({}),\n ];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE })];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when witch targeted someone with death potion but already used it with life potion before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n const gameHistoryRecordTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n ];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when witch targeted someone with death potion but already used it alone before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1], drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2] }),\n ];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH })];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should call potions validators without players when called with valid data but no target drank potions.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() })];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([]);\n });\n\n it(\"should call potions validators with players when called without bad data and without witch history.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[1]]);\n });\n\n it(\"should call potions validators with players when called for valid life potion data and some witch history.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE })];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH })];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) })];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockReturnValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([]);\n });\n\n it(\"should call potions validators with players when called for valid death potion data and some witch history.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH })];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE })];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) })];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]]);\n });\n });\n\n describe(\"validateGamePlayInfectedTargets\", () => {\n it(\"should throw error when vile father of wolves is not in the game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true })];\n const gameHistoryRecords = [];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should throw error when vile father of wolves is dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true })];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: gameHistoryRecordTargets }) })];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should throw error when vile father of wolves has already infected and some targets are infected.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n const gameHistoryRecordTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true }),\n createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: false }),\n ];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: gameHistoryRecordTargets }) })];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when there is no infected target.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when infected target data is valid.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true })];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateWerewolvesTargetsBoundaries\", () => {\n let localMocks: {\n gamePlayValidatorService: { validateGamePlayTargetsBoundaries: jest.SpyInstance };\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.SpyInstance;\n getLeftToEatByWhiteWerewolfPlayers: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: { validateGamePlayTargetsBoundaries: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayTargetsBoundaries }, \"validateGamePlayTargetsBoundaries\").mockImplementation() },\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWerewolvesPlayers\").mockReturnValue([]),\n getLeftToEatByWhiteWerewolfPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWhiteWerewolfPlayers\").mockReturnValue([]),\n },\n };\n });\n\n it(\"should do nothing when game play source is not from available methods.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayThiefChoosesCard() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).not.toHaveBeenCalled();\n });\n\n it(\"should validate targets boundaries when game play source are werewolves.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 1, max: 1 });\n });\n\n it(\"should validate targets boundaries when game play source is big bad wolf and targets are available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([createFakeVillagerAlivePlayer(), createFakeVillagerAlivePlayer()]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 1, max: 1 });\n });\n\n it(\"should validate targets boundaries when game play source is big bad wolf but targets are not available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 0, max: 0 });\n });\n\n it(\"should validate targets boundaries when game play source is white werewolf and targets are available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([createFakeVillagerAlivePlayer(), createFakeVillagerAlivePlayer()]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 0, max: 1 });\n });\n\n it(\"should validate targets boundaries when game play source is white werewolf but targets are not available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 0, max: 0 });\n });\n });\n\n describe(\"validateGamePlayWerewolvesTargets\", () => {\n beforeEach(() => {\n jest.spyOn(services.gamePlayValidator as unknown as { validateWerewolvesTargetsBoundaries }, \"validateWerewolvesTargetsBoundaries\").mockImplementation();\n });\n\n it(\"should do nothing when there is no target.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayTargetsWithRelationsDto = [];\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when source is WEREWOLVES and targeted player is dead.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Werewolves can't eat this target\");\n });\n\n it(\"should throw error when source is WEREWOLVES and targeted player is from werewolves side.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Werewolves can't eat this target\");\n });\n\n it(\"should throw error when source is BIG_BAD_WOLF and targeted player is dead.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Big bad wolf can't eat this target\");\n });\n\n it(\"should throw error when source is BIG_BAD_WOLF and targeted player is from werewolves side.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Big bad wolf can't eat this target\");\n });\n\n it(\"should throw error when source is BIG_BAD_WOLF and targeted player is already eaten.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Big bad wolf can't eat this target\");\n });\n\n it(\"should throw error when source is WHITE_WEREWOLF and targeted player is dead.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"White werewolf can't eat this target\");\n });\n\n it(\"should throw error when source is WHITE_WEREWOLF and targeted player is from villagers side.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"White werewolf can't eat this target\");\n });\n\n it(\"should throw error when source is WHITE_WEREWOLF and targeted player is white werewolf himself.\", async() => {\n const whiteWerewolfPlayer = createFakeWhiteWerewolfAlivePlayer();\n const players = bulkCreateFakePlayers(4, [whiteWerewolfPlayer]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: whiteWerewolfPlayer })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"White werewolf can't eat this target\");\n });\n\n it(\"should do nothing when white werewolf eaten target is valid.\", async() => {\n const players = [createFakeWerewolfAlivePlayer()];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when big bad wolf eaten target is valid.\", async() => {\n const players = [createFakeVillagerAlivePlayer()];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when werewolves eaten target is valid.\", async() => {\n const players = [createFakeVillagerAlivePlayer()];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayHunterTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayHunterTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Hunter can't shoot this target\");\n });\n\n it(\"should do nothing when targeted player for hunter is valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayHunterTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayScapeGoatTargets\", () => {\n it(\"should throw error when one of the targeted player is dead.\", () => {\n const players = [\n createFakeWitchAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayScapegoatBansVoting(), players });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayScapegoatTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"At least one of the scapegoat targets can't be banned from voting\");\n });\n\n it(\"should do nothing when all scapegoat's targets are valid.\", () => {\n const players = [\n createFakeWitchAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayScapegoatBansVoting(), players });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayScapegoatTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayCupidTargets\", () => {\n it(\"should throw error when one of the targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayCupidTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"At least one of the cupid targets can't be charmed\");\n });\n\n it(\"should do nothing when all cupid's targets are valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayCupidTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayFoxTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayFoxTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Fox can't sniff this target\");\n });\n\n it(\"should do nothing when targeted player for fox is valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayFoxTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlaySeerTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlaySeerTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Seer can't look at this target\");\n });\n\n it(\"should throw error when targeted player is seer herself.\", () => {\n const seerPlayer = createFakeSeerAlivePlayer();\n const players = bulkCreateFakePlayers(4, [seerPlayer]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: seerPlayer })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlaySeerTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Seer can't look at this target\");\n });\n\n it(\"should do nothing when seer's targeted player is valid.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlaySeerTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayRavenTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayRavenTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Raven can't mark this target\");\n });\n\n it(\"should do nothing when there are no targets.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayRavenTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n\n it(\"should do nothing when raven's target is valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayRavenTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayWildChildTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWildChildTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Wild child can't choose this target as a model\");\n });\n\n it(\"should throw error when targeted player is wild child himself.\", () => {\n const wildChildPlayer = createFakeWildChildAlivePlayer();\n const players = bulkCreateFakePlayers(4, [wildChildPlayer]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: wildChildPlayer })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWildChildTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Wild child can't choose this target as a model\");\n });\n\n it(\"should do nothing when wild child's targeted player is valid.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWildChildTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayPiedPiperTargets\", () => {\n let validateGamePlayTargetsBoundariesMock: jest.SpyInstance;\n\n beforeEach(() => {\n validateGamePlayTargetsBoundariesMock = jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayTargetsBoundaries }, \"validateGamePlayTargetsBoundaries\").mockImplementation();\n });\n\n it(\"should throw error when one of the targeted player is not in the last to charm.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms() });\n const leftToCharmPlayers = [\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[0] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[2] }),\n ];\n jest.spyOn(GameHelper, \"getLeftToCharmByPiedPiperPlayers\").mockReturnValue(leftToCharmPlayers);\n\n expect(() => services.gamePlayValidator[\"validateGamePlayPiedPiperTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"At least one of the pied piper targets can't be charmed\");\n });\n\n it(\"should do nothing when pied piper targets are valid and limited to game options.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ charmedPeopleCountPerNight: 2 }) }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms(), options });\n const leftToCharmPlayers = [\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[0] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[1] }),\n ];\n jest.spyOn(GameHelper, \"getLeftToCharmByPiedPiperPlayers\").mockReturnValue(leftToCharmPlayers);\n\n expect(() => services.gamePlayValidator[\"validateGamePlayPiedPiperTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n expect(validateGamePlayTargetsBoundariesMock).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 2, max: 2 });\n });\n\n it(\"should do nothing when pied piper targets are valid and limited to left players to charm count.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ charmedPeopleCountPerNight: 5 }) }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms(), options });\n const leftToCharmPlayers = [createFakeWildChildAlivePlayer()];\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[0] })];\n jest.spyOn(GameHelper, \"getLeftToCharmByPiedPiperPlayers\").mockReturnValue(leftToCharmPlayers);\n\n expect(() => services.gamePlayValidator[\"validateGamePlayPiedPiperTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n expect(validateGamePlayTargetsBoundariesMock).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 1, max: 1 });\n });\n });\n\n describe(\"validateGamePlayGuardTargets\", () => {\n it(\"should throw error when targeted player is dead.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects() });\n const targetedPlayer = createFakeVillagerAlivePlayer({ isAlive: false });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Guard can't protect this target\");\n });\n\n it(\"should throw error when targeted player is the same as previous guard play and game option doesn't allow this.\", async() => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ guard: { canProtectTwice: false } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects(), options });\n const targetedPlayer = createFakeVillagerAlivePlayer();\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n mocks.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [{ player: targetedPlayer }] }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Guard can't protect this target\");\n });\n\n it(\"should do nothing when targeted player is the same as previous guard play and game option allow this.\", async() => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ guard: { canProtectTwice: true } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects(), options });\n const targetedPlayer = createFakeVillagerAlivePlayer();\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n mocks.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [{ player: targetedPlayer }] }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when targeted player is not the same as previous guard play.\", async() => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ guard: { canProtectTwice: false } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects(), options });\n const targetedPlayer = createFakeVillagerAlivePlayer();\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n mocks.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [{ player: createFakeSeerAlivePlayer() }] }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlaySheriffTargets\", () => {\n it(\"should do nothing when game play action is not DELEGATE nor SETTLE_VOTES.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates({ action: GAME_PLAY_ACTIONS.USE_POTIONS }) });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when targeted player is dead and upcoming action is DELEGATE.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Sheriff can't delegate his role to this target\");\n });\n\n it(\"should do nothing when targeted player for sheriff delegation is valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() })];\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when targeted player is not in last tie in votes and upcoming action is SETTLE_VOTES.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE, nominatedPlayers: [createFakeSeerAlivePlayer()] });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayVoting }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Sheriff can't break the tie in votes with this target\");\n });\n\n it(\"should do nothing when targeted player for sheriff settling votes is valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE, nominatedPlayers: [game.players[0]] });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayVoting }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayTargetsBoundaries\", () => {\n it(\"should throw error when min boundary is not respected.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 4, max: 4 })).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too less targets for this current game's state\");\n });\n\n it(\"should throw error when max boundary is not respected.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 2, max: 2 })).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too much targets for this current game's state\");\n });\n\n it(\"should do nothing when boundaries are respected, even equal to max.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 1, max: 3 })).not.toThrow();\n });\n\n it(\"should do nothing when boundaries are respected, even equal to min.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 3, max: 4 })).not.toThrow();\n });\n });\n\n describe(\"validateGamePlaySourceTargets\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlaySheriffTargets: jest.SpyInstance;\n validateGamePlayGuardTargets: jest.SpyInstance;\n validateGamePlayPiedPiperTargets: jest.SpyInstance;\n validateGamePlayWildChildTargets: jest.SpyInstance;\n validateGamePlayRavenTargets: jest.SpyInstance;\n validateGamePlaySeerTargets: jest.SpyInstance;\n validateGamePlayFoxTargets: jest.SpyInstance;\n validateGamePlayCupidTargets: jest.SpyInstance;\n validateGamePlayScapegoatTargets: jest.SpyInstance;\n validateGamePlayHunterTargets: jest.SpyInstance;\n validateGamePlayWerewolvesTargets: jest.SpyInstance;\n validateGamePlayWitchTargets: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateGamePlaySheriffTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlaySheriffTargets }, \"validateGamePlaySheriffTargets\").mockImplementation(),\n validateGamePlayGuardTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayGuardTargets }, \"validateGamePlayGuardTargets\").mockImplementation(),\n validateGamePlayPiedPiperTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayPiedPiperTargets }, \"validateGamePlayPiedPiperTargets\").mockImplementation(),\n validateGamePlayWildChildTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWildChildTargets }, \"validateGamePlayWildChildTargets\").mockImplementation(),\n validateGamePlayRavenTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayRavenTargets }, \"validateGamePlayRavenTargets\").mockImplementation(),\n validateGamePlaySeerTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlaySeerTargets }, \"validateGamePlaySeerTargets\").mockImplementation(),\n validateGamePlayFoxTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayFoxTargets }, \"validateGamePlayFoxTargets\").mockImplementation(),\n validateGamePlayCupidTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayCupidTargets }, \"validateGamePlayCupidTargets\").mockImplementation(),\n validateGamePlayScapegoatTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayScapegoatTargets }, \"validateGamePlayScapegoatTargets\").mockImplementation(),\n validateGamePlayHunterTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayHunterTargets }, \"validateGamePlayHunterTargets\").mockImplementation(),\n validateGamePlayWerewolvesTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWerewolvesTargets }, \"validateGamePlayWerewolvesTargets\").mockImplementation(),\n validateGamePlayWitchTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWitchTargets }, \"validateGamePlayWitchTargets\").mockImplementation(),\n },\n };\n });\n\n it(\"should do nothing when game source doesn't have a validation method.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlay({ source: createFakeGamePlaySource({ name: ROLE_NAMES.IDIOT }) }) });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call sheriff validator when game current play is for the sheriff.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call werewolves validator when game current play is for the werewolves.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call werewolves validator when game current play is for the big bad wolf.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call werewolves validator when game current play is for the white werewolf.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call guard validator when game current play is for the guard.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call pied piper validator when game current play is for the pied piper.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call wild child validator when game current play is for the wild child.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call raven validator when game current play is for the raven.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayRavenMarks() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call seer validator when game current play is for the seer.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call fox validator when game current play is for the fox.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayFoxSniffs() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call cupid validator when game current play is for the cupid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayCupidCharms() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call scapegoat validator when game current play is for the scapegoat.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayScapegoatBansVoting() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call hunter validator when game current play is for the hunter.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayHunterShoots() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call witch validator when game current play is for the witch.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).toHaveBeenCalledExactlyOnceWith([], game);\n });\n });\n\n describe(\"validateInfectedTargetsAndPotionUsage\", () => {\n it(\"should throw error when expected action is not EAT and some targets are infected.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ action: GAME_PLAY_ACTIONS.CHOOSE_CARD }), players });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should throw error when expected source is not WEREWOLVES and some targets are infected.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }) }), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when there are infected targets and expected expected play is valid.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n\n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n \n it(\"should throw error when expected action is not USE_POTIONS but targets drank potions.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ action: GAME_PLAY_ACTIONS.CHOOSE_CARD }) });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when expected source is not WITCH but targets drank potions.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ source: createFakeGamePlaySource({ name: ROLE_NAMES.THIEF }) }) });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when expected some players drank potions and game play is valid.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n\n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayTargetsWithRelationsDto\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateInfectedTargetsAndPotionUsage: jest.SpyInstance;\n validateGamePlaySourceTargets: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateInfectedTargetsAndPotionUsage: jest.spyOn(services.gamePlayValidator as unknown as { validateInfectedTargetsAndPotionUsage }, \"validateInfectedTargetsAndPotionUsage\").mockImplementation(),\n validateGamePlaySourceTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlaySourceTargets }, \"validateGamePlaySourceTargets\").mockImplementation(),\n },\n };\n });\n\n it(\"should do nothing when there are no targets defined and upcoming action doesn't require targets anyway.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"](undefined, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateInfectedTargetsAndPotionUsage).not.toHaveBeenCalled();\n });\n\n it(\"should do nothing when there are no targets (empty array) and upcoming action doesn't require targets anyway.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"]([], game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateInfectedTargetsAndPotionUsage).not.toHaveBeenCalled();\n });\n\n it(\"should throw error when there is no targets but they are required.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"]([], game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets` is required on this current game's state\");\n });\n\n it(\"should throw error when there are targets but they are not expected.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets` can't be set on this current game's state\");\n });\n\n it(\"should call targets validators when targets data is valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySourceTargets).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateInfectedTargetsAndPotionUsage).toHaveBeenCalledOnce();\n });\n });\n\n describe(\"validateGamePlayVotesTieBreakerWithRelationsDto\", () => {\n it(\"should throw error when there is no previous tie in votes record.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGameWithCurrentPlay({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto(),\n createFakeMakeGamePlayVoteWithRelationsDto(),\n createFakeMakeGamePlayVoteWithRelationsDto(),\n ];\n\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(null);\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesTieBreakerWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"One vote's target is not in the previous tie in votes\");\n });\n\n it(\"should throw error when one voted player is not in the previous tie.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGameWithCurrentPlay({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[0] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[2] }),\n ];\n\n const lastTieInVotesRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ nominatedPlayers: [players[0], players[1]] });\n const lastTieInVotesRecord = createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: lastTieInVotesRecordPlayVoting }) });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(lastTieInVotesRecord);\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesTieBreakerWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"One vote's target is not in the previous tie in votes\");\n });\n\n it(\"should do nothing when all voted players were in previous tie.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGameWithCurrentPlay({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[0] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[1] }),\n ];\n\n const lastTieInVotesRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ nominatedPlayers: [players[0], players[1]] });\n const lastTieInVotesRecord = createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: lastTieInVotesRecordPlayVoting }) });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(lastTieInVotesRecord);\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesTieBreakerWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\", () => {\n it(\"should throw error when one vote source is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One source is not able to vote because he's dead or doesn't have the ability to do so\");\n });\n\n it(\"should throw error when one vote source doesn't have the ability to vote.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One source is not able to vote because he's dead or doesn't have the ability to do so\");\n });\n\n it(\"should throw error when one vote target is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[3], target: players[0] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One target can't be voted because he's dead\");\n });\n\n it(\"should throw error when there are votes with the same source and target.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[0] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One vote has the same source and target\");\n });\n });\n\n describe(\"validateUnsetGamePlayVotesWithRelationsDto\", () => {\n it(\"should do nothing when there is no vote but nobody can votes.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n createFakeIdiotAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: false }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).not.toThrow();\n });\n\n it(\"should do nothing when there is no vote but votes can be skipped.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).not.toThrow();\n });\n\n it(\"should do nothing when there is no vote when angel presence but it's not a vote action.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE, action: GAME_PLAY_ACTIONS.CHOOSE_CARD }), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).not.toThrow();\n });\n\n it(\"should throw error when there is no vote but they are required.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: false }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`votes` is required on this current game's state\");\n });\n\n it(\"should throw error when there is no vote but it's sheriff election time.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllElectSheriff(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`votes` is required on this current game's state\");\n });\n\n it(\"should throw error when there is no vote but votes are because of angel presence.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`votes` is required on this current game's state\");\n });\n });\n\n describe(\"validateGamePlayVotesWithRelationsDto\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlayVotesTieBreakerWithRelationsDto: jest.SpyInstance;\n validateUnsetGamePlayVotesWithRelationsDto: jest.SpyInstance;\n validateGamePlayVotesWithRelationsDtoSourceAndTarget: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateGamePlayVotesTieBreakerWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayVotesTieBreakerWithRelationsDto }, \"validateGamePlayVotesTieBreakerWithRelationsDto\").mockImplementation(),\n validateUnsetGamePlayVotesWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateUnsetGamePlayVotesWithRelationsDto }, \"validateUnsetGamePlayVotesWithRelationsDto\").mockImplementation(),\n validateGamePlayVotesWithRelationsDtoSourceAndTarget: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayVotesWithRelationsDtoSourceAndTarget }, \"validateGamePlayVotesWithRelationsDtoSourceAndTarget\").mockImplementation(),\n },\n };\n });\n\n it(\"should resolve when there are no votes defined.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](undefined, game)).toResolve();\n });\n\n it(\"should call validateGamePlayVotesWithRelationsDto method when there are no votes defined.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](undefined, game);\n\n expect(localMocks.gamePlayValidatorService.validateUnsetGamePlayVotesWithRelationsDto).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call validateGamePlayVotesWithRelationsDto method when there are no votes (empty array).\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateUnsetGamePlayVotesWithRelationsDto).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should throw error when there are votes but they are not expected.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayVotesWithRelationsDto = [createFakeMakeGamePlayVoteWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`votes` can't be set on this current game's state\");\n });\n\n it(\"should call validateGamePlayVotesTieBreakerWithRelationsDto when current play is because of previous votes were in ties.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }) });\n const makeGamePlayVotesWithRelationsDto = [createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[0], target: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateGamePlayVotesTieBreakerWithRelationsDto).toHaveBeenCalledExactlyOnceWith(makeGamePlayVotesWithRelationsDto, game);\n });\n\n it(\"should do nothing when votes are valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayVotesWithRelationsDto = [createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[0], target: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayWithRelationsDtoChosenSide\", () => {\n it(\"should throw error when chosenSide is not defined and game play action is CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`chosenSide` is required on this current game's state\");\n });\n\n it(\"should throw error when chosenSide is defined and game play action is not CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`chosenSide` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when chosenSide is not defined and game play action is not CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).not.toThrow();\n });\n\n it(\"should do nothing when chosenSide is defined and game play action is CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayWithRelationsDtoJudgeRequest\", () => {\n it(\"should do nothing when doesJudgeRequestAnotherVote is undefined.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when judge request another vote but upcoming action is not vote.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should throw error when judge request another vote but there is no judge in the game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should throw error when judge request another vote but he is dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should throw error when judge request another vote but he has reach the request limit.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ stutteringJudge: { voteRequestsCount: 2 } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players, options });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n mocks.gameHistoryRecordService.getGameHistoryJudgeRequestRecords.mockResolvedValue([\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n ]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when judge request another vote and he can.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ stutteringJudge: { voteRequestsCount: 2 } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players, options });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n mocks.gameHistoryRecordService.getGameHistoryJudgeRequestRecords.mockResolvedValue([createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) })]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toResolve();\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport { when } from \"jest-when\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GameHistoryRecordVotingResults } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GamePlayActions, GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePlayValidatorService } from \"@/modules/game/providers/services/game-play/game-play-validator.service\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { BadGamePlayPayloadException } from \"@/shared/exception/types/bad-game-play-payload-exception.type\";\n\nimport { createFakeMakeGamePlayTargetWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayVoteWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordAllVotePlay, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlayVoting, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakePiedPiperGameOptions, createFakeRolesGameOptions, createFakeThiefGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeVotesGameOptions } from \"@tests/factories/game/schemas/game-options/votes-game-options.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGamePlay, createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayBigBadWolfEats, createFakeGamePlayCupidCharms, createFakeGamePlayDogWolfChoosesSide, createFakeGamePlayFoxSniffs, createFakeGamePlayGuardProtects, createFakeGamePlayHunterShoots, createFakeGamePlayPiedPiperCharms, createFakeGamePlayRavenMarks, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySeerLooks, createFakeGamePlaySheriffDelegates, createFakeGamePlaySheriffSettlesVotes, createFakeGamePlayThiefChoosesCard, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats, createFakeGamePlayWildChildChoosesModel, createFakeGamePlayWitchUsesPotions } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCantVoteByAllPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeDogWolfAlivePlayer, createFakeIdiotAlivePlayer, createFakeSeerAlivePlayer, createFakeStutteringJudgeAlivePlayer, createFakeVileFatherOfWolvesAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer, createFakeWildChildAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\njest.mock(\"@/shared/exception/types/bad-game-play-payload-exception.type\");\n\ndescribe(\"Game Play Validator Service\", () => {\n let mocks: {\n gameRepository: {\n find: jest.SpyInstance;\n findOne: jest.SpyInstance;\n create: jest.SpyInstance;\n updateOne: jest.SpyInstance;\n };\n gameHistoryRecordRepository: {\n find: jest.SpyInstance;\n create: jest.SpyInstance;\n };\n gameHistoryRecordService: {\n getLastGameHistoryGuardProtectsRecord: jest.SpyInstance;\n getLastGameHistoryTieInVotesRecord: jest.SpyInstance;\n getGameHistoryWitchUsesSpecificPotionRecords: jest.SpyInstance;\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.SpyInstance;\n getGameHistoryJudgeRequestRecords: jest.SpyInstance;\n };\n };\n let services: { gamePlayValidator: GamePlayValidatorService };\n\n beforeEach(async() => {\n mocks = {\n gameRepository: {\n find: jest.fn(),\n findOne: jest.fn(),\n create: jest.fn(),\n updateOne: jest.fn(),\n },\n gameHistoryRecordRepository: {\n find: jest.fn(),\n create: jest.fn(),\n },\n gameHistoryRecordService: {\n getLastGameHistoryGuardProtectsRecord: jest.fn(),\n getLastGameHistoryTieInVotesRecord: jest.fn(),\n getGameHistoryWitchUsesSpecificPotionRecords: jest.fn(),\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.fn(),\n getGameHistoryJudgeRequestRecords: jest.fn(),\n },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GamePlayValidatorService,\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n {\n provide: GameHistoryRecordRepository,\n useValue: mocks.gameHistoryRecordRepository,\n },\n ],\n }).compile();\n \n services = { gamePlayValidator: module.get(GamePlayValidatorService) };\n });\n \n describe(\"validateGamePlayWithRelationsDto\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlayWithRelationsDtoJudgeRequest: jest.SpyInstance;\n validateGamePlayWithRelationsDtoChosenSide: jest.SpyInstance;\n validateGamePlayVotesWithRelationsDto: jest.SpyInstance;\n validateGamePlayTargetsWithRelationsDto: jest.SpyInstance;\n validateGamePlayWithRelationsDtoChosenCard: jest.SpyInstance;\n };\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.SpyInstance };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateGamePlayWithRelationsDtoJudgeRequest: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWithRelationsDtoJudgeRequest }, \"validateGamePlayWithRelationsDtoJudgeRequest\").mockImplementation(),\n validateGamePlayWithRelationsDtoChosenSide: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWithRelationsDtoChosenSide }, \"validateGamePlayWithRelationsDtoChosenSide\").mockImplementation(),\n validateGamePlayVotesWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayVotesWithRelationsDto }, \"validateGamePlayVotesWithRelationsDto\").mockImplementation(),\n validateGamePlayTargetsWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayTargetsWithRelationsDto }, \"validateGamePlayTargetsWithRelationsDto\").mockImplementation(),\n validateGamePlayWithRelationsDtoChosenCard: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWithRelationsDtoChosenCard }, \"validateGamePlayWithRelationsDtoChosenCard\").mockImplementation(),\n },\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() },\n };\n });\n \n it(\"should throw error when game's current play is not set.\", async() => {\n const game = createFakeGame();\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n const interpolations = { gameId: game._id };\n \n await expect(services.gamePlayValidator.validateGamePlayWithRelationsDto(makeGamePlayWithRelationsDto, game)).toReject();\n expect(localMocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"validateGamePlayWithRelationsDto\", interpolations);\n });\n\n it(\"should call validators when called.\", async() => {\n const game = createFakeGame({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n await services.gamePlayValidator.validateGamePlayWithRelationsDto(makeGamePlayWithRelationsDto, game);\n \n expect(localMocks.gamePlayValidatorService.validateGamePlayWithRelationsDtoJudgeRequest).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWithRelationsDtoChosenSide).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayVotesWithRelationsDto).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsWithRelationsDto).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWithRelationsDtoChosenCard).toHaveBeenCalledOnce();\n });\n });\n\n describe(\"validateGamePlayThiefChosenCard\", () => {\n it(\"should do nothing when game additional cards are not set.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const game = createFakeGameWithCurrentPlay({ options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n \n it(\"should do nothing when game additional cards are set but thief can skip even if all cards are werewolves.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: false }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: RoleNames.WHITE_WEREWOLF }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n\n it(\"should do nothing when thief can't skip if all cards are werewolves but they are not so he can skip.\", () => {\n const chosenCard = undefined;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: RoleNames.SEER }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n\n it(\"should do nothing when thief can't skip if all cards are werewolves but he chose one anyway.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: RoleNames.WHITE_WEREWOLF }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).not.toThrow();\n });\n\n it(\"should throw error when all additional cards are werewolves and thief didn't choose a card.\", () => {\n const chosenCard = undefined;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) });\n const additionalCards = [\n createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }),\n createFakeGameAdditionalCard({ roleName: RoleNames.WHITE_WEREWOLF }),\n ];\n const game = createFakeGameWithCurrentPlay({ additionalCards, options });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayThiefChosenCard\"](chosenCard, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Thief must choose a card (`chosenCard`)\");\n });\n });\n\n describe(\"validateGamePlayWithRelationsDtoChosenCard\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlayThiefChosenCard: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = { gamePlayValidatorService: { validateGamePlayThiefChosenCard: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayThiefChosenCard }, \"validateGamePlayThiefChosenCard\").mockImplementation() } };\n });\n\n it(\"should do nothing when chosen card is not defined and not expected.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n \n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenCard\"](makeGamePlayWithRelationsDto, game)).not.toThrow();\n });\n\n it(\"should throw error when chosen card is defined but not expected.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenCard: createFakeGameAdditionalCard() });\n \n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenCard\"](makeGamePlayWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`chosenCard` can't be set on this current game's state\");\n });\n\n it(\"should call validateGamePlayThiefChosenCard method when action is choose card.\", () => {\n const chosenCard = createFakeGameAdditionalCard();\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayThiefChoosesCard() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenCard });\n services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenCard\"](makeGamePlayWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayThiefChosenCard).toHaveBeenCalledExactlyOnceWith(chosenCard, game);\n });\n });\n\n describe(\"validateDrankLifePotionTargets\", () => {\n it(\"should throw error when there are too much targets for life potion.\", () => {\n const drankLifePotionTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n ];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too much targets which drank life potion (`targets.drankPotion`)\");\n });\n\n it(\"should throw error when life potion target is not alive.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: false, attributes: [createFakeEatenByWerewolvesPlayerAttribute()] });\n const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.LIFE })];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Life potion can't be applied to this target (`targets.drankPotion`)\");\n });\n\n it(\"should throw error when life potion target is not eaten by werewolves.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: true, attributes: [] });\n const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.LIFE })];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Life potion can't be applied to this target (`targets.drankPotion`)\");\n });\n\n it(\"should do nothing when there is no life potion target.\", () => {\n const game = createFakeGame();\n\n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"]([], game)).not.toThrow();\n });\n\n it(\"should do nothing when life potion target is applied on valid target.\", () => {\n const targetedPlayer = createFakePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()], isAlive: true });\n const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.LIFE })];\n const game = createFakeGame();\n \n expect(() => services.gamePlayValidator[\"validateDrankLifePotionTargets\"](drankLifePotionTargets, game)).not.toThrow();\n });\n });\n\n describe(\"validateDrankDeathPotionTargets\", () => {\n it(\"should throw error when there are too much targets for death potion.\", () => {\n const drankDeathPotionTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n ];\n \n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"](drankDeathPotionTargets)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too much targets which drank death potion (`targets.drankPotion`)\");\n });\n\n it(\"should throw error when death potion target is not alive.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: false });\n const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.DEATH })];\n \n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"](drankDeathPotionTargets)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Death potion can't be applied to this target (`targets.drankPotion`)\");\n });\n\n it(\"should do nothing when there is no death potion target.\", () => {\n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"]([])).not.toThrow();\n });\n\n it(\"should do nothing when death potion target is applied on valid target.\", () => {\n const targetedPlayer = createFakePlayer({ isAlive: true });\n const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.DEATH })];\n \n expect(() => services.gamePlayValidator[\"validateDrankDeathPotionTargets\"](drankDeathPotionTargets)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayWitchTargets\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateDrankLifePotionTargets: jest.SpyInstance;\n validateDrankDeathPotionTargets: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateDrankLifePotionTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateDrankLifePotionTargets }, \"validateDrankLifePotionTargets\").mockImplementation(),\n validateDrankDeathPotionTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateDrankDeathPotionTargets }, \"validateDrankDeathPotionTargets\").mockImplementation(),\n },\n };\n });\n \n it(\"should throw error when witch targeted someone with life potion but already used it with death potion before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n const gameHistoryRecordTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n ];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when witch targeted someone with life potion but already used it alone before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({}),\n ];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE })];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when witch targeted someone with death potion but already used it with life potion before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n const gameHistoryRecordTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n ];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when witch targeted someone with death potion but already used it alone before.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1], drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2] }),\n ];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH })];\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should call potions validators without players when called with valid data but no target drank potions.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() })];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([]);\n });\n\n it(\"should call potions validators with players when called without bad data and without witch history.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n ];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[1]]);\n });\n\n it(\"should call potions validators with players when called for valid life potion data and some witch history.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE })];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH })];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) })];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockReturnValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([]);\n });\n\n it(\"should call potions validators with players when called for valid death potion data and some witch history.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH })];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE })];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) })];\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWitchTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateDrankDeathPotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]]);\n });\n });\n\n describe(\"validateGamePlayInfectedTargets\", () => {\n it(\"should throw error when vile father of wolves is not in the game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true })];\n const gameHistoryRecords = [];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should throw error when vile father of wolves is dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true })];\n const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: gameHistoryRecordTargets }) })];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should throw error when vile father of wolves has already infected and some targets are infected.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n const gameHistoryRecordTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true }),\n createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: false }),\n ];\n const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: gameHistoryRecordTargets }) })];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue(gameHistoryRecords);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when there is no infected target.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when infected target data is valid.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true })];\n mocks.gameHistoryRecordService.getGameHistoryVileFatherOfWolvesInfectedRecords.mockResolvedValue([]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayInfectedTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateWerewolvesTargetsBoundaries\", () => {\n let localMocks: {\n gamePlayValidatorService: { validateGamePlayTargetsBoundaries: jest.SpyInstance };\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.SpyInstance;\n getLeftToEatByWhiteWerewolfPlayers: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: { validateGamePlayTargetsBoundaries: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayTargetsBoundaries }, \"validateGamePlayTargetsBoundaries\").mockImplementation() },\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWerewolvesPlayers\").mockReturnValue([]),\n getLeftToEatByWhiteWerewolfPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWhiteWerewolfPlayers\").mockReturnValue([]),\n },\n };\n });\n\n it(\"should do nothing when game play source is not from available methods.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayThiefChoosesCard() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).not.toHaveBeenCalled();\n });\n\n it(\"should validate targets boundaries when game play source are werewolves.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 1, max: 1 });\n });\n\n it(\"should validate targets boundaries when game play source is big bad wolf and targets are available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([createFakeVillagerAlivePlayer(), createFakeVillagerAlivePlayer()]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 1, max: 1 });\n });\n\n it(\"should validate targets boundaries when game play source is big bad wolf but targets are not available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 0, max: 0 });\n });\n\n it(\"should validate targets boundaries when game play source is white werewolf and targets are available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([createFakeVillagerAlivePlayer(), createFakeVillagerAlivePlayer()]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 0, max: 1 });\n });\n\n it(\"should validate targets boundaries when game play source is white werewolf but targets are not available.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n localMocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([]);\n services.gamePlayValidator[\"validateWerewolvesTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlayTargetsBoundaries).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 0, max: 0 });\n });\n });\n\n describe(\"validateGamePlayWerewolvesTargets\", () => {\n beforeEach(() => {\n jest.spyOn(services.gamePlayValidator as unknown as { validateWerewolvesTargetsBoundaries }, \"validateWerewolvesTargetsBoundaries\").mockImplementation();\n });\n\n it(\"should do nothing when there is no target.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayTargetsWithRelationsDto = [];\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when source is WEREWOLVES and targeted player is dead.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Werewolves can't eat this target\");\n });\n\n it(\"should throw error when source is WEREWOLVES and targeted player is from werewolves side.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Werewolves can't eat this target\");\n });\n\n it(\"should throw error when source is BIG_BAD_WOLF and targeted player is dead.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Big bad wolf can't eat this target\");\n });\n\n it(\"should throw error when source is BIG_BAD_WOLF and targeted player is from werewolves side.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Big bad wolf can't eat this target\");\n });\n\n it(\"should throw error when source is BIG_BAD_WOLF and targeted player is already eaten.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Big bad wolf can't eat this target\");\n });\n\n it(\"should throw error when source is WHITE_WEREWOLF and targeted player is dead.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"White werewolf can't eat this target\");\n });\n\n it(\"should throw error when source is WHITE_WEREWOLF and targeted player is from villagers side.\", async() => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"White werewolf can't eat this target\");\n });\n\n it(\"should throw error when source is WHITE_WEREWOLF and targeted player is white werewolf himself.\", async() => {\n const whiteWerewolfPlayer = createFakeWhiteWerewolfAlivePlayer();\n const players = bulkCreateFakePlayers(4, [whiteWerewolfPlayer]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: whiteWerewolfPlayer })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"White werewolf can't eat this target\");\n });\n\n it(\"should do nothing when white werewolf eaten target is valid.\", async() => {\n const players = [createFakeWerewolfAlivePlayer()];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when big bad wolf eaten target is valid.\", async() => {\n const players = [createFakeVillagerAlivePlayer()];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when werewolves eaten target is valid.\", async() => {\n const players = [createFakeVillagerAlivePlayer()];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[0] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayWerewolvesTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayHunterTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayHunterTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Hunter can't shoot this target\");\n });\n\n it(\"should do nothing when targeted player for hunter is valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayHunterTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayScapeGoatTargets\", () => {\n it(\"should throw error when one of the targeted player is dead.\", () => {\n const players = [\n createFakeWitchAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayScapegoatBansVoting(), players });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayScapegoatTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"At least one of the scapegoat targets can't be banned from voting\");\n });\n\n it(\"should do nothing when all scapegoat's targets are valid.\", () => {\n const players = [\n createFakeWitchAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayScapegoatBansVoting(), players });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayScapegoatTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayCupidTargets\", () => {\n it(\"should throw error when one of the targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayCupidTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"At least one of the cupid targets can't be charmed\");\n });\n\n it(\"should do nothing when all cupid's targets are valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayCupidTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayFoxTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayFoxTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Fox can't sniff this target\");\n });\n\n it(\"should do nothing when targeted player for fox is valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayFoxTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlaySeerTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlaySeerTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Seer can't look at this target\");\n });\n\n it(\"should throw error when targeted player is seer herself.\", () => {\n const seerPlayer = createFakeSeerAlivePlayer();\n const players = bulkCreateFakePlayers(4, [seerPlayer]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: seerPlayer })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlaySeerTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Seer can't look at this target\");\n });\n\n it(\"should do nothing when seer's targeted player is valid.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlaySeerTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayRavenTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayRavenTargets\"](makeGamePlayTargetsWithRelationsDto)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Raven can't mark this target\");\n });\n\n it(\"should do nothing when there are no targets.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayRavenTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n\n it(\"should do nothing when raven's target is valid.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayRavenTargets\"](makeGamePlayTargetsWithRelationsDto)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayWildChildTargets\", () => {\n it(\"should throw error when targeted player is dead.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWildChildTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Wild child can't choose this target as a model\");\n });\n\n it(\"should throw error when targeted player is wild child himself.\", () => {\n const wildChildPlayer = createFakeWildChildAlivePlayer();\n const players = bulkCreateFakePlayers(4, [wildChildPlayer]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: wildChildPlayer })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWildChildTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Wild child can't choose this target as a model\");\n });\n\n it(\"should do nothing when wild child's targeted player is valid.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() })];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWildChildTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayPiedPiperTargets\", () => {\n let validateGamePlayTargetsBoundariesMock: jest.SpyInstance;\n\n beforeEach(() => {\n validateGamePlayTargetsBoundariesMock = jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayTargetsBoundaries }, \"validateGamePlayTargetsBoundaries\").mockImplementation();\n });\n\n it(\"should throw error when one of the targeted player is not in the last to charm.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms() });\n const leftToCharmPlayers = [\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[0] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[2] }),\n ];\n jest.spyOn(GameHelper, \"getLeftToCharmByPiedPiperPlayers\").mockReturnValue(leftToCharmPlayers);\n\n expect(() => services.gamePlayValidator[\"validateGamePlayPiedPiperTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"At least one of the pied piper targets can't be charmed\");\n });\n\n it(\"should do nothing when pied piper targets are valid and limited to game options.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ charmedPeopleCountPerNight: 2 }) }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms(), options });\n const leftToCharmPlayers = [\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[0] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[1] }),\n ];\n jest.spyOn(GameHelper, \"getLeftToCharmByPiedPiperPlayers\").mockReturnValue(leftToCharmPlayers);\n\n expect(() => services.gamePlayValidator[\"validateGamePlayPiedPiperTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n expect(validateGamePlayTargetsBoundariesMock).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 2, max: 2 });\n });\n\n it(\"should do nothing when pied piper targets are valid and limited to left players to charm count.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ charmedPeopleCountPerNight: 5 }) }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms(), options });\n const leftToCharmPlayers = [createFakeWildChildAlivePlayer()];\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: leftToCharmPlayers[0] })];\n jest.spyOn(GameHelper, \"getLeftToCharmByPiedPiperPlayers\").mockReturnValue(leftToCharmPlayers);\n\n expect(() => services.gamePlayValidator[\"validateGamePlayPiedPiperTargets\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n expect(validateGamePlayTargetsBoundariesMock).toHaveBeenCalledExactlyOnceWith(makeGamePlayTargetsWithRelationsDto, { min: 1, max: 1 });\n });\n });\n\n describe(\"validateGamePlayGuardTargets\", () => {\n it(\"should throw error when targeted player is dead.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects() });\n const targetedPlayer = createFakeVillagerAlivePlayer({ isAlive: false });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Guard can't protect this target\");\n });\n\n it(\"should throw error when targeted player is the same as previous guard play and game option doesn't allow this.\", async() => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ guard: { canProtectTwice: false } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects(), options });\n const targetedPlayer = createFakeVillagerAlivePlayer();\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n mocks.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [{ player: targetedPlayer }] }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Guard can't protect this target\");\n });\n\n it(\"should do nothing when targeted player is the same as previous guard play and game option allow this.\", async() => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ guard: { canProtectTwice: true } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects(), options });\n const targetedPlayer = createFakeVillagerAlivePlayer();\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n mocks.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [{ player: targetedPlayer }] }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should do nothing when targeted player is not the same as previous guard play.\", async() => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ guard: { canProtectTwice: false } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects(), options });\n const targetedPlayer = createFakeVillagerAlivePlayer();\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })];\n mocks.gameHistoryRecordService.getLastGameHistoryGuardProtectsRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [{ player: createFakeSeerAlivePlayer() }] }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlayGuardTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlaySheriffTargets\", () => {\n it(\"should do nothing when game play action is not DELEGATE nor SETTLE_VOTES.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates({ action: GamePlayActions.USE_POTIONS }) });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when targeted player is dead and upcoming action is DELEGATE.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Sheriff can't delegate his role to this target\");\n });\n\n it(\"should do nothing when targeted player for sheriff delegation is valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() })];\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when targeted player is not in last tie in votes and upcoming action is SETTLE_VOTES.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })];\n const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE, nominatedPlayers: [createFakeSeerAlivePlayer()] });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayVoting }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"Sheriff can't break the tie in votes with this target\");\n });\n\n it(\"should do nothing when targeted player for sheriff settling votes is valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })];\n const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE, nominatedPlayers: [game.players[0]] });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayVoting }) }));\n\n await expect(services.gamePlayValidator[\"validateGamePlaySheriffTargets\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayTargetsBoundaries\", () => {\n it(\"should throw error when min boundary is not respected.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 4, max: 4 })).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too less targets for this current game's state\");\n });\n\n it(\"should throw error when max boundary is not respected.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 2, max: 2 })).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"There are too much targets for this current game's state\");\n });\n\n it(\"should do nothing when boundaries are respected, even equal to max.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 1, max: 3 })).not.toThrow();\n });\n\n it(\"should do nothing when boundaries are respected, even equal to min.\", () => {\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer() }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeWerewolfAlivePlayer() }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayTargetsBoundaries\"](makeGamePlayTargetsWithRelationsDto, { min: 3, max: 4 })).not.toThrow();\n });\n });\n\n describe(\"validateGamePlaySourceTargets\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlaySheriffTargets: jest.SpyInstance;\n validateGamePlayGuardTargets: jest.SpyInstance;\n validateGamePlayPiedPiperTargets: jest.SpyInstance;\n validateGamePlayWildChildTargets: jest.SpyInstance;\n validateGamePlayRavenTargets: jest.SpyInstance;\n validateGamePlaySeerTargets: jest.SpyInstance;\n validateGamePlayFoxTargets: jest.SpyInstance;\n validateGamePlayCupidTargets: jest.SpyInstance;\n validateGamePlayScapegoatTargets: jest.SpyInstance;\n validateGamePlayHunterTargets: jest.SpyInstance;\n validateGamePlayWerewolvesTargets: jest.SpyInstance;\n validateGamePlayWitchTargets: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateGamePlaySheriffTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlaySheriffTargets }, \"validateGamePlaySheriffTargets\").mockImplementation(),\n validateGamePlayGuardTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayGuardTargets }, \"validateGamePlayGuardTargets\").mockImplementation(),\n validateGamePlayPiedPiperTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayPiedPiperTargets }, \"validateGamePlayPiedPiperTargets\").mockImplementation(),\n validateGamePlayWildChildTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWildChildTargets }, \"validateGamePlayWildChildTargets\").mockImplementation(),\n validateGamePlayRavenTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayRavenTargets }, \"validateGamePlayRavenTargets\").mockImplementation(),\n validateGamePlaySeerTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlaySeerTargets }, \"validateGamePlaySeerTargets\").mockImplementation(),\n validateGamePlayFoxTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayFoxTargets }, \"validateGamePlayFoxTargets\").mockImplementation(),\n validateGamePlayCupidTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayCupidTargets }, \"validateGamePlayCupidTargets\").mockImplementation(),\n validateGamePlayScapegoatTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayScapegoatTargets }, \"validateGamePlayScapegoatTargets\").mockImplementation(),\n validateGamePlayHunterTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayHunterTargets }, \"validateGamePlayHunterTargets\").mockImplementation(),\n validateGamePlayWerewolvesTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWerewolvesTargets }, \"validateGamePlayWerewolvesTargets\").mockImplementation(),\n validateGamePlayWitchTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayWitchTargets }, \"validateGamePlayWitchTargets\").mockImplementation(),\n },\n };\n });\n\n it(\"should do nothing when game source doesn't have a validation method.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlay({ source: createFakeGamePlaySource({ name: RoleNames.IDIOT }) }) });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call sheriff validator when game current play is for the sheriff.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call werewolves validator when game current play is for the werewolves.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call werewolves validator when game current play is for the big bad wolf.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call werewolves validator when game current play is for the white werewolf.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call guard validator when game current play is for the guard.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayGuardProtects() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call pied piper validator when game current play is for the pied piper.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayPiedPiperCharms() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call wild child validator when game current play is for the wild child.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call raven validator when game current play is for the raven.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayRavenMarks() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n \n it(\"should call seer validator when game current play is for the seer.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call fox validator when game current play is for the fox.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayFoxSniffs() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call cupid validator when game current play is for the cupid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayCupidCharms() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call scapegoat validator when game current play is for the scapegoat.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayScapegoatBansVoting() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).toHaveBeenCalledExactlyOnceWith([], game);\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call hunter validator when game current play is for the hunter.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayHunterShoots() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).toHaveBeenCalledExactlyOnceWith([]);\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).not.toHaveBeenCalled();\n });\n\n it(\"should call witch validator when game current play is for the witch.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n await services.gamePlayValidator[\"validateGamePlaySourceTargets\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWerewolvesTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayGuardTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayPiedPiperTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWildChildTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayRavenTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySeerTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayFoxTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayCupidTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayScapegoatTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayHunterTargets).not.toHaveBeenCalled();\n expect(localMocks.gamePlayValidatorService.validateGamePlayWitchTargets).toHaveBeenCalledExactlyOnceWith([], game);\n });\n });\n\n describe(\"validateInfectedTargetsAndPotionUsage\", () => {\n it(\"should throw error when expected action is not EAT and some targets are infected.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ action: GamePlayActions.CHOOSE_CARD }), players });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should throw error when expected source is not WEREWOLVES and some targets are infected.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PlayerGroups.ALL }) }), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.isInfected` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when there are infected targets and expected expected play is valid.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat(), players });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })];\n\n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n \n it(\"should throw error when expected action is not USE_POTIONS but targets drank potions.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ action: GamePlayActions.CHOOSE_CARD }) });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should throw error when expected source is not WITCH but targets drank potions.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ source: createFakeGamePlaySource({ name: RoleNames.THIEF }) }) });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n \n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets.drankPotion` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when expected some players drank potions and game play is valid.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayTargetsWithRelationsDto = [\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }),\n createFakeMakeGamePlayTargetWithRelationsDto(),\n ];\n\n expect(() => services.gamePlayValidator[\"validateInfectedTargetsAndPotionUsage\"](makeGamePlayTargetsWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayTargetsWithRelationsDto\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateInfectedTargetsAndPotionUsage: jest.SpyInstance;\n validateGamePlaySourceTargets: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateInfectedTargetsAndPotionUsage: jest.spyOn(services.gamePlayValidator as unknown as { validateInfectedTargetsAndPotionUsage }, \"validateInfectedTargetsAndPotionUsage\").mockImplementation(),\n validateGamePlaySourceTargets: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlaySourceTargets }, \"validateGamePlaySourceTargets\").mockImplementation(),\n },\n };\n });\n\n it(\"should do nothing when there are no targets defined and upcoming action doesn't require targets anyway.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"](undefined, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateInfectedTargetsAndPotionUsage).not.toHaveBeenCalled();\n });\n\n it(\"should do nothing when there are no targets (empty array) and upcoming action doesn't require targets anyway.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"]([], game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateInfectedTargetsAndPotionUsage).not.toHaveBeenCalled();\n });\n\n it(\"should throw error when there is no targets but they are required.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySeerLooks() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"]([], game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets` is required on this current game's state\");\n });\n\n it(\"should throw error when there are targets but they are not expected.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"](makeGamePlayTargetsWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`targets` can't be set on this current game's state\");\n });\n\n it(\"should call targets validators when targets data is valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayTargetsWithRelationsDto\"](makeGamePlayTargetsWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateGamePlaySourceTargets).toHaveBeenCalledOnce();\n expect(localMocks.gamePlayValidatorService.validateInfectedTargetsAndPotionUsage).toHaveBeenCalledOnce();\n });\n });\n\n describe(\"validateGamePlayVotesTieBreakerWithRelationsDto\", () => {\n it(\"should throw error when there is no previous tie in votes record.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGameWithCurrentPlay({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto(),\n createFakeMakeGamePlayVoteWithRelationsDto(),\n createFakeMakeGamePlayVoteWithRelationsDto(),\n ];\n\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(null);\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesTieBreakerWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"One vote's target is not in the previous tie in votes\");\n });\n\n it(\"should throw error when one voted player is not in the previous tie.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGameWithCurrentPlay({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[0] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[2] }),\n ];\n\n const lastTieInVotesRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ nominatedPlayers: [players[0], players[1]] });\n const lastTieInVotesRecord = createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: lastTieInVotesRecordPlayVoting }) });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(lastTieInVotesRecord);\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesTieBreakerWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"One vote's target is not in the previous tie in votes\");\n });\n\n it(\"should do nothing when all voted players were in previous tie.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGameWithCurrentPlay({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[0] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ target: players[1] }),\n ];\n\n const lastTieInVotesRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ nominatedPlayers: [players[0], players[1]] });\n const lastTieInVotesRecord = createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: lastTieInVotesRecordPlayVoting }) });\n mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(lastTieInVotesRecord);\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesTieBreakerWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\", () => {\n it(\"should throw error when one vote source is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One source is not able to vote because he's dead or doesn't have the ability to do so\");\n });\n\n it(\"should throw error when one vote source doesn't have the ability to vote.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One source is not able to vote because he's dead or doesn't have the ability to do so\");\n });\n\n it(\"should throw error when one vote target is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[3], target: players[0] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One target can't be voted because he's dead\");\n });\n\n it(\"should throw error when there are votes with the same source and target.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const makeGamePlayVotesWithRelationsDto = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[0] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[1] }),\n ];\n\n expect(() => services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDtoSourceAndTarget\"](makeGamePlayVotesWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"One vote has the same source and target\");\n });\n });\n\n describe(\"validateUnsetGamePlayVotesWithRelationsDto\", () => {\n it(\"should do nothing when there is no vote but nobody can votes.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n createFakeIdiotAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: false }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).not.toThrow();\n });\n\n it(\"should do nothing when there is no vote but votes can be skipped.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCantVoteByAllPlayerAttribute()] }),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).not.toThrow();\n });\n\n it(\"should do nothing when there is no vote when angel presence but it's not a vote action.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE, action: GamePlayActions.CHOOSE_CARD }), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).not.toThrow();\n });\n\n it(\"should throw error when there is no vote but they are required.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: false }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`votes` is required on this current game's state\");\n });\n\n it(\"should throw error when there is no vote but it's sheriff election time.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllElectSheriff(), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`votes` is required on this current game's state\");\n });\n\n it(\"should throw error when there is no vote but votes are because of angel presence.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }), options });\n\n expect(() => services.gamePlayValidator[\"validateUnsetGamePlayVotesWithRelationsDto\"](game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith(\"`votes` is required on this current game's state\");\n });\n });\n\n describe(\"validateGamePlayVotesWithRelationsDto\", () => {\n let localMocks: {\n gamePlayValidatorService: {\n validateGamePlayVotesTieBreakerWithRelationsDto: jest.SpyInstance;\n validateUnsetGamePlayVotesWithRelationsDto: jest.SpyInstance;\n validateGamePlayVotesWithRelationsDtoSourceAndTarget: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayValidatorService: {\n validateGamePlayVotesTieBreakerWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayVotesTieBreakerWithRelationsDto }, \"validateGamePlayVotesTieBreakerWithRelationsDto\").mockImplementation(),\n validateUnsetGamePlayVotesWithRelationsDto: jest.spyOn(services.gamePlayValidator as unknown as { validateUnsetGamePlayVotesWithRelationsDto }, \"validateUnsetGamePlayVotesWithRelationsDto\").mockImplementation(),\n validateGamePlayVotesWithRelationsDtoSourceAndTarget: jest.spyOn(services.gamePlayValidator as unknown as { validateGamePlayVotesWithRelationsDtoSourceAndTarget }, \"validateGamePlayVotesWithRelationsDtoSourceAndTarget\").mockImplementation(),\n },\n };\n });\n\n it(\"should resolve when there are no votes defined.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](undefined, game)).toResolve();\n });\n\n it(\"should call validateGamePlayVotesWithRelationsDto method when there are no votes defined.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](undefined, game);\n\n expect(localMocks.gamePlayValidatorService.validateUnsetGamePlayVotesWithRelationsDto).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call validateGamePlayVotesWithRelationsDto method when there are no votes (empty array).\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"]([], game);\n\n expect(localMocks.gamePlayValidatorService.validateUnsetGamePlayVotesWithRelationsDto).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should throw error when there are votes but they are not expected.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayWerewolvesEat() });\n const makeGamePlayVotesWithRelationsDto = [createFakeMakeGamePlayVoteWithRelationsDto()];\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`votes` can't be set on this current game's state\");\n });\n\n it(\"should call validateGamePlayVotesTieBreakerWithRelationsDto when current play is because of previous votes were in ties.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }) });\n const makeGamePlayVotesWithRelationsDto = [createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[0], target: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toResolve();\n expect(localMocks.gamePlayValidatorService.validateGamePlayVotesTieBreakerWithRelationsDto).toHaveBeenCalledExactlyOnceWith(makeGamePlayVotesWithRelationsDto, game);\n });\n\n it(\"should do nothing when votes are valid.\", async() => {\n const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayVotesWithRelationsDto = [createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[0], target: game.players[1] })];\n\n await expect(services.gamePlayValidator[\"validateGamePlayVotesWithRelationsDto\"](makeGamePlayVotesWithRelationsDto, game)).toResolve();\n });\n });\n\n describe(\"validateGamePlayWithRelationsDtoChosenSide\", () => {\n it(\"should throw error when chosenSide is not defined and game play action is CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`chosenSide` is required on this current game's state\");\n });\n\n it(\"should throw error when chosenSide is defined and game play action is not CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).toThrow(BadGamePlayPayloadException);\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`chosenSide` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when chosenSide is not defined and game play action is not CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).not.toThrow();\n });\n\n it(\"should do nothing when chosenSide is defined and game play action is CHOOSE_SIDE.\", () => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES });\n\n expect(() => services.gamePlayValidator[\"validateGamePlayWithRelationsDtoChosenSide\"](makeGamePlayWithRelationsDto, game)).not.toThrow();\n });\n });\n\n describe(\"validateGamePlayWithRelationsDtoJudgeRequest\", () => {\n it(\"should do nothing when doesJudgeRequestAnotherVote is undefined.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto();\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toResolve();\n });\n\n it(\"should throw error when judge request another vote but upcoming action is not vote.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should throw error when judge request another vote but there is no judge in the game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should throw error when judge request another vote but he is dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should throw error when judge request another vote but he has reach the request limit.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ stutteringJudge: { voteRequestsCount: 2 } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players, options });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n mocks.gameHistoryRecordService.getGameHistoryJudgeRequestRecords.mockResolvedValue([\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n ]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toReject();\n expect(BadGamePlayPayloadException).toHaveBeenCalledWith(\"`doesJudgeRequestAnotherVote` can't be set on this current game's state\");\n });\n\n it(\"should do nothing when judge request another vote and he can.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWitchAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ stutteringJudge: { voteRequestsCount: 2 } }) });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote(), players, options });\n const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ doesJudgeRequestAnotherVote: true });\n mocks.gameHistoryRecordService.getGameHistoryJudgeRequestRecords.mockResolvedValue([createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) })]);\n\n await expect(services.gamePlayValidator[\"validateGamePlayWithRelationsDtoJudgeRequest\"](makeGamePlayWithRelationsDto, game)).toResolve();\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts": { "tests": [ @@ -100795,7 +100955,7 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport { when } from \"jest-when\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { defaultGameOptions } from \"@/modules/game/constants/game-options/game-options.constant\";\nimport { GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport * as PlayerHelper from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeAngelAlivePlayer, createFakeBigBadWolfAlivePlayer, createFakeCupidAlivePlayer, createFakeDogWolfAlivePlayer, createFakeFoxAlivePlayer, createFakeGuardAlivePlayer, createFakeHunterAlivePlayer, createFakePiedPiperAlivePlayer, createFakeRavenAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeStutteringJudgeAlivePlayer, createFakeThiefAlivePlayer, createFakeThreeBrothersAlivePlayer, createFakeTwoSistersAlivePlayer, createFakeVileFatherOfWolvesAlivePlayer, createFakeVillagerAlivePlayer, createFakeVillagerVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer, createFakeWildChildAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGamePlay, createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayBigBadWolfEats, createFakeGamePlayCharmedMeetEachOther, createFakeGamePlayCupidCharms, createFakeGamePlayDogWolfChoosesSide, createFakeGamePlayFoxSniffs, createFakeGamePlayGuardProtects, createFakeGamePlayHunterShoots, createFakeGamePlayLoversMeetEachOther, createFakeGamePlayPiedPiperCharms, createFakeGamePlayRavenMarks, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySeerLooks, createFakeGamePlaySheriffDelegates, createFakeGamePlayStutteringJudgeChoosesSign, createFakeGamePlayThiefChoosesCard, createFakeGamePlayThreeBrothersMeetEachOther, createFakeGamePlayTwoSistersMeetEachOther, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats, createFakeGamePlayWildChildChoosesModel, createFakeGamePlayWitchUsesPotions } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeRolesGameOptions, createFakeSheriffGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory\";\n\ndescribe(\"Game Play Service\", () => {\n let services: { gamePlay: GamePlayService };\n let mocks: {\n gameHistoryRecordService: {\n getGameHistoryWitchUsesSpecificPotionRecords: jest.SpyInstance;\n getGameHistoryPhaseRecords: jest.SpyInstance;\n };\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.SpyInstance;\n getLeftToEatByWhiteWerewolfPlayers: jest.SpyInstance;\n getExpectedPlayersToPlay: jest.SpyInstance;\n };\n unexpectedExceptionFactory: {\n createNoGamePlayPriorityUnexpectedException: jest.SpyInstance;\n };\n };\n\n beforeEach(async() => {\n mocks = {\n gameHistoryRecordService: {\n getGameHistoryWitchUsesSpecificPotionRecords: jest.fn().mockResolvedValue([]),\n getGameHistoryPhaseRecords: jest.fn().mockResolvedValue([]),\n },\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWerewolvesPlayers\").mockReturnValue([]),\n getLeftToEatByWhiteWerewolfPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWhiteWerewolfPlayers\").mockReturnValue([]),\n getExpectedPlayersToPlay: jest.spyOn(GameHelper, \"getExpectedPlayersToPlay\").mockReturnValue([]),\n },\n unexpectedExceptionFactory: { createNoGamePlayPriorityUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoGamePlayPriorityUnexpectedException\").mockImplementation() },\n };\n const module: TestingModule = await Test.createTestingModule({\n providers: [\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n GamePlayService,\n ],\n }).compile();\n \n services = { gamePlay: module.get(GamePlayService) };\n });\n\n describe(\"refreshUpcomingPlays\", () => {\n let localMocks: {\n gamePlayService: {\n removeObsoleteUpcomingPlays: jest.SpyInstance;\n getNewUpcomingPlaysForCurrentPhase: jest.SpyInstance;\n sortUpcomingPlaysByPriority: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n removeObsoleteUpcomingPlays: jest.spyOn(services.gamePlay as unknown as { removeObsoleteUpcomingPlays }, \"removeObsoleteUpcomingPlays\").mockImplementation(),\n getNewUpcomingPlaysForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { getNewUpcomingPlaysForCurrentPhase }, \"getNewUpcomingPlaysForCurrentPhase\").mockImplementation(),\n sortUpcomingPlaysByPriority: jest.spyOn(services.gamePlay as unknown as { sortUpcomingPlaysByPriority }, \"sortUpcomingPlaysByPriority\").mockImplementation(),\n },\n };\n });\n\n it(\"should call removeObsoleteUpcomingPlays when called.\", async() => {\n const game = createFakeGame();\n localMocks.gamePlayService.removeObsoleteUpcomingPlays.mockResolvedValue(game);\n localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase.mockReturnValue(game.upcomingPlays);\n localMocks.gamePlayService.sortUpcomingPlaysByPriority.mockReturnValue(game.upcomingPlays);\n await services.gamePlay.refreshUpcomingPlays(game);\n\n expect(localMocks.gamePlayService.removeObsoleteUpcomingPlays).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call getNewUpcomingPlaysForCurrentPhase when called.\", async() => {\n const game = createFakeGame();\n localMocks.gamePlayService.removeObsoleteUpcomingPlays.mockResolvedValue(game);\n localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase.mockReturnValue(game.upcomingPlays);\n localMocks.gamePlayService.sortUpcomingPlaysByPriority.mockReturnValue(game.upcomingPlays);\n await services.gamePlay.refreshUpcomingPlays(game);\n\n expect(localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call sortUpcomingPlaysByPriority when called.\", async() => {\n const game = createFakeGame();\n localMocks.gamePlayService.removeObsoleteUpcomingPlays.mockResolvedValue(game);\n localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase.mockReturnValue(game.upcomingPlays);\n localMocks.gamePlayService.sortUpcomingPlaysByPriority.mockReturnValue(game.upcomingPlays);\n await services.gamePlay.refreshUpcomingPlays(game);\n\n expect(localMocks.gamePlayService.sortUpcomingPlaysByPriority).toHaveBeenCalledExactlyOnceWith(game.upcomingPlays);\n });\n });\n\n describe(\"proceedToNextGamePlay\", () => {\n it(\"should return game as is when there is no upcoming plays.\", () => {\n const game = createFakeGame();\n\n expect(services.gamePlay.proceedToNextGamePlay(game)).toStrictEqual(game);\n });\n\n it(\"should make proceed to next game play when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThiefAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const expectedPlayersToPlay = [players[1], players[3]];\n mocks.gameHelper.getExpectedPlayersToPlay.mockReturnValue(expectedPlayersToPlay);\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayAllVote()], currentPlay: createFakeGamePlayFoxSniffs() });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [],\n currentPlay: createFakeGamePlay({\n ...game.upcomingPlays[0],\n source: createFakeGamePlaySource({ ...game.upcomingPlays[0].source, players: expectedPlayersToPlay }),\n }),\n });\n\n expect(services.gamePlay.proceedToNextGamePlay(game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"getUpcomingDayPlays\", () => {\n it(\"should get upcoming day plays when called.\", () => {\n expect(services.gamePlay.getUpcomingDayPlays()).toStrictEqual([createFakeGamePlayAllVote()]);\n });\n });\n\n describe(\"getUpcomingNightPlays\", () => {\n it.each<{ game: Game; output: GamePlay[]; test: string }>([\n {\n test: \"it's the first night with official rules and some roles\",\n game: createFakeGame({\n turn: 1,\n phase: GAME_PHASES.NIGHT,\n players: bulkCreateFakePlayers(4, [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ]),\n options: defaultGameOptions,\n }),\n output: [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n ],\n },\n {\n test: \"it's the first night with official rules and all roles who act during the night\",\n game: createFakeGame({\n turn: 1,\n phase: GAME_PHASES.NIGHT,\n players: bulkCreateFakePlayers(22, [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeAngelAlivePlayer(),\n createFakeThiefAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeCupidAlivePlayer(),\n createFakeFoxAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]),\n options: defaultGameOptions,\n }),\n output: [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }),\n createFakeGamePlayThiefChoosesCard(),\n createFakeGamePlayDogWolfChoosesSide(),\n createFakeGamePlayCupidCharms(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayFoxSniffs(),\n createFakeGamePlayLoversMeetEachOther(),\n createFakeGamePlayStutteringJudgeChoosesSign(),\n createFakeGamePlayTwoSistersMeetEachOther(),\n createFakeGamePlayThreeBrothersMeetEachOther(),\n createFakeGamePlayWildChildChoosesModel(),\n createFakeGamePlayRavenMarks(),\n createFakeGamePlayGuardProtects(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayWhiteWerewolfEats(),\n createFakeGamePlayBigBadWolfEats(),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayPiedPiperCharms(),\n createFakeGamePlayCharmedMeetEachOther(),\n ],\n },\n {\n test: \"it's the second night with official rules and some roles\",\n game: createFakeGame({\n turn: 2,\n phase: GAME_PHASES.NIGHT,\n players: bulkCreateFakePlayers(4, [\n createFakeCupidAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWitchAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeAngelAlivePlayer(),\n ]),\n options: defaultGameOptions,\n }),\n output: [createFakeGamePlayWerewolvesEat()],\n },\n ])(\"should get upcoming night plays when $test [#$#].\", async({ game, output }) => {\n await expect(services.gamePlay.getUpcomingNightPlays(game)).resolves.toStrictEqual(output);\n });\n });\n\n describe(\"removeObsoleteUpcomingPlays\", () => {\n it(\"should return game as is when no game play needs to be removed.\", async() => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer({ isAlive: false }),\n createFakeWitchAlivePlayer(),\n ];\n const upcomingPlays = [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ players, upcomingPlays });\n\n await expect(services.gamePlay[\"removeObsoleteUpcomingPlays\"](game)).resolves.toStrictEqual(game);\n });\n\n it(\"should remove some game plays when players became powerless or died.\", async() => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer({ isAlive: false }),\n createFakeWitchAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ players, upcomingPlays });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWerewolvesEat(),\n ],\n });\n\n await expect(services.gamePlay[\"removeObsoleteUpcomingPlays\"](game)).resolves.toStrictEqual(expectedGame);\n });\n });\n\n describe(\"isUpcomingPlayNewForCurrentPhase\", () => {\n it(\"should return false when gamePlay is in game's upcoming plays.\", () => {\n const upcomingPlays = [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ upcomingPlays });\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, [])).toBe(false);\n });\n\n it(\"should return false when upcomingPlay is game's current play.\", () => {\n const game = createFakeGame({ currentPlay: createFakeGamePlayAllElectSheriff() });\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, [])).toBe(false);\n });\n\n it(\"should return false when upcomingPlay is already played in game history.\", () => {\n const game = createFakeGame();\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n const allVoteGamePlay = createFakeGamePlayAllVote();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordPlay({\n action: allVoteGamePlay.action,\n source: createFakeGameHistoryRecordPlaySource({ name: allVoteGamePlay.source.name }),\n cause: allVoteGamePlay.cause,\n }),\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordPlay({\n action: upcomingPlay.action,\n source: createFakeGameHistoryRecordPlaySource({ name: upcomingPlay.source.name }),\n cause: upcomingPlay.cause,\n }),\n }),\n ];\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, gameHistoryRecords)).toBe(false);\n });\n\n it(\"should return true when upcoming play is nor the current game play, nor already played nor in game's upcoming plays.\", () => {\n const game = createFakeGame();\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n const allVoteGamePlay = createFakeGamePlayAllVote();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordPlay({\n action: allVoteGamePlay.action,\n source: createFakeGameHistoryRecordPlaySource({ name: allVoteGamePlay.source.name }),\n cause: allVoteGamePlay.cause,\n }),\n }),\n ];\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, gameHistoryRecords)).toBe(true);\n });\n });\n\n describe(\"getNewUpcomingPlaysForCurrentPhase\", () => {\n let localMocks: {\n gamePlayService: {\n getUpcomingDayPlays: jest.SpyInstance;\n getUpcomingNightPlays: jest.SpyInstance;\n isUpcomingPlayNewForCurrentPhase: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n getUpcomingDayPlays: jest.spyOn(services.gamePlay as unknown as { getUpcomingDayPlays }, \"getUpcomingDayPlays\").mockReturnValue([]),\n getUpcomingNightPlays: jest.spyOn(services.gamePlay as unknown as { getUpcomingNightPlays }, \"getUpcomingNightPlays\").mockResolvedValue([]),\n isUpcomingPlayNewForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isUpcomingPlayNewForCurrentPhase }, \"isUpcomingPlayNewForCurrentPhase\"),\n },\n };\n });\n \n it(\"should call getUpcomingNightPlays method with night phase when game phase is night.\", async() => {\n const game = createFakeGame({ phase: GAME_PHASES.NIGHT });\n await services.gamePlay[\"getNewUpcomingPlaysForCurrentPhase\"](game);\n\n expect(localMocks.gamePlayService.getUpcomingNightPlays).toHaveBeenCalledExactlyOnceWith(game);\n expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GAME_PHASES.NIGHT);\n });\n\n it(\"should call getUpcomingNightPlays method with day phase when game phase is day.\", async() => {\n const game = createFakeGame({ phase: GAME_PHASES.DAY });\n await services.gamePlay[\"getNewUpcomingPlaysForCurrentPhase\"](game);\n\n expect(localMocks.gamePlayService.getUpcomingDayPlays).toHaveBeenCalledExactlyOnceWith();\n expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GAME_PHASES.DAY);\n });\n\n it(\"should call isUpcomingPlayNewForCurrentPhase method for as much times as there are upcoming phase plays when filtering them.\", async() => {\n const game = createFakeGame({ phase: GAME_PHASES.NIGHT });\n const upcomingPlays = [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n ];\n localMocks.gamePlayService.getUpcomingNightPlays.mockResolvedValue(upcomingPlays);\n await services.gamePlay[\"getNewUpcomingPlaysForCurrentPhase\"](game);\n\n expect(localMocks.gamePlayService.isUpcomingPlayNewForCurrentPhase).toHaveBeenNthCalledWith(1, upcomingPlays[0], game, []);\n expect(localMocks.gamePlayService.isUpcomingPlayNewForCurrentPhase).toHaveBeenNthCalledWith(2, upcomingPlays[1], game, []);\n expect(localMocks.gamePlayService.isUpcomingPlayNewForCurrentPhase).toHaveBeenNthCalledWith(3, upcomingPlays[2], game, []);\n });\n });\n\n describe(\"validateUpcomingPlaysPriority\", () => {\n it(\"should do nothing when all game plays have a priority.\", () => {\n const upcomingPlays = [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }),\n ];\n\n expect(() => services.gamePlay[\"validateUpcomingPlaysPriority\"](upcomingPlays)).not.toThrow();\n });\n\n it(\"should throw an error when the first upcoming play doesn't have a priority.\", () => {\n const upcomingPlays = [\n createFakeGamePlayWitchUsesPotions({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }),\n ];\n\n expect(() => services.gamePlay[\"validateUpcomingPlaysPriority\"](upcomingPlays)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoGamePlayPriorityUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"validateUpcomingPlaysPriority\", upcomingPlays[0]);\n });\n });\n\n describe(\"sortUpcomingPlaysByPriority\", () => {\n it(\"should return empty array when upcoming plays are empty.\", () => {\n expect(services.gamePlay[\"sortUpcomingPlaysByPriority\"]([])).toStrictEqual([]);\n });\n\n it(\"should return upcoming plays sorted by priority when called with defined actions in priority list.\", () => {\n const upcomingPlaysToSort = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayBigBadWolfEats(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }),\n ];\n const expectedUpcomingPlays = [\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }),\n createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }),\n createFakeGamePlayAllVote(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayBigBadWolfEats(),\n createFakeGamePlayWitchUsesPotions(),\n ];\n\n expect(services.gamePlay[\"sortUpcomingPlaysByPriority\"](upcomingPlaysToSort)).toStrictEqual(expectedUpcomingPlays);\n });\n });\n\n describe(\"isSheriffElectionTime\", () => {\n it(\"should return false when sheriff is not enabled even if it's the time.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.NIGHT }, isEnabled: false, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 1, GAME_PHASES.NIGHT)).toBe(false);\n });\n\n it(\"should return false when it's not the right turn.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.NIGHT }, isEnabled: true, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 2, GAME_PHASES.NIGHT)).toBe(false);\n });\n\n it(\"should return false when it's not the right phase.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.DAY }, isEnabled: true, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 1, GAME_PHASES.NIGHT)).toBe(false);\n });\n\n it(\"should return true when it's the right phase and turn.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.NIGHT }, isEnabled: true, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 1, GAME_PHASES.NIGHT)).toBe(true);\n });\n });\n\n describe(\"isLoversGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when there is no cupid in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when there is cupid in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.CUPID } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when there is no cupid in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when there is cupid in the game but he is dead and there is no lovers.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeCupidAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when there is cupid in the game but he is powerless and there is no lovers.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeCupidAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when there is cupid alive and powerful and there is no lovers.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeCupidAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when cupid is dead but one of the lovers is dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeVileFatherOfWolvesAlivePlayer({ isAlive: false, attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeCupidAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n\n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when cupid is dead and lovers are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeVileFatherOfWolvesAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeCupidAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n\n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isAllGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return true when game play's action is ELECT_SHERIFF.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.DAY });\n const gamePlay = createFakeGamePlayAllElectSheriff();\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n \n it(\"should return true when game play's action is VOTE but reason is not angel presence.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.DAY });\n const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n\n it(\"should return false when there is no angel in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(false);\n });\n\n it(\"should return true when there is angel in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.ANGEL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(true);\n });\n\n it(\"should return false when there is no angel in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return false when there is angel in the game but he is dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE });\n \n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return false when there is angel in the game but he is powerless.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE });\n \n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return true when there is angel in the game alive and powerful.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE });\n \n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n });\n\n describe(\"isGroupGamePlaySuitableForCurrentPhase\", () => {\n let localMocks: {\n gamePlayService: {\n isAllGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isLoversGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n isAllGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isAllGamePlaySuitableForCurrentPhase }, \"isAllGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isLoversGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isLoversGamePlaySuitableForCurrentPhase }, \"isLoversGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isPiedPiperGamePlaySuitableForCurrentPhase }, \"isPiedPiperGamePlaySuitableForCurrentPhase\").mockImplementation(),\n },\n };\n });\n\n it(\"should call all playable method when game plays source group is all.\", () => {\n const game = createFakeGame();\n const gamePlay = createFakeGamePlayAllVote();\n services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isAllGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should call lovers playable method when game plays source group is lovers.\", () => {\n const game = createFakeGame();\n const gamePlay = createFakeGamePlayLoversMeetEachOther();\n services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isLoversGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should call charmed playable method when game plays source group is charmed people.\", () => {\n const game = createFakeGame();\n const gamePlay = createFakeGamePlayCharmedMeetEachOther();\n services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isPiedPiperGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should return true when game plays source group is werewolves and game is dto.\", () => {\n const gameDto = createFakeCreateGameDto();\n const gamePlay = createFakeGamePlayWerewolvesEat();\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(true);\n });\n\n it(\"should return false when game plays source group is villagers and game is dto.\", () => {\n const gameDto = createFakeCreateGameDto();\n const gamePlay = createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.VILLAGERS }) });\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(false);\n });\n\n it(\"should return false when game plays source group is werewolves and all are powerless.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeBigBadWolfAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWitchAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWerewolvesEat();\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return true when game plays source group is werewolves and at least one is alive and powerful.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeBigBadWolfAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWerewolvesEat();\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n });\n\n describe(\"isWitchGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when witch is not in the game dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](gameDto)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is not in the game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is in the game but dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer({ isAlive: false }),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is in the game but powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is in the game but options specify that her turn must be skipped if no more potions.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) });\n const game = createFakeGame({ players, options });\n mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords.mockResolvedValue([createFakeGameHistoryRecord()]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return true when witch is in the game but options specify that her turn must not be skipped even with no more potions.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false }) });\n const game = createFakeGame({ players, options });\n mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords.mockResolvedValue([createFakeGameHistoryRecord()]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(true);\n });\n\n it(\"should return true when witch is in the game but options specify that her turn must be skipped with no more potions but has still death potion.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) });\n const game = createFakeGame({ players, options });\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([createFakeGameHistoryRecord()]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(true);\n });\n\n it(\"should return true when witch is in the game but options specify that her turn must be skipped with no more potions but has still life potion.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) });\n const game = createFakeGame({ players, options });\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([createFakeGameHistoryRecord()]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(true);\n });\n });\n\n describe(\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when white werewolf is not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game dto but options specify that he's never called.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ whiteWerewolf: { wakingUpInterval: 0 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when white werewolf is in the game dto and options specify that he's called every other night.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ whiteWerewolf: { wakingUpInterval: 2 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when white werewolf is not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1 });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game but options specify that he's never called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 0 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game but dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 1 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game but powerless.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 1 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game, alive, powerful, has no targets and options say skip if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, whiteWerewolf: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n mocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([]);\n\n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game, alive and powerful but game's turn is not aligned with his waking up interval.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 4 } }) });\n const game = createFakeGame({ players, turn: 3, options });\n\n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when white werewolf is in the game, alive and powerful.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when white werewolf is in the game, alive, powerful, has targets and options say skip if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, whiteWerewolf: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n mocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([players[3]]);\n\n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isPiedPiperGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when pied piper is not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when pied piper is in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when pied piper is not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when pied piper is in the game can't charm anymore.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakePiedPiperAlivePlayer({ isAlive: false }),\n ]);\n jest.spyOn(PlayerHelper, \"canPiedPiperCharm\").mockReturnValue(false);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when pied piper is in the game and can still charm.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]);\n jest.spyOn(PlayerHelper, \"canPiedPiperCharm\").mockReturnValue(true);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isBigBadWolfGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when big bad wolf is not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when big bad wolf is in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.BIG_BAD_WOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when big bad wolf is not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when big bad wolf is in the game but dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when big bad wolf is in the game but one werewolf is dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when big bad wolf is in the game, all werewolves are alive and his turn is skipped if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when big bad wolf is in the game, all werewolves are alive and his turn is skipped if no targets but there are targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[1]]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when big bad wolf is in the game, one werewolf is dead but classic rules are not followed.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: false } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when big bad wolf is in the game and all werewolves are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when big bad wolf is in the game, all werewolves are alive and his turn is no skipped if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isThreeBrothersGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when three brothers are not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return false when three brothers are in the game dto but options specify that they are never called.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 0 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when three brother are in the game dto and options specify that they are called every other night.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when three brothers are not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when three brothers is in the game but options specify that they are never called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 0 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when three brothers are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when two brothers are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when one brothers is alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when all brothers are dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n });\n\n describe(\"isTwoSistersGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when two sisters are not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return false when two sisters are in the game dto but options specify that they are never called.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 0 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when two sisters are in the game dto and options specify that they are called every other night.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when two sisters are not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when two sisters is in the game but options specify that they are never called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 0 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when two sisters are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when one sister is alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when all sisters are dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n });\n\n describe(\"isRoleGamePlaySuitableForCurrentPhase\", () => {\n let localMocks: {\n gamePlayService: {\n isTwoSistersGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isThreeBrothersGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isBigBadWolfGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isWhiteWerewolfGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isWitchGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n isTwoSistersGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isTwoSistersGamePlaySuitableForCurrentPhase }, \"isTwoSistersGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isThreeBrothersGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isThreeBrothersGamePlaySuitableForCurrentPhase }, \"isThreeBrothersGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isBigBadWolfGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isBigBadWolfGamePlaySuitableForCurrentPhase }, \"isBigBadWolfGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isPiedPiperGamePlaySuitableForCurrentPhase }, \"isPiedPiperGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isWhiteWerewolfGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isWhiteWerewolfGamePlaySuitableForCurrentPhase }, \"isWhiteWerewolfGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isWitchGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isWitchGamePlaySuitableForCurrentPhase }, \"isWitchGamePlaySuitableForCurrentPhase\").mockImplementation(),\n },\n };\n });\n \n it(\"should return false when player is not in game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should call two sisters method when game play source role is two sisters.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayTwoSistersMeetEachOther();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isTwoSistersGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call three brothers method when game play source role is three brothers.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayThreeBrothersMeetEachOther();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isThreeBrothersGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call big bad wolf method when game plays source role is big bad wolf.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayBigBadWolfEats();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isBigBadWolfGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call pied piper method when game plays source role is pied piper.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayPiedPiperCharms();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isPiedPiperGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call white werewolf method when game plays source role is white werewolf.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWhiteWerewolfEats();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isWhiteWerewolfGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call witch method when game plays source role is witch.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWitchUsesPotions();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isWitchGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should return true when game plays source role is hunter and player is dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.HUNTER } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } },\n { role: { name: ROLE_NAMES.LITTLE_GIRL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayHunterShoots();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return true when game plays source role is hunter and player is powerful.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayHunterShoots();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return false when game plays source role is hunter and player is powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeHunterAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayHunterShoots();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return true when game plays source role is scapegoat and player is dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SCAPEGOAT } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } },\n { role: { name: ROLE_NAMES.LITTLE_GIRL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayScapegoatBansVoting();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return true when game plays source role is scapegoat and player is powerful.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeScapegoatAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayScapegoatBansVoting();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return false when game plays source role is scapegoat and player is powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeScapegoatAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayScapegoatBansVoting();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return true when player is dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } },\n { role: { name: ROLE_NAMES.LITTLE_GIRL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return false when player is dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return false when player is powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return true when player is alive and powerful.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(true);\n });\n });\n\n describe(\"isSheriffGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when sheriff is not enabled.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: false }) }) });\n const game = createFakeCreateGameDto({ options });\n \n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when game is dto.\", () => {\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: true }) }) });\n const game = createFakeCreateGameDto({ options });\n\n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when sheriff is not in the game.\", () => {\n const players = [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeCupidAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when sheriff is in the game.\", () => {\n const players = [\n createFakeWhiteWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeCupidAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isGamePlaySuitableForCurrentPhase\", () => {\n it(\"should call isRoleGamePlaySuitableForCurrentPhase when source is a sheriff.\", async() => {\n const game = createFakeGame();\n const isSheriffGamePlaySuitableForCurrentPhaseSpy = jest.spyOn(services.gamePlay as unknown as { isSheriffGamePlaySuitableForCurrentPhase }, \"isSheriffGamePlaySuitableForCurrentPhase\");\n const gamePlay = createFakeGamePlaySheriffDelegates();\n await services.gamePlay[\"isGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(isSheriffGamePlaySuitableForCurrentPhaseSpy).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call isRoleGamePlaySuitableForCurrentPhase when source is a role.\", async() => {\n const game = createFakeGame();\n const isRoleGamePlaySuitableForCurrentPhaseSpy = jest.spyOn(services.gamePlay as unknown as { isRoleGamePlaySuitableForCurrentPhase }, \"isRoleGamePlaySuitableForCurrentPhase\");\n const gamePlay = createFakeGamePlaySeerLooks();\n await services.gamePlay[\"isGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(isRoleGamePlaySuitableForCurrentPhaseSpy).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should call isGroupGamePlaySuitableForCurrentPhase when source is a group.\", async() => {\n const game = createFakeGame();\n const isGroupGamePlaySuitableForCurrentPhaseSpy = jest.spyOn(services.gamePlay as unknown as { isGroupGamePlaySuitableForCurrentPhase }, \"isGroupGamePlaySuitableForCurrentPhase\");\n const gamePlay = createFakeGamePlayAllVote();\n await services.gamePlay[\"isGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n \n expect(isGroupGamePlaySuitableForCurrentPhaseSpy).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport { when } from \"jest-when\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { DEFAULT_GAME_OPTIONS } from \"@/modules/game/constants/game-options/game-options.constant\";\nimport { GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport * as PlayerHelper from \"@/modules/game/helpers/player/player.helper\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeAngelAlivePlayer, createFakeBigBadWolfAlivePlayer, createFakeCupidAlivePlayer, createFakeDogWolfAlivePlayer, createFakeFoxAlivePlayer, createFakeGuardAlivePlayer, createFakeHunterAlivePlayer, createFakePiedPiperAlivePlayer, createFakeRavenAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeStutteringJudgeAlivePlayer, createFakeThiefAlivePlayer, createFakeThreeBrothersAlivePlayer, createFakeTwoSistersAlivePlayer, createFakeVileFatherOfWolvesAlivePlayer, createFakeVillagerAlivePlayer, createFakeVillagerVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer, createFakeWildChildAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGamePlay, createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayBigBadWolfEats, createFakeGamePlayCharmedMeetEachOther, createFakeGamePlayCupidCharms, createFakeGamePlayDogWolfChoosesSide, createFakeGamePlayFoxSniffs, createFakeGamePlayGuardProtects, createFakeGamePlayHunterShoots, createFakeGamePlayLoversMeetEachOther, createFakeGamePlayPiedPiperCharms, createFakeGamePlayRavenMarks, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySeerLooks, createFakeGamePlaySheriffDelegates, createFakeGamePlayStutteringJudgeChoosesSign, createFakeGamePlayThiefChoosesCard, createFakeGamePlayThreeBrothersMeetEachOther, createFakeGamePlayTwoSistersMeetEachOther, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats, createFakeGamePlayWildChildChoosesModel, createFakeGamePlayWitchUsesPotions } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeRolesGameOptions, createFakeSheriffGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory\";\n\ndescribe(\"Game Play Service\", () => {\n let services: { gamePlay: GamePlayService };\n let mocks: {\n gameHistoryRecordService: {\n getGameHistoryWitchUsesSpecificPotionRecords: jest.SpyInstance;\n getGameHistoryPhaseRecords: jest.SpyInstance;\n };\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.SpyInstance;\n getLeftToEatByWhiteWerewolfPlayers: jest.SpyInstance;\n getExpectedPlayersToPlay: jest.SpyInstance;\n };\n unexpectedExceptionFactory: {\n createNoGamePlayPriorityUnexpectedException: jest.SpyInstance;\n };\n };\n\n beforeEach(async() => {\n mocks = {\n gameHistoryRecordService: {\n getGameHistoryWitchUsesSpecificPotionRecords: jest.fn().mockResolvedValue([]),\n getGameHistoryPhaseRecords: jest.fn().mockResolvedValue([]),\n },\n gameHelper: {\n getLeftToEatByWerewolvesPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWerewolvesPlayers\").mockReturnValue([]),\n getLeftToEatByWhiteWerewolfPlayers: jest.spyOn(GameHelper, \"getLeftToEatByWhiteWerewolfPlayers\").mockReturnValue([]),\n getExpectedPlayersToPlay: jest.spyOn(GameHelper, \"getExpectedPlayersToPlay\").mockReturnValue([]),\n },\n unexpectedExceptionFactory: { createNoGamePlayPriorityUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoGamePlayPriorityUnexpectedException\").mockImplementation() },\n };\n const module: TestingModule = await Test.createTestingModule({\n providers: [\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n GamePlayService,\n ],\n }).compile();\n \n services = { gamePlay: module.get(GamePlayService) };\n });\n\n describe(\"refreshUpcomingPlays\", () => {\n let localMocks: {\n gamePlayService: {\n removeObsoleteUpcomingPlays: jest.SpyInstance;\n getNewUpcomingPlaysForCurrentPhase: jest.SpyInstance;\n sortUpcomingPlaysByPriority: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n removeObsoleteUpcomingPlays: jest.spyOn(services.gamePlay as unknown as { removeObsoleteUpcomingPlays }, \"removeObsoleteUpcomingPlays\").mockImplementation(),\n getNewUpcomingPlaysForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { getNewUpcomingPlaysForCurrentPhase }, \"getNewUpcomingPlaysForCurrentPhase\").mockImplementation(),\n sortUpcomingPlaysByPriority: jest.spyOn(services.gamePlay as unknown as { sortUpcomingPlaysByPriority }, \"sortUpcomingPlaysByPriority\").mockImplementation(),\n },\n };\n });\n\n it(\"should call removeObsoleteUpcomingPlays when called.\", async() => {\n const game = createFakeGame();\n localMocks.gamePlayService.removeObsoleteUpcomingPlays.mockResolvedValue(game);\n localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase.mockReturnValue(game.upcomingPlays);\n localMocks.gamePlayService.sortUpcomingPlaysByPriority.mockReturnValue(game.upcomingPlays);\n await services.gamePlay.refreshUpcomingPlays(game);\n\n expect(localMocks.gamePlayService.removeObsoleteUpcomingPlays).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call getNewUpcomingPlaysForCurrentPhase when called.\", async() => {\n const game = createFakeGame();\n localMocks.gamePlayService.removeObsoleteUpcomingPlays.mockResolvedValue(game);\n localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase.mockReturnValue(game.upcomingPlays);\n localMocks.gamePlayService.sortUpcomingPlaysByPriority.mockReturnValue(game.upcomingPlays);\n await services.gamePlay.refreshUpcomingPlays(game);\n\n expect(localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call sortUpcomingPlaysByPriority when called.\", async() => {\n const game = createFakeGame();\n localMocks.gamePlayService.removeObsoleteUpcomingPlays.mockResolvedValue(game);\n localMocks.gamePlayService.getNewUpcomingPlaysForCurrentPhase.mockReturnValue(game.upcomingPlays);\n localMocks.gamePlayService.sortUpcomingPlaysByPriority.mockReturnValue(game.upcomingPlays);\n await services.gamePlay.refreshUpcomingPlays(game);\n\n expect(localMocks.gamePlayService.sortUpcomingPlaysByPriority).toHaveBeenCalledExactlyOnceWith(game.upcomingPlays);\n });\n });\n\n describe(\"proceedToNextGamePlay\", () => {\n it(\"should return game as is when there is no upcoming plays.\", () => {\n const game = createFakeGame();\n\n expect(services.gamePlay.proceedToNextGamePlay(game)).toStrictEqual(game);\n });\n\n it(\"should make proceed to next game play when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThiefAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const expectedPlayersToPlay = [players[1], players[3]];\n mocks.gameHelper.getExpectedPlayersToPlay.mockReturnValue(expectedPlayersToPlay);\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayAllVote()], currentPlay: createFakeGamePlayFoxSniffs() });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [],\n currentPlay: createFakeGamePlay({\n ...game.upcomingPlays[0],\n source: createFakeGamePlaySource({ ...game.upcomingPlays[0].source, players: expectedPlayersToPlay }),\n }),\n });\n\n expect(services.gamePlay.proceedToNextGamePlay(game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"getUpcomingDayPlays\", () => {\n it(\"should get upcoming day plays when called.\", () => {\n expect(services.gamePlay.getUpcomingDayPlays()).toStrictEqual([createFakeGamePlayAllVote()]);\n });\n });\n\n describe(\"getUpcomingNightPlays\", () => {\n it.each<{ game: Game; output: GamePlay[]; test: string }>([\n {\n test: \"it's the first night with official rules and some roles\",\n game: createFakeGame({\n turn: 1,\n phase: GamePhases.NIGHT,\n players: bulkCreateFakePlayers(4, [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ]),\n options: DEFAULT_GAME_OPTIONS,\n }),\n output: [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n ],\n },\n {\n test: \"it's the first night with official rules and all roles who act during the night\",\n game: createFakeGame({\n turn: 1,\n phase: GamePhases.NIGHT,\n players: bulkCreateFakePlayers(22, [\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeAngelAlivePlayer(),\n createFakeThiefAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeCupidAlivePlayer(),\n createFakeFoxAlivePlayer(),\n createFakeStutteringJudgeAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]),\n options: DEFAULT_GAME_OPTIONS,\n }),\n output: [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }),\n createFakeGamePlayThiefChoosesCard(),\n createFakeGamePlayDogWolfChoosesSide(),\n createFakeGamePlayCupidCharms(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayFoxSniffs(),\n createFakeGamePlayLoversMeetEachOther(),\n createFakeGamePlayStutteringJudgeChoosesSign(),\n createFakeGamePlayTwoSistersMeetEachOther(),\n createFakeGamePlayThreeBrothersMeetEachOther(),\n createFakeGamePlayWildChildChoosesModel(),\n createFakeGamePlayRavenMarks(),\n createFakeGamePlayGuardProtects(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayWhiteWerewolfEats(),\n createFakeGamePlayBigBadWolfEats(),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayPiedPiperCharms(),\n createFakeGamePlayCharmedMeetEachOther(),\n ],\n },\n {\n test: \"it's the second night with official rules and some roles\",\n game: createFakeGame({\n turn: 2,\n phase: GamePhases.NIGHT,\n players: bulkCreateFakePlayers(4, [\n createFakeCupidAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWitchAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeAngelAlivePlayer(),\n ]),\n options: DEFAULT_GAME_OPTIONS,\n }),\n output: [createFakeGamePlayWerewolvesEat()],\n },\n ])(\"should get upcoming night plays when $test [#$#].\", async({ game, output }) => {\n await expect(services.gamePlay.getUpcomingNightPlays(game)).resolves.toStrictEqual(output);\n });\n });\n\n describe(\"removeObsoleteUpcomingPlays\", () => {\n it(\"should return game as is when no game play needs to be removed.\", async() => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer({ isAlive: false }),\n createFakeWitchAlivePlayer(),\n ];\n const upcomingPlays = [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ players, upcomingPlays });\n\n await expect(services.gamePlay[\"removeObsoleteUpcomingPlays\"](game)).resolves.toStrictEqual(game);\n });\n\n it(\"should remove some game plays when players became powerless or died.\", async() => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer({ isAlive: false }),\n createFakeWitchAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ players, upcomingPlays });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWerewolvesEat(),\n ],\n });\n\n await expect(services.gamePlay[\"removeObsoleteUpcomingPlays\"](game)).resolves.toStrictEqual(expectedGame);\n });\n });\n\n describe(\"isUpcomingPlayNewForCurrentPhase\", () => {\n it(\"should return false when gamePlay is in game's upcoming plays.\", () => {\n const upcomingPlays = [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ upcomingPlays });\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, [])).toBe(false);\n });\n\n it(\"should return false when upcomingPlay is game's current play.\", () => {\n const game = createFakeGame({ currentPlay: createFakeGamePlayAllElectSheriff() });\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, [])).toBe(false);\n });\n\n it(\"should return false when upcomingPlay is already played in game history.\", () => {\n const game = createFakeGame();\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n const allVoteGamePlay = createFakeGamePlayAllVote();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordPlay({\n action: allVoteGamePlay.action,\n source: createFakeGameHistoryRecordPlaySource({ name: allVoteGamePlay.source.name }),\n cause: allVoteGamePlay.cause,\n }),\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordPlay({\n action: upcomingPlay.action,\n source: createFakeGameHistoryRecordPlaySource({ name: upcomingPlay.source.name }),\n cause: upcomingPlay.cause,\n }),\n }),\n ];\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, gameHistoryRecords)).toBe(false);\n });\n\n it(\"should return true when upcoming play is nor the current game play, nor already played nor in game's upcoming plays.\", () => {\n const game = createFakeGame();\n const upcomingPlay = createFakeGamePlayAllElectSheriff();\n const allVoteGamePlay = createFakeGamePlayAllVote();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordPlay({\n action: allVoteGamePlay.action,\n source: createFakeGameHistoryRecordPlaySource({ name: allVoteGamePlay.source.name }),\n cause: allVoteGamePlay.cause,\n }),\n }),\n ];\n\n expect(services.gamePlay[\"isUpcomingPlayNewForCurrentPhase\"](upcomingPlay, game, gameHistoryRecords)).toBe(true);\n });\n });\n\n describe(\"getNewUpcomingPlaysForCurrentPhase\", () => {\n let localMocks: {\n gamePlayService: {\n getUpcomingDayPlays: jest.SpyInstance;\n getUpcomingNightPlays: jest.SpyInstance;\n isUpcomingPlayNewForCurrentPhase: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n getUpcomingDayPlays: jest.spyOn(services.gamePlay as unknown as { getUpcomingDayPlays }, \"getUpcomingDayPlays\").mockReturnValue([]),\n getUpcomingNightPlays: jest.spyOn(services.gamePlay as unknown as { getUpcomingNightPlays }, \"getUpcomingNightPlays\").mockResolvedValue([]),\n isUpcomingPlayNewForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isUpcomingPlayNewForCurrentPhase }, \"isUpcomingPlayNewForCurrentPhase\"),\n },\n };\n });\n \n it(\"should call getUpcomingNightPlays method with night phase when game phase is night.\", async() => {\n const game = createFakeGame({ phase: GamePhases.NIGHT });\n await services.gamePlay[\"getNewUpcomingPlaysForCurrentPhase\"](game);\n\n expect(localMocks.gamePlayService.getUpcomingNightPlays).toHaveBeenCalledExactlyOnceWith(game);\n expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GamePhases.NIGHT);\n });\n\n it(\"should call getUpcomingNightPlays method with day phase when game phase is day.\", async() => {\n const game = createFakeGame({ phase: GamePhases.DAY });\n await services.gamePlay[\"getNewUpcomingPlaysForCurrentPhase\"](game);\n\n expect(localMocks.gamePlayService.getUpcomingDayPlays).toHaveBeenCalledExactlyOnceWith();\n expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GamePhases.DAY);\n });\n\n it(\"should call isUpcomingPlayNewForCurrentPhase method for as much times as there are upcoming phase plays when filtering them.\", async() => {\n const game = createFakeGame({ phase: GamePhases.NIGHT });\n const upcomingPlays = [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n ];\n localMocks.gamePlayService.getUpcomingNightPlays.mockResolvedValue(upcomingPlays);\n await services.gamePlay[\"getNewUpcomingPlaysForCurrentPhase\"](game);\n\n expect(localMocks.gamePlayService.isUpcomingPlayNewForCurrentPhase).toHaveBeenNthCalledWith(1, upcomingPlays[0], game, []);\n expect(localMocks.gamePlayService.isUpcomingPlayNewForCurrentPhase).toHaveBeenNthCalledWith(2, upcomingPlays[1], game, []);\n expect(localMocks.gamePlayService.isUpcomingPlayNewForCurrentPhase).toHaveBeenNthCalledWith(3, upcomingPlays[2], game, []);\n });\n });\n\n describe(\"validateUpcomingPlaysPriority\", () => {\n it(\"should do nothing when all game plays have a priority.\", () => {\n const upcomingPlays = [\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }),\n ];\n\n expect(() => services.gamePlay[\"validateUpcomingPlaysPriority\"](upcomingPlays)).not.toThrow();\n });\n\n it(\"should throw an error when the first upcoming play doesn't have a priority.\", () => {\n const upcomingPlays = [\n createFakeGamePlayWitchUsesPotions({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }),\n ];\n\n expect(() => services.gamePlay[\"validateUpcomingPlaysPriority\"](upcomingPlays)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoGamePlayPriorityUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"validateUpcomingPlaysPriority\", upcomingPlays[0]);\n });\n });\n\n describe(\"sortUpcomingPlaysByPriority\", () => {\n it(\"should return empty array when upcoming plays are empty.\", () => {\n expect(services.gamePlay[\"sortUpcomingPlaysByPriority\"]([])).toStrictEqual([]);\n });\n\n it(\"should return upcoming plays sorted by priority when called with defined actions in priority list.\", () => {\n const upcomingPlaysToSort = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayBigBadWolfEats(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }),\n createFakeGamePlayWitchUsesPotions(),\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }),\n ];\n const expectedUpcomingPlays = [\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayAllElectSheriff(),\n createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }),\n createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }),\n createFakeGamePlayAllVote(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayBigBadWolfEats(),\n createFakeGamePlayWitchUsesPotions(),\n ];\n\n expect(services.gamePlay[\"sortUpcomingPlaysByPriority\"](upcomingPlaysToSort)).toStrictEqual(expectedUpcomingPlays);\n });\n });\n\n describe(\"isSheriffElectionTime\", () => {\n it(\"should return false when sheriff is not enabled even if it's the time.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.NIGHT }, isEnabled: false, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 1, GamePhases.NIGHT)).toBe(false);\n });\n\n it(\"should return false when it's not the right turn.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.NIGHT }, isEnabled: true, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 2, GamePhases.NIGHT)).toBe(false);\n });\n\n it(\"should return false when it's not the right phase.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.DAY }, isEnabled: true, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 1, GamePhases.NIGHT)).toBe(false);\n });\n\n it(\"should return true when it's the right phase and turn.\", () => {\n const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.NIGHT }, isEnabled: true, hasDoubledVote: false });\n \n expect(services.gamePlay[\"isSheriffElectionTime\"](sheriffGameOptions, 1, GamePhases.NIGHT)).toBe(true);\n });\n });\n\n describe(\"isLoversGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when there is no cupid in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when there is cupid in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.CUPID } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when there is no cupid in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when there is cupid in the game but he is dead and there is no lovers.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeCupidAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when there is cupid in the game but he is powerless and there is no lovers.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeCupidAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when there is cupid alive and powerful and there is no lovers.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeCupidAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when cupid is dead but one of the lovers is dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeVileFatherOfWolvesAlivePlayer({ isAlive: false, attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeCupidAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n\n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when cupid is dead and lovers are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeVileFatherOfWolvesAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeCupidAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n\n expect(services.gamePlay[\"isLoversGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isAllGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return true when game play's action is ELECT_SHERIFF.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GamePhases.DAY });\n const gamePlay = createFakeGamePlayAllElectSheriff();\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n \n it(\"should return true when game play's action is VOTE but reason is not angel presence.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GamePhases.DAY });\n const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n\n it(\"should return false when there is no angel in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(false);\n });\n\n it(\"should return true when there is angel in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.ANGEL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(true);\n });\n\n it(\"should return false when there is no angel in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeVillagerVillagerAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE });\n\n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return false when there is angel in the game but he is dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE });\n \n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return false when there is angel in the game but he is powerless.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE });\n \n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return true when there is angel in the game alive and powerful.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT });\n const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE });\n \n expect(services.gamePlay[\"isAllGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n });\n\n describe(\"isGroupGamePlaySuitableForCurrentPhase\", () => {\n let localMocks: {\n gamePlayService: {\n isAllGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isLoversGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n isAllGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isAllGamePlaySuitableForCurrentPhase }, \"isAllGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isLoversGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isLoversGamePlaySuitableForCurrentPhase }, \"isLoversGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isPiedPiperGamePlaySuitableForCurrentPhase }, \"isPiedPiperGamePlaySuitableForCurrentPhase\").mockImplementation(),\n },\n };\n });\n\n it(\"should call all playable method when game plays source group is all.\", () => {\n const game = createFakeGame();\n const gamePlay = createFakeGamePlayAllVote();\n services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isAllGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should call lovers playable method when game plays source group is lovers.\", () => {\n const game = createFakeGame();\n const gamePlay = createFakeGamePlayLoversMeetEachOther();\n services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isLoversGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should call charmed playable method when game plays source group is charmed people.\", () => {\n const game = createFakeGame();\n const gamePlay = createFakeGamePlayCharmedMeetEachOther();\n services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isPiedPiperGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should return true when game plays source group is werewolves and game is dto.\", () => {\n const gameDto = createFakeCreateGameDto();\n const gamePlay = createFakeGamePlayWerewolvesEat();\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(true);\n });\n\n it(\"should return false when game plays source group is villagers and game is dto.\", () => {\n const gameDto = createFakeCreateGameDto();\n const gamePlay = createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PlayerGroups.VILLAGERS }) });\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).toBe(false);\n });\n\n it(\"should return false when game plays source group is werewolves and all are powerless.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeBigBadWolfAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWitchAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWerewolvesEat();\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(false);\n });\n\n it(\"should return true when game plays source group is werewolves and at least one is alive and powerful.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeBigBadWolfAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWerewolvesEat();\n\n expect(services.gamePlay[\"isGroupGamePlaySuitableForCurrentPhase\"](game, gamePlay)).toBe(true);\n });\n });\n\n describe(\"isWitchGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when witch is not in the game dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](gameDto)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is not in the game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is in the game but dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer({ isAlive: false }),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is in the game but powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return false when witch is in the game but options specify that her turn must be skipped if no more potions.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) });\n const game = createFakeGame({ players, options });\n mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords.mockResolvedValue([createFakeGameHistoryRecord()]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(false);\n });\n\n it(\"should return true when witch is in the game but options specify that her turn must not be skipped even with no more potions.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false }) });\n const game = createFakeGame({ players, options });\n mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords.mockResolvedValue([createFakeGameHistoryRecord()]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(true);\n });\n\n it(\"should return true when witch is in the game but options specify that her turn must be skipped with no more potions but has still death potion.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) });\n const game = createFakeGame({ players, options });\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([createFakeGameHistoryRecord()]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(true);\n });\n\n it(\"should return true when witch is in the game but options specify that her turn must be skipped with no more potions but has still life potion.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) });\n const game = createFakeGame({ players, options });\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([createFakeGameHistoryRecord()]);\n when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]);\n\n await expect(services.gamePlay[\"isWitchGamePlaySuitableForCurrentPhase\"](game)).resolves.toBe(true);\n });\n });\n\n describe(\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when white werewolf is not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game dto but options specify that he's never called.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ whiteWerewolf: { wakingUpInterval: 0 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when white werewolf is in the game dto and options specify that he's called every other night.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ whiteWerewolf: { wakingUpInterval: 2 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when white werewolf is not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players, turn: 1 });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game but options specify that he's never called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 0 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game but dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 1 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game but powerless.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 1 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game, alive, powerful, has no targets and options say skip if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, whiteWerewolf: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n mocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([]);\n\n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when white werewolf is in the game, alive and powerful but game's turn is not aligned with his waking up interval.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 4 } }) });\n const game = createFakeGame({ players, turn: 3, options });\n\n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when white werewolf is in the game, alive and powerful.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, whiteWerewolf: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n \n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when white werewolf is in the game, alive, powerful, has targets and options say skip if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, whiteWerewolf: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, turn: 1, options });\n mocks.gameHelper.getLeftToEatByWhiteWerewolfPlayers.mockReturnValue([players[3]]);\n\n expect(services.gamePlay[\"isWhiteWerewolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isPiedPiperGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when pied piper is not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when pied piper is in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.PIED_PIPER } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when pied piper is not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when pied piper is in the game can't charm anymore.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakePiedPiperAlivePlayer({ isAlive: false }),\n ]);\n jest.spyOn(PlayerHelper, \"canPiedPiperCharm\").mockReturnValue(false);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when pied piper is in the game and can still charm.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]);\n jest.spyOn(PlayerHelper, \"canPiedPiperCharm\").mockReturnValue(true);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isPiedPiperGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isBigBadWolfGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when big bad wolf is not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when big bad wolf is in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.BIG_BAD_WOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when big bad wolf is not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when big bad wolf is in the game but dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when big bad wolf is in the game but one werewolf is dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when big bad wolf is in the game, all werewolves are alive and his turn is skipped if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when big bad wolf is in the game, all werewolves are alive and his turn is skipped if no targets but there are targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[1]]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when big bad wolf is in the game, one werewolf is dead but classic rules are not followed.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: false } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when big bad wolf is in the game and all werewolves are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]);\n \n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when big bad wolf is in the game, all werewolves are alive and his turn is no skipped if no targets.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: false, bigBadWolf: { isPowerlessIfWerewolfDies: true } }) });\n const game = createFakeGame({ players, options });\n mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([]);\n\n expect(services.gamePlay[\"isBigBadWolfGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isThreeBrothersGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when three brothers are not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return false when three brothers are in the game dto but options specify that they are never called.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.THREE_BROTHERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 0 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when three brother are in the game dto and options specify that they are called every other night.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.THREE_BROTHERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when three brothers are not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVileFatherOfWolvesAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when three brothers is in the game but options specify that they are never called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 0 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when three brothers are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return true when two brothers are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when one brothers is alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when all brothers are dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n createFakeThreeBrothersAlivePlayer({ isAlive: false }),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isThreeBrothersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n });\n\n describe(\"isTwoSistersGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when two sisters are not in the game dto.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return false when two sisters are in the game dto but options specify that they are never called.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER_VILLAGER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 0 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(false);\n });\n\n it(\"should return true when two sisters are in the game dto and options specify that they are called every other night.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const gameDto = createFakeCreateGameDto({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](gameDto)).toBe(true);\n });\n\n it(\"should return false when two sisters are not in the game.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when two sisters is in the game but options specify that they are never called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 0 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when two sisters are alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when one sister is alive.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return false when all sisters are dead.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeWildChildAlivePlayer(),\n ]);\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) });\n const game = createFakeGame({ players, options });\n \n expect(services.gamePlay[\"isTwoSistersGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n });\n\n describe(\"isRoleGamePlaySuitableForCurrentPhase\", () => {\n let localMocks: {\n gamePlayService: {\n isTwoSistersGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isThreeBrothersGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isBigBadWolfGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isWhiteWerewolfGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n isWitchGamePlaySuitableForCurrentPhase: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayService: {\n isTwoSistersGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isTwoSistersGamePlaySuitableForCurrentPhase }, \"isTwoSistersGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isThreeBrothersGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isThreeBrothersGamePlaySuitableForCurrentPhase }, \"isThreeBrothersGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isBigBadWolfGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isBigBadWolfGamePlaySuitableForCurrentPhase }, \"isBigBadWolfGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isPiedPiperGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isPiedPiperGamePlaySuitableForCurrentPhase }, \"isPiedPiperGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isWhiteWerewolfGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isWhiteWerewolfGamePlaySuitableForCurrentPhase }, \"isWhiteWerewolfGamePlaySuitableForCurrentPhase\").mockImplementation(),\n isWitchGamePlaySuitableForCurrentPhase: jest.spyOn(services.gamePlay as unknown as { isWitchGamePlaySuitableForCurrentPhase }, \"isWitchGamePlaySuitableForCurrentPhase\").mockImplementation(),\n },\n };\n });\n \n it(\"should return false when player is not in game.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should call two sisters method when game play source role is two sisters.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayTwoSistersMeetEachOther();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isTwoSistersGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call three brothers method when game play source role is three brothers.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeThreeBrothersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n createFakeThreeBrothersAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayThreeBrothersMeetEachOther();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isThreeBrothersGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call big bad wolf method when game plays source role is big bad wolf.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayBigBadWolfEats();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isBigBadWolfGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call pied piper method when game plays source role is pied piper.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayPiedPiperCharms();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isPiedPiperGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call white werewolf method when game plays source role is white werewolf.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWhiteWerewolfEats();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isWhiteWerewolfGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call witch method when game plays source role is witch.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeBigBadWolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWitchAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayWitchUsesPotions();\n await services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(localMocks.gamePlayService.isWitchGamePlaySuitableForCurrentPhase).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should return true when game plays source role is hunter and player is dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.HUNTER } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n { role: { name: RoleNames.VILLAGER_VILLAGER } },\n { role: { name: RoleNames.LITTLE_GIRL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayHunterShoots();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return true when game plays source role is hunter and player is powerful.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayHunterShoots();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return false when game plays source role is hunter and player is powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeHunterAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayHunterShoots();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return true when game plays source role is scapegoat and player is dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SCAPEGOAT } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n { role: { name: RoleNames.VILLAGER_VILLAGER } },\n { role: { name: RoleNames.LITTLE_GIRL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlayScapegoatBansVoting();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return true when game plays source role is scapegoat and player is powerful.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeScapegoatAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayScapegoatBansVoting();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return false when game plays source role is scapegoat and player is powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeScapegoatAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlayScapegoatBansVoting();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return true when player is dto.\", async() => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n { role: { name: RoleNames.VILLAGER_VILLAGER } },\n { role: { name: RoleNames.LITTLE_GIRL } },\n ]);\n const gameDto = createFakeCreateGameDto({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](gameDto, gamePlay)).resolves.toBe(true);\n });\n\n it(\"should return false when player is dead.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return false when player is powerless.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(false);\n });\n\n it(\"should return true when player is alive and powerful.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeTwoSistersAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n const gamePlay = createFakeGamePlaySeerLooks();\n\n await expect(services.gamePlay[\"isRoleGamePlaySuitableForCurrentPhase\"](game, gamePlay)).resolves.toBe(true);\n });\n });\n\n describe(\"isSheriffGamePlaySuitableForCurrentPhase\", () => {\n it(\"should return false when sheriff is not enabled.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: false }) }) });\n const game = createFakeCreateGameDto({ options });\n \n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when game is dto.\", () => {\n const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: true }) }) });\n const game = createFakeCreateGameDto({ options });\n\n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n\n it(\"should return false when sheriff is not in the game.\", () => {\n const players = [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeCupidAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(false);\n });\n\n it(\"should return true when sheriff is in the game.\", () => {\n const players = [\n createFakeWhiteWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeCupidAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ sheriff: createFakeSheriffGameOptions({ isEnabled: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(services.gamePlay[\"isSheriffGamePlaySuitableForCurrentPhase\"](game)).toBe(true);\n });\n });\n\n describe(\"isGamePlaySuitableForCurrentPhase\", () => {\n it(\"should call isRoleGamePlaySuitableForCurrentPhase when source is a sheriff.\", async() => {\n const game = createFakeGame();\n const isSheriffGamePlaySuitableForCurrentPhaseSpy = jest.spyOn(services.gamePlay as unknown as { isSheriffGamePlaySuitableForCurrentPhase }, \"isSheriffGamePlaySuitableForCurrentPhase\");\n const gamePlay = createFakeGamePlaySheriffDelegates();\n await services.gamePlay[\"isGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(isSheriffGamePlaySuitableForCurrentPhaseSpy).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call isRoleGamePlaySuitableForCurrentPhase when source is a role.\", async() => {\n const game = createFakeGame();\n const isRoleGamePlaySuitableForCurrentPhaseSpy = jest.spyOn(services.gamePlay as unknown as { isRoleGamePlaySuitableForCurrentPhase }, \"isRoleGamePlaySuitableForCurrentPhase\");\n const gamePlay = createFakeGamePlaySeerLooks();\n await services.gamePlay[\"isGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n\n expect(isRoleGamePlaySuitableForCurrentPhaseSpy).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n\n it(\"should call isGroupGamePlaySuitableForCurrentPhase when source is a group.\", async() => {\n const game = createFakeGame();\n const isGroupGamePlaySuitableForCurrentPhaseSpy = jest.spyOn(services.gamePlay as unknown as { isGroupGamePlaySuitableForCurrentPhase }, \"isGroupGamePlaySuitableForCurrentPhase\");\n const gamePlay = createFakeGamePlayAllVote();\n await services.gamePlay[\"isGamePlaySuitableForCurrentPhase\"](game, gamePlay);\n \n expect(isGroupGamePlaySuitableForCurrentPhaseSpy).toHaveBeenCalledExactlyOnceWith(game, gamePlay);\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts": { "tests": [ @@ -101740,7 +101900,7 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport lodash from \"lodash\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport { GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport * as GameMutator from \"@/modules/game/helpers/game.mutator\";\nimport { GamePlayMakerService } from \"@/modules/game/providers/services/game-play/game-play-maker.service\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { PlayerKillerService } from \"@/modules/game/providers/services/player/player-killer.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeMakeGamePlayTargetWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayVoteWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { bulkCreateFakeGameAdditionalCards, createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeFoxGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayBigBadWolfEats, createFakeGamePlayCupidCharms, createFakeGamePlayDogWolfChoosesSide, createFakeGamePlayFoxSniffs, createFakeGamePlayGuardProtects, createFakeGamePlayHunterShoots, createFakeGamePlayPiedPiperCharms, createFakeGamePlayRavenMarks, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySeerLooks, createFakeGamePlaySheriffDelegates, createFakeGamePlaySheriffSettlesVotes, createFakeGamePlayThiefChoosesCard, createFakeGamePlayTwoSistersMeetEachOther, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats, createFakeGamePlayWildChildChoosesModel, createFakeGamePlayWitchUsesPotions } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCantVoteByScapegoatPlayerAttribute, createFakeCharmedByPiedPiperPlayerAttribute, createFakeDrankDeathPotionByWitchPlayerAttribute, createFakeDrankLifePotionByWitchPlayerAttribute, createFakeEatenByBigBadWolfPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute, createFakeEatenByWhiteWerewolfPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute, createFakePowerlessByFoxPlayerAttribute, createFakeProtectedByGuardPlayerAttribute, createFakeRavenMarkedByRavenPlayerAttribute, createFakeSeenBySeerPlayerAttribute, createFakeSheriffByAllPlayerAttribute, createFakeSheriffBySheriffPlayerAttribute, createFakeWorshipedByWildChildPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakePlayerShotByHunterDeath, createFakePlayerVoteByAllDeath, createFakePlayerVoteBySheriffDeath, createFakePlayerVoteScapegoatedByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeAncientAlivePlayer, createFakeDogWolfAlivePlayer, createFakeFoxAlivePlayer, createFakeRavenAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeThiefAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Game Play Maker Service\", () => {\n let services: { gamePlayMaker: GamePlayMakerService };\n let mocks: {\n playerKillerService: {\n killOrRevealPlayer: jest.SpyInstance;\n isAncientKillable: jest.SpyInstance;\n };\n gamePlayVoteService: { getNominatedPlayers: jest.SpyInstance };\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n\n beforeEach(async() => {\n mocks = {\n playerKillerService: {\n killOrRevealPlayer: jest.fn(),\n isAncientKillable: jest.fn(),\n },\n gamePlayVoteService: { getNominatedPlayers: jest.fn() },\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() },\n };\n\n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GamePlayMakerService,\n {\n provide: GamePlayVoteService,\n useValue: mocks.gamePlayVoteService,\n },\n {\n provide: PlayerKillerService,\n useValue: mocks.playerKillerService,\n },\n ],\n }).compile();\n\n services = { gamePlayMaker: module.get(GamePlayMakerService) };\n });\n\n describe(\"gameSourcePlayMethods\", () => {\n it(\"should contain play methods from game play sources when accessed.\", () => {\n expect(services.gamePlayMaker[\"gameSourcePlayMethods\"][PLAYER_GROUPS.WEREWOLVES]).toStrictEqual(expect.any(Function));\n expect(services.gamePlayMaker[\"gameSourcePlayMethods\"][ROLE_NAMES.FOX]).toStrictEqual(expect.any(Function));\n expect(services.gamePlayMaker[\"gameSourcePlayMethods\"][PLAYER_ATTRIBUTE_NAMES.SHERIFF]).toStrictEqual(expect.any(Function));\n });\n });\n\n describe(\"makeGamePlay\", () => {\n let localMocks: {\n gamePlayMakerService: {\n werewolvesEat: jest.SpyInstance;\n bigBadWolfEats: jest.SpyInstance;\n whiteWerewolfEats: jest.SpyInstance;\n seerLooks: jest.SpyInstance;\n cupidCharms: jest.SpyInstance;\n piedPiperCharms: jest.SpyInstance;\n witchUsesPotions: jest.SpyInstance;\n hunterShoots: jest.SpyInstance;\n guardProtects: jest.SpyInstance;\n foxSniffs: jest.SpyInstance;\n wildChildChoosesModel: jest.SpyInstance;\n dogWolfChoosesSide: jest.SpyInstance;\n scapegoatBansVoting: jest.SpyInstance;\n thiefChoosesCard: jest.SpyInstance;\n allPlay: jest.SpyInstance;\n ravenMarks: jest.SpyInstance;\n sheriffPlays: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayMakerService: {\n werewolvesEat: jest.spyOn(services.gamePlayMaker as unknown as { werewolvesEat }, \"werewolvesEat\").mockImplementation(),\n bigBadWolfEats: jest.spyOn(services.gamePlayMaker as unknown as { bigBadWolfEats }, \"bigBadWolfEats\").mockImplementation(),\n whiteWerewolfEats: jest.spyOn(services.gamePlayMaker as unknown as { whiteWerewolfEats }, \"whiteWerewolfEats\").mockImplementation(),\n seerLooks: jest.spyOn(services.gamePlayMaker as unknown as { seerLooks }, \"seerLooks\").mockImplementation(),\n cupidCharms: jest.spyOn(services.gamePlayMaker as unknown as { cupidCharms }, \"cupidCharms\").mockImplementation(),\n piedPiperCharms: jest.spyOn(services.gamePlayMaker as unknown as { piedPiperCharms }, \"piedPiperCharms\").mockImplementation(),\n witchUsesPotions: jest.spyOn(services.gamePlayMaker as unknown as { witchUsesPotions }, \"witchUsesPotions\").mockImplementation(),\n hunterShoots: jest.spyOn(services.gamePlayMaker as unknown as { hunterShoots }, \"hunterShoots\").mockImplementation(),\n guardProtects: jest.spyOn(services.gamePlayMaker as unknown as { guardProtects }, \"guardProtects\").mockImplementation(),\n foxSniffs: jest.spyOn(services.gamePlayMaker as unknown as { foxSniffs }, \"foxSniffs\").mockImplementation(),\n wildChildChoosesModel: jest.spyOn(services.gamePlayMaker as unknown as { wildChildChoosesModel }, \"wildChildChoosesModel\").mockImplementation(),\n dogWolfChoosesSide: jest.spyOn(services.gamePlayMaker as unknown as { dogWolfChoosesSide }, \"dogWolfChoosesSide\").mockImplementation(),\n scapegoatBansVoting: jest.spyOn(services.gamePlayMaker as unknown as { scapegoatBansVoting }, \"scapegoatBansVoting\").mockImplementation(),\n thiefChoosesCard: jest.spyOn(services.gamePlayMaker as unknown as { thiefChoosesCard }, \"thiefChoosesCard\").mockImplementation(),\n allPlay: jest.spyOn(services.gamePlayMaker as unknown as { allPlay }, \"allPlay\").mockImplementation(),\n ravenMarks: jest.spyOn(services.gamePlayMaker as unknown as { ravenMarks }, \"ravenMarks\").mockImplementation(),\n sheriffPlays: jest.spyOn(services.gamePlayMaker as unknown as { sheriffPlays }, \"sheriffPlays\").mockImplementation(),\n },\n };\n });\n\n it(\"should throw error when game's current play is not set.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame();\n const interpolations = { gameId: game._id };\n\n await expect(services.gamePlayMaker.makeGamePlay(play, game)).toReject();\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"makeGamePlay\", interpolations);\n });\n\n it(\"should call no play method when source is not in available methods.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayTwoSistersMeetEachOther() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n const gamePlayMakerServiceMockKeys = Object.keys(localMocks.gamePlayMakerService);\n for (const gamePlayMakerServiceMockKey of gamePlayMakerServiceMockKeys) {\n expect(localMocks.gamePlayMakerService[gamePlayMakerServiceMockKey]).not.toHaveBeenCalled();\n }\n });\n\n it(\"should return game as is when source is not in available methods.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayTwoSistersMeetEachOther() });\n\n await expect(services.gamePlayMaker.makeGamePlay(play, game)).resolves.toStrictEqual(game);\n });\n\n it(\"should call werewolvesEat method when it's werewolves turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n \n expect(localMocks.gamePlayMakerService.werewolvesEat).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call bigBadWolfEats method when it's big bad wolf's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.bigBadWolfEats).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call whiteWerewolfEats method when it's white werewolf's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.whiteWerewolfEats).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call seerLooks method when it's seer's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlaySeerLooks() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.seerLooks).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call cupidCharms method when it's cupid's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayCupidCharms() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.cupidCharms).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call piedPiperCharms method when it's pied piper's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayPiedPiperCharms() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.piedPiperCharms).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call witchUsesPotions method when it's witch's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.witchUsesPotions).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call hunterShoots method when it's hunter's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayHunterShoots() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.hunterShoots).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call guardProtects method when it's guard's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayGuardProtects() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.guardProtects).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call foxSniffs method when it's fox's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayFoxSniffs() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.foxSniffs).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call wildChildChoosesModel method when it's wild child's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.wildChildChoosesModel).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call dogWolfChoosesSide method when it's dog wolf's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.dogWolfChoosesSide).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call scapegoatBansVoting method when it's scapegoat's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayScapegoatBansVoting() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.scapegoatBansVoting).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call thiefChoosesCard method when it's thief's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayThiefChoosesCard() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.thiefChoosesCard).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call allPlay method when it's all's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayAllVote() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.allPlay).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call ravenMarks method when it's raven's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayRavenMarks() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.ravenMarks).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call sheriffPlays method when it's sheriff's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlaySheriffDelegates() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.sheriffPlays).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n });\n\n describe(\"sheriffSettlesVotes\", () => {\n it(\"should return game as is when target count is not the one expected.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGameWithCurrentPlay();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"sheriffSettlesVotes\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call killOrRevealPlayer method when sheriff delegates to a target.\", async() => {\n const targetedPlayer = createFakePlayer();\n const play = createFakeMakeGamePlayWithRelationsDto({ targets: [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })] });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n await services.gamePlayMaker[\"sheriffSettlesVotes\"](play, game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(targetedPlayer._id, game, createFakePlayerVoteBySheriffDeath());\n });\n });\n\n describe(\"sheriffDelegates\", () => {\n it(\"should return game as is when target count is not the one expected.\", () => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGameWithCurrentPlay();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"sheriffDelegates\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should remove previous sheriff attribute and add it to the target when called.\", () => {\n const players = bulkCreateFakePlayers(4, [{ attributes: [createFakeSheriffByAllPlayerAttribute()] }]);\n const play = createFakeMakeGamePlayWithRelationsDto({ targets: [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })] });\n const game = createFakeGameWithCurrentPlay({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({ ...players[0], attributes: [] }),\n createFakePlayer({ ...players[1], attributes: [createFakeSheriffBySheriffPlayerAttribute()] }),\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"sheriffDelegates\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"sheriffPlays\", () => {\n let localMocks: {\n gamePlayMakerService: {\n sheriffDelegates: jest.SpyInstance;\n sheriffSettlesVotes: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayMakerService: {\n sheriffDelegates: jest.spyOn(services.gamePlayMaker as unknown as { sheriffDelegates }, \"sheriffDelegates\").mockImplementation(),\n sheriffSettlesVotes: jest.spyOn(services.gamePlayMaker as unknown as { sheriffSettlesVotes }, \"sheriffSettlesVotes\").mockImplementation(),\n },\n };\n });\n \n it(\"should return game as is when upcoming play is not for sheriff.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayFoxSniffs() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"sheriffPlays\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call sheriffDelegates method when upcoming play is sheriff role delegation.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"sheriffPlays\"](play, game);\n\n expect(localMocks.gamePlayMakerService.sheriffDelegates).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call sheriffSettlesVotes method when upcoming play is sheriff settling vote.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"sheriffPlays\"](play, game);\n\n expect(localMocks.gamePlayMakerService.sheriffSettlesVotes).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n });\n\n describe(\"handleTieInVotes\", () => {\n let localMocks: { gameMutator: { prependUpcomingPlayInGame: jest.SpyInstance } };\n\n beforeEach(() => {\n localMocks = { gameMutator: { prependUpcomingPlayInGame: jest.spyOn(GameMutator, \"prependUpcomingPlayInGame\") } };\n });\n\n it(\"should not kill scapegoat when he's not the game.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should not kill scapegoat when he's dead.\", async() => {\n const players: Player[] = [\n createFakeScapegoatAlivePlayer({ isAlive: false }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should not kill scapegoat when he's powerless.\", async() => {\n const players: Player[] = [\n createFakeScapegoatAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should kill scapegoat when he's in the game and alive.\", async() => {\n const players: Player[] = [\n createFakeScapegoatAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const playerDeath = createFakePlayerVoteScapegoatedByAllDeath();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(players[0]._id, game, playerDeath);\n });\n\n it(\"should not prepend sheriff delegation game play when sheriff is not in the game.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlaySheriffSettlesVotes = createFakeGamePlaySheriffSettlesVotes();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).not.toHaveBeenCalledWith(gamePlaySheriffSettlesVotes, game);\n });\n\n it(\"should not prepend sheriff delegation game play when sheriff is dead.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer({ isAlive: false, attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlaySheriffSettlesVotes = createFakeGamePlaySheriffSettlesVotes();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).not.toHaveBeenCalledWith(gamePlaySheriffSettlesVotes, game);\n });\n\n it(\"should prepend sheriff delegation game play when sheriff is in the game.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlaySheriffSettlesVotes = createFakeGamePlaySheriffSettlesVotes();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlaySheriffSettlesVotes, game);\n });\n\n it(\"should prepend vote game play when previous play is not a tie.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlayAllVote, game);\n });\n\n it(\"should prepend vote game play when there is no game history records.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlayAllVote, game);\n });\n\n it(\"should not prepend vote game play when current play is due to a tie.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const currentPlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay });\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"handleTieInVotes\"](game)).resolves.toStrictEqual(expectedGame);\n });\n });\n \n describe(\"allVote\", () => {\n let localMocks: {\n gamePlayMakerService: {\n handleTieInVotes: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = { gamePlayMakerService: { handleTieInVotes: jest.spyOn(services.gamePlayMaker as unknown as { handleTieInVotes }, \"handleTieInVotes\").mockImplementation() } };\n });\n \n it(\"should return game as is when there is no vote.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"allVote\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no nominated players.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: false });\n const nominatedPlayers = [];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"allVote\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n \n it(\"should call handleTieInVotes method when there are several nominated players.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: false });\n const nominatedPlayers = [players[1], players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n await services.gamePlayMaker[\"allVote\"](play, game);\n\n expect(localMocks.gamePlayMakerService.handleTieInVotes).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call handleTieInVotes method with prepended all vote game play from judge when there are several nominated players and judge requested it.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: true });\n const nominatedPlayers = [players[1], players[2]];\n const expectedGame = createFakeGameWithCurrentPlay({\n ...game,\n upcomingPlays: [createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST })],\n });\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n await services.gamePlayMaker[\"allVote\"](play, game);\n\n expect(localMocks.gamePlayMakerService.handleTieInVotes).toHaveBeenCalledExactlyOnceWith(expectedGame);\n });\n\n it(\"should call killOrRevealPlayer method when there is one nominated player.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: false });\n const nominatedPlayers = [players[1]];\n const playerVoteByAllDeath = createFakePlayerVoteByAllDeath();\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n await services.gamePlayMaker[\"allVote\"](play, game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(players[1]._id, game, playerVoteByAllDeath);\n });\n });\n\n describe(\"handleTieInSheriffElection\", () => {\n let localMocks: { lodash: { sample: jest.SpyInstance } };\n \n beforeEach(() => {\n localMocks = { lodash: { sample: jest.spyOn(lodash, \"sample\").mockImplementation() } };\n });\n \n it(\"should prepend all elect sheriff game play when current play is not due to a tie.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST });\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays });\n const nominatedPlayers = [players[0], players[1]];\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), ...upcomingPlays],\n });\n\n expect(services.gamePlayMaker[\"handleTieInSheriffElection\"](nominatedPlayers, game)).toStrictEqual(expectedGame);\n });\n \n it(\"should add sheriff attribute to a random nominated player when current play is due to a tie.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n localMocks.lodash.sample.mockReturnValue(players[0]);\n const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays });\n const nominatedPlayers = [players[0], players[1]];\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({\n ...players[0],\n attributes: [createFakeSheriffByAllPlayerAttribute()],\n }),\n players[1],\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"handleTieInSheriffElection\"](nominatedPlayers, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when it's not possible to choose a random nominated player.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n localMocks.lodash.sample.mockReturnValue(undefined);\n const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES });\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays });\n const nominatedPlayers = [players[0], players[1]];\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"handleTieInSheriffElection\"](nominatedPlayers, game)).toStrictEqual(expectedGame);\n });\n });\n \n describe(\"allElectSheriff\", () => {\n let localMocks: {\n gamePlayMakerService: {\n handleTieInSheriffElection: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = { gamePlayMakerService: { handleTieInSheriffElection: jest.spyOn(services.gamePlayMaker as unknown as { handleTieInSheriffElection }, \"handleTieInSheriffElection\").mockImplementation() } };\n });\n \n it(\"should return game as is when there is no vote.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"allElectSheriff\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no nominated players.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes });\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue([]);\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"allElectSheriff\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should call handleTieInSheriffElection method when there is a tie in votes.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes });\n const nominatedPlayers = [players[0], players[1]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n services.gamePlayMaker[\"allElectSheriff\"](play, game);\n\n expect(localMocks.gamePlayMakerService.handleTieInSheriffElection).toHaveBeenCalledExactlyOnceWith(nominatedPlayers, game);\n });\n\n it(\"should add sheriff attribute to nominated player when called.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes });\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue([players[1]]);\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n createFakePlayer({ ...players[1], attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"allElectSheriff\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"allPlay\", () => {\n let localMocks: {\n gamePlayMakerService: {\n allElectSheriff: jest.SpyInstance;\n allVote: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayMakerService: {\n allElectSheriff: jest.spyOn(services.gamePlayMaker as unknown as { allElectSheriff }, \"allElectSheriff\").mockImplementation(),\n allVote: jest.spyOn(services.gamePlayMaker as unknown as { allVote }, \"allVote\").mockImplementation(),\n },\n };\n });\n\n it(\"should return game as is when upcoming play is not for all.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayFoxSniffs() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"allPlay\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call allElectSheriff method when upcoming play is sheriff role delegation.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllElectSheriff() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"allPlay\"](play, game);\n\n expect(localMocks.gamePlayMakerService.allElectSheriff).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call allVote method when upcoming play is sheriff settling vote.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"allPlay\"](play, game);\n\n expect(localMocks.gamePlayMakerService.allVote).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n });\n\n describe(\"thiefChoosesCard\", () => {\n it(\"should return game as is when there is no thief player in game.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenCard: additionalCards[0] });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no chosen card.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when chosen card role is unknown.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenCard: createFakeGameAdditionalCard({}, { roleName: \"Toto\" }) });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should update thief role and side when called.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4, [createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF })]);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenCard: additionalCards[0] });\n const expectedThiefPlayer = createFakePlayer({\n ...players[0],\n role: { ...players[0].role, current: ROLE_NAMES.WEREWOLF },\n side: { ...players[0].side, current: ROLE_SIDES.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n expectedThiefPlayer,\n players[1],\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"scapegoatBansVoting\", () => {\n it(\"should return game as is when there are no targets.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"scapegoatBansVoting\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add scapegoat ban voting attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n createFakePlayer({ ...players[1], attributes: [createFakeCantVoteByScapegoatPlayerAttribute(game)] }),\n createFakePlayer({ ...players[2], attributes: [createFakeCantVoteByScapegoatPlayerAttribute(game)] }),\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"scapegoatBansVoting\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"dogWolfChoosesSide\", () => {\n it(\"should return game as is when chosen side is not set.\", () => {\n const players: Player[] = [\n createFakeDogWolfAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"dogWolfChoosesSide\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no dog wolf in the game.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"dogWolfChoosesSide\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return dog wolf on the werewolves side when called.\", () => {\n const players: Player[] = [\n createFakeRavenAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES });\n const expectedDogWolfPlayer = createFakePlayer({\n ...players[1],\n side: { ...players[1].side, current: ROLE_SIDES.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedDogWolfPlayer,\n players[2],\n players[3],\n ],\n });\n \n expect(services.gamePlayMaker[\"dogWolfChoosesSide\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"wildChildChoosesModel\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeDogWolfAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"wildChildChoosesModel\"](play, game)).toStrictEqual(expectedGame);\n });\n \n it(\"should add worshiped attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeDogWolfAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeWorshipedByWildChildPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"wildChildChoosesModel\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"foxSniffs\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no fox in the game.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when fox is not powerless if misses werewolves by game options.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ fox: createFakeFoxGameOptions({ isPowerlessIfMissesWerewolf: false }) }) });\n const game = createFakeGameWithCurrentPlay({ players, options });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when fox sniffes a werewolf in the group.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ fox: createFakeFoxGameOptions({ isPowerlessIfMissesWerewolf: true }) }) });\n const game = createFakeGameWithCurrentPlay({ players, options });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should make fox powerless when there is no werewolf in the group.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeVillagerAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ fox: createFakeFoxGameOptions({ isPowerlessIfMissesWerewolf: true }) }) });\n const game = createFakeGameWithCurrentPlay({ players, options });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[0],\n attributes: [createFakePowerlessByFoxPlayerAttribute({ doesRemainAfterDeath: true })],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n expectedTargetedPlayer,\n players[1],\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"ravenMarks\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"ravenMarks\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add raven marked attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeRavenMarkedByRavenPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"ravenMarks\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"guardProtects\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"guardProtects\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add protected attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeProtectedByGuardPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"guardProtects\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"hunterShoots\", () => {\n it(\"should return game as is when expected target count is not reached.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"hunterShoots\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call killOrRevealPlayer method when called.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const playerDeath = createFakePlayerShotByHunterDeath();\n await services.gamePlayMaker[\"hunterShoots\"](play, game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(players[1]._id, game, playerDeath);\n });\n });\n\n describe(\"witchUsesPotions\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"witchUsesPotions\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add only one potion attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WITCH_POTIONS.LIFE })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeDrankLifePotionByWitchPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"witchUsesPotions\"](play, game)).toStrictEqual(expectedGame);\n });\n \n it(\"should add both potion attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WITCH_POTIONS.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2], drankPotion: WITCH_POTIONS.DEATH }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedFirstTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeDrankLifePotionByWitchPlayerAttribute()],\n });\n const expectedSecondTargetedPlayer = createFakePlayer({\n ...players[2],\n attributes: [createFakeDrankDeathPotionByWitchPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedFirstTargetedPlayer,\n expectedSecondTargetedPlayer,\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"witchUsesPotions\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"piedPiperCharms\", () => {\n it(\"should return game as is when targets are undefined.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"piedPiperCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when targets are empty.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto({ targets: [] });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"piedPiperCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add pied piper charmed attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedFirstTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeCharmedByPiedPiperPlayerAttribute()],\n });\n const expectedSecondTargetedPlayer = createFakePlayer({\n ...players[2],\n attributes: [createFakeCharmedByPiedPiperPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedFirstTargetedPlayer,\n expectedSecondTargetedPlayer,\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"piedPiperCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"cupidCharms\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"cupidCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add in-love attribute to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedFirstTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeInLoveByCupidPlayerAttribute()],\n });\n const expectedSecondTargetedPlayer = createFakePlayer({\n ...players[2],\n attributes: [createFakeInLoveByCupidPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedFirstTargetedPlayer,\n expectedSecondTargetedPlayer,\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"cupidCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"seerLooks\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"seerLooks\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add seen attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeSeenBySeerPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"seerLooks\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"whiteWerewolfEats\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"whiteWerewolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by white werewolf to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByWhiteWerewolfPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"whiteWerewolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"bigBadWolfEats\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"bigBadWolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by big bad wolf to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByBigBadWolfPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"bigBadWolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"werewolvesEat\", () => {\n it(\"should return game as is when expected target count is not reached.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by werewolves to target when target is not infected.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: false })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(false);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByWerewolvesPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by werewolves to target when target is infected but not killable ancient.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeAncientAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: true })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(false);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByWerewolvesPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should change target side to werewolves when he's infected and not the ancient.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: true })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(false);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n side: { ...players[1].side, current: ROLE_SIDES.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should change target side to werewolves when he's infected and killable as ancient.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeAncientAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: true })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(true);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n side: { ...players[1].side, current: ROLE_SIDES.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport lodash from \"lodash\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport { GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport * as GameMutator from \"@/modules/game/helpers/game.mutator\";\nimport { GamePlayMakerService } from \"@/modules/game/providers/services/game-play/game-play-maker.service\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { PlayerKillerService } from \"@/modules/game/providers/services/player/player-killer.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeMakeGamePlayTargetWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayVoteWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { bulkCreateFakeGameAdditionalCards, createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeFoxGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayBigBadWolfEats, createFakeGamePlayCupidCharms, createFakeGamePlayDogWolfChoosesSide, createFakeGamePlayFoxSniffs, createFakeGamePlayGuardProtects, createFakeGamePlayHunterShoots, createFakeGamePlayPiedPiperCharms, createFakeGamePlayRavenMarks, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySeerLooks, createFakeGamePlaySheriffDelegates, createFakeGamePlaySheriffSettlesVotes, createFakeGamePlayThiefChoosesCard, createFakeGamePlayTwoSistersMeetEachOther, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats, createFakeGamePlayWildChildChoosesModel, createFakeGamePlayWitchUsesPotions } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCantVoteByScapegoatPlayerAttribute, createFakeCharmedByPiedPiperPlayerAttribute, createFakeDrankDeathPotionByWitchPlayerAttribute, createFakeDrankLifePotionByWitchPlayerAttribute, createFakeEatenByBigBadWolfPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute, createFakeEatenByWhiteWerewolfPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute, createFakePowerlessByFoxPlayerAttribute, createFakeProtectedByGuardPlayerAttribute, createFakeRavenMarkedByRavenPlayerAttribute, createFakeSeenBySeerPlayerAttribute, createFakeSheriffByAllPlayerAttribute, createFakeSheriffBySheriffPlayerAttribute, createFakeWorshipedByWildChildPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakePlayerShotByHunterDeath, createFakePlayerVoteByAllDeath, createFakePlayerVoteBySheriffDeath, createFakePlayerVoteScapegoatedByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeAncientAlivePlayer, createFakeDogWolfAlivePlayer, createFakeFoxAlivePlayer, createFakeRavenAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeThiefAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Game Play Maker Service\", () => {\n let services: { gamePlayMaker: GamePlayMakerService };\n let mocks: {\n playerKillerService: {\n killOrRevealPlayer: jest.SpyInstance;\n isAncientKillable: jest.SpyInstance;\n };\n gamePlayVoteService: { getNominatedPlayers: jest.SpyInstance };\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n\n beforeEach(async() => {\n mocks = {\n playerKillerService: {\n killOrRevealPlayer: jest.fn(),\n isAncientKillable: jest.fn(),\n },\n gamePlayVoteService: { getNominatedPlayers: jest.fn() },\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() },\n };\n\n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GamePlayMakerService,\n {\n provide: GamePlayVoteService,\n useValue: mocks.gamePlayVoteService,\n },\n {\n provide: PlayerKillerService,\n useValue: mocks.playerKillerService,\n },\n ],\n }).compile();\n\n services = { gamePlayMaker: module.get(GamePlayMakerService) };\n });\n\n describe(\"gameSourcePlayMethods\", () => {\n it(\"should contain play methods from game play sources when accessed.\", () => {\n expect(services.gamePlayMaker[\"gameSourcePlayMethods\"][PlayerGroups.WEREWOLVES]).toStrictEqual(expect.any(Function));\n expect(services.gamePlayMaker[\"gameSourcePlayMethods\"][RoleNames.FOX]).toStrictEqual(expect.any(Function));\n expect(services.gamePlayMaker[\"gameSourcePlayMethods\"][PlayerAttributeNames.SHERIFF]).toStrictEqual(expect.any(Function));\n });\n });\n\n describe(\"makeGamePlay\", () => {\n let localMocks: {\n gamePlayMakerService: {\n werewolvesEat: jest.SpyInstance;\n bigBadWolfEats: jest.SpyInstance;\n whiteWerewolfEats: jest.SpyInstance;\n seerLooks: jest.SpyInstance;\n cupidCharms: jest.SpyInstance;\n piedPiperCharms: jest.SpyInstance;\n witchUsesPotions: jest.SpyInstance;\n hunterShoots: jest.SpyInstance;\n guardProtects: jest.SpyInstance;\n foxSniffs: jest.SpyInstance;\n wildChildChoosesModel: jest.SpyInstance;\n dogWolfChoosesSide: jest.SpyInstance;\n scapegoatBansVoting: jest.SpyInstance;\n thiefChoosesCard: jest.SpyInstance;\n allPlay: jest.SpyInstance;\n ravenMarks: jest.SpyInstance;\n sheriffPlays: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayMakerService: {\n werewolvesEat: jest.spyOn(services.gamePlayMaker as unknown as { werewolvesEat }, \"werewolvesEat\").mockImplementation(),\n bigBadWolfEats: jest.spyOn(services.gamePlayMaker as unknown as { bigBadWolfEats }, \"bigBadWolfEats\").mockImplementation(),\n whiteWerewolfEats: jest.spyOn(services.gamePlayMaker as unknown as { whiteWerewolfEats }, \"whiteWerewolfEats\").mockImplementation(),\n seerLooks: jest.spyOn(services.gamePlayMaker as unknown as { seerLooks }, \"seerLooks\").mockImplementation(),\n cupidCharms: jest.spyOn(services.gamePlayMaker as unknown as { cupidCharms }, \"cupidCharms\").mockImplementation(),\n piedPiperCharms: jest.spyOn(services.gamePlayMaker as unknown as { piedPiperCharms }, \"piedPiperCharms\").mockImplementation(),\n witchUsesPotions: jest.spyOn(services.gamePlayMaker as unknown as { witchUsesPotions }, \"witchUsesPotions\").mockImplementation(),\n hunterShoots: jest.spyOn(services.gamePlayMaker as unknown as { hunterShoots }, \"hunterShoots\").mockImplementation(),\n guardProtects: jest.spyOn(services.gamePlayMaker as unknown as { guardProtects }, \"guardProtects\").mockImplementation(),\n foxSniffs: jest.spyOn(services.gamePlayMaker as unknown as { foxSniffs }, \"foxSniffs\").mockImplementation(),\n wildChildChoosesModel: jest.spyOn(services.gamePlayMaker as unknown as { wildChildChoosesModel }, \"wildChildChoosesModel\").mockImplementation(),\n dogWolfChoosesSide: jest.spyOn(services.gamePlayMaker as unknown as { dogWolfChoosesSide }, \"dogWolfChoosesSide\").mockImplementation(),\n scapegoatBansVoting: jest.spyOn(services.gamePlayMaker as unknown as { scapegoatBansVoting }, \"scapegoatBansVoting\").mockImplementation(),\n thiefChoosesCard: jest.spyOn(services.gamePlayMaker as unknown as { thiefChoosesCard }, \"thiefChoosesCard\").mockImplementation(),\n allPlay: jest.spyOn(services.gamePlayMaker as unknown as { allPlay }, \"allPlay\").mockImplementation(),\n ravenMarks: jest.spyOn(services.gamePlayMaker as unknown as { ravenMarks }, \"ravenMarks\").mockImplementation(),\n sheriffPlays: jest.spyOn(services.gamePlayMaker as unknown as { sheriffPlays }, \"sheriffPlays\").mockImplementation(),\n },\n };\n });\n\n it(\"should throw error when game's current play is not set.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame();\n const interpolations = { gameId: game._id };\n\n await expect(services.gamePlayMaker.makeGamePlay(play, game)).toReject();\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"makeGamePlay\", interpolations);\n });\n\n it(\"should call no play method when source is not in available methods.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayTwoSistersMeetEachOther() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n const gamePlayMakerServiceMockKeys = Object.keys(localMocks.gamePlayMakerService);\n for (const gamePlayMakerServiceMockKey of gamePlayMakerServiceMockKeys) {\n expect(localMocks.gamePlayMakerService[gamePlayMakerServiceMockKey]).not.toHaveBeenCalled();\n }\n });\n\n it(\"should return game as is when source is not in available methods.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayTwoSistersMeetEachOther() });\n\n await expect(services.gamePlayMaker.makeGamePlay(play, game)).resolves.toStrictEqual(game);\n });\n\n it(\"should call werewolvesEat method when it's werewolves turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWerewolvesEat() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n \n expect(localMocks.gamePlayMakerService.werewolvesEat).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call bigBadWolfEats method when it's big bad wolf's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayBigBadWolfEats() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.bigBadWolfEats).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call whiteWerewolfEats method when it's white werewolf's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWhiteWerewolfEats() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.whiteWerewolfEats).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call seerLooks method when it's seer's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlaySeerLooks() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.seerLooks).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call cupidCharms method when it's cupid's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayCupidCharms() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.cupidCharms).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call piedPiperCharms method when it's pied piper's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayPiedPiperCharms() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.piedPiperCharms).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call witchUsesPotions method when it's witch's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWitchUsesPotions() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.witchUsesPotions).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call hunterShoots method when it's hunter's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayHunterShoots() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.hunterShoots).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call guardProtects method when it's guard's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayGuardProtects() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.guardProtects).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call foxSniffs method when it's fox's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayFoxSniffs() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.foxSniffs).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call wildChildChoosesModel method when it's wild child's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayWildChildChoosesModel() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.wildChildChoosesModel).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call dogWolfChoosesSide method when it's dog wolf's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayDogWolfChoosesSide() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.dogWolfChoosesSide).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call scapegoatBansVoting method when it's scapegoat's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayScapegoatBansVoting() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.scapegoatBansVoting).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call thiefChoosesCard method when it's thief's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayThiefChoosesCard() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.thiefChoosesCard).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call allPlay method when it's all's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayAllVote() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.allPlay).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call ravenMarks method when it's raven's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlayRavenMarks() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.ravenMarks).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call sheriffPlays method when it's sheriff's turn.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGame({ currentPlay: createFakeGamePlaySheriffDelegates() });\n await services.gamePlayMaker.makeGamePlay(play, game);\n\n expect(localMocks.gamePlayMakerService.sheriffPlays).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n });\n\n describe(\"sheriffSettlesVotes\", () => {\n it(\"should return game as is when target count is not the one expected.\", async() => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGameWithCurrentPlay();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"sheriffSettlesVotes\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call killOrRevealPlayer method when sheriff delegates to a target.\", async() => {\n const targetedPlayer = createFakePlayer();\n const play = createFakeMakeGamePlayWithRelationsDto({ targets: [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer })] });\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n await services.gamePlayMaker[\"sheriffSettlesVotes\"](play, game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(targetedPlayer._id, game, createFakePlayerVoteBySheriffDeath());\n });\n });\n\n describe(\"sheriffDelegates\", () => {\n it(\"should return game as is when target count is not the one expected.\", () => {\n const play = createFakeMakeGamePlayWithRelationsDto();\n const game = createFakeGameWithCurrentPlay();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"sheriffDelegates\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should remove previous sheriff attribute and add it to the target when called.\", () => {\n const players = bulkCreateFakePlayers(4, [{ attributes: [createFakeSheriffByAllPlayerAttribute()] }]);\n const play = createFakeMakeGamePlayWithRelationsDto({ targets: [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })] });\n const game = createFakeGameWithCurrentPlay({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({ ...players[0], attributes: [] }),\n createFakePlayer({ ...players[1], attributes: [createFakeSheriffBySheriffPlayerAttribute()] }),\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"sheriffDelegates\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"sheriffPlays\", () => {\n let localMocks: {\n gamePlayMakerService: {\n sheriffDelegates: jest.SpyInstance;\n sheriffSettlesVotes: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = {\n gamePlayMakerService: {\n sheriffDelegates: jest.spyOn(services.gamePlayMaker as unknown as { sheriffDelegates }, \"sheriffDelegates\").mockImplementation(),\n sheriffSettlesVotes: jest.spyOn(services.gamePlayMaker as unknown as { sheriffSettlesVotes }, \"sheriffSettlesVotes\").mockImplementation(),\n },\n };\n });\n \n it(\"should return game as is when upcoming play is not for sheriff.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayFoxSniffs() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"sheriffPlays\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call sheriffDelegates method when upcoming play is sheriff role delegation.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"sheriffPlays\"](play, game);\n\n expect(localMocks.gamePlayMakerService.sheriffDelegates).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call sheriffSettlesVotes method when upcoming play is sheriff settling vote.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"sheriffPlays\"](play, game);\n\n expect(localMocks.gamePlayMakerService.sheriffSettlesVotes).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n });\n\n describe(\"handleTieInVotes\", () => {\n let localMocks: { gameMutator: { prependUpcomingPlayInGame: jest.SpyInstance } };\n\n beforeEach(() => {\n localMocks = { gameMutator: { prependUpcomingPlayInGame: jest.spyOn(GameMutator, \"prependUpcomingPlayInGame\") } };\n });\n\n it(\"should not kill scapegoat when he's not the game.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should not kill scapegoat when he's dead.\", async() => {\n const players: Player[] = [\n createFakeScapegoatAlivePlayer({ isAlive: false }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should not kill scapegoat when he's powerless.\", async() => {\n const players: Player[] = [\n createFakeScapegoatAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should kill scapegoat when he's in the game and alive.\", async() => {\n const players: Player[] = [\n createFakeScapegoatAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const playerDeath = createFakePlayerVoteScapegoatedByAllDeath();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(players[0]._id, game, playerDeath);\n });\n\n it(\"should not prepend sheriff delegation game play when sheriff is not in the game.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlaySheriffSettlesVotes = createFakeGamePlaySheriffSettlesVotes();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).not.toHaveBeenCalledWith(gamePlaySheriffSettlesVotes, game);\n });\n\n it(\"should not prepend sheriff delegation game play when sheriff is dead.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer({ isAlive: false, attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlaySheriffSettlesVotes = createFakeGamePlaySheriffSettlesVotes();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).not.toHaveBeenCalledWith(gamePlaySheriffSettlesVotes, game);\n });\n\n it(\"should prepend sheriff delegation game play when sheriff is in the game.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlaySheriffSettlesVotes = createFakeGamePlaySheriffSettlesVotes();\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlaySheriffSettlesVotes, game);\n });\n\n it(\"should prepend vote game play when previous play is not a tie.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlayAllVote, game);\n });\n\n it(\"should prepend vote game play when there is no game history records.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n await services.gamePlayMaker[\"handleTieInVotes\"](game);\n\n expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlayAllVote, game);\n });\n\n it(\"should not prepend vote game play when current play is due to a tie.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const currentPlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n const game = createFakeGameWithCurrentPlay({ players, currentPlay });\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"handleTieInVotes\"](game)).resolves.toStrictEqual(expectedGame);\n });\n });\n \n describe(\"allVote\", () => {\n let localMocks: {\n gamePlayMakerService: {\n handleTieInVotes: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = { gamePlayMakerService: { handleTieInVotes: jest.spyOn(services.gamePlayMaker as unknown as { handleTieInVotes }, \"handleTieInVotes\").mockImplementation() } };\n });\n \n it(\"should return game as is when there is no vote.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"allVote\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no nominated players.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: false });\n const nominatedPlayers = [];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"allVote\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n \n it(\"should call handleTieInVotes method when there are several nominated players.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: false });\n const nominatedPlayers = [players[1], players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n await services.gamePlayMaker[\"allVote\"](play, game);\n\n expect(localMocks.gamePlayMakerService.handleTieInVotes).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call handleTieInVotes method with prepended all vote game play from judge when there are several nominated players and judge requested it.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: true });\n const nominatedPlayers = [players[1], players[2]];\n const expectedGame = createFakeGameWithCurrentPlay({\n ...game,\n upcomingPlays: [createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST })],\n });\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n await services.gamePlayMaker[\"allVote\"](play, game);\n\n expect(localMocks.gamePlayMakerService.handleTieInVotes).toHaveBeenCalledExactlyOnceWith(expectedGame);\n });\n\n it(\"should call killOrRevealPlayer method when there is one nominated player.\", async() => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes, doesJudgeRequestAnotherVote: false });\n const nominatedPlayers = [players[1]];\n const playerVoteByAllDeath = createFakePlayerVoteByAllDeath();\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n await services.gamePlayMaker[\"allVote\"](play, game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(players[1]._id, game, playerVoteByAllDeath);\n });\n });\n\n describe(\"handleTieInSheriffElection\", () => {\n let localMocks: { lodash: { sample: jest.SpyInstance } };\n \n beforeEach(() => {\n localMocks = { lodash: { sample: jest.spyOn(lodash, \"sample\").mockImplementation() } };\n });\n \n it(\"should prepend all elect sheriff game play when current play is not due to a tie.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST });\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays });\n const nominatedPlayers = [players[0], players[1]];\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), ...upcomingPlays],\n });\n\n expect(services.gamePlayMaker[\"handleTieInSheriffElection\"](nominatedPlayers, game)).toStrictEqual(expectedGame);\n });\n \n it(\"should add sheriff attribute to a random nominated player when current play is due to a tie.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n localMocks.lodash.sample.mockReturnValue(players[0]);\n const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays });\n const nominatedPlayers = [players[0], players[1]];\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({\n ...players[0],\n attributes: [createFakeSheriffByAllPlayerAttribute()],\n }),\n players[1],\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"handleTieInSheriffElection\"](nominatedPlayers, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when it's not possible to choose a random nominated player.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n localMocks.lodash.sample.mockReturnValue(undefined);\n const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES });\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays });\n const nominatedPlayers = [players[0], players[1]];\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"handleTieInSheriffElection\"](nominatedPlayers, game)).toStrictEqual(expectedGame);\n });\n });\n \n describe(\"allElectSheriff\", () => {\n let localMocks: {\n gamePlayMakerService: {\n handleTieInSheriffElection: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n localMocks = { gamePlayMakerService: { handleTieInSheriffElection: jest.spyOn(services.gamePlayMaker as unknown as { handleTieInSheriffElection }, \"handleTieInSheriffElection\").mockImplementation() } };\n });\n \n it(\"should return game as is when there is no vote.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"allElectSheriff\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no nominated players.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes });\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue([]);\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"allElectSheriff\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should call handleTieInSheriffElection method when there is a tie in votes.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes });\n const nominatedPlayers = [players[0], players[1]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n services.gamePlayMaker[\"allElectSheriff\"](play, game);\n\n expect(localMocks.gamePlayMakerService.handleTieInSheriffElection).toHaveBeenCalledExactlyOnceWith(nominatedPlayers, game);\n });\n\n it(\"should add sheriff attribute to nominated player when called.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const votes: MakeGamePlayVoteWithRelationsDto[] = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[0], target: players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: players[2], target: players[0] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ votes });\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue([players[1]]);\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n createFakePlayer({ ...players[1], attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"allElectSheriff\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"allPlay\", () => {\n let localMocks: {\n gamePlayMakerService: {\n allElectSheriff: jest.SpyInstance;\n allVote: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePlayMakerService: {\n allElectSheriff: jest.spyOn(services.gamePlayMaker as unknown as { allElectSheriff }, \"allElectSheriff\").mockImplementation(),\n allVote: jest.spyOn(services.gamePlayMaker as unknown as { allVote }, \"allVote\").mockImplementation(),\n },\n };\n });\n\n it(\"should return game as is when upcoming play is not for all.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayFoxSniffs() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"allPlay\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call allElectSheriff method when upcoming play is sheriff role delegation.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllElectSheriff() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"allPlay\"](play, game);\n\n expect(localMocks.gamePlayMakerService.allElectSheriff).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n\n it(\"should call allVote method when upcoming play is sheriff settling vote.\", async() => {\n const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n await services.gamePlayMaker[\"allPlay\"](play, game);\n\n expect(localMocks.gamePlayMakerService.allVote).toHaveBeenCalledExactlyOnceWith(play, game);\n });\n });\n\n describe(\"thiefChoosesCard\", () => {\n it(\"should return game as is when there is no thief player in game.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenCard: additionalCards[0] });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no chosen card.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when chosen card role is unknown.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenCard: createFakeGameAdditionalCard({}, { roleName: \"Toto\" }) });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should update thief role and side when called.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const additionalCards = bulkCreateFakeGameAdditionalCards(4, [createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF })]);\n const game = createFakeGameWithCurrentPlay({ players, additionalCards });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenCard: additionalCards[0] });\n const expectedThiefPlayer = createFakePlayer({\n ...players[0],\n role: { ...players[0].role, current: RoleNames.WEREWOLF },\n side: { ...players[0].side, current: RoleSides.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n expectedThiefPlayer,\n players[1],\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"thiefChoosesCard\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"scapegoatBansVoting\", () => {\n it(\"should return game as is when there are no targets.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"scapegoatBansVoting\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add scapegoat ban voting attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n createFakePlayer({ ...players[1], attributes: [createFakeCantVoteByScapegoatPlayerAttribute(game)] }),\n createFakePlayer({ ...players[2], attributes: [createFakeCantVoteByScapegoatPlayerAttribute(game)] }),\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"scapegoatBansVoting\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"dogWolfChoosesSide\", () => {\n it(\"should return game as is when chosen side is not set.\", () => {\n const players: Player[] = [\n createFakeDogWolfAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"dogWolfChoosesSide\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no dog wolf in the game.\", () => {\n const players: Player[] = [\n createFakeThiefAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"dogWolfChoosesSide\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return dog wolf on the werewolves side when called.\", () => {\n const players: Player[] = [\n createFakeRavenAlivePlayer(),\n createFakeDogWolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES });\n const expectedDogWolfPlayer = createFakePlayer({\n ...players[1],\n side: { ...players[1].side, current: RoleSides.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedDogWolfPlayer,\n players[2],\n players[3],\n ],\n });\n \n expect(services.gamePlayMaker[\"dogWolfChoosesSide\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"wildChildChoosesModel\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeDogWolfAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"wildChildChoosesModel\"](play, game)).toStrictEqual(expectedGame);\n });\n \n it(\"should add worshiped attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeDogWolfAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeWorshipedByWildChildPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"wildChildChoosesModel\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"foxSniffs\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when there is no fox in the game.\", () => {\n const players: Player[] = [\n createFakeSeerAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when fox is not powerless if misses werewolves by game options.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ fox: createFakeFoxGameOptions({ isPowerlessIfMissesWerewolf: false }) }) });\n const game = createFakeGameWithCurrentPlay({ players, options });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when fox sniffes a werewolf in the group.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ fox: createFakeFoxGameOptions({ isPowerlessIfMissesWerewolf: true }) }) });\n const game = createFakeGameWithCurrentPlay({ players, options });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should make fox powerless when there is no werewolf in the group.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer({ position: 0 }),\n createFakeRavenAlivePlayer({ position: 1 }),\n createFakeVillagerAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ fox: createFakeFoxGameOptions({ isPowerlessIfMissesWerewolf: true }) }) });\n const game = createFakeGameWithCurrentPlay({ players, options });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[0],\n attributes: [createFakePowerlessByFoxPlayerAttribute({ doesRemainAfterDeath: true })],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n expectedTargetedPlayer,\n players[1],\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"foxSniffs\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"ravenMarks\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"ravenMarks\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add raven marked attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeRavenMarkedByRavenPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"ravenMarks\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"guardProtects\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"guardProtects\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add protected attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeProtectedByGuardPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"guardProtects\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"hunterShoots\", () => {\n it(\"should return game as is when expected target count is not reached.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"hunterShoots\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should call killOrRevealPlayer method when called.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const playerDeath = createFakePlayerShotByHunterDeath();\n await services.gamePlayMaker[\"hunterShoots\"](play, game);\n\n expect(mocks.playerKillerService.killOrRevealPlayer).toHaveBeenCalledExactlyOnceWith(players[1]._id, game, playerDeath);\n });\n });\n\n describe(\"witchUsesPotions\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"witchUsesPotions\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add only one potion attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WitchPotions.LIFE })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeDrankLifePotionByWitchPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"witchUsesPotions\"](play, game)).toStrictEqual(expectedGame);\n });\n \n it(\"should add both potion attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WitchPotions.LIFE }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2], drankPotion: WitchPotions.DEATH }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedFirstTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeDrankLifePotionByWitchPlayerAttribute()],\n });\n const expectedSecondTargetedPlayer = createFakePlayer({\n ...players[2],\n attributes: [createFakeDrankDeathPotionByWitchPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedFirstTargetedPlayer,\n expectedSecondTargetedPlayer,\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"witchUsesPotions\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"piedPiperCharms\", () => {\n it(\"should return game as is when targets are undefined.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"piedPiperCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when targets are empty.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto({ targets: [] });\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"piedPiperCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add pied piper charmed attributes to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedFirstTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeCharmedByPiedPiperPlayerAttribute()],\n });\n const expectedSecondTargetedPlayer = createFakePlayer({\n ...players[2],\n attributes: [createFakeCharmedByPiedPiperPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedFirstTargetedPlayer,\n expectedSecondTargetedPlayer,\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"piedPiperCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"cupidCharms\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"cupidCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add in-love attribute to targets when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2] }),\n ];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedFirstTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeInLoveByCupidPlayerAttribute()],\n });\n const expectedSecondTargetedPlayer = createFakePlayer({\n ...players[2],\n attributes: [createFakeInLoveByCupidPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedFirstTargetedPlayer,\n expectedSecondTargetedPlayer,\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"cupidCharms\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"seerLooks\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"seerLooks\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add seen attribute to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeSeenBySeerPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"seerLooks\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"whiteWerewolfEats\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"whiteWerewolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by white werewolf to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByWhiteWerewolfPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"whiteWerewolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"bigBadWolfEats\", () => {\n it(\"should return game as is when expected target count is not reached.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n expect(services.gamePlayMaker[\"bigBadWolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by big bad wolf to target when called.\", () => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1] })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByBigBadWolfPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n expect(services.gamePlayMaker[\"bigBadWolfEats\"](play, game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"werewolvesEat\", () => {\n it(\"should return game as is when expected target count is not reached.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedGame = createFakeGame(game);\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by werewolves to target when target is not infected.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: false })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(false);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByWerewolvesPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should add eaten attribute by werewolves to target when target is infected but not killable ancient.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeAncientAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: true })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(false);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n attributes: [createFakeEatenByWerewolvesPlayerAttribute()],\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should change target side to werewolves when he's infected and not the ancient.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeRavenAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: true })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(false);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n side: { ...players[1].side, current: RoleSides.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should change target side to werewolves when he's infected and killable as ancient.\", async() => {\n const players: Player[] = [\n createFakeFoxAlivePlayer(),\n createFakeAncientAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], isInfected: true })];\n const play = createFakeMakeGamePlayWithRelationsDto({ targets });\n mocks.playerKillerService.isAncientKillable.mockReturnValue(true);\n const expectedTargetedPlayer = createFakePlayer({\n ...players[1],\n side: { ...players[1].side, current: RoleSides.WEREWOLVES },\n });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n expectedTargetedPlayer,\n players[2],\n players[3],\n ],\n });\n\n await expect(services.gamePlayMaker[\"werewolvesEat\"](play, game)).resolves.toStrictEqual(expectedGame);\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts": { "tests": [ @@ -102535,7 +102695,7 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_DEATH_CAUSES } from \"@/modules/game/enums/player.enum\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport * as GameMutator from \"@/modules/game/helpers/game.mutator\";\nimport { createPowerlessByAncientPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { PlayerKillerService } from \"@/modules/game/providers/services/player/player-killer.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { UNEXPECTED_EXCEPTION_REASONS } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport { createFakePlayer, createFakePlayerRole, createFakePlayerSide } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeAncientAlivePlayer, createFakeGuardAlivePlayer, createFakeHunterAlivePlayer, createFakeIdiotAlivePlayer, createFakeLittleGirlAlivePlayer, createFakeRustySwordKnightAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeVillagerVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWildChildAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayerBrokenHeartByCupidDeath, createFakePlayerDeathPotionByWitchDeath, createFakePlayerEatenByWerewolvesDeath, createFakePlayerReconsiderPardonByAllDeath, createFakePlayerVoteByAllDeath, createFakePlayerVoteScapegoatedByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeCantVoteByAllPlayerAttribute, createFakeContaminatedByRustySwordKnightPlayerAttribute, createFakeDrankLifePotionByWitchPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute, createFakeProtectedByGuardPlayerAttribute, createFakeSheriffByAllPlayerAttribute, createFakeWorshipedByWildChildPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGamePlayHunterShoots, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySheriffDelegates } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeAncientGameOptions, createFakeIdiotGameOptions, createFakeLittleGirlGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\n\ndescribe(\"Player Killer Service\", () => {\n let mocks: {\n playerKillerService: {\n getPlayerToKillInGame: jest.SpyInstance;\n isPlayerKillable: jest.SpyInstance;\n doesPlayerRoleMustBeRevealed: jest.SpyInstance;\n removePlayerAttributesAfterDeath: jest.SpyInstance;\n revealPlayerRole: jest.SpyInstance;\n killPlayer: jest.SpyInstance;\n applySheriffPlayerDeathOutcomes: jest.SpyInstance;\n applyInLovePlayerDeathOutcomes: jest.SpyInstance;\n applyWorshipedPlayerDeathOutcomes: jest.SpyInstance;\n applyHunterDeathOutcomes: jest.SpyInstance;\n applyAncientDeathOutcomes: jest.SpyInstance;\n applyScapegoatDeathOutcomes: jest.SpyInstance;\n applyRustySwordKnightDeathOutcomes: jest.SpyInstance;\n };\n gameHistoryRecordService: {\n getGameHistoryWerewolvesEatAncientRecords: jest.SpyInstance;\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.SpyInstance;\n };\n gameHelper: {\n getPlayerWithIdOrThrow: jest.SpyInstance;\n };\n unexpectedExceptionFactory: {\n createCantFindPlayerUnexpectedException: jest.SpyInstance;\n };\n };\n let services: { playerKiller: PlayerKillerService };\n\n beforeEach(async() => {\n mocks = {\n playerKillerService: {\n getPlayerToKillInGame: jest.fn(),\n isPlayerKillable: jest.fn(),\n doesPlayerRoleMustBeRevealed: jest.fn(),\n removePlayerAttributesAfterDeath: jest.fn(),\n revealPlayerRole: jest.fn(),\n killPlayer: jest.fn(),\n applySheriffPlayerDeathOutcomes: jest.fn(),\n applyInLovePlayerDeathOutcomes: jest.fn(),\n applyWorshipedPlayerDeathOutcomes: jest.fn(),\n applyHunterDeathOutcomes: jest.fn(),\n applyAncientDeathOutcomes: jest.fn(),\n applyScapegoatDeathOutcomes: jest.fn(),\n applyRustySwordKnightDeathOutcomes: jest.fn(),\n },\n gameHistoryRecordService: {\n getGameHistoryWerewolvesEatAncientRecords: jest.fn(),\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.fn(),\n },\n gameHelper: { getPlayerWithIdOrThrow: jest.fn() },\n unexpectedExceptionFactory: { createCantFindPlayerUnexpectedException: jest.fn() },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n PlayerKillerService,\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n ],\n }).compile();\n\n services = { playerKiller: module.get(PlayerKillerService) };\n });\n\n describe(\"killOrRevealPlayer\", () => {\n beforeEach(() => {\n mocks.playerKillerService.getPlayerToKillInGame = jest.spyOn(services.playerKiller as unknown as { getPlayerToKillInGame }, \"getPlayerToKillInGame\");\n mocks.playerKillerService.isPlayerKillable = jest.spyOn(services.playerKiller as unknown as { isPlayerKillable }, \"isPlayerKillable\");\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\");\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed = jest.spyOn(services.playerKiller as unknown as { doesPlayerRoleMustBeRevealed }, \"doesPlayerRoleMustBeRevealed\");\n mocks.playerKillerService.revealPlayerRole = jest.spyOn(services.playerKiller as unknown as { revealPlayerRole }, \"revealPlayerRole\");\n });\n\n it(\"should return game as is when player can't be revealed or killed.\", async() => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n mocks.playerKillerService.getPlayerToKillInGame.mockReturnValue(players[0]);\n mocks.playerKillerService.isPlayerKillable.mockReturnValue(false);\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed.mockReturnValue(false);\n\n await expect(services.playerKiller.killOrRevealPlayer(players[0]._id, game, death)).resolves.toStrictEqual(game);\n expect(mocks.playerKillerService.killPlayer).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.revealPlayerRole).not.toHaveBeenCalled();\n });\n\n it(\"should call kill method when player is killable.\", async() => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n mocks.playerKillerService.getPlayerToKillInGame.mockReturnValue(players[0]);\n mocks.playerKillerService.isPlayerKillable.mockReturnValue(true);\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed.mockReturnValue(true);\n\n await services.playerKiller.killOrRevealPlayer(players[0]._id, game, death);\n expect(mocks.playerKillerService.killPlayer).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.revealPlayerRole).not.toHaveBeenCalled();\n });\n\n it(\"should call reveal role method when player role must be revealed.\", async() => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n mocks.playerKillerService.getPlayerToKillInGame.mockReturnValue(players[0]);\n mocks.playerKillerService.isPlayerKillable.mockReturnValue(false);\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed.mockReturnValue(true);\n\n await services.playerKiller.killOrRevealPlayer(players[0]._id, game, death);\n expect(mocks.playerKillerService.killPlayer).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.revealPlayerRole).toHaveBeenCalledExactlyOnceWith(players[0], game);\n });\n });\n\n describe(\"applyPlayerRoleRevelationOutcomes\", () => {\n it(\"should add can't vote attribute when player is idiot.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({\n ...players[0],\n attributes: [createFakeCantVoteByAllPlayerAttribute()],\n }),\n game.players[1],\n game.players[2],\n game.players[3],\n ],\n });\n\n expect(services.playerKiller[\"applyPlayerRoleRevelationOutcomes\"](game.players[0], game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return the game as is when player is not an idiot.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyPlayerRoleRevelationOutcomes\"](game.players[1], game)).toStrictEqual(game);\n });\n });\n \n describe(\"isAncientKillable\", () => {\n it(\"should return true when cause is not EATEN.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(2);\n\n await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.VOTE)).resolves.toBe(true);\n });\n\n it(\"should return false when cause is EATEN but ancient still have at least one life left.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(2);\n\n await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(false);\n });\n\n it(\"should return true when cause is EATEN but ancient has only one life left.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(1);\n\n await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(true);\n });\n\n it(\"should return true when cause is EATEN but ancient has 0 life left.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(0);\n\n await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(true);\n });\n });\n\n describe(\"revealPlayerRole\", () => {\n it(\"should throw error when player to reveal is not found among players.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const unknownPlayer = createFakePlayer();\n const interpolations = { gameId: game._id.toString(), playerId: unknownPlayer._id.toString() };\n const exception = new UnexpectedException(\"revealPlayerRole\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations);\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(exception);\n\n expect(() => services.playerKiller[\"revealPlayerRole\"](unknownPlayer, game)).toThrow(exception);\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"revealPlayerRole\", interpolations);\n });\n\n it(\"should reveal player role when called.\", () => {\n const players = [\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({\n ...players[0],\n role: createFakePlayerRole({ ...players[0].role, isRevealed: true }),\n }),\n game.players[1],\n game.players[2],\n game.players[3],\n ],\n });\n\n expect(services.playerKiller[\"revealPlayerRole\"](players[0], game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"doesPlayerRoleMustBeRevealed\", () => {\n it(\"should return false when player role is already revealed.\", () => {\n const game = createFakeGame();\n const player = createFakeVillagerVillagerAlivePlayer();\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return false when player role is not idiot.\", () => {\n const game = createFakeGame();\n const player = createFakeSeerAlivePlayer();\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return false when player role is idiot but powerless.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer({ attributes: [createPowerlessByAncientPlayerAttribute()] });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return false when player role is idiot but death cause is not vote.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return true when player role is idiot and death cause is not vote.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(true);\n });\n });\n\n describe(\"removePlayerAttributesAfterDeath\", () => {\n it(\"should remove player attributes which need to be removed after death when called.\", () => {\n const player = createFakePlayer({\n isAlive: false,\n attributes: [\n createFakeCantVoteByAllPlayerAttribute({ doesRemainAfterDeath: false }),\n createFakePowerlessByAncientPlayerAttribute(),\n createFakeSheriffByAllPlayerAttribute({ doesRemainAfterDeath: true }),\n ],\n });\n const expectedPlayer = createFakePlayer({\n ...player,\n attributes: [\n player.attributes[1],\n player.attributes[2],\n ],\n });\n \n expect(services.playerKiller[\"removePlayerAttributesAfterDeath\"](player)).toStrictEqual(expectedPlayer);\n });\n });\n\n describe(\"getAncientLivesCountAgainstWerewolves\", () => {\n it(\"should return same amount of lives when no werewolves attack against ancient.\", async() => {\n const livesCountAgainstWerewolves = 3;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ livesCountAgainstWerewolves }) }) });\n const game = createFakeGame({ options });\n const gameHistoryRecordPlayAncientTarget = createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() });\n const ancientProtectedFromWerewolvesRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n ];\n mocks.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords.mockResolvedValue([]);\n mocks.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords.mockResolvedValue(ancientProtectedFromWerewolvesRecords);\n\n await expect(services.playerKiller[\"getAncientLivesCountAgainstWerewolves\"](game)).resolves.toBe(3);\n });\n\n it(\"should return amount of lives minus one when ancient was attacked three times but protected once and saved by witch once.\", async() => {\n const livesCountAgainstWerewolves = 3;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ livesCountAgainstWerewolves }) }) });\n const game = createFakeGame({ options });\n const gameHistoryRecordPlayAncientTarget = createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() });\n const gameHistoryRecordPlayAncientDrankLifePotionTarget = createFakeGameHistoryRecordPlayTarget({ ...gameHistoryRecordPlayAncientTarget, drankPotion: WITCH_POTIONS.LIFE });\n const werewolvesEatAncientRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 2,\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 3,\n }),\n ];\n const ancientProtectedFromWerewolvesRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [gameHistoryRecordPlayAncientDrankLifePotionTarget] }),\n turn: 2,\n }),\n ];\n mocks.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords.mockResolvedValue(werewolvesEatAncientRecords);\n mocks.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords.mockResolvedValue(ancientProtectedFromWerewolvesRecords);\n\n await expect(services.playerKiller[\"getAncientLivesCountAgainstWerewolves\"](game)).resolves.toBe(2);\n });\n\n it(\"should return amount of lives minus one when ancient was attacked but not protected and killed by witch.\", async() => {\n const livesCountAgainstWerewolves = 3;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ livesCountAgainstWerewolves }) }) });\n const game = createFakeGame({ options });\n const gameHistoryRecordPlayAncientTarget = createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() });\n const werewolvesEatAncientRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n ];\n mocks.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords.mockResolvedValue(werewolvesEatAncientRecords);\n mocks.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords.mockResolvedValue([]);\n \n await expect(services.playerKiller[\"getAncientLivesCountAgainstWerewolves\"](game)).resolves.toBe(2);\n });\n });\n\n describe(\"isIdiotKillable\", () => {\n it(\"should return true when idiot is already revealed.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n player.role.isRevealed = true;\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PLAYER_DEATH_CAUSES.VOTE, game)).toBe(true);\n });\n\n it(\"should return true when idiot is killed by other cause than a vote.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PLAYER_DEATH_CAUSES.DEATH_POTION, game)).toBe(true);\n });\n\n it(\"should return true when idiot is killed by vote but powerless.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] });\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PLAYER_DEATH_CAUSES.VOTE, game)).toBe(true);\n });\n\n it(\"should return false when idiot is not revealed, dies from votes and is not powerless.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PLAYER_DEATH_CAUSES.VOTE, game)).toBe(false);\n });\n });\n\n describe(\"canPlayerBeEaten\", () => {\n it(\"should return false when player is saved by the witch.\", () => {\n const player = createFakeSeerAlivePlayer({ attributes: [createFakeDrankLifePotionByWitchPlayerAttribute()] });\n const game = createFakeGame();\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(false);\n });\n\n it(\"should return false when player is protected by guard and is not little girl.\", () => {\n const player = createFakeSeerAlivePlayer({ attributes: [createFakeProtectedByGuardPlayerAttribute()] });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ littleGirl: createFakeLittleGirlGameOptions({ isProtectedByGuard: false }) }) });\n const game = createFakeGame({ options });\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(false);\n });\n\n it(\"should return false when player is protected by guard, is little girl but game options allows guard to protect her.\", () => {\n const player = createFakeLittleGirlAlivePlayer({ attributes: [createFakeProtectedByGuardPlayerAttribute()] });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ littleGirl: createFakeLittleGirlGameOptions({ isProtectedByGuard: true }) }) });\n const game = createFakeGame({ options });\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(false);\n });\n\n it(\"should return true when player is protected by guard, is little girl but game options doesn't allow guard to protect her.\", () => {\n const player = createFakeLittleGirlAlivePlayer({ attributes: [createFakeProtectedByGuardPlayerAttribute()] });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ littleGirl: createFakeLittleGirlGameOptions({ isProtectedByGuard: false }) }) });\n const game = createFakeGame({ options });\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(true);\n });\n\n it(\"should return true when player defenseless.\", () => {\n const player = createFakeSeerAlivePlayer({ attributes: [] });\n const game = createFakeGame();\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(true);\n });\n });\n\n describe(\"isPlayerKillable\", () => {\n it(\"should return false when cause is EATEN and player can't be eaten.\", async() => {\n jest.spyOn(services.playerKiller as unknown as { canPlayerBeEaten }, \"canPlayerBeEaten\").mockReturnValue(false);\n const player = createFakePlayer();\n const game = createFakeGame();\n\n await expect(services.playerKiller[\"isPlayerKillable\"](player, game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(false);\n });\n\n it(\"should not call can player be eaten validator when cause is not EATEN.\", async() => {\n const canPlayerBeEatenMock = jest.spyOn(services.playerKiller as unknown as { canPlayerBeEaten }, \"canPlayerBeEaten\").mockReturnValue(false);\n const player = createFakePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PLAYER_DEATH_CAUSES.VOTE);\n\n expect(canPlayerBeEatenMock).not.toHaveBeenCalled();\n });\n\n it(\"should call is idiot killable when player is an idiot.\", async() => {\n const isIdiotKillableMock = jest.spyOn(services.playerKiller as unknown as { isIdiotKillable }, \"isIdiotKillable\").mockReturnValue(false);\n const player = createFakeIdiotAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PLAYER_DEATH_CAUSES.VOTE);\n\n expect(isIdiotKillableMock).toHaveBeenCalledExactlyOnceWith(player, PLAYER_DEATH_CAUSES.VOTE, game);\n });\n\n it(\"should not call is idiot killable when player is not an idiot.\", async() => {\n const isIdiotKillableMock = jest.spyOn(services.playerKiller as unknown as { isIdiotKillable }, \"isIdiotKillable\").mockReturnValue(false);\n const player = createFakeSeerAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PLAYER_DEATH_CAUSES.VOTE);\n\n expect(isIdiotKillableMock).not.toHaveBeenCalled();\n });\n\n it(\"should call is ancient killable when player is an ancient.\", async() => {\n const isAncientKillableMock = jest.spyOn(services.playerKiller as unknown as { isAncientKillable }, \"isAncientKillable\").mockReturnValue(false);\n const player = createFakeAncientAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PLAYER_DEATH_CAUSES.VOTE);\n\n expect(isAncientKillableMock).toHaveBeenCalledExactlyOnceWith(game, PLAYER_DEATH_CAUSES.VOTE);\n });\n\n it(\"should not call is ancient killable when player is not an ancient.\", async() => {\n const isAncientKillableMock = jest.spyOn(services.playerKiller as unknown as { isAncientKillable }, \"isAncientKillable\").mockReturnValue(false);\n const player = createFakeSeerAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PLAYER_DEATH_CAUSES.VOTE);\n\n expect(isAncientKillableMock).not.toHaveBeenCalled();\n });\n\n it(\"should return true when there are no contraindications.\", async() => {\n const player = createFakeSeerAlivePlayer();\n const game = createFakeGame();\n\n await expect(services.playerKiller[\"isPlayerKillable\"](player, game, PLAYER_DEATH_CAUSES.VOTE)).resolves.toBe(true);\n });\n });\n\n describe(\"applyWorshipedPlayerDeathOutcomes\", () => {\n it(\"should return game as is when killed player doesn't have the worshiped attribute.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when there is no wild child player.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when wild child player is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when wild child player is powerless.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer({ attributes: [createPowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should transform wild child to a werewolf sided player when called.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n game.players[0],\n game.players[1],\n game.players[2],\n createFakePlayer({\n ...game.players[3],\n side: createFakePlayerSide({ ...game.players[3].side, current: ROLE_SIDES.WEREWOLVES }),\n }),\n ],\n });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyInLovePlayerDeathOutcomes\", () => {\n it(\"should return game as is when killed player doesn't have the in love attribute.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when the other lover is not found because no other one has the in love attribute.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when the other lover is not found because he is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()], isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should kill the other lover when called.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\").mockImplementation();\n services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[1], game);\n\n expect(mocks.playerKillerService.killPlayer).toHaveBeenCalledExactlyOnceWith(players[0], game, createFakePlayerBrokenHeartByCupidDeath());\n });\n });\n\n describe(\"applySheriffPlayerDeathOutcomes\", () => {\n it(\"should return game as is when player is not the sheriff.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when player is idiot and not powerless.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should prepend sheriff election game play when called with powerless idiot.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute(), createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGame({ players, upcomingPlays });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlaySheriffDelegates(), ...game.upcomingPlays],\n }));\n });\n\n it(\"should prepend sheriff election game play when called with any other role.\", () => {\n const players = [\n createFakeWildChildAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGame({ players, upcomingPlays });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlaySheriffDelegates(), ...game.upcomingPlays],\n }));\n });\n });\n\n describe(\"applyPlayerAttributesDeathOutcomes\", () => {\n beforeEach(() => {\n mocks.playerKillerService.applySheriffPlayerDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applySheriffPlayerDeathOutcomes }, \"applySheriffPlayerDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyInLovePlayerDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyInLovePlayerDeathOutcomes }, \"applyInLovePlayerDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyWorshipedPlayerDeathOutcomes }, \"applyWorshipedPlayerDeathOutcomes\").mockImplementation();\n mocks.gameHelper.getPlayerWithIdOrThrow = jest.spyOn(GameHelper, \"getPlayerWithIdOrThrow\").mockImplementation();\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockImplementation();\n });\n\n it(\"should call no methods when player doesn't have the right attributes.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n services.playerKiller[\"applyPlayerAttributesDeathOutcomes\"](game.players[0], game);\n expect(mocks.playerKillerService.applySheriffPlayerDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyInLovePlayerDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).not.toHaveBeenCalled();\n });\n\n it(\"should call all methods when player have all attributes.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute(), createFakeInLoveByCupidPlayerAttribute(), createFakeWorshipedByWildChildPlayerAttribute()] }),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const interpolations = { gameId: game._id.toString(), playerId: players[2]._id.toString() };\n const exception = new UnexpectedException(\"applyPlayerAttributesDeathOutcomes\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations);\n\n mocks.playerKillerService.applySheriffPlayerDeathOutcomes.mockReturnValue(game);\n mocks.playerKillerService.applyInLovePlayerDeathOutcomes.mockReturnValue(game);\n mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes.mockReturnValue(game);\n mocks.gameHelper.getPlayerWithIdOrThrow.mockReturnValue(game.players[2]);\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException.mockReturnValue(exception);\n services.playerKiller[\"applyPlayerAttributesDeathOutcomes\"](game.players[2], game);\n\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"applyPlayerAttributesDeathOutcomes\", interpolations);\n expect(mocks.playerKillerService.applySheriffPlayerDeathOutcomes).toHaveBeenCalledExactlyOnceWith(game.players[2], game);\n expect(mocks.playerKillerService.applyInLovePlayerDeathOutcomes).toHaveBeenCalledExactlyOnceWith(game.players[2], game);\n expect(mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes).toHaveBeenCalledExactlyOnceWith(game.players[2], game);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(1, game.players[2]._id, game, exception);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(2, game.players[2]._id, game, exception);\n });\n });\n\n describe(\"applyRustySwordKnightDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not rusty sword knight.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player is powerless.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when death cause is not eaten.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when no left alive werewolf is found.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game with first left alive werewolf player with contaminated attribute when called.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n createFakeGuardAlivePlayer({ position: 4 }),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n players[1],\n createFakePlayer({ ...players[2], attributes: [createFakeContaminatedByRustySwordKnightPlayerAttribute()] }),\n players[3],\n ],\n });\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyScapegoatDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not scapegoat.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player is powerless.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player was not scapegoated.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game with upcoming scapegoat bans votes play when called.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGame({ players, upcomingPlays });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlayScapegoatBansVoting(), ...upcomingPlays],\n });\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyAncientDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not ancient.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: true });\n const idiotOptions = createFakeIdiotGameOptions({ doesDieOnAncientDeath: true });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ idiot: idiotOptions, ancient: ancientOptions }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player is powerless.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: true });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: ancientOptions }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when ancient doesn't take his revenge and idiot is not revealed.\", () => {\n const players = [\n createFakeAncientAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should game as is when ancient doesn't take his revenge from game options.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ doesTakeHisRevenge: false }) }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerDeathPotionByWitchDeath();\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game with all villagers powerless when ancient takes his revenge.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ doesTakeHisRevenge: true }) }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerDeathPotionByWitchDeath();\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n createFakePlayer({ ...players[1], attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n players[2],\n createFakePlayer({ ...players[3], attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakePlayer(players[4]),\n ],\n });\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when idiot was revealed before but doesn't die on ancient death thanks to game options.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: false });\n const idiotOptions = createFakeIdiotGameOptions({ doesDieOnAncientDeath: false });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: ancientOptions, idiot: idiotOptions }) });\n const game = createFakeGame({ players, options });\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\").mockImplementation();\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n expect(mocks.playerKillerService.killPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should return game with killed idiot when idiot was revealed before.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: false });\n const idiotOptions = createFakeIdiotGameOptions({ doesDieOnAncientDeath: true });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: ancientOptions, idiot: idiotOptions }) });\n const game = createFakeGame({ players, options });\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\").mockImplementation();\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.killPlayer).toHaveBeenCalledExactlyOnceWith(players[1], game, createFakePlayerReconsiderPardonByAllDeath());\n });\n });\n\n describe(\"applyHunterDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not hunter.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyHunterDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player powerless.\", () => {\n const players = [\n createFakeHunterAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyHunterDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game with upcoming hunter shoots play when called.\", () => {\n const players = [\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayScapegoatBansVoting()];\n const game = createFakeGame({ players, upcomingPlays });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlayHunterShoots(), ...upcomingPlays],\n });\n\n expect(services.playerKiller[\"applyHunterDeathOutcomes\"](players[0], game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyPlayerRoleDeathOutcomes\", () => {\n beforeEach(() => {\n mocks.playerKillerService.applyHunterDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyHunterDeathOutcomes }, \"applyHunterDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyAncientDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyAncientDeathOutcomes }, \"applyAncientDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyScapegoatDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyScapegoatDeathOutcomes }, \"applyScapegoatDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyRustySwordKnightDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyRustySwordKnightDeathOutcomes }, \"applyRustySwordKnightDeathOutcomes\").mockImplementation();\n });\n\n it(\"should return game as is without calling role method outcomes when killed player doesn't have the right role.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n expect(services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed hunter outcomes method when killed player is hunter.\", () => {\n const players = [\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game);\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed ancient outcomes method when killed player is ancient.\", () => {\n const players = [\n createFakeAncientAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed scapegoat outcomes method when killed player is scapegoat.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed rusty sword knight outcomes method when killed player is rusty sword knight.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n });\n });\n\n describe(\"applyPlayerDeathOutcomes\", () => {\n it(\"should call player death outcomes methods when called.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n const exception = new UnexpectedException(\"applyPlayerAttributesDeathOutcomes\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() });\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(exception);\n const applyPlayerRoleDeathOutcomesMock = jest.spyOn(services.playerKiller as unknown as { applyPlayerRoleDeathOutcomes }, \"applyPlayerRoleDeathOutcomes\").mockReturnValue(game);\n mocks.gameHelper.getPlayerWithIdOrThrow = jest.spyOn(GameHelper, \"getPlayerWithIdOrThrow\").mockReturnValue(players[0]);\n const applyPlayerAttributesDeathOutcomesMock = jest.spyOn(services.playerKiller as unknown as { applyPlayerAttributesDeathOutcomes }, \"applyPlayerAttributesDeathOutcomes\").mockImplementation();\n services.playerKiller[\"applyPlayerDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"applyPlayerDeathOutcomes\", { gameId: game._id, playerId: players[0]._id });\n expect(applyPlayerRoleDeathOutcomesMock).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenCalledExactlyOnceWith(players[0]._id, game, exception);\n expect(applyPlayerAttributesDeathOutcomesMock).toHaveBeenCalledExactlyOnceWith(players[0], game);\n });\n });\n\n describe(\"killPlayer\", () => {\n it(\"should set player to dead and call death outcomes method when called.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n const exception = new UnexpectedException(\"applyPlayerAttributesDeathOutcomes\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() });\n const expectedKilledPlayer = createFakePlayer({ ...players[0], isAlive: false, role: createFakePlayerRole({ ...players[0].role, isRevealed: true }), death });\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(exception);\n const updatePlayerInGameMock = jest.spyOn(GameMutator, \"updatePlayerInGame\").mockReturnValue(game);\n mocks.gameHelper.getPlayerWithIdOrThrow = jest.spyOn(GameHelper, \"getPlayerWithIdOrThrow\").mockReturnValue(expectedKilledPlayer);\n const removePlayerAttributesAfterDeathMock = jest.spyOn(services.playerKiller as unknown as { removePlayerAttributesAfterDeath }, \"removePlayerAttributesAfterDeath\").mockReturnValue(expectedKilledPlayer);\n const applyPlayerDeathOutcomesMock = jest.spyOn(services.playerKiller as unknown as { applyPlayerDeathOutcomes }, \"applyPlayerDeathOutcomes\").mockReturnValue(game);\n services.playerKiller[\"killPlayer\"](players[0], game, death);\n\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"killPlayer\", { gameId: game._id, playerId: players[0]._id });\n expect(updatePlayerInGameMock).toHaveBeenNthCalledWith(1, players[0]._id, expectedKilledPlayer, game);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(1, expectedKilledPlayer._id, game, exception);\n expect(applyPlayerDeathOutcomesMock).toHaveBeenCalledExactlyOnceWith(expectedKilledPlayer, game, death);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(2, expectedKilledPlayer._id, game, exception);\n expect(removePlayerAttributesAfterDeathMock).toHaveBeenCalledWith(expectedKilledPlayer);\n expect(updatePlayerInGameMock).toHaveBeenNthCalledWith(2, players[0]._id, expectedKilledPlayer, game);\n });\n });\n\n describe(\"getPlayerToKillInGame\", () => {\n it(\"should throw error when player is already dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const exceptionInterpolations = { gameId: game._id.toString(), playerId: players[1]._id.toString() };\n const cantFindPlayerException = new UnexpectedException(\"getPlayerToKillInGame\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n const playerIsDeadException = new UnexpectedException(\"getPlayerToKillInGame\", UNEXPECTED_EXCEPTION_REASONS.PLAYER_IS_DEAD, exceptionInterpolations);\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(cantFindPlayerException);\n const createPlayerIsDeadUnexpectedExceptionMock = jest.spyOn(UnexpectedExceptionFactory, \"createPlayerIsDeadUnexpectedException\").mockReturnValue(playerIsDeadException);\n\n expect(() => services.playerKiller[\"getPlayerToKillInGame\"](players[1]._id, game)).toThrow(playerIsDeadException);\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"getPlayerToKillInGame\", exceptionInterpolations);\n expect(createPlayerIsDeadUnexpectedExceptionMock).toHaveBeenCalledExactlyOnceWith(\"getPlayerToKillInGame\", exceptionInterpolations);\n });\n\n it(\"should get player to kill when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"getPlayerToKillInGame\"](players[1]._id, game)).toStrictEqual(players[1]);\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerDeathCauses } from \"@/modules/game/enums/player.enum\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport * as GameMutator from \"@/modules/game/helpers/game.mutator\";\nimport { createPowerlessByAncientPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { PlayerKillerService } from \"@/modules/game/providers/services/player/player-killer.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { UnexpectedExceptionReasons } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport { createFakePlayer, createFakePlayerRole, createFakePlayerSide } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeAncientAlivePlayer, createFakeGuardAlivePlayer, createFakeHunterAlivePlayer, createFakeIdiotAlivePlayer, createFakeLittleGirlAlivePlayer, createFakeRustySwordKnightAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeVillagerVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWildChildAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayerBrokenHeartByCupidDeath, createFakePlayerDeathPotionByWitchDeath, createFakePlayerEatenByWerewolvesDeath, createFakePlayerReconsiderPardonByAllDeath, createFakePlayerVoteByAllDeath, createFakePlayerVoteScapegoatedByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeCantVoteByAllPlayerAttribute, createFakeContaminatedByRustySwordKnightPlayerAttribute, createFakeDrankLifePotionByWitchPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute, createFakeProtectedByGuardPlayerAttribute, createFakeSheriffByAllPlayerAttribute, createFakeWorshipedByWildChildPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGamePlayHunterShoots, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySheriffDelegates } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeAncientGameOptions, createFakeIdiotGameOptions, createFakeLittleGirlGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\n\ndescribe(\"Player Killer Service\", () => {\n let mocks: {\n playerKillerService: {\n getPlayerToKillInGame: jest.SpyInstance;\n isPlayerKillable: jest.SpyInstance;\n doesPlayerRoleMustBeRevealed: jest.SpyInstance;\n removePlayerAttributesAfterDeath: jest.SpyInstance;\n revealPlayerRole: jest.SpyInstance;\n killPlayer: jest.SpyInstance;\n applySheriffPlayerDeathOutcomes: jest.SpyInstance;\n applyInLovePlayerDeathOutcomes: jest.SpyInstance;\n applyWorshipedPlayerDeathOutcomes: jest.SpyInstance;\n applyHunterDeathOutcomes: jest.SpyInstance;\n applyAncientDeathOutcomes: jest.SpyInstance;\n applyScapegoatDeathOutcomes: jest.SpyInstance;\n applyRustySwordKnightDeathOutcomes: jest.SpyInstance;\n };\n gameHistoryRecordService: {\n getGameHistoryWerewolvesEatAncientRecords: jest.SpyInstance;\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.SpyInstance;\n };\n gameHelper: {\n getPlayerWithIdOrThrow: jest.SpyInstance;\n };\n unexpectedExceptionFactory: {\n createCantFindPlayerUnexpectedException: jest.SpyInstance;\n };\n };\n let services: { playerKiller: PlayerKillerService };\n\n beforeEach(async() => {\n mocks = {\n playerKillerService: {\n getPlayerToKillInGame: jest.fn(),\n isPlayerKillable: jest.fn(),\n doesPlayerRoleMustBeRevealed: jest.fn(),\n removePlayerAttributesAfterDeath: jest.fn(),\n revealPlayerRole: jest.fn(),\n killPlayer: jest.fn(),\n applySheriffPlayerDeathOutcomes: jest.fn(),\n applyInLovePlayerDeathOutcomes: jest.fn(),\n applyWorshipedPlayerDeathOutcomes: jest.fn(),\n applyHunterDeathOutcomes: jest.fn(),\n applyAncientDeathOutcomes: jest.fn(),\n applyScapegoatDeathOutcomes: jest.fn(),\n applyRustySwordKnightDeathOutcomes: jest.fn(),\n },\n gameHistoryRecordService: {\n getGameHistoryWerewolvesEatAncientRecords: jest.fn(),\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.fn(),\n },\n gameHelper: { getPlayerWithIdOrThrow: jest.fn() },\n unexpectedExceptionFactory: { createCantFindPlayerUnexpectedException: jest.fn() },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n PlayerKillerService,\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n ],\n }).compile();\n\n services = { playerKiller: module.get(PlayerKillerService) };\n });\n\n describe(\"killOrRevealPlayer\", () => {\n beforeEach(() => {\n mocks.playerKillerService.getPlayerToKillInGame = jest.spyOn(services.playerKiller as unknown as { getPlayerToKillInGame }, \"getPlayerToKillInGame\");\n mocks.playerKillerService.isPlayerKillable = jest.spyOn(services.playerKiller as unknown as { isPlayerKillable }, \"isPlayerKillable\");\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\");\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed = jest.spyOn(services.playerKiller as unknown as { doesPlayerRoleMustBeRevealed }, \"doesPlayerRoleMustBeRevealed\");\n mocks.playerKillerService.revealPlayerRole = jest.spyOn(services.playerKiller as unknown as { revealPlayerRole }, \"revealPlayerRole\");\n });\n\n it(\"should return game as is when player can't be revealed or killed.\", async() => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n mocks.playerKillerService.getPlayerToKillInGame.mockReturnValue(players[0]);\n mocks.playerKillerService.isPlayerKillable.mockReturnValue(false);\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed.mockReturnValue(false);\n\n await expect(services.playerKiller.killOrRevealPlayer(players[0]._id, game, death)).resolves.toStrictEqual(game);\n expect(mocks.playerKillerService.killPlayer).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.revealPlayerRole).not.toHaveBeenCalled();\n });\n\n it(\"should call kill method when player is killable.\", async() => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n mocks.playerKillerService.getPlayerToKillInGame.mockReturnValue(players[0]);\n mocks.playerKillerService.isPlayerKillable.mockReturnValue(true);\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed.mockReturnValue(true);\n\n await services.playerKiller.killOrRevealPlayer(players[0]._id, game, death);\n expect(mocks.playerKillerService.killPlayer).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.revealPlayerRole).not.toHaveBeenCalled();\n });\n\n it(\"should call reveal role method when player role must be revealed.\", async() => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n mocks.playerKillerService.getPlayerToKillInGame.mockReturnValue(players[0]);\n mocks.playerKillerService.isPlayerKillable.mockReturnValue(false);\n mocks.playerKillerService.doesPlayerRoleMustBeRevealed.mockReturnValue(true);\n\n await services.playerKiller.killOrRevealPlayer(players[0]._id, game, death);\n expect(mocks.playerKillerService.killPlayer).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.revealPlayerRole).toHaveBeenCalledExactlyOnceWith(players[0], game);\n });\n });\n\n describe(\"applyPlayerRoleRevelationOutcomes\", () => {\n it(\"should add can't vote attribute when player is idiot.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({\n ...players[0],\n attributes: [createFakeCantVoteByAllPlayerAttribute()],\n }),\n game.players[1],\n game.players[2],\n game.players[3],\n ],\n });\n\n expect(services.playerKiller[\"applyPlayerRoleRevelationOutcomes\"](game.players[0], game)).toStrictEqual(expectedGame);\n });\n\n it(\"should return the game as is when player is not an idiot.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyPlayerRoleRevelationOutcomes\"](game.players[1], game)).toStrictEqual(game);\n });\n });\n \n describe(\"isAncientKillable\", () => {\n it(\"should return true when cause is not EATEN.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(2);\n\n await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.VOTE)).resolves.toBe(true);\n });\n\n it(\"should return false when cause is EATEN but ancient still have at least one life left.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(2);\n\n await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.EATEN)).resolves.toBe(false);\n });\n\n it(\"should return true when cause is EATEN but ancient has only one life left.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(1);\n\n await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.EATEN)).resolves.toBe(true);\n });\n\n it(\"should return true when cause is EATEN but ancient has 0 life left.\", async() => {\n const game = createFakeGame();\n jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, \"getAncientLivesCountAgainstWerewolves\").mockReturnValue(0);\n\n await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.EATEN)).resolves.toBe(true);\n });\n });\n\n describe(\"revealPlayerRole\", () => {\n it(\"should throw error when player to reveal is not found among players.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const unknownPlayer = createFakePlayer();\n const interpolations = { gameId: game._id.toString(), playerId: unknownPlayer._id.toString() };\n const exception = new UnexpectedException(\"revealPlayerRole\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations);\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(exception);\n\n expect(() => services.playerKiller[\"revealPlayerRole\"](unknownPlayer, game)).toThrow(exception);\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"revealPlayerRole\", interpolations);\n });\n\n it(\"should reveal player role when called.\", () => {\n const players = [\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer({\n ...players[0],\n role: createFakePlayerRole({ ...players[0].role, isRevealed: true }),\n }),\n game.players[1],\n game.players[2],\n game.players[3],\n ],\n });\n\n expect(services.playerKiller[\"revealPlayerRole\"](players[0], game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"doesPlayerRoleMustBeRevealed\", () => {\n it(\"should return false when player role is already revealed.\", () => {\n const game = createFakeGame();\n const player = createFakeVillagerVillagerAlivePlayer();\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return false when player role is not idiot.\", () => {\n const game = createFakeGame();\n const player = createFakeSeerAlivePlayer();\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return false when player role is idiot but powerless.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer({ attributes: [createPowerlessByAncientPlayerAttribute()] });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return false when player role is idiot but death cause is not vote.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(false);\n });\n\n it(\"should return true when player role is idiot and death cause is not vote.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"doesPlayerRoleMustBeRevealed\"](player, death, game)).toBe(true);\n });\n });\n\n describe(\"removePlayerAttributesAfterDeath\", () => {\n it(\"should remove player attributes which need to be removed after death when called.\", () => {\n const player = createFakePlayer({\n isAlive: false,\n attributes: [\n createFakeCantVoteByAllPlayerAttribute({ doesRemainAfterDeath: false }),\n createFakePowerlessByAncientPlayerAttribute(),\n createFakeSheriffByAllPlayerAttribute({ doesRemainAfterDeath: true }),\n ],\n });\n const expectedPlayer = createFakePlayer({\n ...player,\n attributes: [\n player.attributes[1],\n player.attributes[2],\n ],\n });\n \n expect(services.playerKiller[\"removePlayerAttributesAfterDeath\"](player)).toStrictEqual(expectedPlayer);\n });\n });\n\n describe(\"getAncientLivesCountAgainstWerewolves\", () => {\n it(\"should return same amount of lives when no werewolves attack against ancient.\", async() => {\n const livesCountAgainstWerewolves = 3;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ livesCountAgainstWerewolves }) }) });\n const game = createFakeGame({ options });\n const gameHistoryRecordPlayAncientTarget = createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() });\n const ancientProtectedFromWerewolvesRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n ];\n mocks.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords.mockResolvedValue([]);\n mocks.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords.mockResolvedValue(ancientProtectedFromWerewolvesRecords);\n\n await expect(services.playerKiller[\"getAncientLivesCountAgainstWerewolves\"](game)).resolves.toBe(3);\n });\n\n it(\"should return amount of lives minus one when ancient was attacked three times but protected once and saved by witch once.\", async() => {\n const livesCountAgainstWerewolves = 3;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ livesCountAgainstWerewolves }) }) });\n const game = createFakeGame({ options });\n const gameHistoryRecordPlayAncientTarget = createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() });\n const gameHistoryRecordPlayAncientDrankLifePotionTarget = createFakeGameHistoryRecordPlayTarget({ ...gameHistoryRecordPlayAncientTarget, drankPotion: WitchPotions.LIFE });\n const werewolvesEatAncientRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 2,\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 3,\n }),\n ];\n const ancientProtectedFromWerewolvesRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [gameHistoryRecordPlayAncientDrankLifePotionTarget] }),\n turn: 2,\n }),\n ];\n mocks.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords.mockResolvedValue(werewolvesEatAncientRecords);\n mocks.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords.mockResolvedValue(ancientProtectedFromWerewolvesRecords);\n\n await expect(services.playerKiller[\"getAncientLivesCountAgainstWerewolves\"](game)).resolves.toBe(2);\n });\n\n it(\"should return amount of lives minus one when ancient was attacked but not protected and killed by witch.\", async() => {\n const livesCountAgainstWerewolves = 3;\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ livesCountAgainstWerewolves }) }) });\n const game = createFakeGame({ options });\n const gameHistoryRecordPlayAncientTarget = createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() });\n const werewolvesEatAncientRecords = [\n createFakeGameHistoryRecord({\n play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }),\n turn: 1,\n }),\n ];\n mocks.gameHistoryRecordService.getGameHistoryWerewolvesEatAncientRecords.mockResolvedValue(werewolvesEatAncientRecords);\n mocks.gameHistoryRecordService.getGameHistoryAncientProtectedFromWerewolvesRecords.mockResolvedValue([]);\n \n await expect(services.playerKiller[\"getAncientLivesCountAgainstWerewolves\"](game)).resolves.toBe(2);\n });\n });\n\n describe(\"isIdiotKillable\", () => {\n it(\"should return true when idiot is already revealed.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n player.role.isRevealed = true;\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PlayerDeathCauses.VOTE, game)).toBe(true);\n });\n\n it(\"should return true when idiot is killed by other cause than a vote.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PlayerDeathCauses.DEATH_POTION, game)).toBe(true);\n });\n\n it(\"should return true when idiot is killed by vote but powerless.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] });\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PlayerDeathCauses.VOTE, game)).toBe(true);\n });\n\n it(\"should return false when idiot is not revealed, dies from votes and is not powerless.\", () => {\n const game = createFakeGame();\n const player = createFakeIdiotAlivePlayer();\n\n expect(services.playerKiller[\"isIdiotKillable\"](player, PlayerDeathCauses.VOTE, game)).toBe(false);\n });\n });\n\n describe(\"canPlayerBeEaten\", () => {\n it(\"should return false when player is saved by the witch.\", () => {\n const player = createFakeSeerAlivePlayer({ attributes: [createFakeDrankLifePotionByWitchPlayerAttribute()] });\n const game = createFakeGame();\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(false);\n });\n\n it(\"should return false when player is protected by guard and is not little girl.\", () => {\n const player = createFakeSeerAlivePlayer({ attributes: [createFakeProtectedByGuardPlayerAttribute()] });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ littleGirl: createFakeLittleGirlGameOptions({ isProtectedByGuard: false }) }) });\n const game = createFakeGame({ options });\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(false);\n });\n\n it(\"should return false when player is protected by guard, is little girl but game options allows guard to protect her.\", () => {\n const player = createFakeLittleGirlAlivePlayer({ attributes: [createFakeProtectedByGuardPlayerAttribute()] });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ littleGirl: createFakeLittleGirlGameOptions({ isProtectedByGuard: true }) }) });\n const game = createFakeGame({ options });\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(false);\n });\n\n it(\"should return true when player is protected by guard, is little girl but game options doesn't allow guard to protect her.\", () => {\n const player = createFakeLittleGirlAlivePlayer({ attributes: [createFakeProtectedByGuardPlayerAttribute()] });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ littleGirl: createFakeLittleGirlGameOptions({ isProtectedByGuard: false }) }) });\n const game = createFakeGame({ options });\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(true);\n });\n\n it(\"should return true when player defenseless.\", () => {\n const player = createFakeSeerAlivePlayer({ attributes: [] });\n const game = createFakeGame();\n\n expect(services.playerKiller[\"canPlayerBeEaten\"](player, game)).toBe(true);\n });\n });\n\n describe(\"isPlayerKillable\", () => {\n it(\"should return false when cause is EATEN and player can't be eaten.\", async() => {\n jest.spyOn(services.playerKiller as unknown as { canPlayerBeEaten }, \"canPlayerBeEaten\").mockReturnValue(false);\n const player = createFakePlayer();\n const game = createFakeGame();\n\n await expect(services.playerKiller[\"isPlayerKillable\"](player, game, PlayerDeathCauses.EATEN)).resolves.toBe(false);\n });\n\n it(\"should not call can player be eaten validator when cause is not EATEN.\", async() => {\n const canPlayerBeEatenMock = jest.spyOn(services.playerKiller as unknown as { canPlayerBeEaten }, \"canPlayerBeEaten\").mockReturnValue(false);\n const player = createFakePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PlayerDeathCauses.VOTE);\n\n expect(canPlayerBeEatenMock).not.toHaveBeenCalled();\n });\n\n it(\"should call is idiot killable when player is an idiot.\", async() => {\n const isIdiotKillableMock = jest.spyOn(services.playerKiller as unknown as { isIdiotKillable }, \"isIdiotKillable\").mockReturnValue(false);\n const player = createFakeIdiotAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PlayerDeathCauses.VOTE);\n\n expect(isIdiotKillableMock).toHaveBeenCalledExactlyOnceWith(player, PlayerDeathCauses.VOTE, game);\n });\n\n it(\"should not call is idiot killable when player is not an idiot.\", async() => {\n const isIdiotKillableMock = jest.spyOn(services.playerKiller as unknown as { isIdiotKillable }, \"isIdiotKillable\").mockReturnValue(false);\n const player = createFakeSeerAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PlayerDeathCauses.VOTE);\n\n expect(isIdiotKillableMock).not.toHaveBeenCalled();\n });\n\n it(\"should call is ancient killable when player is an ancient.\", async() => {\n const isAncientKillableMock = jest.spyOn(services.playerKiller as unknown as { isAncientKillable }, \"isAncientKillable\").mockReturnValue(false);\n const player = createFakeAncientAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PlayerDeathCauses.VOTE);\n\n expect(isAncientKillableMock).toHaveBeenCalledExactlyOnceWith(game, PlayerDeathCauses.VOTE);\n });\n\n it(\"should not call is ancient killable when player is not an ancient.\", async() => {\n const isAncientKillableMock = jest.spyOn(services.playerKiller as unknown as { isAncientKillable }, \"isAncientKillable\").mockReturnValue(false);\n const player = createFakeSeerAlivePlayer();\n const game = createFakeGame();\n await services.playerKiller[\"isPlayerKillable\"](player, game, PlayerDeathCauses.VOTE);\n\n expect(isAncientKillableMock).not.toHaveBeenCalled();\n });\n\n it(\"should return true when there are no contraindications.\", async() => {\n const player = createFakeSeerAlivePlayer();\n const game = createFakeGame();\n\n await expect(services.playerKiller[\"isPlayerKillable\"](player, game, PlayerDeathCauses.VOTE)).resolves.toBe(true);\n });\n });\n\n describe(\"applyWorshipedPlayerDeathOutcomes\", () => {\n it(\"should return game as is when killed player doesn't have the worshiped attribute.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when there is no wild child player.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWitchAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when wild child player is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when wild child player is powerless.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer({ attributes: [createPowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should transform wild child to a werewolf sided player when called.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createWorshipedByWildChildPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWildChildAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n game.players[0],\n game.players[1],\n game.players[2],\n createFakePlayer({\n ...game.players[3],\n side: createFakePlayerSide({ ...game.players[3].side, current: RoleSides.WEREWOLVES }),\n }),\n ],\n });\n\n expect(services.playerKiller[\"applyWorshipedPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyInLovePlayerDeathOutcomes\", () => {\n it(\"should return game as is when killed player doesn't have the in love attribute.\", () => {\n const players = [\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when the other lover is not found because no other one has the in love attribute.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when the other lover is not found because he is dead.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()], isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should kill the other lover when called.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\").mockImplementation();\n services.playerKiller[\"applyInLovePlayerDeathOutcomes\"](players[1], game);\n\n expect(mocks.playerKillerService.killPlayer).toHaveBeenCalledExactlyOnceWith(players[0], game, createFakePlayerBrokenHeartByCupidDeath());\n });\n });\n\n describe(\"applySheriffPlayerDeathOutcomes\", () => {\n it(\"should return game as is when player is not the sheriff.\", () => {\n const players = [\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when player is idiot and not powerless.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should prepend sheriff election game play when called with powerless idiot.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute(), createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGame({ players, upcomingPlays });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlaySheriffDelegates(), ...game.upcomingPlays],\n }));\n });\n\n it(\"should prepend sheriff election game play when called with any other role.\", () => {\n const players = [\n createFakeWildChildAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGame({ players, upcomingPlays });\n\n expect(services.playerKiller[\"applySheriffPlayerDeathOutcomes\"](players[0], game)).toStrictEqual(createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlaySheriffDelegates(), ...game.upcomingPlays],\n }));\n });\n });\n\n describe(\"applyPlayerAttributesDeathOutcomes\", () => {\n beforeEach(() => {\n mocks.playerKillerService.applySheriffPlayerDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applySheriffPlayerDeathOutcomes }, \"applySheriffPlayerDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyInLovePlayerDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyInLovePlayerDeathOutcomes }, \"applyInLovePlayerDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyWorshipedPlayerDeathOutcomes }, \"applyWorshipedPlayerDeathOutcomes\").mockImplementation();\n mocks.gameHelper.getPlayerWithIdOrThrow = jest.spyOn(GameHelper, \"getPlayerWithIdOrThrow\").mockImplementation();\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockImplementation();\n });\n\n it(\"should call no methods when player doesn't have the right attributes.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n services.playerKiller[\"applyPlayerAttributesDeathOutcomes\"](game.players[0], game);\n expect(mocks.playerKillerService.applySheriffPlayerDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyInLovePlayerDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).not.toHaveBeenCalled();\n });\n\n it(\"should call all methods when player have all attributes.\", () => {\n const players = [\n createFakeIdiotAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute(), createFakeInLoveByCupidPlayerAttribute(), createFakeWorshipedByWildChildPlayerAttribute()] }),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const interpolations = { gameId: game._id.toString(), playerId: players[2]._id.toString() };\n const exception = new UnexpectedException(\"applyPlayerAttributesDeathOutcomes\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations);\n\n mocks.playerKillerService.applySheriffPlayerDeathOutcomes.mockReturnValue(game);\n mocks.playerKillerService.applyInLovePlayerDeathOutcomes.mockReturnValue(game);\n mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes.mockReturnValue(game);\n mocks.gameHelper.getPlayerWithIdOrThrow.mockReturnValue(game.players[2]);\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException.mockReturnValue(exception);\n services.playerKiller[\"applyPlayerAttributesDeathOutcomes\"](game.players[2], game);\n\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"applyPlayerAttributesDeathOutcomes\", interpolations);\n expect(mocks.playerKillerService.applySheriffPlayerDeathOutcomes).toHaveBeenCalledExactlyOnceWith(game.players[2], game);\n expect(mocks.playerKillerService.applyInLovePlayerDeathOutcomes).toHaveBeenCalledExactlyOnceWith(game.players[2], game);\n expect(mocks.playerKillerService.applyWorshipedPlayerDeathOutcomes).toHaveBeenCalledExactlyOnceWith(game.players[2], game);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(1, game.players[2]._id, game, exception);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(2, game.players[2]._id, game, exception);\n });\n });\n\n describe(\"applyRustySwordKnightDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not rusty sword knight.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player is powerless.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when death cause is not eaten.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when no left alive werewolf is found.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game with first left alive werewolf player with contaminated attribute when called.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 3 }),\n createFakeGuardAlivePlayer({ position: 4 }),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n players[1],\n createFakePlayer({ ...players[2], attributes: [createFakeContaminatedByRustySwordKnightPlayerAttribute()] }),\n players[3],\n ],\n });\n\n expect(services.playerKiller[\"applyRustySwordKnightDeathOutcomes\"](players[0], game, death)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyScapegoatDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not scapegoat.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player is powerless.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player was not scapegoated.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game with upcoming scapegoat bans votes play when called.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayHunterShoots()];\n const game = createFakeGame({ players, upcomingPlays });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlayScapegoatBansVoting(), ...upcomingPlays],\n });\n\n expect(services.playerKiller[\"applyScapegoatDeathOutcomes\"](players[0], game, death)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyAncientDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not ancient.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: true });\n const idiotOptions = createFakeIdiotGameOptions({ doesDieOnAncientDeath: true });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ idiot: idiotOptions, ancient: ancientOptions }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerVoteScapegoatedByAllDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player is powerless.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: true });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: ancientOptions }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerVoteByAllDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game as is when ancient doesn't take his revenge and idiot is not revealed.\", () => {\n const players = [\n createFakeAncientAlivePlayer(),\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerEatenByWerewolvesDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should game as is when ancient doesn't take his revenge from game options.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ doesTakeHisRevenge: false }) }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerDeathPotionByWitchDeath();\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n });\n\n it(\"should return game with all villagers powerless when ancient takes his revenge.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ doesTakeHisRevenge: true }) }) });\n const game = createFakeGame({ players, options });\n const death = createFakePlayerDeathPotionByWitchDeath();\n const expectedGame = createFakeGame({\n ...game,\n players: [\n players[0],\n createFakePlayer({ ...players[1], attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n players[2],\n createFakePlayer({ ...players[3], attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakePlayer(players[4]),\n ],\n });\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(expectedGame);\n });\n\n it(\"should return game as is when idiot was revealed before but doesn't die on ancient death thanks to game options.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: false });\n const idiotOptions = createFakeIdiotGameOptions({ doesDieOnAncientDeath: false });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: ancientOptions, idiot: idiotOptions }) });\n const game = createFakeGame({ players, options });\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\").mockImplementation();\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n expect(services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n expect(mocks.playerKillerService.killPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should return game with killed idiot when idiot was revealed before.\", () => {\n const players = [\n createFakeAncientAlivePlayer({ isAlive: false }),\n createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const ancientOptions = createFakeAncientGameOptions({ doesTakeHisRevenge: false });\n const idiotOptions = createFakeIdiotGameOptions({ doesDieOnAncientDeath: true });\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: ancientOptions, idiot: idiotOptions }) });\n const game = createFakeGame({ players, options });\n mocks.playerKillerService.killPlayer = jest.spyOn(services.playerKiller as unknown as { killPlayer }, \"killPlayer\").mockImplementation();\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyAncientDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.killPlayer).toHaveBeenCalledExactlyOnceWith(players[1], game, createFakePlayerReconsiderPardonByAllDeath());\n });\n });\n\n describe(\"applyHunterDeathOutcomes\", () => {\n it(\"should return game as is when killed player is not hunter.\", () => {\n const players = [\n createFakeIdiotAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyHunterDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game as is when killed player powerless.\", () => {\n const players = [\n createFakeHunterAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"applyHunterDeathOutcomes\"](players[0], game)).toStrictEqual(game);\n });\n\n it(\"should return game with upcoming hunter shoots play when called.\", () => {\n const players = [\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const upcomingPlays = [createFakeGamePlayScapegoatBansVoting()];\n const game = createFakeGame({ players, upcomingPlays });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [createFakeGamePlayHunterShoots(), ...upcomingPlays],\n });\n\n expect(services.playerKiller[\"applyHunterDeathOutcomes\"](players[0], game)).toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyPlayerRoleDeathOutcomes\", () => {\n beforeEach(() => {\n mocks.playerKillerService.applyHunterDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyHunterDeathOutcomes }, \"applyHunterDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyAncientDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyAncientDeathOutcomes }, \"applyAncientDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyScapegoatDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyScapegoatDeathOutcomes }, \"applyScapegoatDeathOutcomes\").mockImplementation();\n mocks.playerKillerService.applyRustySwordKnightDeathOutcomes = jest.spyOn(services.playerKiller as unknown as { applyRustySwordKnightDeathOutcomes }, \"applyRustySwordKnightDeathOutcomes\").mockImplementation();\n });\n\n it(\"should return game as is without calling role method outcomes when killed player doesn't have the right role.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n\n expect(services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death)).toStrictEqual(game);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed hunter outcomes method when killed player is hunter.\", () => {\n const players = [\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game);\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed ancient outcomes method when killed player is ancient.\", () => {\n const players = [\n createFakeAncientAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed scapegoat outcomes method when killed player is scapegoat.\", () => {\n const players = [\n createFakeScapegoatAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call killed rusty sword knight outcomes method when killed player is rusty sword knight.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n services.playerKiller[\"applyPlayerRoleDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.playerKillerService.applyRustySwordKnightDeathOutcomes).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.playerKillerService.applyHunterDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyAncientDeathOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerKillerService.applyScapegoatDeathOutcomes).not.toHaveBeenCalled();\n });\n });\n\n describe(\"applyPlayerDeathOutcomes\", () => {\n it(\"should call player death outcomes methods when called.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n const exception = new UnexpectedException(\"applyPlayerAttributesDeathOutcomes\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() });\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(exception);\n const applyPlayerRoleDeathOutcomesMock = jest.spyOn(services.playerKiller as unknown as { applyPlayerRoleDeathOutcomes }, \"applyPlayerRoleDeathOutcomes\").mockReturnValue(game);\n mocks.gameHelper.getPlayerWithIdOrThrow = jest.spyOn(GameHelper, \"getPlayerWithIdOrThrow\").mockReturnValue(players[0]);\n const applyPlayerAttributesDeathOutcomesMock = jest.spyOn(services.playerKiller as unknown as { applyPlayerAttributesDeathOutcomes }, \"applyPlayerAttributesDeathOutcomes\").mockImplementation();\n services.playerKiller[\"applyPlayerDeathOutcomes\"](players[0], game, death);\n\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"applyPlayerDeathOutcomes\", { gameId: game._id, playerId: players[0]._id });\n expect(applyPlayerRoleDeathOutcomesMock).toHaveBeenCalledExactlyOnceWith(players[0], game, death);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenCalledExactlyOnceWith(players[0]._id, game, exception);\n expect(applyPlayerAttributesDeathOutcomesMock).toHaveBeenCalledExactlyOnceWith(players[0], game);\n });\n });\n\n describe(\"killPlayer\", () => {\n it(\"should set player to dead and call death outcomes method when called.\", () => {\n const players = [\n createFakeRustySwordKnightAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeGuardAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const death = createFakePlayerDeathPotionByWitchDeath();\n const exception = new UnexpectedException(\"applyPlayerAttributesDeathOutcomes\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() });\n const expectedKilledPlayer = createFakePlayer({ ...players[0], isAlive: false, role: createFakePlayerRole({ ...players[0].role, isRevealed: true }), death });\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(exception);\n const updatePlayerInGameMock = jest.spyOn(GameMutator, \"updatePlayerInGame\").mockReturnValue(game);\n mocks.gameHelper.getPlayerWithIdOrThrow = jest.spyOn(GameHelper, \"getPlayerWithIdOrThrow\").mockReturnValue(expectedKilledPlayer);\n const removePlayerAttributesAfterDeathMock = jest.spyOn(services.playerKiller as unknown as { removePlayerAttributesAfterDeath }, \"removePlayerAttributesAfterDeath\").mockReturnValue(expectedKilledPlayer);\n const applyPlayerDeathOutcomesMock = jest.spyOn(services.playerKiller as unknown as { applyPlayerDeathOutcomes }, \"applyPlayerDeathOutcomes\").mockReturnValue(game);\n services.playerKiller[\"killPlayer\"](players[0], game, death);\n\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"killPlayer\", { gameId: game._id, playerId: players[0]._id });\n expect(updatePlayerInGameMock).toHaveBeenNthCalledWith(1, players[0]._id, expectedKilledPlayer, game);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(1, expectedKilledPlayer._id, game, exception);\n expect(applyPlayerDeathOutcomesMock).toHaveBeenCalledExactlyOnceWith(expectedKilledPlayer, game, death);\n expect(mocks.gameHelper.getPlayerWithIdOrThrow).toHaveBeenNthCalledWith(2, expectedKilledPlayer._id, game, exception);\n expect(removePlayerAttributesAfterDeathMock).toHaveBeenCalledWith(expectedKilledPlayer);\n expect(updatePlayerInGameMock).toHaveBeenNthCalledWith(2, players[0]._id, expectedKilledPlayer, game);\n });\n });\n\n describe(\"getPlayerToKillInGame\", () => {\n it(\"should throw error when player is already dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n const exceptionInterpolations = { gameId: game._id.toString(), playerId: players[1]._id.toString() };\n const cantFindPlayerException = new UnexpectedException(\"getPlayerToKillInGame\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n const playerIsDeadException = new UnexpectedException(\"getPlayerToKillInGame\", UnexpectedExceptionReasons.PLAYER_IS_DEAD, exceptionInterpolations);\n\n mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, \"createCantFindPlayerUnexpectedException\").mockReturnValue(cantFindPlayerException);\n const createPlayerIsDeadUnexpectedExceptionMock = jest.spyOn(UnexpectedExceptionFactory, \"createPlayerIsDeadUnexpectedException\").mockReturnValue(playerIsDeadException);\n\n expect(() => services.playerKiller[\"getPlayerToKillInGame\"](players[1]._id, game)).toThrow(playerIsDeadException);\n expect(mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"getPlayerToKillInGame\", exceptionInterpolations);\n expect(createPlayerIsDeadUnexpectedExceptionMock).toHaveBeenCalledExactlyOnceWith(\"getPlayerToKillInGame\", exceptionInterpolations);\n });\n\n it(\"should get player to kill when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(services.playerKiller[\"getPlayerToKillInGame\"](players[1]._id, game)).toStrictEqual(players[1]);\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts": { "tests": [ @@ -103010,7 +103170,7 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport { when } from \"jest-when\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GAME_HISTORY_RECORD_VOTING_RESULTS } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlayAllElectSheriff } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport type { GameHistoryRecordPlay } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport { bulkCreateFakePlayers, createFakePlayer, createFakePlayerRole } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeAngelAlivePlayer, createFakeHunterAlivePlayer, createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayerDeathPotionByWitchDeath, createFakePlayerVoteByAllDeath, createFakePlayerVoteScapegoatedByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordPlayVote, createFakeGameHistoryRecordPlayVoting } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { bulkCreateFakeGameAdditionalCards, createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\nimport { createFakeGameHistoryRecordToInsert } from \"@tests/factories/game/types/game-history-record/game-history-record.type.factory\";\n\njest.mock(\"@/shared/exception/types/resource-not-found-exception.type\");\n\ndescribe(\"Game History Record Service\", () => {\n let mocks: {\n gameHistoryRecordRepository: {\n create: jest.SpyInstance;\n getLastGameHistoryGuardProtectsRecord: jest.SpyInstance;\n getLastGameHistoryTieInVotesRecord: jest.SpyInstance;\n getGameHistoryWitchUsesSpecificPotionRecords: jest.SpyInstance;\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.SpyInstance;\n getGameHistoryJudgeRequestRecords: jest.SpyInstance;\n getGameHistoryWerewolvesEatAncientRecords: jest.SpyInstance;\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.SpyInstance;\n getPreviousGameHistoryRecord: jest.SpyInstance;\n getGameHistory: jest.SpyInstance;\n getGameHistoryPhaseRecords: jest.SpyInstance;\n };\n gameRepository: { findOne: jest.SpyInstance };\n gamePlayVoteService: { getNominatedPlayers: jest.SpyInstance };\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n let services: { gameHistoryRecord: GameHistoryRecordService };\n let repositories: { gameHistoryRecord: GameHistoryRecordRepository };\n\n beforeEach(async() => {\n mocks = {\n gameHistoryRecordRepository: {\n create: jest.fn(),\n getLastGameHistoryGuardProtectsRecord: jest.fn(),\n getLastGameHistoryTieInVotesRecord: jest.fn(),\n getGameHistoryWitchUsesSpecificPotionRecords: jest.fn(),\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.fn(),\n getGameHistoryJudgeRequestRecords: jest.fn(),\n getGameHistoryWerewolvesEatAncientRecords: jest.fn(),\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.fn(),\n getPreviousGameHistoryRecord: jest.fn(),\n getGameHistory: jest.fn(),\n getGameHistoryPhaseRecords: jest.fn(),\n },\n gameRepository: { findOne: jest.fn() },\n gamePlayVoteService: { getNominatedPlayers: jest.fn() },\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n {\n provide: GameHistoryRecordRepository,\n useValue: mocks.gameHistoryRecordRepository,\n },\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n {\n provide: GamePlayVoteService,\n useValue: mocks.gamePlayVoteService,\n },\n GameHistoryRecordService,\n ],\n }).compile();\n\n services = { gameHistoryRecord: module.get(GameHistoryRecordService) };\n repositories = { gameHistoryRecord: module.get(GameHistoryRecordRepository) };\n });\n\n describe(\"createGameHistoryRecord\", () => {\n it(\"should create game history record when called with valid data.\", async() => {\n jest.spyOn(services.gameHistoryRecord as unknown as { validateGameHistoryRecordToInsertData }, \"validateGameHistoryRecordToInsertData\").mockImplementation();\n const validPlay = createFakeGameHistoryRecordToInsert({\n gameId: createFakeObjectId(),\n play: createFakeGameHistoryRecordPlay(),\n });\n await services.gameHistoryRecord.createGameHistoryRecord(validPlay);\n\n expect(repositories.gameHistoryRecord.create).toHaveBeenCalledExactlyOnceWith(validPlay);\n });\n });\n\n describe(\"getLastGameHistoryGuardProtectsRecord\", () => {\n it(\"should get game history when guard protected when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(gameId);\n\n expect(repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getLastGameHistoryTieInVotesRecord\", () => {\n it(\"should get game history when all voted and there was a tie when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE);\n\n expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord).toHaveBeenCalledExactlyOnceWith(gameId, GAME_PLAY_ACTIONS.VOTE);\n });\n });\n\n describe(\"getGameHistoryWitchUsesSpecificPotionRecords\", () => {\n it(\"should get game history records when witch used life potion when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE);\n\n expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WITCH_POTIONS.LIFE);\n });\n\n it(\"should get game history records when witch used death potion when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.DEATH);\n\n expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WITCH_POTIONS.DEATH);\n });\n });\n\n describe(\"getGameHistoryVileFatherOfWolvesInfectedRecords\", () => {\n it(\"should get game history records when vile father of wolves infected a player when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getGameHistoryJudgeRequestRecords\", () => {\n it(\"should get game history records when stuttering judge requested another vote when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryJudgeRequestRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryJudgeRequestRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n \n describe(\"getGameHistoryWerewolvesEatAncientRecords\", () => {\n it(\"should get game history records when any kind of werewolves eat ancient when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getGameHistoryAncientProtectedFromWerewolvesRecords\", () => {\n it(\"should get game history records when ancient is protected from werewolves when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryAncientProtectedFromWerewolvesRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryAncientProtectedFromWerewolvesRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getGameHistoryPhaseRecords\", () => {\n it(\"should call getGameHistoryPhaseRecords method when called.\", async() => {\n const game = createFakeGame();\n await services.gameHistoryRecord.getGameHistoryPhaseRecords(game._id, game.turn, game.phase);\n\n expect(mocks.gameHistoryRecordRepository.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, game.phase);\n });\n });\n\n describe(\"getPreviousGameHistoryRecord\", () => {\n it(\"should previous game history record when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getPreviousGameHistoryRecord(gameId);\n\n expect(repositories.gameHistoryRecord.getPreviousGameHistoryRecord).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordToInsert\", () => {\n let localMocks: {\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordPlayToInsert: jest.SpyInstance;\n generateCurrentGameHistoryRecordRevealedPlayersToInsert: jest.SpyInstance;\n generateCurrentGameHistoryRecordDeadPlayersToInsert: jest.SpyInstance;\n generateCurrentGameHistoryRecordPlayVotingToInsert: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordPlayToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlayToInsert }, \"generateCurrentGameHistoryRecordPlayToInsert\").mockImplementation(),\n generateCurrentGameHistoryRecordRevealedPlayersToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordRevealedPlayersToInsert }, \"generateCurrentGameHistoryRecordRevealedPlayersToInsert\").mockImplementation(),\n generateCurrentGameHistoryRecordDeadPlayersToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordDeadPlayersToInsert }, \"generateCurrentGameHistoryRecordDeadPlayersToInsert\").mockImplementation(),\n generateCurrentGameHistoryRecordPlayVotingToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlayVotingToInsert }, \"generateCurrentGameHistoryRecordPlayVotingToInsert\").mockImplementation(),\n },\n };\n });\n \n it(\"should throw error when there is no current play for the game.\", () => {\n const baseGame = createFakeGame();\n const newGame = createFakeGame();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const interpolations = { gameId: baseGame._id };\n\n expect(() => services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"generateCurrentGameHistoryRecordToInsert\", interpolations);\n });\n \n it(\"should generate current game history to insert when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n const expectedCurrentGameHistoryToInsert = createFakeGameHistoryRecordToInsert({\n gameId: baseGame._id,\n turn: baseGame.turn,\n phase: baseGame.phase,\n tick: baseGame.tick,\n play: expectedCurrentGameHistoryPlayToInsert,\n });\n \n expect(services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play)).toStrictEqual(expectedCurrentGameHistoryToInsert);\n });\n\n it(\"should call generateCurrentGameHistoryRecordPlayToInsert method when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, play);\n });\n\n it(\"should call generateCurrentGameHistoryRecordRevealedPlayersToInsert method when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordRevealedPlayersToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, newGame);\n });\n\n it(\"should call generateCurrentGameHistoryRecordDeadPlayersToInsert method when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordDeadPlayersToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, newGame);\n });\n \n it(\"should call generateCurrentGameHistoryRecordPlayVotingToInsert method when called with votes.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay({ votes: [] });\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({\n gameId: baseGame._id,\n turn: baseGame.turn,\n phase: baseGame.phase,\n tick: baseGame.tick,\n play: expectedCurrentGameHistoryPlayToInsert,\n });\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, newGame, gameHistoryRecordToInsert);\n });\n\n it(\"should not call generateCurrentGameHistoryRecordPlayVotingToInsert method when called without votes.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingToInsert).not.toHaveBeenCalled();\n });\n });\n\n describe(\"getGameHistory\", () => {\n it(\"should call getGameHistory repository method when called.\", async() => {\n const game = createFakeGame();\n await services.gameHistoryRecord.getGameHistory(game._id);\n\n expect(mocks.gameHistoryRecordRepository.getGameHistory).toHaveBeenCalledExactlyOnceWith(game._id);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordDeadPlayersToInsert\", () => {\n it(\"should generate current game history dead players when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0], isAlive: false }),\n createFakePlayer({ ...players[1] }),\n createFakePlayer({ ...players[2], isAlive: false }),\n createFakePlayer({ ...players[3] }),\n createFakePlayer({ ...players[4] }),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordDeadPlayersToInsert\"](baseGame, newGame)).toStrictEqual([\n newPlayers[0],\n newPlayers[2],\n ]);\n });\n\n it(\"should return undefined when there is no dead players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0] }),\n createFakePlayer({ ...players[1] }),\n createFakePlayer({ ...players[2] }),\n createFakePlayer({ ...players[3] }),\n createFakePlayer({ ...players[4] }),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordDeadPlayersToInsert\"](baseGame, newGame)).toBeUndefined();\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordRevealedPlayersToInsert\", () => {\n it(\"should generate current game history revealed players but alive when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: true }) }),\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ isAlive: false, role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[1], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[2], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[3], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[4], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeAngelAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordRevealedPlayersToInsert\"](baseGame, newGame)).toStrictEqual([\n newPlayers[0],\n newPlayers[2],\n ]);\n });\n\n it(\"should return undefined when there is no new revealed players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: true }) }),\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ isAlive: false, role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakePlayer({ ...players[1], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[2], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakePlayer({ ...players[3], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[4], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeAngelAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordRevealedPlayersToInsert\"](baseGame, newGame)).toBeUndefined();\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlayToInsert\", () => {\n let localMocks: { gameHistoryRecordService: { generateCurrentGameHistoryRecordPlaySourceToInsert: jest.SpyInstance } };\n\n beforeEach(() => {\n localMocks = { gameHistoryRecordService: { generateCurrentGameHistoryRecordPlaySourceToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlaySourceToInsert }, \"generateCurrentGameHistoryRecordPlaySourceToInsert\").mockImplementation() } };\n });\n\n it(\"should generate current game history record play to insert when called.\", () => {\n const game = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto({\n doesJudgeRequestAnotherVote: true,\n targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: true })],\n votes: [createFakeGameHistoryRecordPlayVote()],\n chosenCard: createFakeGameAdditionalCard(),\n chosenSide: ROLE_SIDES.VILLAGERS,\n });\n const expectedGameHistoryRecordPlaySource = { name: undefined, players: undefined };\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlaySourceToInsert.mockReturnValue(expectedGameHistoryRecordPlaySource);\n const expectedGameHistoryRecordPlay = createFakeGameHistoryRecordPlay({\n action: game.currentPlay.action,\n didJudgeRequestAnotherVote: play.doesJudgeRequestAnotherVote,\n targets: play.targets,\n votes: play.votes,\n chosenCard: play.chosenCard,\n chosenSide: play.chosenSide,\n }, { source: expectedGameHistoryRecordPlaySource });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayToInsert\"](game, play)).toStrictEqual(expectedGameHistoryRecordPlay);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\", () => {\n it(\"should return sheriff election when there is a sheriff in the game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllElectSheriff() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer({ ...players[1], attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.SHERIFF_ELECTION);\n });\n\n it(\"should return tie when there is no sheriff in the game after election.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllElectSheriff() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.TIE);\n });\n\n it(\"should return skipped when there are no vote set.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: undefined });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.SKIPPED);\n });\n\n it(\"should return skipped when votes are empty.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.SKIPPED);\n });\n\n it(\"should return death when there is at least one dead player from votes.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const deadPlayers = [\n createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() }),\n ];\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH);\n });\n\n it(\"should return death when there is at least one dead player from scapegoat votes.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteScapegoatedByAllDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH);\n });\n\n it(\"should return inconsequential when there is no death from votes and current play was already after a tie.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }) });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.INCONSEQUENTIAL);\n });\n\n it(\"should return tie when there is no death from votes and current play was not after a tie.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }) });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.TIE);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlayVotingToInsert\", () => {\n let localMocks: {\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordPlayVotingResultToInsert: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = { gameHistoryRecordService: { generateCurrentGameHistoryRecordPlayVotingResultToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlayVotingResultToInsert }, \"generateCurrentGameHistoryRecordPlayVotingResultToInsert\").mockImplementation() } };\n });\n \n it(\"should generate current game history record play voting when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH);\n const expectedCurrentGameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({\n result: GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH,\n nominatedPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert)).toStrictEqual(expectedCurrentGameHistoryRecordPlayVoting);\n });\n\n it(\"should call getNominatedPlayers method with empty votes when called without votes.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH);\n services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert);\n\n expect(mocks.gamePlayVoteService.getNominatedPlayers).toHaveBeenCalledExactlyOnceWith([], game);\n });\n\n it(\"should call getNominatedPlayers method with votes when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }) });\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH);\n services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert);\n\n expect(mocks.gamePlayVoteService.getNominatedPlayers).toHaveBeenCalledExactlyOnceWith(gameHistoryRecordToInsert.play.votes, game);\n });\n\n it(\"should call generateCurrentGameHistoryRecordPlayVotingResultToInsert method when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }) });\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH);\n services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert).toHaveBeenCalledExactlyOnceWith(game, newGame, gameHistoryRecordToInsert);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlaySourceToInsert\", () => {\n it(\"should generate current game history record play source when called.\", () => {\n const players = [\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n ];\n const expectedPlayers = [players[0], players[1], players[3]];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createGamePlayAllElectSheriff({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL, players: expectedPlayers }) }), players });\n const expectedGameHistoryRecordPlaySource = createFakeGameHistoryRecordPlaySource({\n name: game.currentPlay.source.name,\n players: expectedPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlaySourceToInsert\"](game)).toStrictEqual(expectedGameHistoryRecordPlaySource);\n });\n });\n\n describe(\"validateGameHistoryRecordToInsertPlayData\", () => {\n const fakeGameAdditionalCards = bulkCreateFakeGameAdditionalCards(3);\n const fakeGame = createFakeGame({ players: bulkCreateFakePlayers(4), additionalCards: fakeGameAdditionalCards });\n const fakePlayer = createFakePlayer();\n const fakeCard = createFakeGameAdditionalCard();\n\n it.each<{ play: GameHistoryRecordPlay; test: string; errorParameters: [API_RESOURCES, string, string] }>([\n {\n play: createFakeGameHistoryRecordPlay({ source: { name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, players: [fakePlayer] } }),\n test: \"a source is not in the game\",\n errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `source.players` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n players: fakeGame.players,\n },\n targets: [{ player: fakePlayer }],\n }),\n test: \"a target is not in the game\",\n errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `targets.player` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n players: fakeGame.players,\n },\n votes: [{ source: fakePlayer, target: fakeGame.players[0] }],\n }),\n test: \"a vote source is not in the game\",\n errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `votes.source` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n players: fakeGame.players,\n },\n votes: [{ target: fakePlayer, source: fakeGame.players[0] }],\n }),\n test: \"a vote target is not in the game\",\n errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `votes.target` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n players: fakeGame.players,\n },\n chosenCard: fakeCard,\n }),\n test: \"chosen card is not in the game\",\n errorParameters: [API_RESOURCES.GAME_ADDITIONAL_CARDS, fakeCard._id.toString(), \"Game Play - Chosen card is not in the game additional cards\"],\n },\n ])(\"should throw resource not found error when $test [#$#].\", ({ play, errorParameters }) => {\n expect(() => services.gameHistoryRecord[\"validateGameHistoryRecordToInsertPlayData\"](play, fakeGame)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(...errorParameters);\n });\n\n it(\"should not throw any errors when called with valid play data.\", () => {\n const validPlay = createFakeGameHistoryRecordPlay({\n source: {\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n players: fakeGame.players,\n },\n targets: [{ player: fakeGame.players[0] }],\n votes: [{ target: fakeGame.players[1], source: fakeGame.players[0] }],\n chosenCard: fakeGameAdditionalCards[1],\n });\n\n expect(() => services.gameHistoryRecord[\"validateGameHistoryRecordToInsertPlayData\"](validPlay, fakeGame)).not.toThrow();\n });\n });\n\n describe(\"validateGameHistoryRecordToInsertData\", () => {\n const existingId = createFakeObjectId();\n const existingGame = createFakeGame();\n const fakePlayer = createFakePlayer();\n const unknownId = createFakeObjectId();\n\n beforeEach(() => {\n when(mocks.gameRepository.findOne).calledWith({ _id: unknownId.toJSON() }).mockResolvedValue(null);\n when(mocks.gameRepository.findOne).calledWith({ _id: existingId.toJSON() }).mockResolvedValue(existingGame);\n });\n\n it.each<{ gameHistoryRecord: GameHistoryRecordToInsert; test: string; errorParameters: [API_RESOURCES, string, string] }>([\n {\n gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: unknownId }),\n test: \"game is not found with specified gameId\",\n errorParameters: [API_RESOURCES.GAMES, unknownId.toString(), \"Game Play - Game Id is unknown in database\"],\n },\n {\n gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: existingId, revealedPlayers: [fakePlayer] }),\n test: \"a revealed player is not in the game\",\n errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `revealedPlayers` is not in the game players\"],\n },\n {\n gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: existingId, deadPlayers: [fakePlayer] }),\n test: \"a dead player is not in the game\",\n errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `deadPlayers` is not in the game players\"],\n },\n ])(\"should throw resource not found error when $test [#$#].\", async({ gameHistoryRecord, errorParameters }) => {\n await expect(services.gameHistoryRecord[\"validateGameHistoryRecordToInsertData\"](gameHistoryRecord)).toReject();\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(...errorParameters);\n });\n\n it(\"should not throw any errors when called with valid data.\", async() => {\n const validPlay = createFakeGameHistoryRecordToInsert({\n gameId: existingId,\n play: createFakeGameHistoryRecordPlay({ source: { name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, players: existingGame.players } }),\n revealedPlayers: existingGame.players,\n deadPlayers: existingGame.players,\n });\n\n await expect(services.gameHistoryRecord[\"validateGameHistoryRecordToInsertData\"](validPlay)).resolves.not.toThrow();\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport { when } from \"jest-when\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GameHistoryRecordVotingResults } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GamePlayActions, GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlayAllElectSheriff } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport type { GameHistoryRecordPlay } from \"@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport { RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport { bulkCreateFakePlayers, createFakePlayer, createFakePlayerRole } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeAngelAlivePlayer, createFakeHunterAlivePlayer, createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayerDeathPotionByWitchDeath, createFakePlayerVoteByAllDeath, createFakePlayerVoteScapegoatedByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordPlayVote, createFakeGameHistoryRecordPlayVoting } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { bulkCreateFakeGameAdditionalCards, createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\nimport { createFakeGameHistoryRecordToInsert } from \"@tests/factories/game/types/game-history-record/game-history-record.type.factory\";\n\njest.mock(\"@/shared/exception/types/resource-not-found-exception.type\");\n\ndescribe(\"Game History Record Service\", () => {\n let mocks: {\n gameHistoryRecordRepository: {\n create: jest.SpyInstance;\n getLastGameHistoryGuardProtectsRecord: jest.SpyInstance;\n getLastGameHistoryTieInVotesRecord: jest.SpyInstance;\n getGameHistoryWitchUsesSpecificPotionRecords: jest.SpyInstance;\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.SpyInstance;\n getGameHistoryJudgeRequestRecords: jest.SpyInstance;\n getGameHistoryWerewolvesEatAncientRecords: jest.SpyInstance;\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.SpyInstance;\n getPreviousGameHistoryRecord: jest.SpyInstance;\n getGameHistory: jest.SpyInstance;\n getGameHistoryPhaseRecords: jest.SpyInstance;\n };\n gameRepository: { findOne: jest.SpyInstance };\n gamePlayVoteService: { getNominatedPlayers: jest.SpyInstance };\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n let services: { gameHistoryRecord: GameHistoryRecordService };\n let repositories: { gameHistoryRecord: GameHistoryRecordRepository };\n\n beforeEach(async() => {\n mocks = {\n gameHistoryRecordRepository: {\n create: jest.fn(),\n getLastGameHistoryGuardProtectsRecord: jest.fn(),\n getLastGameHistoryTieInVotesRecord: jest.fn(),\n getGameHistoryWitchUsesSpecificPotionRecords: jest.fn(),\n getGameHistoryVileFatherOfWolvesInfectedRecords: jest.fn(),\n getGameHistoryJudgeRequestRecords: jest.fn(),\n getGameHistoryWerewolvesEatAncientRecords: jest.fn(),\n getGameHistoryAncientProtectedFromWerewolvesRecords: jest.fn(),\n getPreviousGameHistoryRecord: jest.fn(),\n getGameHistory: jest.fn(),\n getGameHistoryPhaseRecords: jest.fn(),\n },\n gameRepository: { findOne: jest.fn() },\n gamePlayVoteService: { getNominatedPlayers: jest.fn() },\n unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n {\n provide: GameHistoryRecordRepository,\n useValue: mocks.gameHistoryRecordRepository,\n },\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n {\n provide: GamePlayVoteService,\n useValue: mocks.gamePlayVoteService,\n },\n GameHistoryRecordService,\n ],\n }).compile();\n\n services = { gameHistoryRecord: module.get(GameHistoryRecordService) };\n repositories = { gameHistoryRecord: module.get(GameHistoryRecordRepository) };\n });\n\n describe(\"createGameHistoryRecord\", () => {\n it(\"should create game history record when called with valid data.\", async() => {\n jest.spyOn(services.gameHistoryRecord as unknown as { validateGameHistoryRecordToInsertData }, \"validateGameHistoryRecordToInsertData\").mockImplementation();\n const validPlay = createFakeGameHistoryRecordToInsert({\n gameId: createFakeObjectId(),\n play: createFakeGameHistoryRecordPlay(),\n });\n await services.gameHistoryRecord.createGameHistoryRecord(validPlay);\n\n expect(repositories.gameHistoryRecord.create).toHaveBeenCalledExactlyOnceWith(validPlay);\n });\n });\n\n describe(\"getLastGameHistoryGuardProtectsRecord\", () => {\n it(\"should get game history when guard protected when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(gameId);\n\n expect(repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getLastGameHistoryTieInVotesRecord\", () => {\n it(\"should get game history when all voted and there was a tie when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE);\n\n expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord).toHaveBeenCalledExactlyOnceWith(gameId, GamePlayActions.VOTE);\n });\n });\n\n describe(\"getGameHistoryWitchUsesSpecificPotionRecords\", () => {\n it(\"should get game history records when witch used life potion when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE);\n\n expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WitchPotions.LIFE);\n });\n\n it(\"should get game history records when witch used death potion when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.DEATH);\n\n expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WitchPotions.DEATH);\n });\n });\n\n describe(\"getGameHistoryVileFatherOfWolvesInfectedRecords\", () => {\n it(\"should get game history records when vile father of wolves infected a player when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getGameHistoryJudgeRequestRecords\", () => {\n it(\"should get game history records when stuttering judge requested another vote when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryJudgeRequestRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryJudgeRequestRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n \n describe(\"getGameHistoryWerewolvesEatAncientRecords\", () => {\n it(\"should get game history records when any kind of werewolves eat ancient when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getGameHistoryAncientProtectedFromWerewolvesRecords\", () => {\n it(\"should get game history records when ancient is protected from werewolves when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getGameHistoryAncientProtectedFromWerewolvesRecords(gameId);\n\n expect(repositories.gameHistoryRecord.getGameHistoryAncientProtectedFromWerewolvesRecords).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"getGameHistoryPhaseRecords\", () => {\n it(\"should call getGameHistoryPhaseRecords method when called.\", async() => {\n const game = createFakeGame();\n await services.gameHistoryRecord.getGameHistoryPhaseRecords(game._id, game.turn, game.phase);\n\n expect(mocks.gameHistoryRecordRepository.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, game.phase);\n });\n });\n\n describe(\"getPreviousGameHistoryRecord\", () => {\n it(\"should previous game history record when called.\", async() => {\n const gameId = createFakeObjectId();\n await services.gameHistoryRecord.getPreviousGameHistoryRecord(gameId);\n\n expect(repositories.gameHistoryRecord.getPreviousGameHistoryRecord).toHaveBeenCalledExactlyOnceWith(gameId);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordToInsert\", () => {\n let localMocks: {\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordPlayToInsert: jest.SpyInstance;\n generateCurrentGameHistoryRecordRevealedPlayersToInsert: jest.SpyInstance;\n generateCurrentGameHistoryRecordDeadPlayersToInsert: jest.SpyInstance;\n generateCurrentGameHistoryRecordPlayVotingToInsert: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordPlayToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlayToInsert }, \"generateCurrentGameHistoryRecordPlayToInsert\").mockImplementation(),\n generateCurrentGameHistoryRecordRevealedPlayersToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordRevealedPlayersToInsert }, \"generateCurrentGameHistoryRecordRevealedPlayersToInsert\").mockImplementation(),\n generateCurrentGameHistoryRecordDeadPlayersToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordDeadPlayersToInsert }, \"generateCurrentGameHistoryRecordDeadPlayersToInsert\").mockImplementation(),\n generateCurrentGameHistoryRecordPlayVotingToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlayVotingToInsert }, \"generateCurrentGameHistoryRecordPlayVotingToInsert\").mockImplementation(),\n },\n };\n });\n \n it(\"should throw error when there is no current play for the game.\", () => {\n const baseGame = createFakeGame();\n const newGame = createFakeGame();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const interpolations = { gameId: baseGame._id };\n\n expect(() => services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"generateCurrentGameHistoryRecordToInsert\", interpolations);\n });\n \n it(\"should generate current game history to insert when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n const expectedCurrentGameHistoryToInsert = createFakeGameHistoryRecordToInsert({\n gameId: baseGame._id,\n turn: baseGame.turn,\n phase: baseGame.phase,\n tick: baseGame.tick,\n play: expectedCurrentGameHistoryPlayToInsert,\n });\n \n expect(services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play)).toStrictEqual(expectedCurrentGameHistoryToInsert);\n });\n\n it(\"should call generateCurrentGameHistoryRecordPlayToInsert method when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, play);\n });\n\n it(\"should call generateCurrentGameHistoryRecordRevealedPlayersToInsert method when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordRevealedPlayersToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, newGame);\n });\n\n it(\"should call generateCurrentGameHistoryRecordDeadPlayersToInsert method when called.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordDeadPlayersToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, newGame);\n });\n \n it(\"should call generateCurrentGameHistoryRecordPlayVotingToInsert method when called with votes.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay({ votes: [] });\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({\n gameId: baseGame._id,\n turn: baseGame.turn,\n phase: baseGame.phase,\n tick: baseGame.tick,\n play: expectedCurrentGameHistoryPlayToInsert,\n });\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingToInsert).toHaveBeenCalledExactlyOnceWith(baseGame, newGame, gameHistoryRecordToInsert);\n });\n\n it(\"should not call generateCurrentGameHistoryRecordPlayVotingToInsert method when called without votes.\", () => {\n const baseGame = createFakeGameWithCurrentPlay();\n const newGame = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto();\n const expectedCurrentGameHistoryPlayToInsert = createFakeGameHistoryRecordPlay();\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayToInsert.mockReturnValue(expectedCurrentGameHistoryPlayToInsert);\n services.gameHistoryRecord.generateCurrentGameHistoryRecordToInsert(baseGame, newGame, play);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingToInsert).not.toHaveBeenCalled();\n });\n });\n\n describe(\"getGameHistory\", () => {\n it(\"should call getGameHistory repository method when called.\", async() => {\n const game = createFakeGame();\n await services.gameHistoryRecord.getGameHistory(game._id);\n\n expect(mocks.gameHistoryRecordRepository.getGameHistory).toHaveBeenCalledExactlyOnceWith(game._id);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordDeadPlayersToInsert\", () => {\n it(\"should generate current game history dead players when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0], isAlive: false }),\n createFakePlayer({ ...players[1] }),\n createFakePlayer({ ...players[2], isAlive: false }),\n createFakePlayer({ ...players[3] }),\n createFakePlayer({ ...players[4] }),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordDeadPlayersToInsert\"](baseGame, newGame)).toStrictEqual([\n newPlayers[0],\n newPlayers[2],\n ]);\n });\n\n it(\"should return undefined when there is no dead players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0] }),\n createFakePlayer({ ...players[1] }),\n createFakePlayer({ ...players[2] }),\n createFakePlayer({ ...players[3] }),\n createFakePlayer({ ...players[4] }),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordDeadPlayersToInsert\"](baseGame, newGame)).toBeUndefined();\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordRevealedPlayersToInsert\", () => {\n it(\"should generate current game history revealed players but alive when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: true }) }),\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ isAlive: false, role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[1], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[2], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[3], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[4], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeAngelAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordRevealedPlayersToInsert\"](baseGame, newGame)).toStrictEqual([\n newPlayers[0],\n newPlayers[2],\n ]);\n });\n\n it(\"should return undefined when there is no new revealed players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: true }) }),\n createFakeWerewolfAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ isAlive: false, role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeVillagerAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const baseGame = createFakeGame({ players });\n const newPlayers = [\n createFakePlayer({ ...players[0], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakePlayer({ ...players[1], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[2], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakePlayer({ ...players[3], role: createFakePlayerRole({ isRevealed: true }) }),\n createFakePlayer({ ...players[4], role: createFakePlayerRole({ isRevealed: false }) }),\n createFakeAngelAlivePlayer({ role: createFakePlayerRole({ isRevealed: false }) }),\n ];\n const newGame = createFakeGame({\n ...baseGame,\n players: newPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordRevealedPlayersToInsert\"](baseGame, newGame)).toBeUndefined();\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlayToInsert\", () => {\n let localMocks: { gameHistoryRecordService: { generateCurrentGameHistoryRecordPlaySourceToInsert: jest.SpyInstance } };\n\n beforeEach(() => {\n localMocks = { gameHistoryRecordService: { generateCurrentGameHistoryRecordPlaySourceToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlaySourceToInsert }, \"generateCurrentGameHistoryRecordPlaySourceToInsert\").mockImplementation() } };\n });\n\n it(\"should generate current game history record play to insert when called.\", () => {\n const game = createFakeGameWithCurrentPlay();\n const play = createFakeMakeGamePlayWithRelationsDto({\n doesJudgeRequestAnotherVote: true,\n targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: true })],\n votes: [createFakeGameHistoryRecordPlayVote()],\n chosenCard: createFakeGameAdditionalCard(),\n chosenSide: RoleSides.VILLAGERS,\n });\n const expectedGameHistoryRecordPlaySource = { name: undefined, players: undefined };\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlaySourceToInsert.mockReturnValue(expectedGameHistoryRecordPlaySource);\n const expectedGameHistoryRecordPlay = createFakeGameHistoryRecordPlay({\n action: game.currentPlay.action,\n didJudgeRequestAnotherVote: play.doesJudgeRequestAnotherVote,\n targets: play.targets,\n votes: play.votes,\n chosenCard: play.chosenCard,\n chosenSide: play.chosenSide,\n }, { source: expectedGameHistoryRecordPlaySource });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayToInsert\"](game, play)).toStrictEqual(expectedGameHistoryRecordPlay);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\", () => {\n it(\"should return sheriff election when there is a sheriff in the game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllElectSheriff() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer({ ...players[1], attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.SHERIFF_ELECTION);\n });\n\n it(\"should return tie when there is no sheriff in the game after election.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllElectSheriff() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.TIE);\n });\n\n it(\"should return skipped when there are no vote set.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: undefined });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.SKIPPED);\n });\n\n it(\"should return skipped when votes are empty.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.SKIPPED);\n });\n\n it(\"should return death when there is at least one dead player from votes.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const deadPlayers = [\n createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() }),\n ];\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.DEATH);\n });\n\n it(\"should return death when there is at least one dead player from scapegoat votes.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote() });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteScapegoatedByAllDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.DEATH);\n });\n\n it(\"should return inconsequential when there is no death from votes and current play was already after a tie.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }) });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.INCONSEQUENTIAL);\n });\n\n it(\"should return tie when there is no death from votes and current play was not after a tie.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeHunterAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }) });\n const newGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(players[0]),\n createFakePlayer(players[1]),\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ],\n });\n const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() })] });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingResultToInsert\"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.TIE);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlayVotingToInsert\", () => {\n let localMocks: {\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordPlayVotingResultToInsert: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = { gameHistoryRecordService: { generateCurrentGameHistoryRecordPlayVotingResultToInsert: jest.spyOn(services.gameHistoryRecord as unknown as { generateCurrentGameHistoryRecordPlayVotingResultToInsert }, \"generateCurrentGameHistoryRecordPlayVotingResultToInsert\").mockImplementation() } };\n });\n \n it(\"should generate current game history record play voting when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH);\n const expectedCurrentGameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({\n result: GameHistoryRecordVotingResults.DEATH,\n nominatedPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert)).toStrictEqual(expectedCurrentGameHistoryRecordPlayVoting);\n });\n\n it(\"should call getNominatedPlayers method with empty votes when called without votes.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH);\n services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert);\n\n expect(mocks.gamePlayVoteService.getNominatedPlayers).toHaveBeenCalledExactlyOnceWith([], game);\n });\n\n it(\"should call getNominatedPlayers method with votes when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }) });\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH);\n services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert);\n\n expect(mocks.gamePlayVoteService.getNominatedPlayers).toHaveBeenCalledExactlyOnceWith(gameHistoryRecordToInsert.play.votes, game);\n });\n\n it(\"should call generateCurrentGameHistoryRecordPlayVotingResultToInsert method when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGameWithCurrentPlay({ players });\n const newGame = createFakeGameWithCurrentPlay(game);\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }) });\n const nominatedPlayers = [players[2]];\n mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers);\n localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH);\n services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlayVotingToInsert\"](game, newGame, gameHistoryRecordToInsert);\n\n expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert).toHaveBeenCalledExactlyOnceWith(game, newGame, gameHistoryRecordToInsert);\n });\n });\n\n describe(\"generateCurrentGameHistoryRecordPlaySourceToInsert\", () => {\n it(\"should generate current game history record play source when called.\", () => {\n const players = [\n createFakeHunterAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer(),\n ];\n const expectedPlayers = [players[0], players[1], players[3]];\n const game = createFakeGameWithCurrentPlay({ currentPlay: createGamePlayAllElectSheriff({ source: createFakeGamePlaySource({ name: PlayerGroups.ALL, players: expectedPlayers }) }), players });\n const expectedGameHistoryRecordPlaySource = createFakeGameHistoryRecordPlaySource({\n name: game.currentPlay.source.name,\n players: expectedPlayers,\n });\n\n expect(services.gameHistoryRecord[\"generateCurrentGameHistoryRecordPlaySourceToInsert\"](game)).toStrictEqual(expectedGameHistoryRecordPlaySource);\n });\n });\n\n describe(\"validateGameHistoryRecordToInsertPlayData\", () => {\n const fakeGameAdditionalCards = bulkCreateFakeGameAdditionalCards(3);\n const fakeGame = createFakeGame({ players: bulkCreateFakePlayers(4), additionalCards: fakeGameAdditionalCards });\n const fakePlayer = createFakePlayer();\n const fakeCard = createFakeGameAdditionalCard();\n\n it.each<{ play: GameHistoryRecordPlay; test: string; errorParameters: [ApiResources, string, string] }>([\n {\n play: createFakeGameHistoryRecordPlay({ source: { name: PlayerAttributeNames.SHERIFF, players: [fakePlayer] } }),\n test: \"a source is not in the game\",\n errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `source.players` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PlayerAttributeNames.SHERIFF,\n players: fakeGame.players,\n },\n targets: [{ player: fakePlayer }],\n }),\n test: \"a target is not in the game\",\n errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `targets.player` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PlayerAttributeNames.SHERIFF,\n players: fakeGame.players,\n },\n votes: [{ source: fakePlayer, target: fakeGame.players[0] }],\n }),\n test: \"a vote source is not in the game\",\n errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `votes.source` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PlayerAttributeNames.SHERIFF,\n players: fakeGame.players,\n },\n votes: [{ target: fakePlayer, source: fakeGame.players[0] }],\n }),\n test: \"a vote target is not in the game\",\n errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `votes.target` is not in the game players\"],\n },\n {\n play: createFakeGameHistoryRecordPlay({\n source: {\n name: PlayerAttributeNames.SHERIFF,\n players: fakeGame.players,\n },\n chosenCard: fakeCard,\n }),\n test: \"chosen card is not in the game\",\n errorParameters: [ApiResources.GAME_ADDITIONAL_CARDS, fakeCard._id.toString(), \"Game Play - Chosen card is not in the game additional cards\"],\n },\n ])(\"should throw resource not found error when $test [#$#].\", ({ play, errorParameters }) => {\n expect(() => services.gameHistoryRecord[\"validateGameHistoryRecordToInsertPlayData\"](play, fakeGame)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(...errorParameters);\n });\n\n it(\"should not throw any errors when called with valid play data.\", () => {\n const validPlay = createFakeGameHistoryRecordPlay({\n source: {\n name: PlayerAttributeNames.SHERIFF,\n players: fakeGame.players,\n },\n targets: [{ player: fakeGame.players[0] }],\n votes: [{ target: fakeGame.players[1], source: fakeGame.players[0] }],\n chosenCard: fakeGameAdditionalCards[1],\n });\n\n expect(() => services.gameHistoryRecord[\"validateGameHistoryRecordToInsertPlayData\"](validPlay, fakeGame)).not.toThrow();\n });\n });\n\n describe(\"validateGameHistoryRecordToInsertData\", () => {\n const existingId = createFakeObjectId();\n const existingGame = createFakeGame();\n const fakePlayer = createFakePlayer();\n const unknownId = createFakeObjectId();\n\n beforeEach(() => {\n when(mocks.gameRepository.findOne).calledWith({ _id: unknownId.toJSON() }).mockResolvedValue(null);\n when(mocks.gameRepository.findOne).calledWith({ _id: existingId.toJSON() }).mockResolvedValue(existingGame);\n });\n\n it.each<{ gameHistoryRecord: GameHistoryRecordToInsert; test: string; errorParameters: [ApiResources, string, string] }>([\n {\n gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: unknownId }),\n test: \"game is not found with specified gameId\",\n errorParameters: [ApiResources.GAMES, unknownId.toString(), \"Game Play - Game Id is unknown in database\"],\n },\n {\n gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: existingId, revealedPlayers: [fakePlayer] }),\n test: \"a revealed player is not in the game\",\n errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `revealedPlayers` is not in the game players\"],\n },\n {\n gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: existingId, deadPlayers: [fakePlayer] }),\n test: \"a dead player is not in the game\",\n errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), \"Game Play - Player in `deadPlayers` is not in the game players\"],\n },\n ])(\"should throw resource not found error when $test [#$#].\", async({ gameHistoryRecord, errorParameters }) => {\n await expect(services.gameHistoryRecord[\"validateGameHistoryRecordToInsertData\"](gameHistoryRecord)).toReject();\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(...errorParameters);\n });\n\n it(\"should not throw any errors when called with valid data.\", async() => {\n const validPlay = createFakeGameHistoryRecordToInsert({\n gameId: existingId,\n play: createFakeGameHistoryRecordPlay({ source: { name: PlayerAttributeNames.SHERIFF, players: existingGame.players } }),\n revealedPlayers: existingGame.players,\n deadPlayers: existingGame.players,\n });\n\n await expect(services.gameHistoryRecord[\"validateGameHistoryRecordToInsertData\"](validPlay)).resolves.not.toThrow();\n });\n });\n});" }, "tests/e2e/specs/modules/game/controllers/game.controller.e2e-spec.ts": { "tests": [ @@ -103555,7 +103715,7 @@ } } ], - "source": "import { faker } from \"@faker-js/faker\";\nimport { HttpStatus } from \"@nestjs/common\";\nimport type { BadRequestException, NotFoundException } from \"@nestjs/common\";\nimport { getModelToken } from \"@nestjs/mongoose\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\nimport type { Model, Types } from \"mongoose\";\nimport { stringify } from \"qs\";\n\nimport { gameAdditionalCardsThiefRoleNames } from \"@/modules/game/constants/game-additional-card/game-additional-card.constant\";\nimport { defaultGameOptions } from \"@/modules/game/constants/game-options/game-options.constant\";\nimport type { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport type { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport type { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES } from \"@/modules/game/enums/game-play.enum\";\nimport { GAME_PHASES, GAME_STATUSES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { GameOptions } from \"@/modules/game/schemas/game-options/game-options.schema\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { initNestApp } from \"@tests/e2e/helpers/nest-app.helper\";\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory\";\nimport { createFakeCreateThiefGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.factory\";\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto, createFakeCreateGameWithPlayersDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { createFakeMakeGamePlayDto } from \"@tests/factories/game/dto/make-game-play/make-game-play.dto.factory\";\nimport { createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGameHistoryRecord } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { createFakeCompositionGameOptions } from \"@tests/factories/game/schemas/game-options/composition-game-options.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeVotesGameOptions } from \"@tests/factories/game/schemas/game-options/votes-game-options.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGamePlayAllVote, createFakeGamePlayCupidCharms, createFakeGamePlayLoversMeetEachOther, createFakeGamePlaySeerLooks, createFakeGamePlayThiefChoosesCard, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeSeenBySeerPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createObjectIdFromString } from \"@tests/helpers/mongoose/mongoose.helper\";\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Game Controller\", () => {\n let app: NestFastifyApplication;\n let models: {\n game: Model;\n gameHistoryRecord: Model;\n };\n\n beforeAll(async() => {\n const { app: server, module } = await initNestApp();\n app = server;\n models = {\n game: module.get>(getModelToken(Game.name)),\n gameHistoryRecord: module.get>(getModelToken(GameHistoryRecord.name)),\n };\n });\n\n afterEach(async() => {\n await Promise.all([\n models.game.deleteMany(),\n models.gameHistoryRecord.deleteMany(),\n ]);\n });\n\n afterAll(async() => {\n await app.close();\n });\n\n describe(\"GET /games\", () => {\n it(\"should get no games when no populate yet.\", async() => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual([]);\n });\n\n it(\"should get 3 games when 3 games were created.\", async() => {\n const games = [\n createFakeGameWithCurrentPlay(),\n createFakeGameWithCurrentPlay(),\n createFakeGameWithCurrentPlay(),\n ];\n await models.game.create(games);\n const response = await app.inject({\n method: \"GET\",\n url: \"/games\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toHaveLength(3);\n });\n });\n\n describe(\"GET /games/random-composition\", () => {\n it.each<{ query: Record; test: string; errorMessage: string }>([\n {\n query: { players: undefined },\n test: \"there is not enough players\",\n errorMessage: \"players must contain at least 4 elements\",\n },\n {\n query: { players: [{ name: \"Antoine\" }] },\n test: \"there is not enough players\",\n errorMessage: \"players must contain at least 4 elements\",\n },\n {\n query: { players: bulkCreateFakeCreateGamePlayerDto(45) },\n test: \"the maximum of players is reached\",\n errorMessage: \"players must contain no more than 40 elements\",\n },\n {\n query: { players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: \"\" }]) },\n test: \"one of the player name is too short\",\n errorMessage: \"players.0.name must be longer than or equal to 1 characters\",\n },\n {\n query: { players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: faker.string.sample(31) }]) },\n test: \"one of the player name is too long\",\n errorMessage: \"players.0.name must be shorter than or equal to 30 characters\",\n },\n {\n query: {\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { name: \"John\" },\n { name: \"John\" },\n ]),\n },\n test: \"two players have the same name\",\n errorMessage: \"players.name must be unique\",\n },\n {\n query: {\n \"players\": bulkCreateFakeCreateGamePlayerDto(4),\n \"excluded-roles\": [ROLE_NAMES.WEREWOLF, ROLE_NAMES.SEER],\n },\n test: \"werewolf is in excluded roles\",\n errorMessage: \"excludedRoles should not contain villager, werewolf values\",\n },\n {\n query: {\n players: bulkCreateFakeCreateGamePlayerDto(4),\n excludedRoles: [ROLE_NAMES.VILLAGER, ROLE_NAMES.SEER],\n },\n test: \"villager is in excluded roles\",\n errorMessage: \"excludedRoles should not contain villager, werewolf values\",\n },\n {\n query: {\n players: bulkCreateFakeCreateGamePlayerDto(4),\n excludedRoles: [ROLE_NAMES.SEER, ROLE_NAMES.SEER],\n },\n test: \"there is twice the same excluded role\",\n errorMessage: \"excluded roles must be unique\",\n },\n ])(\"should not allow getting random game composition when $test [#$#].\", async({\n query,\n errorMessage,\n }) => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/random-composition\",\n query: stringify(query),\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toContainEqual(errorMessage);\n });\n\n it(\"should get random composition when called.\", async() => {\n const query: Partial = {\n players: bulkCreateFakeCreateGamePlayerDto(40, [\n { name: \"1\" },\n { name: \"2\" },\n { name: \"3\" },\n { name: \"4\" },\n { name: \"5\" },\n { name: \"6\" },\n { name: \"7\" },\n { name: \"8\" },\n { name: \"9\" },\n { name: \"10\" },\n { name: \"11\" },\n { name: \"12\" },\n { name: \"13\" },\n { name: \"14\" },\n { name: \"15\" },\n { name: \"16\" },\n { name: \"17\" },\n { name: \"18\" },\n { name: \"19\" },\n { name: \"20\" },\n { name: \"21\" },\n { name: \"22\" },\n { name: \"23\" },\n { name: \"24\" },\n { name: \"25\" },\n { name: \"26\" },\n { name: \"27\" },\n { name: \"28\" },\n { name: \"29\" },\n { name: \"30\" },\n { name: \"31\" },\n { name: \"32\" },\n { name: \"33\" },\n { name: \"34\" },\n { name: \"35\" },\n { name: \"36\" },\n { name: \"37\" },\n { name: \"38\" },\n { name: \"39\" },\n { name: \"40\" },\n ]), arePowerfulVillagerRolesPrioritized: false,\n };\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/random-composition\",\n query: stringify(query),\n });\n const players = response.json();\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(players).toSatisfyAll(({ role, side }) =>\n role.current !== undefined && role.current === role.original &&\n side.current !== undefined && side.current === side.original);\n });\n });\n\n describe(\"GET /game/:id\", () => {\n it(\"should get a bad request error when id is not mongoId.\", async() => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/123\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it(\"should get a not found error when id doesn't exist in base.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${unknownId}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should get a game when id exists in base.\", async() => {\n const game = createFakeGameWithCurrentPlay();\n await models.game.create(game);\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${game._id.toString()}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(game) as Game,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"POST /games\", () => {\n it.each<{ payload: CreateGameDto; test: string; errorMessage: string }>([\n {\n payload: createFakeCreateGameDto({}, { players: undefined }),\n test: \"no players are provided\",\n errorMessage: \"players must be an array\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(3) }),\n test: \"the minimum of players is not reached\",\n errorMessage: \"players must contain at least 4 elements\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(45) }),\n test: \"the maximum of players is reached\",\n errorMessage: \"players must contain no more than 40 elements\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: \"\" }]) }),\n test: \"one of the player name is too short\",\n errorMessage: \"players.0.name must be longer than or equal to 1 characters\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: faker.string.sample(31) }]) }),\n test: \"one of the player name is too long\",\n errorMessage: \"players.0.name must be shorter than or equal to 30 characters\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { name: \"John\", role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { name: \"John\" },\n ]),\n }),\n test: \"two players have the same name\",\n errorMessage: \"players.name must be unique\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.SEER } },\n ]),\n }),\n test: \"there is only one brother in the same game\",\n errorMessage: \"players.role minimum occurrences in game must be reached. Please check `minInGame` property of roles\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WITCH } },\n ]),\n }),\n test: \"there is two witches in the same game\",\n errorMessage: \"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]),\n }),\n test: \"there is no villager in game's composition\",\n errorMessage: \"one of the players.role must have at least one role from `villagers` side\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n ]),\n }),\n test: \"there is no werewolf in game's composition\",\n errorMessage: \"one of the players.role must have at least one role from `werewolves` side\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [{ position: -1 }]) }),\n test: \"one of the player position is lower than 0\",\n errorMessage: \"players.0.position must not be less than 0\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER }, position: 0 },\n { role: { name: ROLE_NAMES.PIED_PIPER }, position: 1 },\n { role: { name: ROLE_NAMES.WITCH }, position: 2 },\n { role: { name: ROLE_NAMES.SEER }, position: 666 },\n ]),\n }),\n test: \"one of the player position is not consistent faced to others\",\n errorMessage: \"players.position must be all set or all undefined. Please check that every player has unique position, from 0 to players.length - 1\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.THIEF } },\n ]),\n }),\n test: \"thief is in the game but additional cards are not set\",\n errorMessage: \"additionalCards must be set if there is a player with role `thief`\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n ],\n }),\n test: \"thief is not in the game but additional cards are set\",\n errorMessage: \"additionalCards can't be set if there is no player with role `thief`\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n ],\n }),\n test: \"thief additional cards are more than the expected default limit\",\n errorMessage: \"additionalCards length must be equal to options.roles.thief.additionalCardsCount\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n ],\n options: createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 4 }) }) }),\n }),\n test: \"thief additional cards are less than the expected limit defined in options\",\n errorMessage: \"additionalCards length must be equal to options.roles.thief.additionalCardsCount\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.THIEF, recipient: ROLE_NAMES.THIEF }),\n ],\n }),\n test: \"one thief additional card is the thief himself\",\n errorMessage: `additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`,\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.TWO_SISTERS, recipient: ROLE_NAMES.THIEF }),\n ],\n }),\n test: \"one thief additional card is is not available for thief\",\n errorMessage: `additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`,\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.DOG_WOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.DOG_WOLF, recipient: ROLE_NAMES.THIEF }),\n ],\n }),\n test: \"two thief additional role cards exceed the maximum occurrences in game possible\",\n errorMessage: \"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.PIED_PIPER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n ],\n }),\n test: \"one thief additional role card exceeds the maximum occurrences in game possible because another player has it\",\n errorMessage: \"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\",\n },\n ])(\"should not allow game creation when $test [#$#].\", async({\n payload,\n errorMessage,\n }) => {\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toContainEqual(errorMessage);\n });\n\n it(`should create game when called.`, async() => {\n const payload = createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(6, [\n { role: { name: ROLE_NAMES.VILLAGER }, name: \"Antoine\" },\n { role: { name: ROLE_NAMES.WEREWOLF }, name: \"Mathis\" },\n { role: { name: ROLE_NAMES.VILLAGER_VILLAGER }, name: \"Virgil\" },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF }, name: \"JB\" },\n { role: { name: ROLE_NAMES.CUPID }, name: \"Doudou\" },\n { role: { name: ROLE_NAMES.SEER }, name: \"Juju\" },\n ]),\n }, { options: undefined });\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n const expectedPlayers = payload.players.map((player, index) => ({\n _id: expect.any(String) as Types.ObjectId,\n name: player.name,\n role: {\n current: player.role.name,\n original: player.role.name,\n isRevealed: player.role.name === ROLE_NAMES.VILLAGER_VILLAGER,\n },\n side: {\n current: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES,\n original: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES,\n },\n attributes: [],\n position: index,\n isAlive: true,\n }));\n const expectedGame: Game = {\n _id: expect.any(String) as Types.ObjectId,\n phase: GAME_PHASES.NIGHT,\n status: GAME_STATUSES.PLAYING,\n turn: 1,\n tick: 1,\n players: expectedPlayers,\n currentPlay: {\n action: GAME_PLAY_ACTIONS.ELECT_SHERIFF,\n source: { name: PLAYER_GROUPS.ALL, players: expectedPlayers },\n },\n upcomingPlays: toJSON([\n createFakeGamePlayCupidCharms(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayLoversMeetEachOther(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayWhiteWerewolfEats(),\n ]) as GamePlay[],\n options: defaultGameOptions,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n };\n\n expect(response.statusCode).toBe(HttpStatus.CREATED);\n expect(response.json()).toStrictEqual(expectedGame);\n });\n \n it(`should create game with additional cards when thief is in the game.`, async() => {\n const payload = createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(6, [\n { role: { name: ROLE_NAMES.THIEF }, name: \"Antoine\" },\n { role: { name: ROLE_NAMES.WEREWOLF }, name: \"Mathis\" },\n { role: { name: ROLE_NAMES.VILLAGER_VILLAGER }, name: \"Virgil\" },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF }, name: \"JB\" },\n { role: { name: ROLE_NAMES.CUPID }, name: \"Doudou\" },\n { role: { name: ROLE_NAMES.SEER }, name: \"Juju\" },\n ]),\n additionalCards: [\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF, recipient: ROLE_NAMES.THIEF }),\n createFakeGameAdditionalCard({ roleName: ROLE_NAMES.VILE_FATHER_OF_WOLVES, recipient: ROLE_NAMES.THIEF }),\n ],\n }, { options: undefined });\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n const expectedPlayers = payload.players.map((player, index) => ({\n _id: expect.any(String) as Types.ObjectId,\n name: player.name,\n role: {\n current: player.role.name,\n original: player.role.name,\n isRevealed: player.role.name === ROLE_NAMES.VILLAGER_VILLAGER,\n },\n side: {\n current: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER, ROLE_NAMES.THIEF].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES,\n original: [ROLE_NAMES.VILLAGER, ROLE_NAMES.VILLAGER_VILLAGER, ROLE_NAMES.CUPID, ROLE_NAMES.SEER, ROLE_NAMES.THIEF].includes(player.role.name) ? ROLE_SIDES.VILLAGERS : ROLE_SIDES.WEREWOLVES,\n },\n attributes: [],\n position: index,\n isAlive: true,\n }));\n const expectedGameAdditionalCards = payload.additionalCards?.map(additionalCard => ({\n _id: expect.any(String) as Types.ObjectId,\n roleName: additionalCard.roleName,\n recipient: additionalCard.recipient,\n isUsed: false,\n }));\n const expectedGame: Game = {\n _id: expect.any(String) as Types.ObjectId,\n phase: GAME_PHASES.NIGHT,\n status: GAME_STATUSES.PLAYING,\n turn: 1,\n tick: 1,\n players: expectedPlayers,\n currentPlay: {\n action: GAME_PLAY_ACTIONS.ELECT_SHERIFF,\n source: { name: PLAYER_GROUPS.ALL, players: expectedPlayers },\n },\n upcomingPlays: toJSON([\n createFakeGamePlayThiefChoosesCard(),\n createFakeGamePlayCupidCharms(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayLoversMeetEachOther(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayWhiteWerewolfEats(),\n ]) as GamePlay[],\n additionalCards: expectedGameAdditionalCards,\n options: defaultGameOptions,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n };\n\n expect(response.statusCode).toBe(HttpStatus.CREATED);\n expect(response.json()).toStrictEqual(expectedGame);\n });\n\n it(`should create game with different options when called with options specified and some omitted.`, async() => {\n const options: Partial = {\n roles: {\n areRevealedOnDeath: false,\n doSkipCallIfNoTarget: true,\n sheriff: {\n isEnabled: false,\n electedAt: {\n turn: 5,\n phase: GAME_PHASES.DAY,\n },\n hasDoubledVote: false,\n },\n bigBadWolf: { isPowerlessIfWerewolfDies: false },\n whiteWerewolf: { wakingUpInterval: 5 },\n seer: {\n isTalkative: false,\n canSeeRoles: false,\n },\n littleGirl: { isProtectedByGuard: true },\n guard: { canProtectTwice: true },\n ancient: {\n livesCountAgainstWerewolves: 1,\n doesTakeHisRevenge: false,\n },\n idiot: { doesDieOnAncientDeath: false },\n twoSisters: { wakingUpInterval: 0 },\n threeBrothers: { wakingUpInterval: 5 },\n fox: { isPowerlessIfMissesWerewolf: false },\n bearTamer: { doesGrowlIfInfected: false },\n stutteringJudge: { voteRequestsCount: 3 },\n wildChild: { isTransformationRevealed: true },\n dogWolf: { isChosenSideRevealed: true },\n thief: {\n mustChooseBetweenWerewolves: false,\n additionalCardsCount: 4,\n },\n piedPiper: {\n charmedPeopleCountPerNight: 1,\n isPowerlessIfInfected: false,\n },\n raven: { markPenalty: 5 },\n },\n };\n const payload = createFakeCreateGameWithPlayersDto({}, { options });\n const expectedOptions = createFakeGameOptionsDto({\n ...options,\n composition: createFakeCompositionGameOptions({ isHidden: defaultGameOptions.composition.isHidden }),\n votes: createFakeVotesGameOptions({ canBeSkipped: defaultGameOptions.votes.canBeSkipped }),\n });\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.CREATED);\n expect(response.json().options).toStrictEqual(toJSON(expectedOptions) as GameOptions);\n });\n });\n\n describe(\"DELETE /game/:id\", () => {\n it(\"should get a bad request error when id is not mongoId.\", async() => {\n const response = await app.inject({\n method: \"DELETE\",\n url: \"/games/123\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it(\"should get a not found error when id doesn't exist in base.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"DELETE\",\n url: `/games/${unknownId}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should get a bad request error when game doesn't have playing status.\", async() => {\n const game = createFakeGameWithCurrentPlay({ status: GAME_STATUSES.CANCELED });\n await models.game.create(game);\n const response = await app.inject({\n method: \"DELETE\",\n url: `/games/${game._id.toString()}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json()).toStrictEqual({\n statusCode: HttpStatus.BAD_REQUEST,\n message: `Bad mutation for Game with id \"${game._id.toString()}\"`,\n error: `Game doesn't have status with value \"playing\"`,\n });\n });\n\n it(\"should update game status to canceled when called.\", async() => {\n const game = createFakeGameWithCurrentPlay({ status: GAME_STATUSES.PLAYING });\n await models.game.create(game);\n const response = await app.inject({\n method: \"DELETE\",\n url: `/games/${game._id.toString()}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(game) as Game,\n status: GAME_STATUSES.CANCELED,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"POST /game/:id/play\", () => {\n it(\"should not allow game play when game id is not a mongo id.\", async() => {\n const response = await app.inject({\n method: \"POST\",\n url: `/games/123/play`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it.each<{ payload: MakeGamePlayDto; test: string; errorMessage: string }>([\n {\n payload: createFakeMakeGamePlayDto({ targets: [{ playerId: createObjectIdFromString(\"507f1f77bcf86cd799439011\") }, { playerId: createObjectIdFromString(\"507f1f77bcf86cd799439011\") }] }),\n test: \"player ids in targets must be unique\",\n errorMessage: \"targets.playerId must be unique\",\n },\n {\n payload: createFakeMakeGamePlayDto({\n votes: [\n { sourceId: createObjectIdFromString(\"507f1f77bcf86cd799439011\"), targetId: createObjectIdFromString(\"507f1f77bcf86cd799439012\") },\n { sourceId: createObjectIdFromString(\"507f1f77bcf86cd799439011\"), targetId: createObjectIdFromString(\"507f1f77bcf86cd799439012\") },\n ],\n }),\n test: \"player ids in targets must be unique\",\n errorMessage: \"votes.sourceId must be unique\",\n },\n ])(\"should not allow game play when $test [#$#].\", async({\n payload,\n errorMessage,\n }) => {\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${faker.database.mongodbObjectId()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toContainEqual(errorMessage);\n });\n\n it(\"should not allow game play when game id not found.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${unknownId}/play`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should not allow game play when payload contains unknown resources id.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({\n status: GAME_STATUSES.PLAYING,\n upcomingPlays: [createFakeGamePlayAllVote()],\n players,\n });\n await models.game.create(game);\n const unknownPlayerId = faker.database.mongodbObjectId();\n const payload = createFakeMakeGamePlayDto({ targets: [{ playerId: createObjectIdFromString(unknownPlayerId) }] });\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json()).toStrictEqual({\n statusCode: HttpStatus.NOT_FOUND,\n message: `Player with id \"${unknownPlayerId.toString()}\" not found`,\n error: \"Game Play - Player in `targets.player` is not in the game players\",\n });\n });\n\n it(\"should not allow game play when payload is not valid.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: false }) });\n const game = createFakeGame({\n status: GAME_STATUSES.PLAYING,\n currentPlay: createFakeGamePlayAllVote(),\n players,\n options,\n });\n await models.game.create(game);\n const payload = createFakeMakeGamePlayDto({});\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json()).toStrictEqual({\n statusCode: HttpStatus.BAD_REQUEST,\n message: `Bad game play payload`,\n error: \"`votes` is required on this current game's state\",\n });\n });\n\n it(\"should make a game play when called with votes.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({\n status: GAME_STATUSES.PLAYING,\n currentPlay: createFakeGamePlayAllVote({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL, players }) }),\n upcomingPlays: [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n ],\n players,\n });\n await models.game.create(game);\n const payload = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: players[0]._id, targetId: players[1]._id },\n { sourceId: players[1]._id, targetId: players[0]._id },\n ],\n });\n const expectedCurrentPlay = createFakeGamePlayAllVote({\n cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES,\n source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL, players }),\n });\n const expectedGame = createFakeGame({\n ...game,\n tick: game.tick + 1,\n currentPlay: expectedCurrentPlay,\n });\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(expectedGame) as Game,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n \n it(\"should make a game play when called with targets.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({\n phase: GAME_PHASES.NIGHT,\n status: GAME_STATUSES.PLAYING,\n currentPlay: createFakeGamePlaySeerLooks({ source: createFakeGamePlaySource({ name: ROLE_NAMES.SEER, players: [players[1]] }) }),\n upcomingPlays: [createFakeGamePlayWerewolvesEat()],\n players,\n });\n await models.game.create(game);\n const payload = createFakeMakeGamePlayDto({ targets: [{ playerId: players[0]._id }] });\n const expectedCurrentPlay = createFakeGamePlayWerewolvesEat({\n source: createFakeGamePlaySource({\n name: PLAYER_GROUPS.WEREWOLVES,\n players: [createFakePlayer({ ...players[0], attributes: [createFakeSeenBySeerPlayerAttribute()] }), players[3]],\n }),\n });\n const expectedGame = createFakeGame({\n ...game,\n tick: game.tick + 1,\n currentPlay: expectedCurrentPlay,\n upcomingPlays: [],\n players: [\n createFakePlayer({ ...players[0], attributes: [createFakeSeenBySeerPlayerAttribute()] }),\n players[1],\n players[2],\n players[3],\n ],\n });\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(expectedGame) as Game,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"GET /games/:id/history\", () => {\n afterEach(async() => {\n await models.gameHistoryRecord.deleteMany();\n });\n\n it(\"should get a bad request error when id is not mongoId.\", async() => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/123/history\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it(\"should get a not found error when id doesn't exist in base.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${unknownId}/history`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should return no game history records when game doesn't have any.\", async() => {\n const game = createFakeGameWithCurrentPlay();\n const secondGame = createFakeGameWithCurrentPlay();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n ];\n await models.game.insertMany([game, secondGame]);\n await models.gameHistoryRecord.insertMany(gameHistoryRecords);\n\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${secondGame._id.toString()}/history`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual([]);\n });\n\n it(\"should return 3 game history records when game have 3 records.\", async() => {\n const game = createFakeGameWithCurrentPlay();\n const secondGame = createFakeGameWithCurrentPlay();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n ];\n await models.game.insertMany([game, secondGame]);\n await models.gameHistoryRecord.insertMany(gameHistoryRecords);\n\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${game._id.toString()}/history`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual([\n {\n ...toJSON(gameHistoryRecords[0]),\n createdAt: expect.any(String) as Date,\n },\n {\n ...toJSON(gameHistoryRecords[1]),\n createdAt: expect.any(String) as Date,\n },\n {\n ...toJSON(gameHistoryRecords[2]),\n createdAt: expect.any(String) as Date,\n },\n ] as GameHistoryRecord[]);\n });\n });\n});" + "source": "import { faker } from \"@faker-js/faker\";\nimport { HttpStatus } from \"@nestjs/common\";\nimport type { BadRequestException, NotFoundException } from \"@nestjs/common\";\nimport { getModelToken } from \"@nestjs/mongoose\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\nimport type { Model, Types } from \"mongoose\";\nimport { stringify } from \"qs\";\n\nimport { GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES } from \"@/modules/game/constants/game-additional-cards/game-additional-cards.constant\";\nimport { DEFAULT_GAME_OPTIONS } from \"@/modules/game/constants/game-options/game-options.constant\";\nimport type { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport type { CreateGameDto } from \"@/modules/game/dto/create-game/create-game.dto\";\nimport type { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport type { MakeGamePlayDto } from \"@/modules/game/dto/make-game-play/make-game-play.dto\";\nimport { GamePlayActions, GamePlayCauses } from \"@/modules/game/enums/game-play.enum\";\nimport { GamePhases, GameStatuses } from \"@/modules/game/enums/game.enum\";\nimport { PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport type { GameAdditionalCard } from \"@/modules/game/schemas/game-additional-card/game-additional-card.schema\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { GameOptions } from \"@/modules/game/schemas/game-options/game-options.schema\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { Game } from \"@/modules/game/schemas/game.schema\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { initNestApp } from \"@tests/e2e/helpers/nest-app.helper\";\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-game-options.dto.factory\";\nimport { createFakeCreateThiefGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.factory\";\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto, createFakeCreateGameWithPlayersDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { createFakeMakeGamePlayDto } from \"@tests/factories/game/dto/make-game-play/make-game-play.dto.factory\";\nimport { createFakeGameAdditionalCard } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGameHistoryRecord } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { createFakeCompositionGameOptions } from \"@tests/factories/game/schemas/game-options/composition-game-options.schema.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeVotesGameOptions } from \"@tests/factories/game/schemas/game-options/votes-game-options.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGamePlayAllVote, createFakeGamePlayCupidCharms, createFakeGamePlayLoversMeetEachOther, createFakeGamePlaySeerLooks, createFakeGamePlayThiefChoosesCard, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeSeenBySeerPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createObjectIdFromString } from \"@tests/helpers/mongoose/mongoose.helper\";\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Game Controller\", () => {\n let app: NestFastifyApplication;\n let models: {\n game: Model;\n gameHistoryRecord: Model;\n };\n\n beforeAll(async() => {\n const { app: server, module } = await initNestApp();\n app = server;\n models = {\n game: module.get>(getModelToken(Game.name)),\n gameHistoryRecord: module.get>(getModelToken(GameHistoryRecord.name)),\n };\n });\n\n afterEach(async() => {\n await Promise.all([\n models.game.deleteMany(),\n models.gameHistoryRecord.deleteMany(),\n ]);\n });\n\n afterAll(async() => {\n await app.close();\n });\n\n describe(\"GET /games\", () => {\n it(\"should get no games when no populate yet.\", async() => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual([]);\n });\n\n it(\"should get 3 games when 3 games were created.\", async() => {\n const games = [\n createFakeGameWithCurrentPlay(),\n createFakeGameWithCurrentPlay(),\n createFakeGameWithCurrentPlay(),\n ];\n await models.game.create(games);\n const response = await app.inject({\n method: \"GET\",\n url: \"/games\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toHaveLength(3);\n });\n });\n\n describe(\"GET /games/random-composition\", () => {\n it.each<{ query: Record; test: string; errorMessage: string }>([\n {\n query: { players: undefined },\n test: \"there is not enough players\",\n errorMessage: \"players must contain at least 4 elements\",\n },\n {\n query: { players: [{ name: \"Antoine\" }] },\n test: \"there is not enough players\",\n errorMessage: \"players must contain at least 4 elements\",\n },\n {\n query: { players: bulkCreateFakeCreateGamePlayerDto(45) },\n test: \"the maximum of players is reached\",\n errorMessage: \"players must contain no more than 40 elements\",\n },\n {\n query: { players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: \"\" }]) },\n test: \"one of the player name is too short\",\n errorMessage: \"players.0.name must be longer than or equal to 1 characters\",\n },\n {\n query: { players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: faker.string.sample(31) }]) },\n test: \"one of the player name is too long\",\n errorMessage: \"players.0.name must be shorter than or equal to 30 characters\",\n },\n {\n query: {\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { name: \"John\" },\n { name: \"John\" },\n ]),\n },\n test: \"two players have the same name\",\n errorMessage: \"players.name must be unique\",\n },\n {\n query: {\n \"players\": bulkCreateFakeCreateGamePlayerDto(4),\n \"excluded-roles\": [RoleNames.WEREWOLF, RoleNames.SEER],\n },\n test: \"werewolf is in excluded roles\",\n errorMessage: \"excludedRoles should not contain villager, werewolf values\",\n },\n {\n query: {\n players: bulkCreateFakeCreateGamePlayerDto(4),\n excludedRoles: [RoleNames.VILLAGER, RoleNames.SEER],\n },\n test: \"villager is in excluded roles\",\n errorMessage: \"excludedRoles should not contain villager, werewolf values\",\n },\n {\n query: {\n players: bulkCreateFakeCreateGamePlayerDto(4),\n excludedRoles: [RoleNames.SEER, RoleNames.SEER],\n },\n test: \"there is twice the same excluded role\",\n errorMessage: \"excluded roles must be unique\",\n },\n ])(\"should not allow getting random game composition when $test [#$#].\", async({\n query,\n errorMessage,\n }) => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/random-composition\",\n query: stringify(query),\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toContainEqual(errorMessage);\n });\n\n it(\"should get random composition when called.\", async() => {\n const query: Partial = {\n players: bulkCreateFakeCreateGamePlayerDto(40, [\n { name: \"1\" },\n { name: \"2\" },\n { name: \"3\" },\n { name: \"4\" },\n { name: \"5\" },\n { name: \"6\" },\n { name: \"7\" },\n { name: \"8\" },\n { name: \"9\" },\n { name: \"10\" },\n { name: \"11\" },\n { name: \"12\" },\n { name: \"13\" },\n { name: \"14\" },\n { name: \"15\" },\n { name: \"16\" },\n { name: \"17\" },\n { name: \"18\" },\n { name: \"19\" },\n { name: \"20\" },\n { name: \"21\" },\n { name: \"22\" },\n { name: \"23\" },\n { name: \"24\" },\n { name: \"25\" },\n { name: \"26\" },\n { name: \"27\" },\n { name: \"28\" },\n { name: \"29\" },\n { name: \"30\" },\n { name: \"31\" },\n { name: \"32\" },\n { name: \"33\" },\n { name: \"34\" },\n { name: \"35\" },\n { name: \"36\" },\n { name: \"37\" },\n { name: \"38\" },\n { name: \"39\" },\n { name: \"40\" },\n ]), arePowerfulVillagerRolesPrioritized: false,\n };\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/random-composition\",\n query: stringify(query),\n });\n const players = response.json();\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(players).toSatisfyAll(({ role, side }) =>\n role.current !== undefined && role.current === role.original &&\n side.current !== undefined && side.current === side.original);\n });\n });\n\n describe(\"GET /game/:id\", () => {\n it(\"should get a bad request error when id is not mongoId.\", async() => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/123\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it(\"should get a not found error when id doesn't exist in base.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${unknownId}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should get a game when id exists in base.\", async() => {\n const game = createFakeGameWithCurrentPlay();\n await models.game.create(game);\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${game._id.toString()}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(game) as Game,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"POST /games\", () => {\n it.each<{ payload: CreateGameDto; test: string; errorMessage: string }>([\n {\n payload: createFakeCreateGameDto({}, { players: undefined }),\n test: \"no players are provided\",\n errorMessage: \"players must be an array\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(3) }),\n test: \"the minimum of players is not reached\",\n errorMessage: \"players must contain at least 4 elements\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(45) }),\n test: \"the maximum of players is reached\",\n errorMessage: \"players must contain no more than 40 elements\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: \"\" }]) }),\n test: \"one of the player name is too short\",\n errorMessage: \"players.0.name must be longer than or equal to 1 characters\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [{ name: faker.string.sample(31) }]) }),\n test: \"one of the player name is too long\",\n errorMessage: \"players.0.name must be shorter than or equal to 30 characters\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { name: \"John\", role: { name: RoleNames.THREE_BROTHERS } },\n { name: \"John\" },\n ]),\n }),\n test: \"two players have the same name\",\n errorMessage: \"players.name must be unique\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.VILLAGER_VILLAGER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.SEER } },\n ]),\n }),\n test: \"there is only one brother in the same game\",\n errorMessage: \"players.role minimum occurrences in game must be reached. Please check `minInGame` property of roles\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WITCH } },\n ]),\n }),\n test: \"there is two witches in the same game\",\n errorMessage: \"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WEREWOLF } },\n ]),\n }),\n test: \"there is no villager in game's composition\",\n errorMessage: \"one of the players.role must have at least one role from `villagers` side\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n ]),\n }),\n test: \"there is no werewolf in game's composition\",\n errorMessage: \"one of the players.role must have at least one role from `werewolves` side\",\n },\n {\n payload: createFakeCreateGameDto({ players: bulkCreateFakeCreateGamePlayerDto(4, [{ position: -1 }]) }),\n test: \"one of the player position is lower than 0\",\n errorMessage: \"players.0.position must not be less than 0\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER }, position: 0 },\n { role: { name: RoleNames.PIED_PIPER }, position: 1 },\n { role: { name: RoleNames.WITCH }, position: 2 },\n { role: { name: RoleNames.SEER }, position: 666 },\n ]),\n }),\n test: \"one of the player position is not consistent faced to others\",\n errorMessage: \"players.position must be all set or all undefined. Please check that every player has unique position, from 0 to players.length - 1\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.THIEF } },\n ]),\n }),\n test: \"thief is in the game but additional cards are not set\",\n errorMessage: \"additionalCards must be set if there is a player with role `thief`\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.VILLAGER } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n ],\n }),\n test: \"thief is not in the game but additional cards are set\",\n errorMessage: \"additionalCards can't be set if there is no player with role `thief`\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n ],\n }),\n test: \"thief additional cards are more than the expected default limit\",\n errorMessage: \"additionalCards length must be equal to options.roles.thief.additionalCardsCount\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n ],\n options: createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 4 }) }) }),\n }),\n test: \"thief additional cards are less than the expected limit defined in options\",\n errorMessage: \"additionalCards length must be equal to options.roles.thief.additionalCardsCount\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.THIEF, recipient: RoleNames.THIEF }),\n ],\n }),\n test: \"one thief additional card is the thief himself\",\n errorMessage: `additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`,\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.TWO_SISTERS, recipient: RoleNames.THIEF }),\n ],\n }),\n test: \"one thief additional card is is not available for thief\",\n errorMessage: `additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`,\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.DOG_WOLF, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.DOG_WOLF, recipient: RoleNames.THIEF }),\n ],\n }),\n test: \"two thief additional role cards exceed the maximum occurrences in game possible\",\n errorMessage: \"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\",\n },\n {\n payload: createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.PIED_PIPER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.THIEF } },\n ]),\n additionalCards: [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n ],\n }),\n test: \"one thief additional role card exceeds the maximum occurrences in game possible because another player has it\",\n errorMessage: \"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\",\n },\n ])(\"should not allow game creation when $test [#$#].\", async({\n payload,\n errorMessage,\n }) => {\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toContainEqual(errorMessage);\n });\n\n it(`should create game when called.`, async() => {\n const payload = createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(6, [\n { role: { name: RoleNames.VILLAGER }, name: \"Antoine\" },\n { role: { name: RoleNames.WEREWOLF }, name: \"Mathis\" },\n { role: { name: RoleNames.VILLAGER_VILLAGER }, name: \"Virgil\" },\n { role: { name: RoleNames.WHITE_WEREWOLF }, name: \"JB\" },\n { role: { name: RoleNames.CUPID }, name: \"Doudou\" },\n { role: { name: RoleNames.SEER }, name: \"Juju\" },\n ]),\n }, { options: undefined });\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n const expectedPlayers = payload.players.map((player, index) => ({\n _id: expect.any(String) as Types.ObjectId,\n name: player.name,\n role: {\n current: player.role.name,\n original: player.role.name,\n isRevealed: player.role.name === RoleNames.VILLAGER_VILLAGER,\n },\n side: {\n current: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES,\n original: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES,\n },\n attributes: [],\n position: index,\n isAlive: true,\n }));\n const expectedGame: Game = {\n _id: expect.any(String) as Types.ObjectId,\n phase: GamePhases.NIGHT,\n status: GameStatuses.PLAYING,\n turn: 1,\n tick: 1,\n players: expectedPlayers,\n currentPlay: {\n action: GamePlayActions.ELECT_SHERIFF,\n source: { name: PlayerGroups.ALL, players: expectedPlayers },\n },\n upcomingPlays: toJSON([\n createFakeGamePlayCupidCharms(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayLoversMeetEachOther(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayWhiteWerewolfEats(),\n ]) as GamePlay[],\n options: DEFAULT_GAME_OPTIONS,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n };\n\n expect(response.statusCode).toBe(HttpStatus.CREATED);\n expect(response.json()).toStrictEqual(expectedGame);\n });\n \n it(`should create game with additional cards when thief is in the game.`, async() => {\n const payload = createFakeCreateGameDto({\n players: bulkCreateFakeCreateGamePlayerDto(6, [\n { role: { name: RoleNames.THIEF }, name: \"Antoine\" },\n { role: { name: RoleNames.WEREWOLF }, name: \"Mathis\" },\n { role: { name: RoleNames.VILLAGER_VILLAGER }, name: \"Virgil\" },\n { role: { name: RoleNames.WHITE_WEREWOLF }, name: \"JB\" },\n { role: { name: RoleNames.CUPID }, name: \"Doudou\" },\n { role: { name: RoleNames.SEER }, name: \"Juju\" },\n ]),\n additionalCards: [\n createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF, recipient: RoleNames.THIEF }),\n createFakeGameAdditionalCard({ roleName: RoleNames.VILE_FATHER_OF_WOLVES, recipient: RoleNames.THIEF }),\n ],\n }, { options: undefined });\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n const expectedPlayers = payload.players.map((player, index) => ({\n _id: expect.any(String) as Types.ObjectId,\n name: player.name,\n role: {\n current: player.role.name,\n original: player.role.name,\n isRevealed: player.role.name === RoleNames.VILLAGER_VILLAGER,\n },\n side: {\n current: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER, RoleNames.THIEF].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES,\n original: [RoleNames.VILLAGER, RoleNames.VILLAGER_VILLAGER, RoleNames.CUPID, RoleNames.SEER, RoleNames.THIEF].includes(player.role.name) ? RoleSides.VILLAGERS : RoleSides.WEREWOLVES,\n },\n attributes: [],\n position: index,\n isAlive: true,\n }));\n const expectedGameAdditionalCards = payload.additionalCards?.map(additionalCard => ({\n _id: expect.any(String) as Types.ObjectId,\n roleName: additionalCard.roleName,\n recipient: additionalCard.recipient,\n isUsed: false,\n }));\n const expectedGame: Game = {\n _id: expect.any(String) as Types.ObjectId,\n phase: GamePhases.NIGHT,\n status: GameStatuses.PLAYING,\n turn: 1,\n tick: 1,\n players: expectedPlayers,\n currentPlay: {\n action: GamePlayActions.ELECT_SHERIFF,\n source: { name: PlayerGroups.ALL, players: expectedPlayers },\n },\n upcomingPlays: toJSON([\n createFakeGamePlayThiefChoosesCard(),\n createFakeGamePlayCupidCharms(),\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayLoversMeetEachOther(),\n createFakeGamePlayWerewolvesEat(),\n createFakeGamePlayWhiteWerewolfEats(),\n ]) as GamePlay[],\n additionalCards: expectedGameAdditionalCards,\n options: DEFAULT_GAME_OPTIONS,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n };\n\n expect(response.statusCode).toBe(HttpStatus.CREATED);\n expect(response.json()).toStrictEqual(expectedGame);\n });\n\n it(`should create game with different options when called with options specified and some omitted.`, async() => {\n const options: Partial = {\n roles: {\n areRevealedOnDeath: false,\n doSkipCallIfNoTarget: true,\n sheriff: {\n isEnabled: false,\n electedAt: {\n turn: 5,\n phase: GamePhases.DAY,\n },\n hasDoubledVote: false,\n },\n bigBadWolf: { isPowerlessIfWerewolfDies: false },\n whiteWerewolf: { wakingUpInterval: 5 },\n seer: {\n isTalkative: false,\n canSeeRoles: false,\n },\n littleGirl: { isProtectedByGuard: true },\n guard: { canProtectTwice: true },\n ancient: {\n livesCountAgainstWerewolves: 1,\n doesTakeHisRevenge: false,\n },\n idiot: { doesDieOnAncientDeath: false },\n twoSisters: { wakingUpInterval: 0 },\n threeBrothers: { wakingUpInterval: 5 },\n fox: { isPowerlessIfMissesWerewolf: false },\n bearTamer: { doesGrowlIfInfected: false },\n stutteringJudge: { voteRequestsCount: 3 },\n wildChild: { isTransformationRevealed: true },\n dogWolf: { isChosenSideRevealed: true },\n thief: {\n mustChooseBetweenWerewolves: false,\n additionalCardsCount: 4,\n },\n piedPiper: {\n charmedPeopleCountPerNight: 1,\n isPowerlessIfInfected: false,\n },\n raven: { markPenalty: 5 },\n },\n };\n const payload = createFakeCreateGameWithPlayersDto({}, { options });\n const expectedOptions = createFakeGameOptionsDto({\n ...options,\n composition: createFakeCompositionGameOptions({ isHidden: DEFAULT_GAME_OPTIONS.composition.isHidden }),\n votes: createFakeVotesGameOptions({ canBeSkipped: DEFAULT_GAME_OPTIONS.votes.canBeSkipped }),\n });\n const response = await app.inject({\n method: \"POST\",\n url: \"/games\",\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.CREATED);\n expect(response.json().options).toStrictEqual(toJSON(expectedOptions) as GameOptions);\n });\n });\n\n describe(\"DELETE /game/:id\", () => {\n it(\"should get a bad request error when id is not mongoId.\", async() => {\n const response = await app.inject({\n method: \"DELETE\",\n url: \"/games/123\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it(\"should get a not found error when id doesn't exist in base.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"DELETE\",\n url: `/games/${unknownId}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should get a bad request error when game doesn't have playing status.\", async() => {\n const game = createFakeGameWithCurrentPlay({ status: GameStatuses.CANCELED });\n await models.game.create(game);\n const response = await app.inject({\n method: \"DELETE\",\n url: `/games/${game._id.toString()}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json()).toStrictEqual({\n statusCode: HttpStatus.BAD_REQUEST,\n message: `Bad mutation for Game with id \"${game._id.toString()}\"`,\n error: `Game doesn't have status with value \"playing\"`,\n });\n });\n\n it(\"should update game status to canceled when called.\", async() => {\n const game = createFakeGameWithCurrentPlay({ status: GameStatuses.PLAYING });\n await models.game.create(game);\n const response = await app.inject({\n method: \"DELETE\",\n url: `/games/${game._id.toString()}`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(game) as Game,\n status: GameStatuses.CANCELED,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"POST /game/:id/play\", () => {\n it(\"should not allow game play when game id is not a mongo id.\", async() => {\n const response = await app.inject({\n method: \"POST\",\n url: `/games/123/play`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it.each<{ payload: MakeGamePlayDto; test: string; errorMessage: string }>([\n {\n payload: createFakeMakeGamePlayDto({ targets: [{ playerId: createObjectIdFromString(\"507f1f77bcf86cd799439011\") }, { playerId: createObjectIdFromString(\"507f1f77bcf86cd799439011\") }] }),\n test: \"player ids in targets must be unique\",\n errorMessage: \"targets.playerId must be unique\",\n },\n {\n payload: createFakeMakeGamePlayDto({\n votes: [\n { sourceId: createObjectIdFromString(\"507f1f77bcf86cd799439011\"), targetId: createObjectIdFromString(\"507f1f77bcf86cd799439012\") },\n { sourceId: createObjectIdFromString(\"507f1f77bcf86cd799439011\"), targetId: createObjectIdFromString(\"507f1f77bcf86cd799439012\") },\n ],\n }),\n test: \"player ids in targets must be unique\",\n errorMessage: \"votes.sourceId must be unique\",\n },\n ])(\"should not allow game play when $test [#$#].\", async({\n payload,\n errorMessage,\n }) => {\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${faker.database.mongodbObjectId()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toContainEqual(errorMessage);\n });\n\n it(\"should not allow game play when game id not found.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${unknownId}/play`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should not allow game play when payload contains unknown resources id.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGameWithCurrentPlay({\n status: GameStatuses.PLAYING,\n upcomingPlays: [createFakeGamePlayAllVote()],\n players,\n });\n await models.game.create(game);\n const unknownPlayerId = faker.database.mongodbObjectId();\n const payload = createFakeMakeGamePlayDto({ targets: [{ playerId: createObjectIdFromString(unknownPlayerId) }] });\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json()).toStrictEqual({\n statusCode: HttpStatus.NOT_FOUND,\n message: `Player with id \"${unknownPlayerId.toString()}\" not found`,\n error: \"Game Play - Player in `targets.player` is not in the game players\",\n });\n });\n\n it(\"should not allow game play when payload is not valid.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: false }) });\n const game = createFakeGame({\n status: GameStatuses.PLAYING,\n currentPlay: createFakeGamePlayAllVote(),\n players,\n options,\n });\n await models.game.create(game);\n const payload = createFakeMakeGamePlayDto({});\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json()).toStrictEqual({\n statusCode: HttpStatus.BAD_REQUEST,\n message: `Bad game play payload`,\n error: \"`votes` is required on this current game's state\",\n });\n });\n\n it(\"should make a game play when called with votes.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({\n status: GameStatuses.PLAYING,\n currentPlay: createFakeGamePlayAllVote({ source: createFakeGamePlaySource({ name: PlayerGroups.ALL, players }) }),\n upcomingPlays: [\n createFakeGamePlaySeerLooks(),\n createFakeGamePlayWerewolvesEat(),\n ],\n players,\n });\n await models.game.create(game);\n const payload = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: players[0]._id, targetId: players[1]._id },\n { sourceId: players[1]._id, targetId: players[0]._id },\n ],\n });\n const expectedCurrentPlay = createFakeGamePlayAllVote({\n cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES,\n source: createFakeGamePlaySource({ name: PlayerGroups.ALL, players }),\n });\n const expectedGame = createFakeGame({\n ...game,\n tick: game.tick + 1,\n currentPlay: expectedCurrentPlay,\n });\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(expectedGame) as Game,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n \n it(\"should make a game play when called with targets.\", async() => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({\n phase: GamePhases.NIGHT,\n status: GameStatuses.PLAYING,\n currentPlay: createFakeGamePlaySeerLooks({ source: createFakeGamePlaySource({ name: RoleNames.SEER, players: [players[1]] }) }),\n upcomingPlays: [createFakeGamePlayWerewolvesEat()],\n players,\n });\n await models.game.create(game);\n const payload = createFakeMakeGamePlayDto({ targets: [{ playerId: players[0]._id }] });\n const expectedCurrentPlay = createFakeGamePlayWerewolvesEat({\n source: createFakeGamePlaySource({\n name: PlayerGroups.WEREWOLVES,\n players: [createFakePlayer({ ...players[0], attributes: [createFakeSeenBySeerPlayerAttribute()] }), players[3]],\n }),\n });\n const expectedGame = createFakeGame({\n ...game,\n tick: game.tick + 1,\n currentPlay: expectedCurrentPlay,\n upcomingPlays: [],\n players: [\n createFakePlayer({ ...players[0], attributes: [createFakeSeenBySeerPlayerAttribute()] }),\n players[1],\n players[2],\n players[3],\n ],\n });\n const response = await app.inject({\n method: \"POST\",\n url: `/games/${game._id.toString()}/play`,\n payload,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual({\n ...toJSON(expectedGame) as Game,\n createdAt: expect.any(String) as Date,\n updatedAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"GET /games/:id/history\", () => {\n afterEach(async() => {\n await models.gameHistoryRecord.deleteMany();\n });\n\n it(\"should get a bad request error when id is not mongoId.\", async() => {\n const response = await app.inject({\n method: \"GET\",\n url: \"/games/123/history\",\n });\n\n expect(response.statusCode).toBe(HttpStatus.BAD_REQUEST);\n expect(response.json().message).toBe(\"Validation failed (Mongo ObjectId is expected)\");\n });\n\n it(\"should get a not found error when id doesn't exist in base.\", async() => {\n const unknownId = faker.database.mongodbObjectId();\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${unknownId}/history`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.NOT_FOUND);\n expect(response.json().message).toBe(`Game with id \"${unknownId}\" not found`);\n });\n\n it(\"should return no game history records when game doesn't have any.\", async() => {\n const game = createFakeGameWithCurrentPlay();\n const secondGame = createFakeGameWithCurrentPlay();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n ];\n await models.game.insertMany([game, secondGame]);\n await models.gameHistoryRecord.insertMany(gameHistoryRecords);\n\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${secondGame._id.toString()}/history`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual([]);\n });\n\n it(\"should return 3 game history records when game have 3 records.\", async() => {\n const game = createFakeGameWithCurrentPlay();\n const secondGame = createFakeGameWithCurrentPlay();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n createFakeGameHistoryRecord({ gameId: game._id }),\n ];\n await models.game.insertMany([game, secondGame]);\n await models.gameHistoryRecord.insertMany(gameHistoryRecords);\n\n const response = await app.inject({\n method: \"GET\",\n url: `/games/${game._id.toString()}/history`,\n });\n\n expect(response.statusCode).toBe(HttpStatus.OK);\n expect(response.json()).toStrictEqual([\n {\n ...toJSON(gameHistoryRecords[0]),\n createdAt: expect.any(String) as Date,\n },\n {\n ...toJSON(gameHistoryRecords[1]),\n createdAt: expect.any(String) as Date,\n },\n {\n ...toJSON(gameHistoryRecords[2]),\n createdAt: expect.any(String) as Date,\n },\n ] as GameHistoryRecord[]);\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/game.helper.spec.ts": { "tests": [ @@ -104260,7 +104420,7 @@ } } ], - "source": "import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { areAllPlayersDead, areAllVillagersAlive, areAllWerewolvesAlive, getAdditionalCardWithId, getAlivePlayers, getAliveVillagerSidedPlayers, getAliveWerewolfSidedPlayers, getExpectedPlayersToPlay, getFoxSniffedPlayers, getGroupOfPlayers, getLeftToCharmByPiedPiperPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getNearestAliveNeighbor, getNonexistentPlayer, getNonexistentPlayerId, getPlayerDtoWithRole, getPlayersWithActiveAttributeName, getPlayersWithCurrentRole, getPlayersWithCurrentSide, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole, getPlayerWithId, getPlayerWithIdOrThrow, getPlayerWithName, getPlayerWithNameOrThrow, isGameSourceGroup, isGameSourceRole } from \"@/modules/game/helpers/game.helper\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GetNearestPlayerOptions } from \"@/modules/game/types/game.type\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport type { ExceptionInterpolations } from \"@/shared/exception/types/exception.type\";\nimport { UNEXPECTED_EXCEPTION_REASONS } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { bulkCreateFakeGameAdditionalCards } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGamePlayHunterShoots, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySheriffDelegates, createFakeGamePlaySheriffSettlesVotes, createFakeGamePlayTwoSistersMeetEachOther, createFakeGamePlayWerewolvesEat } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCharmedByPiedPiperPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeHunterAlivePlayer, createFakePiedPiperAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeTwoSistersAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\ndescribe(\"Game Helper\", () => {\n let mocks: {\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n mocks = { unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() } };\n });\n \n describe(\"getPlayerDtoWithRole\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(6, [\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.IDIOT } },\n ]);\n const game = createFakeCreateGameDto({ players });\n\n it(\"should return player with role when a player has this role.\", () => {\n expect(getPlayerDtoWithRole(game, ROLE_NAMES.WEREWOLF)).toStrictEqual(game.players[2]);\n });\n\n it(\"should return undefined when player with role is not found.\", () => {\n expect(getPlayerDtoWithRole(game, ROLE_NAMES.THREE_BROTHERS)).toBeUndefined();\n });\n });\n\n describe(\"getPlayerWithCurrentRole\", () => {\n const players = bulkCreateFakePlayers(6, [\n { role: { current: ROLE_NAMES.WITCH, original: ROLE_NAMES.WITCH, isRevealed: false } },\n { role: { current: ROLE_NAMES.SEER, original: ROLE_NAMES.SEER, isRevealed: false } },\n { role: { current: ROLE_NAMES.WEREWOLF, original: ROLE_NAMES.WEREWOLF, isRevealed: false } },\n { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } },\n { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } },\n { role: { current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT, isRevealed: false } },\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return player with role when a player has this role.\", () => {\n expect(getPlayerWithCurrentRole(game, ROLE_NAMES.SEER)).toStrictEqual(players[1]);\n });\n\n it(\"should return undefined when player with role is not found.\", () => {\n expect(getPlayerWithCurrentRole(game, ROLE_NAMES.BIG_BAD_WOLF)).toBeUndefined();\n });\n });\n\n describe(\"getPlayersWithCurrentRole\", () => {\n const players = bulkCreateFakePlayers(6, [\n { role: { current: ROLE_NAMES.THREE_BROTHERS, original: ROLE_NAMES.WITCH, isRevealed: false } },\n { role: { current: ROLE_NAMES.THREE_BROTHERS, original: ROLE_NAMES.SEER, isRevealed: false } },\n { role: { current: ROLE_NAMES.THREE_BROTHERS, original: ROLE_NAMES.WEREWOLF, isRevealed: false } },\n { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } },\n { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } },\n { role: { current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT, isRevealed: false } },\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return players when they have this role.\", () => {\n expect(getPlayersWithCurrentRole(game, ROLE_NAMES.THREE_BROTHERS)).toStrictEqual([players[0], players[1], players[2]]);\n });\n\n it(\"should return empty array when no one has the role.\", () => {\n expect(getPlayersWithCurrentRole(game, ROLE_NAMES.WEREWOLF)).toStrictEqual([]);\n });\n });\n\n describe(\"getPlayersWithCurrentSide\", () => {\n const players = bulkCreateFakePlayers(6, [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return werewolves when they have this side.\", () => {\n expect(getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES)).toStrictEqual([players[0], players[1], players[4], players[5]]);\n });\n\n it(\"should return villagers when they have this side.\", () => {\n expect(getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS)).toStrictEqual([players[2], players[3]]);\n });\n });\n\n describe(\"getPlayerWithId\", () => {\n it(\"should get player with specific id when called with this id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getPlayerWithId(game, players[2]._id)).toStrictEqual(players[2]);\n });\n \n it(\"should return undefined when called with unknown id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getPlayerWithId(game, createFakeObjectId())).toBeUndefined();\n });\n });\n\n describe(\"getPlayerWithIdOrThrow\", () => {\n it(\"should get player with specific id when called with this id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: players[2]._id.toString() };\n const exception = new UnexpectedException(\"killPlayer\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n \n expect(getPlayerWithIdOrThrow(players[2]._id, game, exception)).toStrictEqual(players[2]);\n });\n\n it(\"should throw error when called with unknown id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const unknownPlayerId = createFakeObjectId();\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() };\n const exception = new UnexpectedException(\"killPlayer\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n \n expect(() => getPlayerWithIdOrThrow(unknownPlayerId, game, exception)).toThrow(exception);\n });\n });\n\n describe(\"getPlayerWithName\", () => {\n it(\"should get player with specific name when called with this name.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithName(game, players[2].name)).toStrictEqual(players[2]);\n });\n\n it(\"should return undefined when called with unknown name.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithName(game, \"i-cant-be-a-valid-name-that-is-bad\")).toBeUndefined();\n });\n });\n\n describe(\"getPlayerWithNameOrThrow\", () => {\n it(\"should get player with specific name when called with this id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: players[2].name };\n const exception = new UnexpectedException(\"killPlayer\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n\n expect(getPlayerWithNameOrThrow(players[2].name, game, exception)).toStrictEqual(players[2]);\n });\n\n it(\"should throw error when called with unknown name.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const unknownPlayerName = \"i-cant-be-a-valid-name-that-is-bad\";\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerName };\n const exception = new UnexpectedException(\"killPlayer\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n\n expect(() => getPlayerWithNameOrThrow(unknownPlayerName, game, exception)).toThrow(exception);\n });\n });\n\n describe(\"getAdditionalCardWithId\", () => {\n it(\"should get card with specific id when called with this id.\", () => {\n const cards = bulkCreateFakeGameAdditionalCards(6);\n \n expect(getAdditionalCardWithId(cards, cards[3]._id)).toStrictEqual(cards[3]);\n });\n\n it(\"should return undefined when cards are undefined.\", () => {\n expect(getAdditionalCardWithId(undefined, createFakeObjectId())).toBeUndefined();\n });\n\n it(\"should return undefined when called with unknown id.\", () => {\n const cards = bulkCreateFakeGameAdditionalCards(6);\n \n expect(getAdditionalCardWithId(cards, createFakeObjectId())).toBeUndefined();\n });\n });\n\n describe(\"areAllWerewolvesAlive\", () => {\n const players = bulkCreateFakePlayers(6, [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return false when empty array is provided.\", () => {\n expect(areAllWerewolvesAlive(createFakeGame())).toBe(false);\n });\n\n it(\"should return true when all werewolves are alive.\", () => {\n expect(areAllWerewolvesAlive(game)).toBe(true);\n });\n\n it(\"should return true when at least one werewolf is dead.\", () => {\n const notAllAlivePlayers = players.map(player => createFakePlayer(player));\n notAllAlivePlayers[0].isAlive = false;\n const notAllAliveGame = createFakeGame({ players: notAllAlivePlayers });\n \n expect(areAllWerewolvesAlive(notAllAliveGame)).toBe(false);\n });\n });\n\n describe(\"areAllVillagersAlive\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return false when empty array is provided.\", () => {\n expect(areAllVillagersAlive(createFakeGame())).toBe(false);\n });\n\n it(\"should return true when all villagers are alive.\", () => {\n expect(areAllVillagersAlive(game)).toBe(true);\n });\n\n it(\"should return true when at least one villager is dead.\", () => {\n const notAllAlivePlayers = players.map(player => createFakePlayer(player));\n notAllAlivePlayers[1].isAlive = false;\n const notAllAliveGame = createFakeGame({ players: notAllAlivePlayers });\n \n expect(areAllVillagersAlive(notAllAliveGame)).toBe(false);\n });\n });\n\n describe(\"areAllPlayersDead\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakePlayer({ isAlive: false }),\n createFakePlayer({ isAlive: false }),\n createFakePlayer({ isAlive: true }),\n createFakePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return false when empty array is provided.\", () => {\n expect(areAllPlayersDead(createFakeGame())).toBe(false);\n });\n\n it(\"should return false when at least one player is alive.\", () => {\n expect(areAllPlayersDead(game)).toBe(false);\n });\n\n it(\"should return true when all players are dead.\", () => {\n game.players[2].isAlive = false;\n \n expect(areAllPlayersDead(game)).toBe(true);\n });\n });\n\n describe(\"getPlayerWithActiveAttributeName\", () => {\n it(\"should return first player with attribute when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n { attributes: [] },\n { attributes: [createFakeEatenByWerewolvesPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n ]);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.CHARMED)).toStrictEqual(players[2]);\n });\n\n it(\"should return undefined when player with attribute is not found.\", () => {\n const players = bulkCreateFakePlayers(4, [\n { attributes: [] },\n { attributes: [createFakeEatenByWerewolvesPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n ]);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBeUndefined();\n });\n });\n\n describe(\"getPlayersWithActiveAttributeName\", () => {\n const players = bulkCreateFakePlayers(4, [\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [createFakeEatenByWerewolvesPlayerAttribute()] },\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return players when they have the attribute.\", () => {\n expect(getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.CHARMED)).toStrictEqual([players[0], players[2]]);\n });\n\n it(\"should return empty array when none has the attribute.\", () => {\n expect(getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SEEN)).toStrictEqual([]);\n });\n });\n\n describe(\"getAlivePlayers\", () => {\n it(\"should get all alive players when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(getAlivePlayers(game)).toStrictEqual([players[0], players[1], players[3]]);\n });\n });\n\n describe(\"getAliveVillagerSidedPlayers\", () => {\n it(\"should get all alive villager sided players when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(getAliveVillagerSidedPlayers(game)).toStrictEqual([players[1]]);\n });\n });\n\n describe(\"getAliveWerewolfSidedPlayers\", () => {\n it(\"should get all alive werewolf sided players when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n \n expect(getAliveWerewolfSidedPlayers(game)).toStrictEqual([players[0]]);\n });\n });\n\n describe(\"getLeftToCharmByPiedPiperPlayers\", () => {\n it(\"should get left to charm by pied piper players when called.\", () => {\n const players = bulkCreateFakePlayers(5, [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false, attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(getLeftToCharmByPiedPiperPlayers(game)).toStrictEqual([players[2], players[4]]);\n });\n });\n\n describe(\"getLeftToEatByWerewolvesPlayers\", () => {\n it(\"should return left to eat by werewolves players when called.\", () => {\n const players = bulkCreateFakePlayers(5, [\n createFakeWerewolfAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n expect(getLeftToEatByWerewolvesPlayers(game)).toStrictEqual([players[1]]);\n });\n });\n\n describe(\"getLeftToEatByWhiteWerewolfPlayers\", () => {\n it(\"should return left to eat by white werewolf players when called.\", () => {\n const players = bulkCreateFakePlayers(5, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n expect(getLeftToEatByWhiteWerewolfPlayers(game)).toStrictEqual([players[4]]);\n });\n });\n\n describe(\"getGroupOfPlayers\", () => {\n const players = bulkCreateFakePlayers(6, [\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWhiteWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return all players when group is all.\", () => {\n expect(getGroupOfPlayers(game, PLAYER_GROUPS.ALL)).toStrictEqual(players);\n });\n\n it(\"should return players in love when group is lovers.\", () => {\n expect(getGroupOfPlayers(game, PLAYER_GROUPS.LOVERS)).toStrictEqual([players[2], players[5]]);\n });\n\n it(\"should return charmed players when group is charmed.\", () => {\n expect(getGroupOfPlayers(game, PLAYER_GROUPS.CHARMED)).toStrictEqual([players[0], players[3]]);\n });\n\n it(\"should return villagers when group is villagers.\", () => {\n expect(getGroupOfPlayers(game, PLAYER_GROUPS.VILLAGERS)).toStrictEqual([players[0], players[2], players[4]]);\n });\n\n it(\"should return werewolves when group is werewolves.\", () => {\n expect(getGroupOfPlayers(game, PLAYER_GROUPS.WEREWOLVES)).toStrictEqual([players[1], players[3], players[5]]);\n });\n });\n\n describe(\"isGameSourceRole\", () => {\n it(\"should return true when source is role.\", () => {\n expect(isGameSourceRole(ROLE_NAMES.WITCH)).toBe(true);\n });\n\n it(\"should return false when source is group.\", () => {\n expect(isGameSourceRole(PLAYER_GROUPS.ALL)).toBe(false);\n });\n });\n\n describe(\"isGameSourceGroup\", () => {\n it(\"should return true when source is group.\", () => {\n expect(isGameSourceGroup(PLAYER_GROUPS.WEREWOLVES)).toBe(true);\n });\n\n it(\"should return false when source is role.\", () => {\n expect(isGameSourceGroup(ROLE_NAMES.SEER)).toBe(false);\n });\n });\n\n describe(\"getNonexistentPlayerId\", () => {\n it(\"should return undefined when all candidate ids are found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayerId(game, players.map(player => player._id))).toBeUndefined();\n });\n\n it(\"should return unknown id when one candidate id is not found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const unknownId = createFakeObjectId();\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayerId(game, [...players.map(player => player._id), unknownId])).toStrictEqual(unknownId);\n });\n });\n\n describe(\"getNonexistentPlayer\", () => {\n it(\"should return undefined when all candidate ids are found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayer(game, players)).toBeUndefined();\n });\n\n it(\"should return unknown id when one candidate id is not found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const otherPlayer = createFakePlayer();\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayer(game, [...players, otherPlayer])).toStrictEqual(otherPlayer);\n });\n });\n\n describe(\"getFoxSniffedPlayers\", () => {\n it(\"should get 3 targets with left and right neighbors when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n createFakePlayer(players[0]),\n ];\n\n expect(getFoxSniffedPlayers(players[3]._id, game)).toStrictEqual(expectedPlayers);\n });\n\n it(\"should get 3 targets with left neighbor when right is dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n createFakePlayer(players[1]),\n ];\n\n expect(getFoxSniffedPlayers(players[3]._id, game)).toStrictEqual(expectedPlayers);\n });\n\n it(\"should get 2 targets with left neighbor when all rights are dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ];\n\n expect(getFoxSniffedPlayers(players[3]._id, game)).toStrictEqual(expectedPlayers);\n });\n \n it(\"should get only 1 target when all neighbors.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [createFakePlayer(players[2])];\n\n expect(getFoxSniffedPlayers(players[2]._id, game)).toStrictEqual(expectedPlayers);\n });\n\n it(\"should throw error when player is not found in game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const unknownPlayerId = createFakeObjectId();\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() };\n const exception = new UnexpectedException(\"getFoxSniffedTargets\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n\n expect(() => getFoxSniffedPlayers(unknownPlayerId, game)).toThrow(exception);\n });\n });\n\n describe(\"getNearestAliveNeighbor\", () => {\n it(\"should throw error when player is not found in game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeVillagerAlivePlayer({ position: 5 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"right\" };\n const unknownPlayerId = createFakeObjectId();\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() };\n const exception = new UnexpectedException(\"getNearestAliveNeighbor\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n \n expect(() => getNearestAliveNeighbor(unknownPlayerId, game, options)).toThrow(exception);\n });\n\n it(\"should get the nearest right alive player when called with right direction.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"right\" };\n \n expect(getNearestAliveNeighbor(players[5]._id, game, options)).toStrictEqual(players[1]);\n });\n\n it(\"should get the nearest left alive player when called with left direction.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\" };\n \n expect(getNearestAliveNeighbor(players[5]._id, game, options)).toStrictEqual(players[4]);\n });\n\n it(\"should get the nearest left alive villager player when called with left direction and villager side.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: ROLE_SIDES.VILLAGERS };\n \n expect(getNearestAliveNeighbor(players[3]._id, game, options)).toStrictEqual(players[1]);\n });\n\n it(\"should get the nearest left alive werewolf player when called with left direction and werewolf side.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: ROLE_SIDES.WEREWOLVES };\n \n expect(getNearestAliveNeighbor(players[1]._id, game, options)).toStrictEqual(players[0]);\n });\n\n it(\"should return undefined when can't find player with conditions.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeWerewolfAlivePlayer({ position: 2, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: ROLE_SIDES.WEREWOLVES };\n \n expect(getNearestAliveNeighbor(players[4]._id, game, options)).toBeUndefined();\n });\n\n it(\"should return undefined when there are no alive players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 4, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 2, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: ROLE_SIDES.WEREWOLVES };\n \n expect(getNearestAliveNeighbor(players[4]._id, game, options)).toBeUndefined();\n });\n });\n\n describe(\"getExpectedPlayersToPlay\", () => {\n it(\"should throw error when there is no current play.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n const interpolations = { gameId: game._id };\n \n expect(() => getExpectedPlayersToPlay(game)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"getExpectedPlayersToPlay\", interpolations);\n });\n\n it(\"should return alive werewolves when source is group of werewolves.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayWerewolvesEat() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([\n players[0],\n players[2],\n ]);\n });\n \n it(\"should return alive two sisters when source is specific role.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayTwoSistersMeetEachOther() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[3]]);\n });\n\n it(\"should not return sheriff when source is sheriff but action is not DELEGATE and sheriff is dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([]);\n });\n\n it(\"should return sheriff when source is sheriff and action is DELEGATE even if he is dying.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlaySheriffDelegates() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[5]]);\n });\n\n it(\"should return hunter when source is hunter and action is SHOOT even if he is dying.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeHunterAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayHunterShoots() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[5]]);\n });\n\n it(\"should return scapegoat when source is scapegoat and action is BAN_VOTING even if he is dying.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeScapegoatAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayScapegoatBansVoting() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[5]]);\n });\n });\n});" + "source": "import { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { areAllPlayersDead, areAllVillagersAlive, areAllWerewolvesAlive, getAdditionalCardWithId, getAlivePlayers, getAliveVillagerSidedPlayers, getAliveWerewolfSidedPlayers, getExpectedPlayersToPlay, getFoxSniffedPlayers, getGroupOfPlayers, getLeftToCharmByPiedPiperPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getNearestAliveNeighbor, getNonexistentPlayer, getNonexistentPlayerId, getPlayerDtoWithRole, getPlayersWithActiveAttributeName, getPlayersWithCurrentRole, getPlayersWithCurrentSide, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole, getPlayerWithId, getPlayerWithIdOrThrow, getPlayerWithName, getPlayerWithNameOrThrow, isGameSourceGroup, isGameSourceRole } from \"@/modules/game/helpers/game.helper\";\nimport type { Player } from \"@/modules/game/schemas/player/player.schema\";\nimport type { GetNearestPlayerOptions } from \"@/modules/game/types/game.type\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport type { ExceptionInterpolations } from \"@/shared/exception/types/exception.type\";\nimport { UnexpectedExceptionReasons } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { bulkCreateFakeGameAdditionalCards } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGamePlayHunterShoots, createFakeGamePlayScapegoatBansVoting, createFakeGamePlaySheriffDelegates, createFakeGamePlaySheriffSettlesVotes, createFakeGamePlayTwoSistersMeetEachOther, createFakeGamePlayWerewolvesEat } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCharmedByPiedPiperPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeHunterAlivePlayer, createFakePiedPiperAlivePlayer, createFakeScapegoatAlivePlayer, createFakeSeerAlivePlayer, createFakeTwoSistersAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\ndescribe(\"Game Helper\", () => {\n let mocks: {\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n mocks = { unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() } };\n });\n \n describe(\"getPlayerDtoWithRole\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(6, [\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.IDIOT } },\n ]);\n const game = createFakeCreateGameDto({ players });\n\n it(\"should return player with role when a player has this role.\", () => {\n expect(getPlayerDtoWithRole(game, RoleNames.WEREWOLF)).toStrictEqual(game.players[2]);\n });\n\n it(\"should return undefined when player with role is not found.\", () => {\n expect(getPlayerDtoWithRole(game, RoleNames.THREE_BROTHERS)).toBeUndefined();\n });\n });\n\n describe(\"getPlayerWithCurrentRole\", () => {\n const players = bulkCreateFakePlayers(6, [\n { role: { current: RoleNames.WITCH, original: RoleNames.WITCH, isRevealed: false } },\n { role: { current: RoleNames.SEER, original: RoleNames.SEER, isRevealed: false } },\n { role: { current: RoleNames.WEREWOLF, original: RoleNames.WEREWOLF, isRevealed: false } },\n { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } },\n { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } },\n { role: { current: RoleNames.IDIOT, original: RoleNames.IDIOT, isRevealed: false } },\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return player with role when a player has this role.\", () => {\n expect(getPlayerWithCurrentRole(game, RoleNames.SEER)).toStrictEqual(players[1]);\n });\n\n it(\"should return undefined when player with role is not found.\", () => {\n expect(getPlayerWithCurrentRole(game, RoleNames.BIG_BAD_WOLF)).toBeUndefined();\n });\n });\n\n describe(\"getPlayersWithCurrentRole\", () => {\n const players = bulkCreateFakePlayers(6, [\n { role: { current: RoleNames.THREE_BROTHERS, original: RoleNames.WITCH, isRevealed: false } },\n { role: { current: RoleNames.THREE_BROTHERS, original: RoleNames.SEER, isRevealed: false } },\n { role: { current: RoleNames.THREE_BROTHERS, original: RoleNames.WEREWOLF, isRevealed: false } },\n { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } },\n { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } },\n { role: { current: RoleNames.IDIOT, original: RoleNames.IDIOT, isRevealed: false } },\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return players when they have this role.\", () => {\n expect(getPlayersWithCurrentRole(game, RoleNames.THREE_BROTHERS)).toStrictEqual([players[0], players[1], players[2]]);\n });\n\n it(\"should return empty array when no one has the role.\", () => {\n expect(getPlayersWithCurrentRole(game, RoleNames.WEREWOLF)).toStrictEqual([]);\n });\n });\n\n describe(\"getPlayersWithCurrentSide\", () => {\n const players = bulkCreateFakePlayers(6, [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return werewolves when they have this side.\", () => {\n expect(getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES)).toStrictEqual([players[0], players[1], players[4], players[5]]);\n });\n\n it(\"should return villagers when they have this side.\", () => {\n expect(getPlayersWithCurrentSide(game, RoleSides.VILLAGERS)).toStrictEqual([players[2], players[3]]);\n });\n });\n\n describe(\"getPlayerWithId\", () => {\n it(\"should get player with specific id when called with this id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getPlayerWithId(game, players[2]._id)).toStrictEqual(players[2]);\n });\n \n it(\"should return undefined when called with unknown id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getPlayerWithId(game, createFakeObjectId())).toBeUndefined();\n });\n });\n\n describe(\"getPlayerWithIdOrThrow\", () => {\n it(\"should get player with specific id when called with this id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: players[2]._id.toString() };\n const exception = new UnexpectedException(\"killPlayer\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n \n expect(getPlayerWithIdOrThrow(players[2]._id, game, exception)).toStrictEqual(players[2]);\n });\n\n it(\"should throw error when called with unknown id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const unknownPlayerId = createFakeObjectId();\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() };\n const exception = new UnexpectedException(\"killPlayer\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n \n expect(() => getPlayerWithIdOrThrow(unknownPlayerId, game, exception)).toThrow(exception);\n });\n });\n\n describe(\"getPlayerWithName\", () => {\n it(\"should get player with specific name when called with this name.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithName(game, players[2].name)).toStrictEqual(players[2]);\n });\n\n it(\"should return undefined when called with unknown name.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithName(game, \"i-cant-be-a-valid-name-that-is-bad\")).toBeUndefined();\n });\n });\n\n describe(\"getPlayerWithNameOrThrow\", () => {\n it(\"should get player with specific name when called with this id.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: players[2].name };\n const exception = new UnexpectedException(\"killPlayer\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n\n expect(getPlayerWithNameOrThrow(players[2].name, game, exception)).toStrictEqual(players[2]);\n });\n\n it(\"should throw error when called with unknown name.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n const unknownPlayerName = \"i-cant-be-a-valid-name-that-is-bad\";\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerName };\n const exception = new UnexpectedException(\"killPlayer\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n\n expect(() => getPlayerWithNameOrThrow(unknownPlayerName, game, exception)).toThrow(exception);\n });\n });\n\n describe(\"getAdditionalCardWithId\", () => {\n it(\"should get card with specific id when called with this id.\", () => {\n const cards = bulkCreateFakeGameAdditionalCards(6);\n \n expect(getAdditionalCardWithId(cards, cards[3]._id)).toStrictEqual(cards[3]);\n });\n\n it(\"should return undefined when cards are undefined.\", () => {\n expect(getAdditionalCardWithId(undefined, createFakeObjectId())).toBeUndefined();\n });\n\n it(\"should return undefined when called with unknown id.\", () => {\n const cards = bulkCreateFakeGameAdditionalCards(6);\n \n expect(getAdditionalCardWithId(cards, createFakeObjectId())).toBeUndefined();\n });\n });\n\n describe(\"areAllWerewolvesAlive\", () => {\n const players = bulkCreateFakePlayers(6, [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return false when empty array is provided.\", () => {\n expect(areAllWerewolvesAlive(createFakeGame())).toBe(false);\n });\n\n it(\"should return true when all werewolves are alive.\", () => {\n expect(areAllWerewolvesAlive(game)).toBe(true);\n });\n\n it(\"should return true when at least one werewolf is dead.\", () => {\n const notAllAlivePlayers = players.map(player => createFakePlayer(player));\n notAllAlivePlayers[0].isAlive = false;\n const notAllAliveGame = createFakeGame({ players: notAllAlivePlayers });\n \n expect(areAllWerewolvesAlive(notAllAliveGame)).toBe(false);\n });\n });\n\n describe(\"areAllVillagersAlive\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return false when empty array is provided.\", () => {\n expect(areAllVillagersAlive(createFakeGame())).toBe(false);\n });\n\n it(\"should return true when all villagers are alive.\", () => {\n expect(areAllVillagersAlive(game)).toBe(true);\n });\n\n it(\"should return true when at least one villager is dead.\", () => {\n const notAllAlivePlayers = players.map(player => createFakePlayer(player));\n notAllAlivePlayers[1].isAlive = false;\n const notAllAliveGame = createFakeGame({ players: notAllAlivePlayers });\n \n expect(areAllVillagersAlive(notAllAliveGame)).toBe(false);\n });\n });\n\n describe(\"areAllPlayersDead\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakePlayer({ isAlive: false }),\n createFakePlayer({ isAlive: false }),\n createFakePlayer({ isAlive: true }),\n createFakePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return false when empty array is provided.\", () => {\n expect(areAllPlayersDead(createFakeGame())).toBe(false);\n });\n\n it(\"should return false when at least one player is alive.\", () => {\n expect(areAllPlayersDead(game)).toBe(false);\n });\n\n it(\"should return true when all players are dead.\", () => {\n game.players[2].isAlive = false;\n \n expect(areAllPlayersDead(game)).toBe(true);\n });\n });\n\n describe(\"getPlayerWithActiveAttributeName\", () => {\n it(\"should return first player with attribute when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n { attributes: [] },\n { attributes: [createFakeEatenByWerewolvesPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n ]);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithActiveAttributeName(game, PlayerAttributeNames.CHARMED)).toStrictEqual(players[2]);\n });\n\n it(\"should return undefined when player with attribute is not found.\", () => {\n const players = bulkCreateFakePlayers(4, [\n { attributes: [] },\n { attributes: [createFakeEatenByWerewolvesPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n ]);\n const game = createFakeGame({ players });\n\n expect(getPlayerWithActiveAttributeName(game, PlayerAttributeNames.SEEN)).toBeUndefined();\n });\n });\n\n describe(\"getPlayersWithActiveAttributeName\", () => {\n const players = bulkCreateFakePlayers(4, [\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [] },\n { attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] },\n { attributes: [createFakeEatenByWerewolvesPlayerAttribute()] },\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return players when they have the attribute.\", () => {\n expect(getPlayersWithActiveAttributeName(game, PlayerAttributeNames.CHARMED)).toStrictEqual([players[0], players[2]]);\n });\n\n it(\"should return empty array when none has the attribute.\", () => {\n expect(getPlayersWithActiveAttributeName(game, PlayerAttributeNames.SEEN)).toStrictEqual([]);\n });\n });\n\n describe(\"getAlivePlayers\", () => {\n it(\"should get all alive players when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(getAlivePlayers(game)).toStrictEqual([players[0], players[1], players[3]]);\n });\n });\n\n describe(\"getAliveVillagerSidedPlayers\", () => {\n it(\"should get all alive villager sided players when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(getAliveVillagerSidedPlayers(game)).toStrictEqual([players[1]]);\n });\n });\n\n describe(\"getAliveWerewolfSidedPlayers\", () => {\n it(\"should get all alive werewolf sided players when called.\", () => {\n const players = bulkCreateFakePlayers(4, [\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ]);\n const game = createFakeGame({ players });\n \n expect(getAliveWerewolfSidedPlayers(game)).toStrictEqual([players[0]]);\n });\n });\n\n describe(\"getLeftToCharmByPiedPiperPlayers\", () => {\n it(\"should get left to charm by pied piper players when called.\", () => {\n const players = bulkCreateFakePlayers(5, [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer({ isAlive: false, attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n \n expect(getLeftToCharmByPiedPiperPlayers(game)).toStrictEqual([players[2], players[4]]);\n });\n });\n\n describe(\"getLeftToEatByWerewolvesPlayers\", () => {\n it(\"should return left to eat by werewolves players when called.\", () => {\n const players = bulkCreateFakePlayers(5, [\n createFakeWerewolfAlivePlayer(),\n createFakePiedPiperAlivePlayer(),\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n expect(getLeftToEatByWerewolvesPlayers(game)).toStrictEqual([players[1]]);\n });\n });\n\n describe(\"getLeftToEatByWhiteWerewolfPlayers\", () => {\n it(\"should return left to eat by white werewolf players when called.\", () => {\n const players = bulkCreateFakePlayers(5, [\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeVillagerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ]);\n const game = createFakeGame({ players });\n\n expect(getLeftToEatByWhiteWerewolfPlayers(game)).toStrictEqual([players[4]]);\n });\n });\n\n describe(\"getGroupOfPlayers\", () => {\n const players = bulkCreateFakePlayers(6, [\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWhiteWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ]);\n const game = createFakeGame({ players });\n\n it(\"should return all players when group is all.\", () => {\n expect(getGroupOfPlayers(game, PlayerGroups.ALL)).toStrictEqual(players);\n });\n\n it(\"should return players in love when group is lovers.\", () => {\n expect(getGroupOfPlayers(game, PlayerGroups.LOVERS)).toStrictEqual([players[2], players[5]]);\n });\n\n it(\"should return charmed players when group is charmed.\", () => {\n expect(getGroupOfPlayers(game, PlayerGroups.CHARMED)).toStrictEqual([players[0], players[3]]);\n });\n\n it(\"should return villagers when group is villagers.\", () => {\n expect(getGroupOfPlayers(game, PlayerGroups.VILLAGERS)).toStrictEqual([players[0], players[2], players[4]]);\n });\n\n it(\"should return werewolves when group is werewolves.\", () => {\n expect(getGroupOfPlayers(game, PlayerGroups.WEREWOLVES)).toStrictEqual([players[1], players[3], players[5]]);\n });\n });\n\n describe(\"isGameSourceRole\", () => {\n it(\"should return true when source is role.\", () => {\n expect(isGameSourceRole(RoleNames.WITCH)).toBe(true);\n });\n\n it(\"should return false when source is group.\", () => {\n expect(isGameSourceRole(PlayerGroups.ALL)).toBe(false);\n });\n });\n\n describe(\"isGameSourceGroup\", () => {\n it(\"should return true when source is group.\", () => {\n expect(isGameSourceGroup(PlayerGroups.WEREWOLVES)).toBe(true);\n });\n\n it(\"should return false when source is role.\", () => {\n expect(isGameSourceGroup(RoleNames.SEER)).toBe(false);\n });\n });\n\n describe(\"getNonexistentPlayerId\", () => {\n it(\"should return undefined when all candidate ids are found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayerId(game, players.map(player => player._id))).toBeUndefined();\n });\n\n it(\"should return unknown id when one candidate id is not found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const unknownId = createFakeObjectId();\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayerId(game, [...players.map(player => player._id), unknownId])).toStrictEqual(unknownId);\n });\n });\n\n describe(\"getNonexistentPlayer\", () => {\n it(\"should return undefined when all candidate ids are found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayer(game, players)).toBeUndefined();\n });\n\n it(\"should return unknown id when one candidate id is not found.\", () => {\n const players = bulkCreateFakePlayers(6);\n const otherPlayer = createFakePlayer();\n const game = createFakeGame({ players });\n \n expect(getNonexistentPlayer(game, [...players, otherPlayer])).toStrictEqual(otherPlayer);\n });\n });\n\n describe(\"getFoxSniffedPlayers\", () => {\n it(\"should get 3 targets with left and right neighbors when called.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n createFakePlayer(players[0]),\n ];\n\n expect(getFoxSniffedPlayers(players[3]._id, game)).toStrictEqual(expectedPlayers);\n });\n\n it(\"should get 3 targets with left neighbor when right is dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n createFakePlayer(players[1]),\n ];\n\n expect(getFoxSniffedPlayers(players[3]._id, game)).toStrictEqual(expectedPlayers);\n });\n\n it(\"should get 2 targets with left neighbor when all rights are dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [\n createFakePlayer(players[2]),\n createFakePlayer(players[3]),\n ];\n\n expect(getFoxSniffedPlayers(players[3]._id, game)).toStrictEqual(expectedPlayers);\n });\n \n it(\"should get only 1 target when all neighbors.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const expectedPlayers = [createFakePlayer(players[2])];\n\n expect(getFoxSniffedPlayers(players[2]._id, game)).toStrictEqual(expectedPlayers);\n });\n\n it(\"should throw error when player is not found in game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n ];\n const game = createFakeGame({ players });\n const unknownPlayerId = createFakeObjectId();\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() };\n const exception = new UnexpectedException(\"getFoxSniffedTargets\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n\n expect(() => getFoxSniffedPlayers(unknownPlayerId, game)).toThrow(exception);\n });\n });\n\n describe(\"getNearestAliveNeighbor\", () => {\n it(\"should throw error when player is not found in game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeVillagerAlivePlayer({ position: 5 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"right\" };\n const unknownPlayerId = createFakeObjectId();\n const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() };\n const exception = new UnexpectedException(\"getNearestAliveNeighbor\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations);\n \n expect(() => getNearestAliveNeighbor(unknownPlayerId, game, options)).toThrow(exception);\n });\n\n it(\"should get the nearest right alive player when called with right direction.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"right\" };\n \n expect(getNearestAliveNeighbor(players[5]._id, game, options)).toStrictEqual(players[1]);\n });\n\n it(\"should get the nearest left alive player when called with left direction.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\" };\n \n expect(getNearestAliveNeighbor(players[5]._id, game, options)).toStrictEqual(players[4]);\n });\n\n it(\"should get the nearest left alive villager player when called with left direction and villager side.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: RoleSides.VILLAGERS };\n \n expect(getNearestAliveNeighbor(players[3]._id, game, options)).toStrictEqual(players[1]);\n });\n\n it(\"should get the nearest left alive werewolf player when called with left direction and werewolf side.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ position: 0 }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 2 }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: RoleSides.WEREWOLVES };\n \n expect(getNearestAliveNeighbor(players[1]._id, game, options)).toStrictEqual(players[0]);\n });\n\n it(\"should return undefined when can't find player with conditions.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3 }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1 }),\n createFakeWerewolfAlivePlayer({ position: 4 }),\n createFakeWerewolfAlivePlayer({ position: 2, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: RoleSides.WEREWOLVES };\n \n expect(getNearestAliveNeighbor(players[4]._id, game, options)).toBeUndefined();\n });\n\n it(\"should return undefined when there are no alive players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ position: 5, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 3, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 0, isAlive: false }),\n createFakeVillagerAlivePlayer({ position: 1, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 4, isAlive: false }),\n createFakeWerewolfAlivePlayer({ position: 2, isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const options: GetNearestPlayerOptions = { direction: \"left\", playerSide: RoleSides.WEREWOLVES };\n \n expect(getNearestAliveNeighbor(players[4]._id, game, options)).toBeUndefined();\n });\n });\n\n describe(\"getExpectedPlayersToPlay\", () => {\n it(\"should throw error when there is no current play.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n const interpolations = { gameId: game._id };\n \n expect(() => getExpectedPlayersToPlay(game)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"getExpectedPlayersToPlay\", interpolations);\n });\n\n it(\"should return alive werewolves when source is group of werewolves.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayWerewolvesEat() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([\n players[0],\n players[2],\n ]);\n });\n \n it(\"should return alive two sisters when source is specific role.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayTwoSistersMeetEachOther() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[3]]);\n });\n\n it(\"should not return sheriff when source is sheriff but action is not DELEGATE and sheriff is dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlaySheriffSettlesVotes() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([]);\n });\n\n it(\"should return sheriff when source is sheriff and action is DELEGATE even if he is dying.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlaySheriffDelegates() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[5]]);\n });\n\n it(\"should return hunter when source is hunter and action is SHOOT even if he is dying.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeHunterAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayHunterShoots() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[5]]);\n });\n\n it(\"should return scapegoat when source is scapegoat and action is BAN_VOTING even if he is dying.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n createFakeTwoSistersAlivePlayer(),\n createFakeTwoSistersAlivePlayer({ isAlive: false }),\n createFakeScapegoatAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players, currentPlay: createFakeGamePlayScapegoatBansVoting() });\n\n expect(getExpectedPlayersToPlay(game)).toStrictEqual([players[5]]);\n });\n });\n});" }, "tests/e2e/specs/modules/game/providers/repositories/game-history-record.repository.e2e-spec.ts": { "tests": [ @@ -104270,7 +104430,7 @@ "location": { "start": { "column": 6, - "line": 49 + "line": 48 } } }, @@ -104280,7 +104440,7 @@ "location": { "start": { "column": 6, - "line": 55 + "line": 54 } } }, @@ -104290,7 +104450,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104300,7 +104460,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104310,7 +104470,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104320,7 +104480,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104330,7 +104490,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104340,7 +104500,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104350,7 +104510,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104360,7 +104520,7 @@ "location": { "start": { "column": 8, - "line": 110 + "line": 109 } } }, @@ -104370,7 +104530,7 @@ "location": { "start": { "column": 6, - "line": 116 + "line": 115 } } }, @@ -104380,7 +104540,7 @@ "location": { "start": { "column": 6, - "line": 130 + "line": 129 } } }, @@ -104390,7 +104550,7 @@ "location": { "start": { "column": 6, - "line": 140 + "line": 139 } } }, @@ -104400,7 +104560,7 @@ "location": { "start": { "column": 6, - "line": 151 + "line": 150 } } }, @@ -104410,7 +104570,7 @@ "location": { "start": { "column": 6, - "line": 167 + "line": 166 } } }, @@ -104420,7 +104580,7 @@ "location": { "start": { "column": 6, - "line": 177 + "line": 176 } } }, @@ -104430,7 +104590,7 @@ "location": { "start": { "column": 6, - "line": 188 + "line": 187 } } }, @@ -104440,7 +104600,7 @@ "location": { "start": { "column": 6, - "line": 200 + "line": 199 } } }, @@ -104450,7 +104610,7 @@ "location": { "start": { "column": 6, - "line": 218 + "line": 217 } } }, @@ -104460,7 +104620,7 @@ "location": { "start": { "column": 6, - "line": 233 + "line": 232 } } }, @@ -104470,7 +104630,7 @@ "location": { "start": { "column": 6, - "line": 247 + "line": 246 } } }, @@ -104480,7 +104640,7 @@ "location": { "start": { "column": 6, - "line": 272 + "line": 271 } } }, @@ -104490,7 +104650,7 @@ "location": { "start": { "column": 6, - "line": 286 + "line": 285 } } }, @@ -104500,7 +104660,7 @@ "location": { "start": { "column": 6, - "line": 313 + "line": 312 } } }, @@ -104510,7 +104670,7 @@ "location": { "start": { "column": 6, - "line": 327 + "line": 326 } } }, @@ -104520,7 +104680,7 @@ "location": { "start": { "column": 6, - "line": 347 + "line": 346 } } }, @@ -104530,7 +104690,7 @@ "location": { "start": { "column": 6, - "line": 361 + "line": 360 } } }, @@ -104540,7 +104700,7 @@ "location": { "start": { "column": 6, - "line": 381 + "line": 380 } } }, @@ -104550,7 +104710,7 @@ "location": { "start": { "column": 6, - "line": 395 + "line": 394 } } }, @@ -104560,7 +104720,7 @@ "location": { "start": { "column": 6, - "line": 431 + "line": 430 } } }, @@ -104570,7 +104730,7 @@ "location": { "start": { "column": 6, - "line": 481 + "line": 480 } } }, @@ -104580,17 +104740,27 @@ "location": { "start": { "column": 6, - "line": 496 + "line": 495 + } + } + }, + { + "id": "638", + "name": "Game History Record Repository getGameHistoryPhaseRecords should get 3 records when called with gameId, turn and phase.", + "location": { + "start": { + "column": 6, + "line": 511 } } } ], - "source": "import { getModelToken } from \"@nestjs/mongoose\";\nimport type { Model, Types } from \"mongoose\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { GAME_HISTORY_RECORD_VOTING_RESULTS } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GAME_PLAY_ACTIONS, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport type { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\nimport type { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\nimport { createFakeGameHistoryRecordToInsert } from \"@tests/factories/game/types/game-history-record/game-history-record.type.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeAncientAlivePlayer, createFakeSeerAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordAllElectSheriffPlay, createFakeGameHistoryRecordAllVotePlay, createFakeGameHistoryRecordBigBadWolfEatPlay, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordPlayVoting, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { initNestApp } from \"@tests/e2e/helpers/nest-app.helper\";\n\ndescribe(\"Game History Record Repository\", () => {\n let app: NestFastifyApplication;\n let models: { gameHistoryRecord: Model };\n let repositories: { gameHistoryRecord: GameHistoryRecordRepository };\n\n beforeAll(async() => {\n const { app: server, module } = await initNestApp();\n app = server;\n\n repositories = { gameHistoryRecord: app.get(GameHistoryRecordRepository) };\n models = { gameHistoryRecord: module.get>(getModelToken(GameHistoryRecord.name)) };\n });\n\n afterEach(async() => {\n await models.gameHistoryRecord.deleteMany();\n });\n\n afterAll(async() => {\n await app.close();\n });\n\n async function populate(gameHistoryRecords: GameHistoryRecord[]): Promise {\n return models.gameHistoryRecord.insertMany(gameHistoryRecords);\n }\n\n describe(\"getGameHistory\", () => {\n it(\"should get nothing when there are no record.\", async() => {\n const gameId = createFakeObjectId();\n\n await expect(repositories.gameHistoryRecord.getGameHistory(gameId)).resolves.toStrictEqual([]);\n });\n\n it(\"should get records when called with gameId with records.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistory(gameId);\n\n expect(toJSON(records)).toStrictEqual(toJSON(gameHistoryRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"create\", () => {\n it.each<{ toInsert: GameHistoryRecordToInsert; errorMessage: string; test: string }>([\n {\n toInsert: createFakeGameHistoryRecord({ turn: 0 }),\n errorMessage: \"GameHistoryRecord validation failed: turn: Path `turn` (0) is less than minimum allowed value (1).\",\n test: \"turn is lower than 1\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ tick: -1 }),\n errorMessage: \"GameHistoryRecord validation failed: tick: Path `tick` (-1) is less than minimum allowed value (1).\",\n test: \"tick is lower than 1\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ phase: \"Noon\" as GAME_PHASES }),\n errorMessage: \"GameHistoryRecord validation failed: phase: `Noon` is not a valid enum value for path `phase`.\",\n test: \"phase is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ source: { name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, players: [] } }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.source.players: Path `play.source.players` length is less than minimum allowed value (1).\",\n test: \"players in play's source is empty\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ source: { name: \"Bad source\" as GameSource, players: bulkCreateFakePlayers(1) } }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.source.name: `Bad source` is not a valid enum value for path `name`.\",\n test: \"source in play's source is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ targets: [{ player: createFakePlayer(), drankPotion: \"Love Potion\" as WITCH_POTIONS }] }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.targets.0.drankPotion: `Love Potion` is not a valid enum value for path `drankPotion`.\",\n test: \"potion in play's target is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: createFakeGameHistoryRecordPlayVoting({ result: \"President election\" as GAME_HISTORY_RECORD_VOTING_RESULTS }) }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.voting.result: `President election` is not a valid enum value for path `result`.\",\n test: \"voting result is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ chosenSide: \"Dark side\" as ROLE_SIDES }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.chosenSide: `Dark side` is not a valid enum value for path `chosenSide`.\",\n test: \"chosen side is not in enum\",\n },\n ])(\"should not create history record when $test [#$#].\", async({ toInsert, errorMessage }) => {\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert(toInsert);\n\n await expect(repositories.gameHistoryRecord.create(gameHistoryRecordToInsert)).rejects.toThrow(errorMessage);\n });\n\n it(\"should create history record when called.\", async() => {\n const gameHistoryRecordPlayToInsert = createFakeGameHistoryRecordPlay({ source: createFakeGameHistoryRecordPlaySource({ players: [createFakePlayer()] }) });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlayToInsert });\n const gameHistoryRecord = await repositories.gameHistoryRecord.create(gameHistoryRecordToInsert);\n\n expect(toJSON(gameHistoryRecord)).toStrictEqual({\n ...(toJSON(gameHistoryRecordToInsert) as GameHistoryRecordToInsert),\n _id: expect.any(String) as Types.ObjectId,\n createdAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"getLastGameHistoryGuardProtectsRecord\", () => {\n it(\"should return no record when there is no guard play in the history.\", async() => {\n const gameId = createFakeObjectId();\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ]);\n \n await expect(repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(gameId)).resolves.toBeNull();\n });\n\n it(\"should return no record when there gameId is not the good one.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(otherGameId)).resolves.toBeNull();\n });\n\n it(\"should return the last guard game history play record when called.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2020-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2021-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2022-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2023-01-01\") }),\n ];\n await populate(gameHistoryRecords);\n const record = await repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(gameId);\n\n expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[2]) as GameHistoryRecord);\n });\n });\n\n describe(\"getLastGameHistoryTieInVotesRecord\", () => {\n it(\"should return no record when there is no vote play in the history.\", async() => {\n const gameId = createFakeObjectId();\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE)).resolves.toBeNull();\n });\n\n it(\"should return no record when there is no tie in vote play in the history.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH });\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE)).resolves.toBeNull();\n });\n\n it(\"should return no record when there gameId is not the good one.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE });\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(otherGameId, GAME_PLAY_ACTIONS.VOTE)).resolves.toBeNull();\n });\n\n it(\"should return the last tie in vote game history play record when called.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE });\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date(\"2020-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2021-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2022-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date(\"2024-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllElectSheriffPlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date(\"2025-01-01\") }),\n ];\n await populate(gameHistoryRecords);\n const record = await repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE);\n\n expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[3]) as GameHistoryRecord);\n });\n });\n\n describe(\"getGameHistoryWitchUsesSpecificPotionRecords\", () => {\n it(\"should get no record when there are no witch play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE });\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get no record when there are no witch using life potion play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get records of witch using life potion for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE })] }) }),\n createFakeGameHistoryRecord({\n gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[2]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n\n it(\"should get no record when there are no witch using death potion play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.DEATH);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get records of witch using death potion for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH })] }) }),\n createFakeGameHistoryRecord({\n gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.LIFE }),\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WITCH_POTIONS.DEATH })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.DEATH);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[2]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryVileFatherOfWolvesInfectedRecords\", () => {\n it(\"should get no record when there are no eat play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get records of vile father of wolves infected for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: false })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: true })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: true })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n const expectedRecords = [gameHistoryRecords[2]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryJudgeRequestRecords\", () => {\n it(\"should get no record when there are no vote with judge request play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryJudgeRequestRecords(gameId);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n \n it(\"should get records of stuttering judge requesting another vote for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryJudgeRequestRecords(gameId);\n const expectedRecords = [gameHistoryRecords[1]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryWerewolvesEatAncientRecords\", () => {\n it(\"should get no record when there are no eat play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords(gameId);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n \n it(\"should get records of ancient eaten by any kind of werewolves for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({\n gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeWitchAlivePlayer() }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordBigBadWolfEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({\n gameId: otherGameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeWitchAlivePlayer() }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordBigBadWolfEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer() })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords(gameId);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[3]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryAncientProtectedFromWerewolvesRecords\", () => {\n it(\"should get game history where ancient is protected from werewolves records for gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }), createdAt: new Date(\"2023-01-01\") }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordGuardProtectPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer() }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({\n gameId: otherGameId,\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() })] }),\n }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer() })] }),\n }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WITCH_POTIONS.LIFE }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WITCH_POTIONS.DEATH }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WITCH_POTIONS.DEATH }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WITCH_POTIONS.LIFE }),\n ],\n }),\n }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryAncientProtectedFromWerewolvesRecords(gameId);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[5]];\n \n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getPreviousGameHistoryRecord\", () => {\n it(\"should get no record when game doesn't have history yet.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getPreviousGameHistoryRecord(gameId);\n\n expect(toJSON(records)).toBeNull();\n });\n\n it(\"should get previous game history record for gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay(), createdAt: new Date(\"2020-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2021-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2022-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay(), createdAt: new Date(\"2023-01-01\") }),\n ];\n await populate(gameHistoryRecords);\n const record = await repositories.gameHistoryRecord.getPreviousGameHistoryRecord(gameId);\n\n expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[3]) as GameHistoryRecord);\n });\n });\n});" + "source": "import { GameHistoryRecordVotingResults } from \"@/modules/game/enums/game-history-record.enum\";\nimport { GamePlayActions, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameHistoryRecord } from \"@/modules/game/schemas/game-history-record/game-history-record.schema\";\nimport type { GameHistoryRecordToInsert } from \"@/modules/game/types/game-history-record.type\";\nimport type { GameSource } from \"@/modules/game/types/game.type\";\nimport type { RoleSides } from \"@/modules/role/enums/role.enum\";\nimport { getModelToken } from \"@nestjs/mongoose\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { initNestApp } from \"@tests/e2e/helpers/nest-app.helper\";\nimport { createFakeGameHistoryRecord, createFakeGameHistoryRecordAllElectSheriffPlay, createFakeGameHistoryRecordAllVotePlay, createFakeGameHistoryRecordBigBadWolfEatPlay, createFakeGameHistoryRecordGuardProtectPlay, createFakeGameHistoryRecordPlay, createFakeGameHistoryRecordPlaySource, createFakeGameHistoryRecordPlayTarget, createFakeGameHistoryRecordPlayVoting, createFakeGameHistoryRecordWerewolvesEatPlay, createFakeGameHistoryRecordWitchUsePotionsPlay } from \"@tests/factories/game/schemas/game-history-record/game-history-record.schema.factory\";\nimport { createFakeAncientAlivePlayer, createFakeSeerAlivePlayer, createFakeWitchAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeGameHistoryRecordToInsert } from \"@tests/factories/game/types/game-history-record/game-history-record.type.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\nimport { toJSON } from \"@tests/helpers/object/object.helper\";\nimport type { Model, Types } from \"mongoose\";\n\ndescribe(\"Game History Record Repository\", () => {\n let app: NestFastifyApplication;\n let models: { gameHistoryRecord: Model };\n let repositories: { gameHistoryRecord: GameHistoryRecordRepository };\n\n beforeAll(async() => {\n const { app: server, module } = await initNestApp();\n app = server;\n\n repositories = { gameHistoryRecord: app.get(GameHistoryRecordRepository) };\n models = { gameHistoryRecord: module.get>(getModelToken(GameHistoryRecord.name)) };\n });\n\n afterEach(async() => {\n await models.gameHistoryRecord.deleteMany();\n });\n\n afterAll(async() => {\n await app.close();\n });\n\n async function populate(gameHistoryRecords: GameHistoryRecord[]): Promise {\n return models.gameHistoryRecord.insertMany(gameHistoryRecords);\n }\n\n describe(\"getGameHistory\", () => {\n it(\"should get nothing when there are no record.\", async() => {\n const gameId = createFakeObjectId();\n\n await expect(repositories.gameHistoryRecord.getGameHistory(gameId)).resolves.toStrictEqual([]);\n });\n\n it(\"should get records when called with gameId with records.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistory(gameId);\n\n expect(toJSON(records)).toStrictEqual(toJSON(gameHistoryRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"create\", () => {\n it.each<{ toInsert: GameHistoryRecordToInsert; errorMessage: string; test: string }>([\n {\n toInsert: createFakeGameHistoryRecord({ turn: 0 }),\n errorMessage: \"GameHistoryRecord validation failed: turn: Path `turn` (0) is less than minimum allowed value (1).\",\n test: \"turn is lower than 1\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ tick: -1 }),\n errorMessage: \"GameHistoryRecord validation failed: tick: Path `tick` (-1) is less than minimum allowed value (1).\",\n test: \"tick is lower than 1\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ phase: \"Noon\" as GamePhases }),\n errorMessage: \"GameHistoryRecord validation failed: phase: `Noon` is not a valid enum value for path `phase`.\",\n test: \"phase is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ source: { name: PlayerAttributeNames.SHERIFF, players: [] } }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.source.players: Path `play.source.players` length is less than minimum allowed value (1).\",\n test: \"players in play's source is empty\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ source: { name: \"Bad source\" as GameSource, players: bulkCreateFakePlayers(1) } }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.source.name: `Bad source` is not a valid enum value for path `name`.\",\n test: \"source in play's source is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ targets: [{ player: createFakePlayer(), drankPotion: \"Love Potion\" as WitchPotions }] }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.targets.0.drankPotion: `Love Potion` is not a valid enum value for path `drankPotion`.\",\n test: \"potion in play's target is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ voting: createFakeGameHistoryRecordPlayVoting({ result: \"President election\" as GameHistoryRecordVotingResults }) }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.voting.result: `President election` is not a valid enum value for path `result`.\",\n test: \"voting result is not in enum\",\n },\n {\n toInsert: createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordPlay({ chosenSide: \"Dark side\" as RoleSides }) }),\n errorMessage: \"GameHistoryRecord validation failed: play.chosenSide: `Dark side` is not a valid enum value for path `chosenSide`.\",\n test: \"chosen side is not in enum\",\n },\n ])(\"should not create history record when $test [#$#].\", async({ toInsert, errorMessage }) => {\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert(toInsert);\n\n await expect(repositories.gameHistoryRecord.create(gameHistoryRecordToInsert)).rejects.toThrow(errorMessage);\n });\n\n it(\"should create history record when called.\", async() => {\n const gameHistoryRecordPlayToInsert = createFakeGameHistoryRecordPlay({ source: createFakeGameHistoryRecordPlaySource({ players: [createFakePlayer()] }) });\n const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlayToInsert });\n const gameHistoryRecord = await repositories.gameHistoryRecord.create(gameHistoryRecordToInsert);\n\n expect(toJSON(gameHistoryRecord)).toStrictEqual({\n ...(toJSON(gameHistoryRecordToInsert) as GameHistoryRecordToInsert),\n _id: expect.any(String) as Types.ObjectId,\n createdAt: expect.any(String) as Date,\n });\n });\n });\n\n describe(\"getLastGameHistoryGuardProtectsRecord\", () => {\n it(\"should return no record when there is no guard play in the history.\", async() => {\n const gameId = createFakeObjectId();\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ]);\n \n await expect(repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(gameId)).resolves.toBeNull();\n });\n\n it(\"should return no record when there gameId is not the good one.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(otherGameId)).resolves.toBeNull();\n });\n\n it(\"should return the last guard game history play record when called.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2020-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2021-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2022-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2023-01-01\") }),\n ];\n await populate(gameHistoryRecords);\n const record = await repositories.gameHistoryRecord.getLastGameHistoryGuardProtectsRecord(gameId);\n\n expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[2]) as GameHistoryRecord);\n });\n });\n\n describe(\"getLastGameHistoryTieInVotesRecord\", () => {\n it(\"should return no record when there is no vote play in the history.\", async() => {\n const gameId = createFakeObjectId();\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE)).resolves.toBeNull();\n });\n\n it(\"should return no record when there is no tie in vote play in the history.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.DEATH });\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE)).resolves.toBeNull();\n });\n\n it(\"should return no record when there gameId is not the good one.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE });\n await populate([\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n ]);\n\n await expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(otherGameId, GamePlayActions.VOTE)).resolves.toBeNull();\n });\n\n it(\"should return the last tie in vote game history play record when called.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE });\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date(\"2020-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2021-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2022-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date(\"2024-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllElectSheriffPlay({ voting: gameHistoryRecordPlayTieVoting }), createdAt: new Date(\"2025-01-01\") }),\n ];\n await populate(gameHistoryRecords);\n const record = await repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE);\n\n expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[3]) as GameHistoryRecord);\n });\n });\n\n describe(\"getGameHistoryWitchUsesSpecificPotionRecords\", () => {\n it(\"should get no record when there are no witch play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecordPlayTieVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE });\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayTieVoting }) }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get no record when there are no witch using life potion play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get records of witch using life potion for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE })] }) }),\n createFakeGameHistoryRecord({\n gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE }),\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[2]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n\n it(\"should get no record when there are no witch using death potion play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.DEATH);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get records of witch using death potion for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH })] }) }),\n createFakeGameHistoryRecord({\n gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.LIFE }),\n createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ drankPotion: WitchPotions.DEATH })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.DEATH);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[2]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryVileFatherOfWolvesInfectedRecords\", () => {\n it(\"should get no record when there are no eat play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n\n it(\"should get records of vile father of wolves infected for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: false })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: true })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: true })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryVileFatherOfWolvesInfectedRecords(gameId);\n const expectedRecords = [gameHistoryRecords[2]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryJudgeRequestRecords\", () => {\n it(\"should get no record when there are no vote with judge request play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryJudgeRequestRecords(gameId);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n \n it(\"should get records of stuttering judge requesting another vote for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: true }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryJudgeRequestRecords(gameId);\n const expectedRecords = [gameHistoryRecords[1]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryWerewolvesEatAncientRecords\", () => {\n it(\"should get no record when there are no eat play.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords(gameId);\n\n expect(toJSON(records)).toStrictEqual([]);\n });\n \n it(\"should get records of ancient eaten by any kind of werewolves for this gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n createFakeGameHistoryRecord({\n gameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeWitchAlivePlayer() }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordBigBadWolfEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({\n gameId: otherGameId, play: createFakeGameHistoryRecordWerewolvesEatPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeWitchAlivePlayer() }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordBigBadWolfEatPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer() })] }) }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryWerewolvesEatAncientRecords(gameId);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[3]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getGameHistoryAncientProtectedFromWerewolvesRecords\", () => {\n it(\"should get game history where ancient is protected from werewolves records for gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }), createdAt: new Date(\"2023-01-01\") }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordGuardProtectPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer() }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({\n gameId: otherGameId,\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() })] }),\n }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordGuardProtectPlay({ targets: [createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer() })] }),\n }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WitchPotions.LIFE }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WitchPotions.DEATH }),\n ],\n }),\n }),\n createFakeGameHistoryRecord({\n gameId,\n play: createFakeGameHistoryRecordWitchUsePotionsPlay({\n targets: [\n createFakeGameHistoryRecordPlayTarget({ player: createFakeSeerAlivePlayer(), drankPotion: WitchPotions.DEATH }),\n createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer(), drankPotion: WitchPotions.LIFE }),\n ],\n }),\n }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryAncientProtectedFromWerewolvesRecords(gameId);\n const expectedRecords = [gameHistoryRecords[1], gameHistoryRecords[5]];\n \n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n\n describe(\"getPreviousGameHistoryRecord\", () => {\n it(\"should get no record when game doesn't have history yet.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordAllVotePlay({ didJudgeRequestAnotherVote: false }) }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordGuardProtectPlay() }),\n createFakeGameHistoryRecord({ gameId: otherGameId, play: createFakeGameHistoryRecordAllVotePlay() }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getPreviousGameHistoryRecord(gameId);\n\n expect(toJSON(records)).toBeNull();\n });\n\n it(\"should get previous game history record for gameId when called.\", async() => {\n const gameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay(), createdAt: new Date(\"2020-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordWitchUsePotionsPlay(), createdAt: new Date(\"2021-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordGuardProtectPlay(), createdAt: new Date(\"2022-01-01\") }),\n createFakeGameHistoryRecord({ gameId, play: createFakeGameHistoryRecordAllVotePlay(), createdAt: new Date(\"2023-01-01\") }),\n ];\n await populate(gameHistoryRecords);\n const record = await repositories.gameHistoryRecord.getPreviousGameHistoryRecord(gameId);\n\n expect(toJSON(record)).toStrictEqual(toJSON(gameHistoryRecords[3]) as GameHistoryRecord);\n });\n });\n\n describe(\"getGameHistoryPhaseRecords\", () => {\n it(\"should get 3 records when called with gameId, turn and phase.\", async() => {\n const gameId = createFakeObjectId();\n const otherGameId = createFakeObjectId();\n const gameHistoryRecords = [\n createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.DAY }),\n createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.NIGHT }),\n createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.DAY }),\n createFakeGameHistoryRecord({ gameId, turn: 2, phase: GamePhases.DAY }),\n createFakeGameHistoryRecord({ gameId, turn: 1, phase: GamePhases.DAY }),\n createFakeGameHistoryRecord({ gameId: otherGameId, phase: GamePhases.DAY, turn: 1 }),\n ];\n await populate(gameHistoryRecords);\n const records = await repositories.gameHistoryRecord.getGameHistoryPhaseRecords(gameId, 1, GamePhases.DAY);\n const expectedRecords = [gameHistoryRecords[0], gameHistoryRecords[2], gameHistoryRecords[4]];\n\n expect(toJSON(records)).toStrictEqual(toJSON(expectedRecords) as GameHistoryRecord[]);\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts": { "tests": [ { - "id": "638", + "id": "639", "name": "Game Victory Helper doWerewolvesWin should return false when there are no players provided.", "location": { "start": { @@ -104600,7 +104770,7 @@ } }, { - "id": "639", + "id": "640", "name": "Game Victory Helper doWerewolvesWin should return false when there are no werewolves among players.", "location": { "start": { @@ -104610,7 +104780,7 @@ } }, { - "id": "640", + "id": "641", "name": "Game Victory Helper doWerewolvesWin should return false when there are at least one alive villager among players.", "location": { "start": { @@ -104620,7 +104790,7 @@ } }, { - "id": "641", + "id": "642", "name": "Game Victory Helper doWerewolvesWin should return true when all villagers are dead.", "location": { "start": { @@ -104630,7 +104800,7 @@ } }, { - "id": "642", + "id": "643", "name": "Game Victory Helper doVillagersWin should return false when there are no players provided.", "location": { "start": { @@ -104640,7 +104810,7 @@ } }, { - "id": "643", + "id": "644", "name": "Game Victory Helper doVillagersWin should return false when there are no villagers among players.", "location": { "start": { @@ -104650,7 +104820,7 @@ } }, { - "id": "644", + "id": "645", "name": "Game Victory Helper doVillagersWin should return false when there are at least one alive werewolf among players.", "location": { "start": { @@ -104660,7 +104830,7 @@ } }, { - "id": "645", + "id": "646", "name": "Game Victory Helper doVillagersWin should return true when all werewolves are dead.", "location": { "start": { @@ -104670,7 +104840,7 @@ } }, { - "id": "646", + "id": "647", "name": "Game Victory Helper doLoversWin should return false when no players are provided.", "location": { "start": { @@ -104680,7 +104850,7 @@ } }, { - "id": "647", + "id": "648", "name": "Game Victory Helper doLoversWin should return false when there are no lovers among players.", "location": { "start": { @@ -104690,7 +104860,7 @@ } }, { - "id": "648", + "id": "649", "name": "Game Victory Helper doLoversWin should return false when at least one non-lover player is alive.", "location": { "start": { @@ -104700,7 +104870,7 @@ } }, { - "id": "649", + "id": "650", "name": "Game Victory Helper doLoversWin should return false when at least one lover player is dead.", "location": { "start": { @@ -104710,7 +104880,7 @@ } }, { - "id": "650", + "id": "651", "name": "Game Victory Helper doLoversWin should return true when lovers are the last survivors.", "location": { "start": { @@ -104720,7 +104890,7 @@ } }, { - "id": "651", + "id": "652", "name": "Game Victory Helper doesWhiteWerewolfWin should return false when no players are provided.", "location": { "start": { @@ -104730,7 +104900,7 @@ } }, { - "id": "652", + "id": "653", "name": "Game Victory Helper doesWhiteWerewolfWin should return false when there is no white werewolf among players.", "location": { "start": { @@ -104740,7 +104910,7 @@ } }, { - "id": "653", + "id": "654", "name": "Game Victory Helper doesWhiteWerewolfWin should return false when there is at least one alive players among players except white werewolf himself.", "location": { "start": { @@ -104750,7 +104920,7 @@ } }, { - "id": "654", + "id": "655", "name": "Game Victory Helper doesWhiteWerewolfWin should return false when all players are dead even white werewolf himself.", "location": { "start": { @@ -104760,7 +104930,7 @@ } }, { - "id": "655", + "id": "656", "name": "Game Victory Helper doesWhiteWerewolfWin should return true when all players are dead except white werewolf.", "location": { "start": { @@ -104770,7 +104940,7 @@ } }, { - "id": "656", + "id": "657", "name": "Game Victory Helper doesPiedPiperWin should return false when no players are provided.", "location": { "start": { @@ -104780,7 +104950,7 @@ } }, { - "id": "657", + "id": "658", "name": "Game Victory Helper doesPiedPiperWin should return false when there is no pied piper among players.", "location": { "start": { @@ -104790,7 +104960,7 @@ } }, { - "id": "658", + "id": "659", "name": "Game Victory Helper doesPiedPiperWin should return false when pied piper is dead but all are charmed.", "location": { "start": { @@ -104800,7 +104970,7 @@ } }, { - "id": "659", + "id": "660", "name": "Game Victory Helper doesPiedPiperWin should return false when pied piper is powerless but all are charmed.", "location": { "start": { @@ -104810,7 +104980,7 @@ } }, { - "id": "660", + "id": "661", "name": "Game Victory Helper doesPiedPiperWin should return false when there are still left to charm players.", "location": { "start": { @@ -104820,7 +104990,7 @@ } }, { - "id": "661", + "id": "662", "name": "Game Victory Helper doesPiedPiperWin should return false when all are charmed but pied piper is powerless because infected.", "location": { "start": { @@ -104830,7 +105000,7 @@ } }, { - "id": "662", + "id": "663", "name": "Game Victory Helper doesPiedPiperWin should return true when all are charmed but pied piper is not powerless because infected.", "location": { "start": { @@ -104840,7 +105010,7 @@ } }, { - "id": "663", + "id": "664", "name": "Game Victory Helper doesPiedPiperWin should return true when all are charmed and pied piper is not infected anyway.", "location": { "start": { @@ -104850,7 +105020,7 @@ } }, { - "id": "664", + "id": "665", "name": "Game Victory Helper doesAngelWin should return false when no players provided.", "location": { "start": { @@ -104860,7 +105030,7 @@ } }, { - "id": "665", + "id": "666", "name": "Game Victory Helper doesAngelWin should return false when there is no angel among players.", "location": { "start": { @@ -104870,7 +105040,7 @@ } }, { - "id": "666", + "id": "667", "name": "Game Victory Helper doesAngelWin should return false when angel is still alive.", "location": { "start": { @@ -104880,7 +105050,7 @@ } }, { - "id": "667", + "id": "668", "name": "Game Victory Helper doesAngelWin should return false when angel is dead but has no death cause.", "location": { "start": { @@ -104890,7 +105060,7 @@ } }, { - "id": "668", + "id": "669", "name": "Game Victory Helper doesAngelWin should return false when angel is dead but powerless.", "location": { "start": { @@ -104900,7 +105070,7 @@ } }, { - "id": "669", + "id": "670", "name": "Game Victory Helper doesAngelWin should return false when it's not first turn of the game.", "location": { "start": { @@ -104910,7 +105080,7 @@ } }, { - "id": "670", + "id": "671", "name": "Game Victory Helper doesAngelWin should return false when angel is not dead from vote or eaten cause.", "location": { "start": { @@ -104920,7 +105090,7 @@ } }, { - "id": "671", + "id": "672", "name": "Game Victory Helper doesAngelWin should return true when angel is dead from eaten cause.", "location": { "start": { @@ -104930,7 +105100,7 @@ } }, { - "id": "672", + "id": "673", "name": "Game Victory Helper doesAngelWin should return true when angel is dead from vote cause.", "location": { "start": { @@ -104940,7 +105110,7 @@ } }, { - "id": "673", + "id": "674", "name": "Game Victory Helper isGameOver should throw error when game's current play is not set.", "location": { "start": { @@ -104950,7 +105120,7 @@ } }, { - "id": "674", + "id": "675", "name": "Game Victory Helper isGameOver should return true when all players are dead.", "location": { "start": { @@ -104960,7 +105130,7 @@ } }, { - "id": "675", + "id": "676", "name": "Game Victory Helper isGameOver should return false when there is a incoming shoot by hunter play.", "location": { "start": { @@ -104970,7 +105140,7 @@ } }, { - "id": "676", + "id": "677", "name": "Game Victory Helper isGameOver should return false when current play is shoot by hunter play.", "location": { "start": { @@ -104980,7 +105150,7 @@ } }, { - "id": "677", + "id": "678", "name": "Game Victory Helper isGameOver should return true when werewolves win.", "location": { "start": { @@ -104990,7 +105160,7 @@ } }, { - "id": "678", + "id": "679", "name": "Game Victory Helper isGameOver should return true when villagers win.", "location": { "start": { @@ -105000,7 +105170,7 @@ } }, { - "id": "679", + "id": "680", "name": "Game Victory Helper isGameOver should return true when lovers win.", "location": { "start": { @@ -105010,7 +105180,7 @@ } }, { - "id": "680", + "id": "681", "name": "Game Victory Helper isGameOver should return true when white werewolf wins.", "location": { "start": { @@ -105020,7 +105190,7 @@ } }, { - "id": "681", + "id": "682", "name": "Game Victory Helper isGameOver should return true when pied piper wins.", "location": { "start": { @@ -105030,7 +105200,7 @@ } }, { - "id": "682", + "id": "683", "name": "Game Victory Helper isGameOver should return true when angel wins.", "location": { "start": { @@ -105040,7 +105210,7 @@ } }, { - "id": "683", + "id": "684", "name": "Game Victory Helper generateGameVictoryData should return no winners when all players are dead.", "location": { "start": { @@ -105050,7 +105220,7 @@ } }, { - "id": "684", + "id": "685", "name": "Game Victory Helper generateGameVictoryData should return angel victory when angel wins.", "location": { "start": { @@ -105060,7 +105230,7 @@ } }, { - "id": "685", + "id": "686", "name": "Game Victory Helper generateGameVictoryData should return lovers victory when lovers win.", "location": { "start": { @@ -105070,7 +105240,7 @@ } }, { - "id": "686", + "id": "687", "name": "Game Victory Helper generateGameVictoryData should return pied piper victory when pied piper wins.", "location": { "start": { @@ -105080,7 +105250,7 @@ } }, { - "id": "687", + "id": "688", "name": "Game Victory Helper generateGameVictoryData should return white werewolf victory when white werewolf wins.", "location": { "start": { @@ -105090,7 +105260,7 @@ } }, { - "id": "688", + "id": "689", "name": "Game Victory Helper generateGameVictoryData should return werewolves victory when werewolves win.", "location": { "start": { @@ -105100,7 +105270,7 @@ } }, { - "id": "689", + "id": "690", "name": "Game Victory Helper generateGameVictoryData should return villagers victory when villagers win.", "location": { "start": { @@ -105110,7 +105280,7 @@ } }, { - "id": "690", + "id": "691", "name": "Game Victory Helper generateGameVictoryData should return undefined when no victory can't be generated.", "location": { "start": { @@ -105120,12 +105290,12 @@ } } ], - "source": "import { GAME_PLAY_ACTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { GAME_VICTORY_TYPES } from \"@/modules/game/enums/game-victory.enum\";\nimport { doesAngelWin, doesPiedPiperWin, doesWhiteWerewolfWin, doLoversWin, doVillagersWin, doWerewolvesWin, generateGameVictoryData, isGameOver } from \"@/modules/game/helpers/game-victory/game-victory.helper\";\nimport type { GameVictory } from \"@/modules/game/schemas/game-victory/game-victory.schema\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakePiedPiperGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGamePlayAllVote, createFakeGamePlayHunterShoots, createFakeGamePlayWerewolvesEat } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGameVictory } from \"@tests/factories/game/schemas/game-victory/game-victory.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCharmedByPiedPiperPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakePlayerBrokenHeartByCupidDeath, createFakePlayerEatenByWerewolvesDeath, createFakePlayerVoteByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeAngelAlivePlayer, createFakePiedPiperAlivePlayer, createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayerSide } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Game Victory Helper\", () => {\n let mocks: {\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n mocks = { unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() } };\n });\n \n describe(\"doWerewolvesWin\", () => {\n it(\"should return false when there are no players provided.\", () => {\n const game = createFakeGame();\n\n expect(doWerewolvesWin(game)).toBe(false);\n });\n\n it(\"should return false when there are no werewolves among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doWerewolvesWin(game)).toBe(false);\n });\n\n it(\"should return false when there are at least one alive villager among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doWerewolvesWin(game)).toBe(false);\n });\n\n it(\"should return true when all villagers are dead.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doWerewolvesWin(game)).toBe(true);\n });\n });\n \n describe(\"doVillagersWin\", () => {\n it(\"should return false when there are no players provided.\", () => {\n const game = createFakeGame();\n expect(doVillagersWin(game)).toBe(false);\n });\n\n it(\"should return false when there are no villagers among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doVillagersWin(game)).toBe(false);\n });\n\n it(\"should return false when there are at least one alive werewolf among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doVillagersWin(game)).toBe(false);\n });\n\n it(\"should return true when all werewolves are dead.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doVillagersWin(game)).toBe(true);\n });\n });\n\n describe(\"doLoversWin\", () => {\n it(\"should return false when no players are provided.\", () => {\n const game = createFakeGame();\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return false when there are no lovers among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return false when at least one non-lover player is alive.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return false when at least one lover player is dead.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return true when lovers are the last survivors.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(true);\n });\n });\n\n describe(\"doesWhiteWerewolfWin\", () => {\n it(\"should return false when no players are provided.\", () => {\n const game = createFakeGame();\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return false when there is no white werewolf among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return false when there is at least one alive players among players except white werewolf himself.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return false when all players are dead even white werewolf himself.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return true when all players are dead except white werewolf.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: true }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(true);\n });\n });\n\n describe(\"doesPiedPiperWin\", () => {\n it(\"should return false when no players are provided.\", () => {\n const game = createFakeGame();\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when there is no pied piper among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when pied piper is dead but all are charmed.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when pied piper is powerless but all are charmed.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when there are still left to charm players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [] }),\n createFakePiedPiperAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when all are charmed but pied piper is powerless because infected.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return true when all are charmed but pied piper is not powerless because infected.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ players, options });\n\n expect(doesPiedPiperWin(game)).toBe(true);\n });\n\n it(\"should return true when all are charmed and pied piper is not infected anyway.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(doesPiedPiperWin(game)).toBe(true);\n });\n });\n\n describe(\"doesAngelWin\", () => {\n it(\"should return false when no players provided.\", () => {\n const game = createFakeGame();\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when there is no angel among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is still alive.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is dead but has no death cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is dead but powerless.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerEatenByWerewolvesDeath(), attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when it's not first turn of the game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerEatenByWerewolvesDeath() }),\n ];\n const game = createFakeGame({ players, turn: 2 });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is not dead from vote or eaten cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerBrokenHeartByCupidDeath() }),\n ];\n const game = createFakeGame({ players, turn: 1 });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return true when angel is dead from eaten cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerEatenByWerewolvesDeath() }),\n ];\n const game = createFakeGame({ players, turn: 1 });\n\n expect(doesAngelWin(game)).toBe(true);\n });\n\n it(\"should return true when angel is dead from vote cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n ];\n const game = createFakeGame({ players, turn: 1 });\n\n expect(doesAngelWin(game)).toBe(true);\n });\n });\n\n describe(\"isGameOver\", () => {\n it(\"should throw error when game's current play is not set.\", () => {\n const game = createFakeGame();\n const interpolations = { gameId: game._id };\n\n expect(() => isGameOver(game)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"isGameOver\", interpolations);\n });\n\n it(\"should return true when all players are dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: ROLE_NAMES.HUNTER }) }),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return false when there is a incoming shoot by hunter play.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(false);\n });\n\n it(\"should return false when current play is shoot by hunter play.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(false);\n });\n\n it(\"should return true when werewolves win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ action: GAME_PLAY_ACTIONS.LOOK }),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, currentPlay, upcomingPlays });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when villagers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: ROLE_NAMES.THIEF }) }),\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, currentPlay, upcomingPlays });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when lovers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when white werewolf wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: true }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when pied piper wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay, options });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when angel wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay, options, turn: 1 });\n\n expect(isGameOver(game)).toBe(true);\n });\n });\n\n describe(\"generateGameVictoryData\", () => {\n it(\"should return no winners when all players are dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: ROLE_NAMES.HUNTER }) }),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ players, upcomingPlays });\n const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.NONE });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return angel victory when angel wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ players, options, turn: 1 });\n const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.ANGEL, winners: [players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return lovers victory when lovers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.LOVERS, winners: [players[2], players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return pied piper victory when pied piper wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ players, options });\n const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.PIED_PIPER, winners: [players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return white werewolf victory when white werewolf wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: true }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.WHITE_WEREWOLF, winners: [players[2]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return werewolves victory when werewolves win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.WEREWOLVES, winners: [players[2], players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return villagers victory when villagers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.VILLAGERS, winners: [players[0], players[1]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return undefined when no victory can't be generated.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(generateGameVictoryData(game)).toBeUndefined();\n });\n });\n});" + "source": "import { GamePlayActions } from \"@/modules/game/enums/game-play.enum\";\nimport { GameVictoryTypes } from \"@/modules/game/enums/game-victory.enum\";\nimport { doesAngelWin, doesPiedPiperWin, doesWhiteWerewolfWin, doLoversWin, doVillagersWin, doWerewolvesWin, generateGameVictoryData, isGameOver } from \"@/modules/game/helpers/game-victory/game-victory.helper\";\nimport type { GameVictory } from \"@/modules/game/schemas/game-victory/game-victory.schema\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport * as UnexpectedExceptionFactory from \"@/shared/exception/helpers/unexpected-exception.factory\";\n\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakePiedPiperGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\nimport { createFakeGamePlayAllVote, createFakeGamePlayHunterShoots, createFakeGamePlayWerewolvesEat } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGameVictory } from \"@tests/factories/game/schemas/game-victory/game-victory.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCharmedByPiedPiperPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePowerlessByAncientPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakePlayerBrokenHeartByCupidDeath, createFakePlayerEatenByWerewolvesDeath, createFakePlayerVoteByAllDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\nimport { createFakeAngelAlivePlayer, createFakePiedPiperAlivePlayer, createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer, createFakeWhiteWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayerSide } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Game Victory Helper\", () => {\n let mocks: {\n unexpectedExceptionFactory: {\n createNoCurrentGamePlayUnexpectedException: jest.SpyInstance;\n };\n };\n \n beforeEach(() => {\n mocks = { unexpectedExceptionFactory: { createNoCurrentGamePlayUnexpectedException: jest.spyOn(UnexpectedExceptionFactory, \"createNoCurrentGamePlayUnexpectedException\").mockImplementation() } };\n });\n \n describe(\"doWerewolvesWin\", () => {\n it(\"should return false when there are no players provided.\", () => {\n const game = createFakeGame();\n\n expect(doWerewolvesWin(game)).toBe(false);\n });\n\n it(\"should return false when there are no werewolves among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doWerewolvesWin(game)).toBe(false);\n });\n\n it(\"should return false when there are at least one alive villager among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doWerewolvesWin(game)).toBe(false);\n });\n\n it(\"should return true when all villagers are dead.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doWerewolvesWin(game)).toBe(true);\n });\n });\n \n describe(\"doVillagersWin\", () => {\n it(\"should return false when there are no players provided.\", () => {\n const game = createFakeGame();\n expect(doVillagersWin(game)).toBe(false);\n });\n\n it(\"should return false when there are no villagers among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doVillagersWin(game)).toBe(false);\n });\n\n it(\"should return false when there are at least one alive werewolf among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doVillagersWin(game)).toBe(false);\n });\n\n it(\"should return true when all werewolves are dead.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doVillagersWin(game)).toBe(true);\n });\n });\n\n describe(\"doLoversWin\", () => {\n it(\"should return false when no players are provided.\", () => {\n const game = createFakeGame();\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return false when there are no lovers among players.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return false when at least one non-lover player is alive.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return false when at least one lover player is dead.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()], isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(false);\n });\n\n it(\"should return true when lovers are the last survivors.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doLoversWin(game)).toBe(true);\n });\n });\n\n describe(\"doesWhiteWerewolfWin\", () => {\n it(\"should return false when no players are provided.\", () => {\n const game = createFakeGame();\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return false when there is no white werewolf among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return false when there is at least one alive players among players except white werewolf himself.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return false when all players are dead even white werewolf himself.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(false);\n });\n\n it(\"should return true when all players are dead except white werewolf.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: true }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesWhiteWerewolfWin(game)).toBe(true);\n });\n });\n\n describe(\"doesPiedPiperWin\", () => {\n it(\"should return false when no players are provided.\", () => {\n const game = createFakeGame();\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when there is no pied piper among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when pied piper is dead but all are charmed.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when pied piper is powerless but all are charmed.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when there are still left to charm players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [] }),\n createFakePiedPiperAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return false when all are charmed but pied piper is powerless because infected.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(doesPiedPiperWin(game)).toBe(false);\n });\n\n it(\"should return true when all are charmed but pied piper is not powerless because infected.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ players, options });\n\n expect(doesPiedPiperWin(game)).toBe(true);\n });\n\n it(\"should return true when all are charmed and pied piper is not infected anyway.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ players, options });\n\n expect(doesPiedPiperWin(game)).toBe(true);\n });\n });\n\n describe(\"doesAngelWin\", () => {\n it(\"should return false when no players provided.\", () => {\n const game = createFakeGame();\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when there is no angel among players.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is still alive.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer(),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is dead but has no death cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is dead but powerless.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerEatenByWerewolvesDeath(), attributes: [createFakePowerlessByAncientPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when it's not first turn of the game.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerEatenByWerewolvesDeath() }),\n ];\n const game = createFakeGame({ players, turn: 2 });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return false when angel is not dead from vote or eaten cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerBrokenHeartByCupidDeath() }),\n ];\n const game = createFakeGame({ players, turn: 1 });\n\n expect(doesAngelWin(game)).toBe(false);\n });\n\n it(\"should return true when angel is dead from eaten cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerEatenByWerewolvesDeath() }),\n ];\n const game = createFakeGame({ players, turn: 1 });\n\n expect(doesAngelWin(game)).toBe(true);\n });\n\n it(\"should return true when angel is dead from vote cause.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n ];\n const game = createFakeGame({ players, turn: 1 });\n\n expect(doesAngelWin(game)).toBe(true);\n });\n });\n\n describe(\"isGameOver\", () => {\n it(\"should throw error when game's current play is not set.\", () => {\n const game = createFakeGame();\n const interpolations = { gameId: game._id };\n\n expect(() => isGameOver(game)).toThrow(undefined);\n expect(mocks.unexpectedExceptionFactory.createNoCurrentGamePlayUnexpectedException).toHaveBeenCalledExactlyOnceWith(\"isGameOver\", interpolations);\n });\n\n it(\"should return true when all players are dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: RoleNames.HUNTER }) }),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return false when there is a incoming shoot by hunter play.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(false);\n });\n\n it(\"should return false when current play is shoot by hunter play.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(false);\n });\n\n it(\"should return true when werewolves win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ action: GamePlayActions.LOOK }),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, currentPlay, upcomingPlays });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when villagers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: RoleNames.THIEF }) }),\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, currentPlay, upcomingPlays });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when lovers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when white werewolf wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: true }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when pied piper wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay, options });\n\n expect(isGameOver(game)).toBe(true);\n });\n\n it(\"should return true when angel wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n ];\n const upcomingPlays = [\n createFakeGamePlayAllVote(),\n createFakeGamePlayWerewolvesEat(),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const currentPlay = createFakeGamePlayAllVote();\n const game = createFakeGame({ players, upcomingPlays, currentPlay, options, turn: 1 });\n\n expect(isGameOver(game)).toBe(true);\n });\n });\n\n describe(\"generateGameVictoryData\", () => {\n it(\"should return no winners when all players are dead.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n ];\n const upcomingPlays = [\n createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: RoleNames.HUNTER }) }),\n createFakeGamePlayWerewolvesEat(),\n ];\n const game = createFakeGame({ players, upcomingPlays });\n const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.NONE });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return angel victory when angel wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeAngelAlivePlayer({ isAlive: false, death: createFakePlayerVoteByAllDeath() }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ players, options, turn: 1 });\n const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.ANGEL, winners: [players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return lovers victory when lovers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.LOVERS, winners: [players[2], players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return pied piper victory when pied piper wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }),\n ];\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ players, options });\n const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.PIED_PIPER, winners: [players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return white werewolf victory when white werewolf wins.\", () => {\n const players = [\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWhiteWerewolfAlivePlayer({ isAlive: true }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.WHITE_WEREWOLF, winners: [players[2]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return werewolves victory when werewolves win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer({ isAlive: false }),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.WEREWOLVES, winners: [players[2], players[3]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return villagers victory when villagers win.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.VILLAGERS, winners: [players[0], players[1]] });\n\n expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory);\n });\n\n it(\"should return undefined when no victory can't be generated.\", () => {\n const players = [\n createFakeVillagerAlivePlayer(),\n createFakeSeerAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer({ isAlive: false }),\n ];\n const game = createFakeGame({ players });\n\n expect(generateGameVictoryData(game)).toBeUndefined();\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/game.service.spec.ts": { "tests": [ { - "id": "691", + "id": "692", "name": "Game Service getGames should get all games when called.", "location": { "start": { @@ -105135,7 +105305,7 @@ } }, { - "id": "692", + "id": "693", "name": "Game Service createGame should throw error when can't generate upcoming plays.", "location": { "start": { @@ -105145,7 +105315,7 @@ } }, { - "id": "693", + "id": "694", "name": "Game Service createGame should call createGame repository method when called.", "location": { "start": { @@ -105155,7 +105325,7 @@ } }, { - "id": "694", + "id": "695", "name": "Game Service createGame should call updateGame repository method when called.", "location": { "start": { @@ -105165,7 +105335,7 @@ } }, { - "id": "695", + "id": "696", "name": "Game Service cancelGame should throw error when game is not playing.", "location": { "start": { @@ -105175,7 +105345,7 @@ } }, { - "id": "696", + "id": "697", "name": "Game Service cancelGame should call update method when game can be canceled.", "location": { "start": { @@ -105185,7 +105355,7 @@ } }, { - "id": "697", + "id": "698", "name": "Game Service makeGamePlay should throw an error when game is not playing.", "location": { "start": { @@ -105195,7 +105365,7 @@ } }, { - "id": "698", + "id": "699", "name": "Game Service makeGamePlay should call play validator method when called.", "location": { "start": { @@ -105205,7 +105375,7 @@ } }, { - "id": "699", + "id": "700", "name": "Game Service makeGamePlay should call play maker method when called.", "location": { "start": { @@ -105215,7 +105385,7 @@ } }, { - "id": "700", + "id": "701", "name": "Game Service makeGamePlay should call remove obsolete upcoming plays method when called.", "location": { "start": { @@ -105225,7 +105395,7 @@ } }, { - "id": "701", + "id": "702", "name": "Game Service makeGamePlay should call proceed to next game play method when called.", "location": { "start": { @@ -105235,7 +105405,7 @@ } }, { - "id": "702", + "id": "703", "name": "Game Service makeGamePlay should call handle game phase completion method when phase is ending.", "location": { "start": { @@ -105245,7 +105415,7 @@ } }, { - "id": "703", + "id": "704", "name": "Game Service makeGamePlay should call generate current game history record method when called.", "location": { "start": { @@ -105255,7 +105425,7 @@ } }, { - "id": "704", + "id": "705", "name": "Game Service makeGamePlay should call createGameHistoryRecord method when called.", "location": { "start": { @@ -105265,7 +105435,7 @@ } }, { - "id": "705", + "id": "706", "name": "Game Service makeGamePlay should call update method when called.", "location": { "start": { @@ -105275,7 +105445,7 @@ } }, { - "id": "706", + "id": "707", "name": "Game Service makeGamePlay should call set game over method when the game is done.", "location": { "start": { @@ -105285,7 +105455,7 @@ } }, { - "id": "707", + "id": "708", "name": "Game Service handleGamePhaseCompletion should call apply ending phase outcomes method when called.", "location": { "start": { @@ -105295,7 +105465,7 @@ } }, { - "id": "708", + "id": "709", "name": "Game Service handleGamePhaseCompletion should call decrease remaining phases attributes to players method when called.", "location": { "start": { @@ -105305,7 +105475,7 @@ } }, { - "id": "709", + "id": "710", "name": "Game Service handleGamePhaseCompletion should call switch phase method when called.", "location": { "start": { @@ -105315,7 +105485,7 @@ } }, { - "id": "710", + "id": "711", "name": "Game Service handleGamePhaseCompletion should call proceed to next game play method when called.", "location": { "start": { @@ -105325,7 +105495,7 @@ } }, { - "id": "711", + "id": "712", "name": "Game Service updateGame should throw an error when game not found by update repository method.", "location": { "start": { @@ -105335,7 +105505,7 @@ } }, { - "id": "712", + "id": "713", "name": "Game Service updateGame should return updated game when called.", "location": { "start": { @@ -105345,7 +105515,7 @@ } }, { - "id": "713", + "id": "714", "name": "Game Service setGameAsOver should set game as over when called.", "location": { "start": { @@ -105355,12 +105525,12 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GAME_STATUSES } from \"@/modules/game/enums/game.enum\";\nimport * as GamePhaseHelper from \"@/modules/game/helpers/game-phase/game-phase.helper\";\nimport * as GamePlayHelper from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport * as GameVictoryHelper from \"@/modules/game/helpers/game-victory/game-victory.helper\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePhaseService } from \"@/modules/game/providers/services/game-phase/game-phase.service\";\nimport { GamePlayMakerService } from \"@/modules/game/providers/services/game-play/game-play-maker.service\";\nimport { GamePlayValidatorService } from \"@/modules/game/providers/services/game-play/game-play-validator.service\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { GameService } from \"@/modules/game/providers/services/game.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { UNEXPECTED_EXCEPTION_REASONS } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport { BadResourceMutationException } from \"@/shared/exception/types/bad-resource-mutation-exception.type\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\nimport { createFakeGameHistoryRecordToInsert } from \"@tests/factories/game/types/game-history-record/game-history-record.type.factory\";\nimport { createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGameVictory } from \"@tests/factories/game/schemas/game-victory/game-victory.schema.factory\";\nimport { createFakeGamePlayAllVote } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeMakeGamePlayDto } from \"@tests/factories/game/dto/make-game-play/make-game-play.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\n\njest.mock(\"@/shared/exception/types/bad-resource-mutation-exception.type\");\njest.mock(\"@/shared/exception/types/resource-not-found-exception.type\");\n\ndescribe(\"Game Service\", () => {\n let mocks: {\n gameRepository: {\n find: jest.SpyInstance;\n findOne: jest.SpyInstance;\n create: jest.SpyInstance;\n updateOne: jest.SpyInstance;\n };\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordToInsert: jest.SpyInstance;\n createGameHistoryRecord: jest.SpyInstance;\n };\n gamePlayService: {\n getUpcomingNightPlays: jest.SpyInstance;\n proceedToNextGamePlay: jest.SpyInstance;\n refreshUpcomingPlays: jest.SpyInstance;\n };\n gamePlayValidatorService: { validateGamePlayWithRelationsDto: jest.SpyInstance };\n gamePlayMakerService: { makeGamePlay: jest.SpyInstance };\n gamePhaseService: {\n applyEndingGamePhasePlayerAttributesOutcomesToPlayers: jest.SpyInstance;\n switchPhaseAndAppendGamePhaseUpcomingPlays: jest.SpyInstance;\n };\n playerAttributeService: {\n decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes: jest.SpyInstance;\n };\n gameHelper: { getExpectedPlayersToPlay: jest.SpyInstance };\n gamePhaseHelper: { isGamePhaseOver: jest.SpyInstance };\n gamePlayHelper: { createMakeGamePlayDtoWithRelations: jest.SpyInstance };\n gameVictoryHelper: { isGameOver: jest.SpyInstance };\n\n };\n let services: { game: GameService };\n let repositories: { game: GameRepository };\n\n beforeEach(async() => {\n mocks = {\n gameRepository: {\n find: jest.fn(),\n findOne: jest.fn(),\n create: jest.fn(),\n updateOne: jest.fn(),\n },\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordToInsert: jest.fn(),\n createGameHistoryRecord: jest.fn(),\n },\n gamePlayService: {\n getUpcomingNightPlays: jest.fn(),\n proceedToNextGamePlay: jest.fn(),\n refreshUpcomingPlays: jest.fn(),\n },\n gamePlayValidatorService: { validateGamePlayWithRelationsDto: jest.fn() },\n gamePlayMakerService: { makeGamePlay: jest.fn() },\n gamePhaseService: {\n applyEndingGamePhasePlayerAttributesOutcomesToPlayers: jest.fn(),\n switchPhaseAndAppendGamePhaseUpcomingPlays: jest.fn(),\n },\n playerAttributeService: { decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes: jest.fn() },\n gameHelper: { getExpectedPlayersToPlay: jest.spyOn(GameHelper, \"getExpectedPlayersToPlay\").mockReturnValue([]) },\n gamePhaseHelper: { isGamePhaseOver: jest.spyOn(GamePhaseHelper, \"isGamePhaseOver\").mockImplementation() },\n gamePlayHelper: { createMakeGamePlayDtoWithRelations: jest.spyOn(GamePlayHelper, \"createMakeGamePlayDtoWithRelations\").mockImplementation() },\n gameVictoryHelper: { isGameOver: jest.spyOn(GameVictoryHelper, \"isGameOver\").mockImplementation() },\n };\n\n const module: TestingModule = await Test.createTestingModule({\n providers: [\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n {\n provide: GamePlayService,\n useValue: mocks.gamePlayService,\n },\n {\n provide: GamePlayValidatorService,\n useValue: mocks.gamePlayValidatorService,\n },\n {\n provide: GamePlayMakerService,\n useValue: mocks.gamePlayMakerService,\n },\n {\n provide: GamePhaseService,\n useValue: mocks.gamePhaseService,\n },\n {\n provide: PlayerAttributeService,\n useValue: mocks.playerAttributeService,\n },\n {\n provide: GameHistoryRecordRepository,\n useValue: {},\n },\n GamePlayVoteService,\n GameService,\n ],\n }).compile();\n\n services = { game: module.get(GameService) };\n repositories = { game: module.get(GameRepository) };\n });\n\n describe(\"getGames\", () => {\n it(\"should get all games when called.\", async() => {\n await services.game.getGames();\n\n expect(repositories.game.find).toHaveBeenCalledExactlyOnceWith();\n });\n });\n\n describe(\"createGame\", () => {\n let localMocks: { gameService: { updateGame: jest.SpyInstance } };\n const createdGame = createFakeGameWithCurrentPlay();\n \n beforeEach(() => {\n mocks.gameRepository.create.mockResolvedValue(createdGame);\n localMocks = { gameService: { updateGame: jest.spyOn(services.game as unknown as { updateGame }, \"updateGame\").mockResolvedValue(createdGame) } };\n });\n\n it(\"should throw error when can't generate upcoming plays.\", async() => {\n mocks.gamePlayService.getUpcomingNightPlays.mockReturnValue([]);\n const toCreateGame = createFakeCreateGameDto();\n const exception = new UnexpectedException(\"createGame\", UNEXPECTED_EXCEPTION_REASONS.CANT_GENERATE_GAME_PLAYS);\n\n await expect(services.game.createGame(toCreateGame)).rejects.toThrow(exception);\n });\n\n it(\"should call createGame repository method when called.\", async() => {\n const toCreateGame = createFakeCreateGameDto();\n mocks.gamePlayService.getUpcomingNightPlays.mockReturnValue([createFakeGamePlayAllVote()]);\n await services.game.createGame(toCreateGame);\n const expectedGame = createFakeCreateGameDto({\n ...toCreateGame,\n currentPlay: createFakeGamePlayAllVote(),\n upcomingPlays: [],\n });\n\n expect(repositories.game.create).toHaveBeenCalledExactlyOnceWith(expectedGame);\n });\n\n it(\"should call updateGame repository method when called.\", async() => {\n const toCreateGame = createFakeCreateGameDto();\n mocks.gamePlayService.getUpcomingNightPlays.mockReturnValue([createFakeGamePlayAllVote()]);\n const expectedPlayersToPlay = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n mocks.gameHelper.getExpectedPlayersToPlay.mockReturnValue(expectedPlayersToPlay);\n await services.game.createGame(toCreateGame);\n const expectedGame = createFakeGameWithCurrentPlay(createdGame);\n expectedGame.currentPlay.source.players = expectedPlayersToPlay;\n\n expect(localMocks.gameService.updateGame).toHaveBeenCalledWith(createdGame._id, expectedGame);\n });\n });\n\n describe(\"cancelGame\", () => {\n let localMocks: { gameService: { updateGame: jest.SpyInstance } };\n const existingPlayingGame = createFakeGame({ status: GAME_STATUSES.PLAYING });\n\n beforeEach(() => {\n localMocks = { gameService: { updateGame: jest.spyOn(services.game as unknown as { updateGame }, \"updateGame\").mockReturnValue(existingPlayingGame) } };\n });\n\n it(\"should throw error when game is not playing.\", async() => {\n const canceledGame = createFakeGame({ status: GAME_STATUSES.CANCELED });\n\n await expect(services.game.cancelGame(canceledGame)).toReject();\n expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAMES, canceledGame._id.toString(), `Game doesn't have status with value \"playing\"`);\n });\n\n it(\"should call update method when game can be canceled.\", async() => {\n await services.game.cancelGame(existingPlayingGame);\n\n expect(localMocks.gameService.updateGame).toHaveBeenCalledExactlyOnceWith(existingPlayingGame._id, { status: GAME_STATUSES.CANCELED });\n });\n });\n\n describe(\"makeGamePlay\", () => {\n let localMocks: {\n gameService: {\n handleGamePhaseCompletion: jest.SpyInstance ;\n updateGame: jest.SpyInstance;\n setGameAsOver: jest.SpyInstance;\n };\n };\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ status: GAME_STATUSES.PLAYING, players, currentPlay: createFakeGamePlayAllVote() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n\n beforeEach(() => {\n mocks.gamePlayHelper.createMakeGamePlayDtoWithRelations.mockReturnValue(play);\n mocks.gamePlayMakerService.makeGamePlay.mockResolvedValue(game);\n mocks.gamePlayService.refreshUpcomingPlays.mockReturnValue(game);\n mocks.gamePlayService.proceedToNextGamePlay.mockReturnValue(game);\n mocks.gameVictoryHelper.isGameOver.mockReturnValue(false);\n localMocks = {\n gameService: {\n handleGamePhaseCompletion: jest.spyOn(services.game as unknown as { handleGamePhaseCompletion }, \"handleGamePhaseCompletion\").mockResolvedValue(game),\n updateGame: jest.spyOn(services.game as unknown as { updateGame }, \"updateGame\").mockReturnValue(game),\n setGameAsOver: jest.spyOn(services.game as unknown as { setGameAsOver }, \"setGameAsOver\").mockReturnValue(game),\n },\n };\n });\n\n it(\"should throw an error when game is not playing.\", async() => {\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n const canceledGame = createFakeGame({ status: GAME_STATUSES.CANCELED });\n\n await expect(services.game.makeGamePlay(canceledGame, makeGamePlayDto)).toReject();\n expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAMES, canceledGame._id.toString(), `Game doesn't have status with value \"playing\"`);\n });\n\n it(\"should call play validator method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayValidatorService.validateGamePlayWithRelationsDto).toHaveBeenCalledExactlyOnceWith(play, clonedGame);\n });\n\n it(\"should call play maker method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayMakerService.makeGamePlay).toHaveBeenCalledExactlyOnceWith(play, clonedGame);\n });\n\n it(\"should call remove obsolete upcoming plays method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayService.refreshUpcomingPlays).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call proceed to next game play method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayService.proceedToNextGamePlay).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call handle game phase completion method when phase is ending.\", async() => {\n const clonedGame = createFakeGame(game);\n mocks.gamePhaseHelper.isGamePhaseOver.mockReturnValue(true);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(localMocks.gameService.handleGamePhaseCompletion).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call generate current game history record method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gameHistoryRecordService.generateCurrentGameHistoryRecordToInsert).toHaveBeenCalledExactlyOnceWith(clonedGame, game, play);\n });\n\n it(\"should call createGameHistoryRecord method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n const currentGameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n mocks.gameHistoryRecordService.generateCurrentGameHistoryRecordToInsert.mockReturnValue(currentGameHistoryRecordToInsert);\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gameHistoryRecordService.createGameHistoryRecord).toHaveBeenCalledExactlyOnceWith(currentGameHistoryRecordToInsert);\n });\n\n it(\"should call update method when called.\", async() => {\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(game, makeGamePlayDto);\n\n expect(localMocks.gameService.updateGame).toHaveBeenCalledExactlyOnceWith(game._id, game);\n });\n\n it(\"should call set game over method when the game is done.\", async() => {\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n const gameVictoryData = createFakeGameVictory();\n jest.spyOn(GameVictoryHelper, \"generateGameVictoryData\").mockReturnValue(gameVictoryData);\n mocks.gameVictoryHelper.isGameOver.mockReturnValue(true);\n mocks.gamePlayMakerService.makeGamePlay.mockReturnValue(game);\n mocks.gamePlayService.proceedToNextGamePlay.mockReturnValue(game);\n mocks.gamePlayService.refreshUpcomingPlays.mockReturnValue(game.upcomingPlays);\n await services.game.makeGamePlay(game, makeGamePlayDto);\n\n expect(localMocks.gameService.setGameAsOver).toHaveBeenCalledExactlyOnceWith(game);\n });\n });\n\n describe(\"handleGamePhaseCompletion\", () => {\n const game = createFakeGame();\n\n beforeEach(() => {\n mocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayers.mockResolvedValue(game);\n mocks.playerAttributeService.decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes.mockReturnValue(game);\n mocks.gamePhaseService.switchPhaseAndAppendGamePhaseUpcomingPlays.mockReturnValue(game);\n mocks.gamePlayService.proceedToNextGamePlay.mockReturnValue(game);\n });\n\n it(\"should call apply ending phase outcomes method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayers).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call decrease remaining phases attributes to players method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.playerAttributeService.decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call switch phase method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.gamePhaseService.switchPhaseAndAppendGamePhaseUpcomingPlays).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call proceed to next game play method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.gamePlayService.proceedToNextGamePlay).toHaveBeenCalledExactlyOnceWith(game);\n });\n });\n\n describe(\"updateGame\", () => {\n it(\"should throw an error when game not found by update repository method.\", async() => {\n const unknownObjectId = createFakeObjectId();\n mocks.gameRepository.updateOne.mockResolvedValue(null);\n\n await expect(services.game[\"updateGame\"](unknownObjectId, { status: GAME_STATUSES.OVER })).toReject();\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAMES, unknownObjectId.toString());\n });\n\n it(\"should return updated game when called.\", async() => {\n const game = createFakeGame();\n const gameDataToUpdate: Partial = { status: GAME_STATUSES.OVER };\n mocks.gameRepository.updateOne.mockResolvedValue(game);\n\n await expect(services.game[\"updateGame\"](game._id, gameDataToUpdate)).resolves.toStrictEqual(game);\n expect(mocks.gameRepository.updateOne).toHaveBeenCalledExactlyOnceWith({ _id: game._id }, gameDataToUpdate);\n });\n });\n\n describe(\"setGameAsOver\", () => {\n it(\"should set game as over when called.\", () => {\n const game = createFakeGame({ status: GAME_STATUSES.PLAYING });\n const gameVictoryData = createFakeGameVictory();\n jest.spyOn(GameVictoryHelper, \"generateGameVictoryData\").mockReturnValue(gameVictoryData);\n const expectedGame = createFakeGame({\n ...game,\n status: GAME_STATUSES.OVER,\n victory: gameVictoryData,\n });\n\n expect(services.game[\"setGameAsOver\"](game)).toStrictEqual(expectedGame);\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GameStatuses } from \"@/modules/game/enums/game.enum\";\nimport * as GamePhaseHelper from \"@/modules/game/helpers/game-phase/game-phase.helper\";\nimport * as GamePlayHelper from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport * as GameVictoryHelper from \"@/modules/game/helpers/game-victory/game-victory.helper\";\nimport * as GameHelper from \"@/modules/game/helpers/game.helper\";\nimport { GameHistoryRecordRepository } from \"@/modules/game/providers/repositories/game-history-record.repository\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\nimport { GameHistoryRecordService } from \"@/modules/game/providers/services/game-history/game-history-record.service\";\nimport { GamePhaseService } from \"@/modules/game/providers/services/game-phase/game-phase.service\";\nimport { GamePlayMakerService } from \"@/modules/game/providers/services/game-play/game-play-maker.service\";\nimport { GamePlayValidatorService } from \"@/modules/game/providers/services/game-play/game-play-validator.service\";\nimport { GamePlayVoteService } from \"@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { GameService } from \"@/modules/game/providers/services/game.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { UnexpectedExceptionReasons } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport { BadResourceMutationException } from \"@/shared/exception/types/bad-resource-mutation-exception.type\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\nimport { createFakeGameHistoryRecordToInsert } from \"@tests/factories/game/types/game-history-record/game-history-record.type.factory\";\nimport { createFakeSeerAlivePlayer, createFakeVillagerAlivePlayer, createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakeGame, createFakeGameWithCurrentPlay } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeGameVictory } from \"@tests/factories/game/schemas/game-victory/game-victory.schema.factory\";\nimport { createFakeGamePlayAllVote } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeMakeGamePlayDto } from \"@tests/factories/game/dto/make-game-play/make-game-play.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\n\njest.mock(\"@/shared/exception/types/bad-resource-mutation-exception.type\");\njest.mock(\"@/shared/exception/types/resource-not-found-exception.type\");\n\ndescribe(\"Game Service\", () => {\n let mocks: {\n gameRepository: {\n find: jest.SpyInstance;\n findOne: jest.SpyInstance;\n create: jest.SpyInstance;\n updateOne: jest.SpyInstance;\n };\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordToInsert: jest.SpyInstance;\n createGameHistoryRecord: jest.SpyInstance;\n };\n gamePlayService: {\n getUpcomingNightPlays: jest.SpyInstance;\n proceedToNextGamePlay: jest.SpyInstance;\n refreshUpcomingPlays: jest.SpyInstance;\n };\n gamePlayValidatorService: { validateGamePlayWithRelationsDto: jest.SpyInstance };\n gamePlayMakerService: { makeGamePlay: jest.SpyInstance };\n gamePhaseService: {\n applyEndingGamePhasePlayerAttributesOutcomesToPlayers: jest.SpyInstance;\n switchPhaseAndAppendGamePhaseUpcomingPlays: jest.SpyInstance;\n };\n playerAttributeService: {\n decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes: jest.SpyInstance;\n };\n gameHelper: { getExpectedPlayersToPlay: jest.SpyInstance };\n gamePhaseHelper: { isGamePhaseOver: jest.SpyInstance };\n gamePlayHelper: { createMakeGamePlayDtoWithRelations: jest.SpyInstance };\n gameVictoryHelper: { isGameOver: jest.SpyInstance };\n\n };\n let services: { game: GameService };\n let repositories: { game: GameRepository };\n\n beforeEach(async() => {\n mocks = {\n gameRepository: {\n find: jest.fn(),\n findOne: jest.fn(),\n create: jest.fn(),\n updateOne: jest.fn(),\n },\n gameHistoryRecordService: {\n generateCurrentGameHistoryRecordToInsert: jest.fn(),\n createGameHistoryRecord: jest.fn(),\n },\n gamePlayService: {\n getUpcomingNightPlays: jest.fn(),\n proceedToNextGamePlay: jest.fn(),\n refreshUpcomingPlays: jest.fn(),\n },\n gamePlayValidatorService: { validateGamePlayWithRelationsDto: jest.fn() },\n gamePlayMakerService: { makeGamePlay: jest.fn() },\n gamePhaseService: {\n applyEndingGamePhasePlayerAttributesOutcomesToPlayers: jest.fn(),\n switchPhaseAndAppendGamePhaseUpcomingPlays: jest.fn(),\n },\n playerAttributeService: { decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes: jest.fn() },\n gameHelper: { getExpectedPlayersToPlay: jest.spyOn(GameHelper, \"getExpectedPlayersToPlay\").mockReturnValue([]) },\n gamePhaseHelper: { isGamePhaseOver: jest.spyOn(GamePhaseHelper, \"isGamePhaseOver\").mockImplementation() },\n gamePlayHelper: { createMakeGamePlayDtoWithRelations: jest.spyOn(GamePlayHelper, \"createMakeGamePlayDtoWithRelations\").mockImplementation() },\n gameVictoryHelper: { isGameOver: jest.spyOn(GameVictoryHelper, \"isGameOver\").mockImplementation() },\n };\n\n const module: TestingModule = await Test.createTestingModule({\n providers: [\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n {\n provide: GameHistoryRecordService,\n useValue: mocks.gameHistoryRecordService,\n },\n {\n provide: GamePlayService,\n useValue: mocks.gamePlayService,\n },\n {\n provide: GamePlayValidatorService,\n useValue: mocks.gamePlayValidatorService,\n },\n {\n provide: GamePlayMakerService,\n useValue: mocks.gamePlayMakerService,\n },\n {\n provide: GamePhaseService,\n useValue: mocks.gamePhaseService,\n },\n {\n provide: PlayerAttributeService,\n useValue: mocks.playerAttributeService,\n },\n {\n provide: GameHistoryRecordRepository,\n useValue: {},\n },\n GamePlayVoteService,\n GameService,\n ],\n }).compile();\n\n services = { game: module.get(GameService) };\n repositories = { game: module.get(GameRepository) };\n });\n\n describe(\"getGames\", () => {\n it(\"should get all games when called.\", async() => {\n await services.game.getGames();\n\n expect(repositories.game.find).toHaveBeenCalledExactlyOnceWith();\n });\n });\n\n describe(\"createGame\", () => {\n let localMocks: { gameService: { updateGame: jest.SpyInstance } };\n const createdGame = createFakeGameWithCurrentPlay();\n \n beforeEach(() => {\n mocks.gameRepository.create.mockResolvedValue(createdGame);\n localMocks = { gameService: { updateGame: jest.spyOn(services.game as unknown as { updateGame }, \"updateGame\").mockResolvedValue(createdGame) } };\n });\n\n it(\"should throw error when can't generate upcoming plays.\", async() => {\n mocks.gamePlayService.getUpcomingNightPlays.mockReturnValue([]);\n const toCreateGame = createFakeCreateGameDto();\n const exception = new UnexpectedException(\"createGame\", UnexpectedExceptionReasons.CANT_GENERATE_GAME_PLAYS);\n\n await expect(services.game.createGame(toCreateGame)).rejects.toThrow(exception);\n });\n\n it(\"should call createGame repository method when called.\", async() => {\n const toCreateGame = createFakeCreateGameDto();\n mocks.gamePlayService.getUpcomingNightPlays.mockReturnValue([createFakeGamePlayAllVote()]);\n await services.game.createGame(toCreateGame);\n const expectedGame = createFakeCreateGameDto({\n ...toCreateGame,\n currentPlay: createFakeGamePlayAllVote(),\n upcomingPlays: [],\n });\n\n expect(repositories.game.create).toHaveBeenCalledExactlyOnceWith(expectedGame);\n });\n\n it(\"should call updateGame repository method when called.\", async() => {\n const toCreateGame = createFakeCreateGameDto();\n mocks.gamePlayService.getUpcomingNightPlays.mockReturnValue([createFakeGamePlayAllVote()]);\n const expectedPlayersToPlay = [\n createFakeWerewolfAlivePlayer(),\n createFakeSeerAlivePlayer(),\n ];\n mocks.gameHelper.getExpectedPlayersToPlay.mockReturnValue(expectedPlayersToPlay);\n await services.game.createGame(toCreateGame);\n const expectedGame = createFakeGameWithCurrentPlay(createdGame);\n expectedGame.currentPlay.source.players = expectedPlayersToPlay;\n\n expect(localMocks.gameService.updateGame).toHaveBeenCalledWith(createdGame._id, expectedGame);\n });\n });\n\n describe(\"cancelGame\", () => {\n let localMocks: { gameService: { updateGame: jest.SpyInstance } };\n const existingPlayingGame = createFakeGame({ status: GameStatuses.PLAYING });\n\n beforeEach(() => {\n localMocks = { gameService: { updateGame: jest.spyOn(services.game as unknown as { updateGame }, \"updateGame\").mockReturnValue(existingPlayingGame) } };\n });\n\n it(\"should throw error when game is not playing.\", async() => {\n const canceledGame = createFakeGame({ status: GameStatuses.CANCELED });\n\n await expect(services.game.cancelGame(canceledGame)).toReject();\n expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAMES, canceledGame._id.toString(), `Game doesn't have status with value \"playing\"`);\n });\n\n it(\"should call update method when game can be canceled.\", async() => {\n await services.game.cancelGame(existingPlayingGame);\n\n expect(localMocks.gameService.updateGame).toHaveBeenCalledExactlyOnceWith(existingPlayingGame._id, { status: GameStatuses.CANCELED });\n });\n });\n\n describe(\"makeGamePlay\", () => {\n let localMocks: {\n gameService: {\n handleGamePhaseCompletion: jest.SpyInstance ;\n updateGame: jest.SpyInstance;\n setGameAsOver: jest.SpyInstance;\n };\n };\n const players = [\n createFakeWerewolfAlivePlayer(),\n createFakeWerewolfAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n createFakeVillagerAlivePlayer(),\n ];\n const game = createFakeGame({ status: GameStatuses.PLAYING, players, currentPlay: createFakeGamePlayAllVote() });\n const play = createFakeMakeGamePlayWithRelationsDto();\n\n beforeEach(() => {\n mocks.gamePlayHelper.createMakeGamePlayDtoWithRelations.mockReturnValue(play);\n mocks.gamePlayMakerService.makeGamePlay.mockResolvedValue(game);\n mocks.gamePlayService.refreshUpcomingPlays.mockReturnValue(game);\n mocks.gamePlayService.proceedToNextGamePlay.mockReturnValue(game);\n mocks.gameVictoryHelper.isGameOver.mockReturnValue(false);\n localMocks = {\n gameService: {\n handleGamePhaseCompletion: jest.spyOn(services.game as unknown as { handleGamePhaseCompletion }, \"handleGamePhaseCompletion\").mockResolvedValue(game),\n updateGame: jest.spyOn(services.game as unknown as { updateGame }, \"updateGame\").mockReturnValue(game),\n setGameAsOver: jest.spyOn(services.game as unknown as { setGameAsOver }, \"setGameAsOver\").mockReturnValue(game),\n },\n };\n });\n\n it(\"should throw an error when game is not playing.\", async() => {\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n const canceledGame = createFakeGame({ status: GameStatuses.CANCELED });\n\n await expect(services.game.makeGamePlay(canceledGame, makeGamePlayDto)).toReject();\n expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAMES, canceledGame._id.toString(), `Game doesn't have status with value \"playing\"`);\n });\n\n it(\"should call play validator method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayValidatorService.validateGamePlayWithRelationsDto).toHaveBeenCalledExactlyOnceWith(play, clonedGame);\n });\n\n it(\"should call play maker method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayMakerService.makeGamePlay).toHaveBeenCalledExactlyOnceWith(play, clonedGame);\n });\n\n it(\"should call remove obsolete upcoming plays method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayService.refreshUpcomingPlays).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call proceed to next game play method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gamePlayService.proceedToNextGamePlay).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call handle game phase completion method when phase is ending.\", async() => {\n const clonedGame = createFakeGame(game);\n mocks.gamePhaseHelper.isGamePhaseOver.mockReturnValue(true);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(localMocks.gameService.handleGamePhaseCompletion).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call generate current game history record method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gameHistoryRecordService.generateCurrentGameHistoryRecordToInsert).toHaveBeenCalledExactlyOnceWith(clonedGame, game, play);\n });\n\n it(\"should call createGameHistoryRecord method when called.\", async() => {\n const clonedGame = createFakeGame(game);\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n const currentGameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert();\n mocks.gameHistoryRecordService.generateCurrentGameHistoryRecordToInsert.mockReturnValue(currentGameHistoryRecordToInsert);\n await services.game.makeGamePlay(clonedGame, makeGamePlayDto);\n\n expect(mocks.gameHistoryRecordService.createGameHistoryRecord).toHaveBeenCalledExactlyOnceWith(currentGameHistoryRecordToInsert);\n });\n\n it(\"should call update method when called.\", async() => {\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n await services.game.makeGamePlay(game, makeGamePlayDto);\n\n expect(localMocks.gameService.updateGame).toHaveBeenCalledExactlyOnceWith(game._id, game);\n });\n\n it(\"should call set game over method when the game is done.\", async() => {\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n const gameVictoryData = createFakeGameVictory();\n jest.spyOn(GameVictoryHelper, \"generateGameVictoryData\").mockReturnValue(gameVictoryData);\n mocks.gameVictoryHelper.isGameOver.mockReturnValue(true);\n mocks.gamePlayMakerService.makeGamePlay.mockReturnValue(game);\n mocks.gamePlayService.proceedToNextGamePlay.mockReturnValue(game);\n mocks.gamePlayService.refreshUpcomingPlays.mockReturnValue(game.upcomingPlays);\n await services.game.makeGamePlay(game, makeGamePlayDto);\n\n expect(localMocks.gameService.setGameAsOver).toHaveBeenCalledExactlyOnceWith(game);\n });\n });\n\n describe(\"handleGamePhaseCompletion\", () => {\n const game = createFakeGame();\n\n beforeEach(() => {\n mocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayers.mockResolvedValue(game);\n mocks.playerAttributeService.decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes.mockReturnValue(game);\n mocks.gamePhaseService.switchPhaseAndAppendGamePhaseUpcomingPlays.mockReturnValue(game);\n mocks.gamePlayService.proceedToNextGamePlay.mockReturnValue(game);\n });\n\n it(\"should call apply ending phase outcomes method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayers).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call decrease remaining phases attributes to players method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.playerAttributeService.decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call switch phase method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.gamePhaseService.switchPhaseAndAppendGamePhaseUpcomingPlays).toHaveBeenCalledExactlyOnceWith(game);\n });\n\n it(\"should call proceed to next game play method when called.\", async() => {\n await services.game[\"handleGamePhaseCompletion\"](game);\n\n expect(mocks.gamePlayService.proceedToNextGamePlay).toHaveBeenCalledExactlyOnceWith(game);\n });\n });\n\n describe(\"updateGame\", () => {\n it(\"should throw an error when game not found by update repository method.\", async() => {\n const unknownObjectId = createFakeObjectId();\n mocks.gameRepository.updateOne.mockResolvedValue(null);\n\n await expect(services.game[\"updateGame\"](unknownObjectId, { status: GameStatuses.OVER })).toReject();\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAMES, unknownObjectId.toString());\n });\n\n it(\"should return updated game when called.\", async() => {\n const game = createFakeGame();\n const gameDataToUpdate: Partial = { status: GameStatuses.OVER };\n mocks.gameRepository.updateOne.mockResolvedValue(game);\n\n await expect(services.game[\"updateGame\"](game._id, gameDataToUpdate)).resolves.toStrictEqual(game);\n expect(mocks.gameRepository.updateOne).toHaveBeenCalledExactlyOnceWith({ _id: game._id }, gameDataToUpdate);\n });\n });\n\n describe(\"setGameAsOver\", () => {\n it(\"should set game as over when called.\", () => {\n const game = createFakeGame({ status: GameStatuses.PLAYING });\n const gameVictoryData = createFakeGameVictory();\n jest.spyOn(GameVictoryHelper, \"generateGameVictoryData\").mockReturnValue(gameVictoryData);\n const expectedGame = createFakeGame({\n ...game,\n status: GameStatuses.OVER,\n victory: gameVictoryData,\n });\n\n expect(services.game[\"setGameAsOver\"](game)).toStrictEqual(expectedGame);\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service.spec.ts": { "tests": [ { - "id": "714", + "id": "715", "name": "Game Play Vote Service getNominatedPlayers should get nominated players when called.", "location": { "start": { @@ -105370,7 +105540,7 @@ } }, { - "id": "715", + "id": "716", "name": "Game Play Vote Service getPlayerVoteCounts should get player vote counts with only simple votes when there is no sheriff.", "location": { "start": { @@ -105380,7 +105550,7 @@ } }, { - "id": "716", + "id": "717", "name": "Game Play Vote Service getPlayerVoteCounts should get player vote counts with only simple votes when sheriff doesn't have double vote.", "location": { "start": { @@ -105390,7 +105560,7 @@ } }, { - "id": "717", + "id": "718", "name": "Game Play Vote Service getPlayerVoteCounts should get player vote counts with simple only votes when game play is not vote.", "location": { "start": { @@ -105400,7 +105570,7 @@ } }, { - "id": "718", + "id": "719", "name": "Game Play Vote Service getPlayerVoteCounts should get player vote counts with simple votes and one doubled vote when sheriff has double vote.", "location": { "start": { @@ -105410,7 +105580,7 @@ } }, { - "id": "719", + "id": "720", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts as is when action is not vote.", "location": { "start": { @@ -105420,7 +105590,7 @@ } }, { - "id": "720", + "id": "721", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts as is when there is no raven player in the game.", "location": { "start": { @@ -105430,7 +105600,7 @@ } }, { - "id": "721", + "id": "722", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts as is when raven player is not alive.", "location": { "start": { @@ -105440,7 +105610,7 @@ } }, { - "id": "722", + "id": "723", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts as is when raven player is powerless.", "location": { "start": { @@ -105450,7 +105620,7 @@ } }, { - "id": "723", + "id": "724", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts as is when there are no raven mark.", "location": { "start": { @@ -105460,7 +105630,7 @@ } }, { - "id": "724", + "id": "725", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts as is when the raven target is dead.", "location": { "start": { @@ -105470,7 +105640,7 @@ } }, { - "id": "725", + "id": "726", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts with new player vote entry when raven target doesn't have vote.", "location": { "start": { @@ -105480,7 +105650,7 @@ } }, { - "id": "726", + "id": "727", "name": "Game Play Vote Service addRavenMarkVoteToPlayerVoteCounts should return player vote counts with updated player vote entry when raven target already has votes.", "location": { "start": { @@ -105495,7 +105665,7 @@ "tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts": { "tests": [ { - "id": "727", + "id": "728", "name": "Game Random Composition Service getGameRandomComposition should return random composition when called [#0].", "location": { "start": { @@ -105505,7 +105675,7 @@ } }, { - "id": "728", + "id": "729", "name": "Game Random Composition Service getGameRandomComposition should return random composition when called [#1].", "location": { "start": { @@ -105515,7 +105685,7 @@ } }, { - "id": "729", + "id": "730", "name": "Game Random Composition Service getGameRandomComposition should return random composition when called [#2].", "location": { "start": { @@ -105525,7 +105695,7 @@ } }, { - "id": "730", + "id": "731", "name": "Game Random Composition Service getGameRandomComposition should return random composition when called [#3].", "location": { "start": { @@ -105535,7 +105705,7 @@ } }, { - "id": "731", + "id": "732", "name": "Game Random Composition Service getGameRandomComposition should return random composition when called [#4].", "location": { "start": { @@ -105545,7 +105715,7 @@ } }, { - "id": "732", + "id": "733", "name": "Game Random Composition Service getRandomRolesForSide should get only werewolves when side is werewolves and no roles are available.", "location": { "start": { @@ -105555,7 +105725,7 @@ } }, { - "id": "733", + "id": "734", "name": "Game Random Composition Service getRandomRolesForSide should get only villagers when side is villagers and no roles are available.", "location": { "start": { @@ -105565,7 +105735,7 @@ } }, { - "id": "734", + "id": "735", "name": "Game Random Composition Service getRandomRolesForSide should get seer, witch, pied piper, and all others are villagers when side is villagers and only seer and witch are available.", "location": { "start": { @@ -105575,7 +105745,7 @@ } }, { - "id": "735", + "id": "736", "name": "Game Random Composition Service getRandomRolesForSide should not get fox when minInGame is too high for left to pick.", "location": { "start": { @@ -105585,7 +105755,7 @@ } }, { - "id": "736", + "id": "737", "name": "Game Random Composition Service getRandomRolesForSide should get three brothers when minInGame is exactly left to pick count.", "location": { "start": { @@ -105595,7 +105765,7 @@ } }, { - "id": "737", + "id": "738", "name": "Game Random Composition Service getRandomRolesForSide should get two sisters when minInGame is lower than left to pick count.", "location": { "start": { @@ -105605,7 +105775,7 @@ } }, { - "id": "738", + "id": "739", "name": "Game Random Composition Service getRandomRolesForSide should get full witches when maxInGame is equal to left to pick count.", "location": { "start": { @@ -105615,7 +105785,7 @@ } }, { - "id": "739", + "id": "740", "name": "Game Random Composition Service getWerewolfCountForComposition should return 1 when called with 4 players.", "location": { "start": { @@ -105625,7 +105795,7 @@ } }, { - "id": "740", + "id": "741", "name": "Game Random Composition Service getWerewolfCountForComposition should return 1 when called with 6 players.", "location": { "start": { @@ -105635,7 +105805,7 @@ } }, { - "id": "741", + "id": "742", "name": "Game Random Composition Service getWerewolfCountForComposition should return 2 when called with 7 players.", "location": { "start": { @@ -105645,7 +105815,7 @@ } }, { - "id": "742", + "id": "743", "name": "Game Random Composition Service getWerewolfCountForComposition should return 4 when called with 23 players.", "location": { "start": { @@ -105655,7 +105825,7 @@ } }, { - "id": "743", + "id": "744", "name": "Game Random Composition Service getWerewolfCountForComposition should return 4 when called with 24 players.", "location": { "start": { @@ -105665,7 +105835,7 @@ } }, { - "id": "744", + "id": "745", "name": "Game Random Composition Service getWerewolfCountForComposition should return 5 when called with 25 players.", "location": { "start": { @@ -105675,7 +105845,7 @@ } }, { - "id": "745", + "id": "746", "name": "Game Random Composition Service getAvailableRolesForGameRandomComposition should not include some roles when there are excluded.", "location": { "start": { @@ -105685,7 +105855,7 @@ } }, { - "id": "746", + "id": "747", "name": "Game Random Composition Service getAvailableRolesForGameRandomComposition should not include default villager role when powerful villager roles are prioritized.", "location": { "start": { @@ -105695,7 +105865,7 @@ } }, { - "id": "747", + "id": "748", "name": "Game Random Composition Service getAvailableRolesForGameRandomComposition should include default villager role when powerful villager roles are not prioritized.", "location": { "start": { @@ -105705,7 +105875,7 @@ } }, { - "id": "748", + "id": "749", "name": "Game Random Composition Service getAvailableRolesForGameRandomComposition should not include default werewolf role when powerful werewolf roles are prioritized.", "location": { "start": { @@ -105715,7 +105885,7 @@ } }, { - "id": "749", + "id": "750", "name": "Game Random Composition Service getAvailableRolesForGameRandomComposition should include default werewolf role when powerful werewolf roles are not prioritized.", "location": { "start": { @@ -105725,7 +105895,7 @@ } }, { - "id": "750", + "id": "751", "name": "Game Random Composition Service getAvailableRolesForGameRandomComposition should not include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true and not enough players.", "location": { "start": { @@ -105735,7 +105905,7 @@ } }, { - "id": "751", + "id": "752", "name": "Game Random Composition Service getAvailableRolesForGameRandomComposition should include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true when enough players.", "location": { "start": { @@ -105745,12 +105915,12 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { doesCompositionHaveAtLeastOneVillager } from \"@/modules/game/dto/base/decorators/composition/composition-has-villager.decorator\";\nimport { doesCompositionHaveAtLeastOneWerewolf } from \"@/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator\";\nimport { areCompositionRolesMaxInGameRespected } from \"@/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator\";\nimport { areCompositionRolesMinInGameRespected } from \"@/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator\";\nimport type { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport type { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport { GameRandomCompositionService } from \"@/modules/game/providers/services/game-random-composition.service\";\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from \"@/modules/role/enums/role.enum\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nimport { createFakeGetGameRandomCompositionDto } from \"@tests/factories/game/dto/get-game-random-composition/get-game-random-composition.dto.factory\";\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Game Random Composition Service\", () => {\n let services: { gameRandomComposition: GameRandomCompositionService };\n\n beforeEach(async() => {\n const module: TestingModule = await Test.createTestingModule({ providers: [GameRandomCompositionService] }).compile();\n\n services = { gameRandomComposition: module.get(GameRandomCompositionService) };\n });\n \n describe(\"getGameRandomComposition\", () => {\n it.each([\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(4) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(40) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(40) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(75) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(100) }),\n ])(\"should return random composition when called [#$#].\", getGameRandomCompositionDto => {\n const result = services.gameRandomComposition.getGameRandomComposition(getGameRandomCompositionDto);\n\n expect(result).toSatisfyAll(player => player.role.current === player.role.original);\n expect(doesCompositionHaveAtLeastOneWerewolf(result)).toBe(true);\n expect(doesCompositionHaveAtLeastOneVillager(result)).toBe(true);\n expect(areCompositionRolesMinInGameRespected(result)).toBe(true);\n expect(areCompositionRolesMaxInGameRespected(result)).toBe(true);\n });\n });\n \n describe(\"getRandomRolesForSide\", () => {\n it(\"should get only werewolves when side is werewolves and no roles are available.\", () => {\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"]([], 10, ROLE_SIDES.WEREWOLVES);\n\n expect(result).toHaveLength(10);\n expect(result.every(role => role.name === ROLE_NAMES.WEREWOLF)).toBe(true);\n });\n\n it(\"should get only villagers when side is villagers and no roles are available.\", () => {\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"]([], 24, ROLE_SIDES.VILLAGERS);\n\n expect(result).toHaveLength(24);\n expect(result.every(role => role.name === ROLE_NAMES.VILLAGER)).toBe(true);\n });\n\n it(\"should get seer, witch, pied piper, and all others are villagers when side is villagers and only seer and witch are available.\", () => {\n const availableRoles: Role[] = [\n { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n ];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 10, ROLE_SIDES.VILLAGERS);\n\n expect(result).toIncludeAllMembers([\n { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER },\n ]);\n });\n\n it(\"should not get fox when minInGame is too high for left to pick.\", () => {\n const availableRoles: Role[] = [\n { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.FOX, side: ROLE_SIDES.VILLAGERS, minInGame: 99, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n ];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 90, ROLE_SIDES.VILLAGERS);\n\n expect(result).toHaveLength(90);\n expect(result.find(role => role.name === ROLE_NAMES.FOX)).toBeUndefined();\n });\n\n it(\"should get three brothers when minInGame is exactly left to pick count.\", () => {\n const availableRoles: Role[] = [{ name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 3, type: ROLE_TYPES.VILLAGER }];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 3, ROLE_SIDES.VILLAGERS);\n\n expect(result).toHaveLength(3);\n expect(result).toIncludeAllMembers([\n { name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n ]);\n });\n\n it(\"should get two sisters when minInGame is lower than left to pick count.\", () => {\n const availableRoles: Role[] = [\n { name: ROLE_NAMES.TWO_SISTERS, side: ROLE_SIDES.VILLAGERS, minInGame: 2, maxInGame: 2, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER },\n ];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 4, ROLE_SIDES.VILLAGERS);\n\n expect(result).toHaveLength(4);\n expect(result).toIncludeAllMembers([\n { name: ROLE_NAMES.TWO_SISTERS, side: ROLE_SIDES.VILLAGERS, minInGame: 2, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.TWO_SISTERS, side: ROLE_SIDES.VILLAGERS, minInGame: 2, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n ]);\n });\n\n it(\"should get full witches when maxInGame is equal to left to pick count.\", () => {\n const availableRoles: Role[] = [{ name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 10, type: ROLE_TYPES.VILLAGER }];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 10, ROLE_SIDES.VILLAGERS);\n\n expect(result).toHaveLength(10);\n expect(result).toIncludeAllMembers([\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER },\n ]);\n });\n });\n\n describe(\"getWerewolfCountForComposition\", () => {\n it.each<{ playersCount: number; expectedWerewolvesCount: number }>([\n { playersCount: 4, expectedWerewolvesCount: 1 },\n { playersCount: 6, expectedWerewolvesCount: 1 },\n { playersCount: 7, expectedWerewolvesCount: 2 },\n { playersCount: 23, expectedWerewolvesCount: 4 },\n { playersCount: 24, expectedWerewolvesCount: 4 },\n { playersCount: 25, expectedWerewolvesCount: 5 },\n ])(\"should return $expectedWerewolvesCount when called with $playersCount players.\", ({ playersCount, expectedWerewolvesCount }) => {\n expect(services.gameRandomComposition[\"getWerewolfCountForComposition\"](playersCount)).toBe(expectedWerewolvesCount);\n });\n });\n\n describe(\"getAvailableRolesForGameRandomComposition\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(60);\n it(\"should not include some roles when there are excluded.\", () => {\n const excludedRoles: ROLE_NAMES[] = [ROLE_NAMES.SEER, ROLE_NAMES.WITCH, ROLE_NAMES.PIED_PIPER, ROLE_NAMES.WHITE_WEREWOLF];\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](createFakeGetGameRandomCompositionDto({ players, excludedRoles }));\n\n expect(result.every(role => !excludedRoles.includes(role.name))).toBe(true);\n });\n\n it(\"should not include default villager role when powerful villager roles are prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulVillagerRolesPrioritized: false });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === ROLE_NAMES.VILLAGER)).toBe(true);\n });\n\n it(\"should include default villager role when powerful villager roles are not prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulVillagerRolesPrioritized: true });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === ROLE_NAMES.VILLAGER)).toBe(false);\n });\n\n it(\"should not include default werewolf role when powerful werewolf roles are prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulWerewolfRolesPrioritized: false });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === ROLE_NAMES.WEREWOLF)).toBe(true);\n });\n\n it(\"should include default werewolf role when powerful werewolf roles are not prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulWerewolfRolesPrioritized: true });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === ROLE_NAMES.WEREWOLF)).toBe(false);\n });\n\n it(\"should not include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true and not enough players.\", () => {\n const rolesWithoutRecommendedMinPlayers = roles.filter(role => role.recommendedMinPlayers === undefined);\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](createFakeGetGameRandomCompositionDto({\n players: bulkCreateFakeCreateGamePlayerDto(10),\n excludedRoles: rolesWithoutRecommendedMinPlayers.map(({ name }) => name),\n areRecommendedMinPlayersRespected: true,\n }));\n const expectedRoleNames = [ROLE_NAMES.VILLAGER, ROLE_NAMES.WEREWOLF];\n\n expect(result.every(role => expectedRoleNames.includes(role.name))).toBe(true);\n });\n\n it(\"should include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true when enough players.\", () => {\n const rolesWithoutRecommendedMinPlayers = roles.filter(role => role.recommendedMinPlayers === undefined);\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](createFakeGetGameRandomCompositionDto({\n players: bulkCreateFakeCreateGamePlayerDto(12),\n excludedRoles: rolesWithoutRecommendedMinPlayers.map(({ name }) => name),\n areRecommendedMinPlayersRespected: true,\n }));\n const expectedRoleNames = [\n ROLE_NAMES.WEREWOLF,\n ROLE_NAMES.PIED_PIPER,\n ROLE_NAMES.FOX,\n ROLE_NAMES.TWO_SISTERS,\n ROLE_NAMES.WHITE_WEREWOLF,\n ROLE_NAMES.VILE_FATHER_OF_WOLVES,\n ];\n\n expect(result).toHaveLength(6);\n expect(result.every(role => expectedRoleNames.includes(role.name))).toBe(true);\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { doesCompositionHaveAtLeastOneVillager } from \"@/modules/game/dto/base/decorators/composition/composition-has-villager.decorator\";\nimport { doesCompositionHaveAtLeastOneWerewolf } from \"@/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator\";\nimport { areCompositionRolesMaxInGameRespected } from \"@/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator\";\nimport { areCompositionRolesMinInGameRespected } from \"@/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator\";\nimport type { CreateGamePlayerDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player.dto\";\nimport type { GetGameRandomCompositionDto } from \"@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto\";\nimport { GameRandomCompositionService } from \"@/modules/game/providers/services/game-random-composition.service\";\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport { RoleNames, RoleSides, RoleTypes } from \"@/modules/role/enums/role.enum\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nimport { createFakeGetGameRandomCompositionDto } from \"@tests/factories/game/dto/get-game-random-composition/get-game-random-composition.dto.factory\";\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Game Random Composition Service\", () => {\n let services: { gameRandomComposition: GameRandomCompositionService };\n\n beforeEach(async() => {\n const module: TestingModule = await Test.createTestingModule({ providers: [GameRandomCompositionService] }).compile();\n\n services = { gameRandomComposition: module.get(GameRandomCompositionService) };\n });\n \n describe(\"getGameRandomComposition\", () => {\n it.each([\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(4) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(40) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(40) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(75) }),\n createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(100) }),\n ])(\"should return random composition when called [#$#].\", getGameRandomCompositionDto => {\n const result = services.gameRandomComposition.getGameRandomComposition(getGameRandomCompositionDto);\n\n expect(result).toSatisfyAll(player => player.role.current === player.role.original);\n expect(doesCompositionHaveAtLeastOneWerewolf(result)).toBe(true);\n expect(doesCompositionHaveAtLeastOneVillager(result)).toBe(true);\n expect(areCompositionRolesMinInGameRespected(result)).toBe(true);\n expect(areCompositionRolesMaxInGameRespected(result)).toBe(true);\n });\n });\n \n describe(\"getRandomRolesForSide\", () => {\n it(\"should get only werewolves when side is werewolves and no roles are available.\", () => {\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"]([], 10, RoleSides.WEREWOLVES);\n\n expect(result).toHaveLength(10);\n expect(result.every(role => role.name === RoleNames.WEREWOLF)).toBe(true);\n });\n\n it(\"should get only villagers when side is villagers and no roles are available.\", () => {\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"]([], 24, RoleSides.VILLAGERS);\n\n expect(result).toHaveLength(24);\n expect(result.every(role => role.name === RoleNames.VILLAGER)).toBe(true);\n });\n\n it(\"should get seer, witch, pied piper, and all others are villagers when side is villagers and only seer and witch are available.\", () => {\n const availableRoles: Role[] = [\n { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER },\n { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER },\n ];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 10, RoleSides.VILLAGERS);\n\n expect(result).toIncludeAllMembers([\n { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER },\n ]);\n });\n\n it(\"should not get fox when minInGame is too high for left to pick.\", () => {\n const availableRoles: Role[] = [\n { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER },\n { name: RoleNames.FOX, side: RoleSides.VILLAGERS, minInGame: 99, maxInGame: 1, type: RoleTypes.VILLAGER },\n ];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 90, RoleSides.VILLAGERS);\n\n expect(result).toHaveLength(90);\n expect(result.find(role => role.name === RoleNames.FOX)).toBeUndefined();\n });\n\n it(\"should get three brothers when minInGame is exactly left to pick count.\", () => {\n const availableRoles: Role[] = [{ name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 3, type: RoleTypes.VILLAGER }];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 3, RoleSides.VILLAGERS);\n\n expect(result).toHaveLength(3);\n expect(result).toIncludeAllMembers([\n { name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 0, type: RoleTypes.VILLAGER },\n ]);\n });\n\n it(\"should get two sisters when minInGame is lower than left to pick count.\", () => {\n const availableRoles: Role[] = [\n { name: RoleNames.TWO_SISTERS, side: RoleSides.VILLAGERS, minInGame: 2, maxInGame: 2, type: RoleTypes.VILLAGER },\n { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER },\n ];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 4, RoleSides.VILLAGERS);\n\n expect(result).toHaveLength(4);\n expect(result).toIncludeAllMembers([\n { name: RoleNames.TWO_SISTERS, side: RoleSides.VILLAGERS, minInGame: 2, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.TWO_SISTERS, side: RoleSides.VILLAGERS, minInGame: 2, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n ]);\n });\n\n it(\"should get full witches when maxInGame is equal to left to pick count.\", () => {\n const availableRoles: Role[] = [{ name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 10, type: RoleTypes.VILLAGER }];\n const result = services.gameRandomComposition[\"getRandomRolesForSide\"](availableRoles, 10, RoleSides.VILLAGERS);\n\n expect(result).toHaveLength(10);\n expect(result).toIncludeAllMembers([\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER },\n ]);\n });\n });\n\n describe(\"getWerewolfCountForComposition\", () => {\n it.each<{ playersCount: number; expectedWerewolvesCount: number }>([\n { playersCount: 4, expectedWerewolvesCount: 1 },\n { playersCount: 6, expectedWerewolvesCount: 1 },\n { playersCount: 7, expectedWerewolvesCount: 2 },\n { playersCount: 23, expectedWerewolvesCount: 4 },\n { playersCount: 24, expectedWerewolvesCount: 4 },\n { playersCount: 25, expectedWerewolvesCount: 5 },\n ])(\"should return $expectedWerewolvesCount when called with $playersCount players.\", ({ playersCount, expectedWerewolvesCount }) => {\n expect(services.gameRandomComposition[\"getWerewolfCountForComposition\"](playersCount)).toBe(expectedWerewolvesCount);\n });\n });\n\n describe(\"getAvailableRolesForGameRandomComposition\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(60);\n it(\"should not include some roles when there are excluded.\", () => {\n const excludedRoles: RoleNames[] = [RoleNames.SEER, RoleNames.WITCH, RoleNames.PIED_PIPER, RoleNames.WHITE_WEREWOLF];\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](createFakeGetGameRandomCompositionDto({ players, excludedRoles }));\n\n expect(result.every(role => !excludedRoles.includes(role.name))).toBe(true);\n });\n\n it(\"should not include default villager role when powerful villager roles are prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulVillagerRolesPrioritized: false });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === RoleNames.VILLAGER)).toBe(true);\n });\n\n it(\"should include default villager role when powerful villager roles are not prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulVillagerRolesPrioritized: true });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === RoleNames.VILLAGER)).toBe(false);\n });\n\n it(\"should not include default werewolf role when powerful werewolf roles are prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulWerewolfRolesPrioritized: false });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === RoleNames.WEREWOLF)).toBe(true);\n });\n\n it(\"should include default werewolf role when powerful werewolf roles are not prioritized.\", () => {\n const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulWerewolfRolesPrioritized: true });\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](compositionDto);\n\n expect(result.some(role => role.name === RoleNames.WEREWOLF)).toBe(false);\n });\n\n it(\"should not include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true and not enough players.\", () => {\n const rolesWithoutRecommendedMinPlayers = ROLES.filter(role => role.recommendedMinPlayers === undefined);\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](createFakeGetGameRandomCompositionDto({\n players: bulkCreateFakeCreateGamePlayerDto(10),\n excludedRoles: rolesWithoutRecommendedMinPlayers.map(({ name }) => name),\n areRecommendedMinPlayersRespected: true,\n }));\n const expectedRoleNames = [RoleNames.VILLAGER, RoleNames.WEREWOLF];\n\n expect(result.every(role => expectedRoleNames.includes(role.name))).toBe(true);\n });\n\n it(\"should include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true when enough players.\", () => {\n const rolesWithoutRecommendedMinPlayers = ROLES.filter(role => role.recommendedMinPlayers === undefined);\n const result = services.gameRandomComposition[\"getAvailableRolesForGameRandomComposition\"](createFakeGetGameRandomCompositionDto({\n players: bulkCreateFakeCreateGamePlayerDto(12),\n excludedRoles: rolesWithoutRecommendedMinPlayers.map(({ name }) => name),\n areRecommendedMinPlayersRespected: true,\n }));\n const expectedRoleNames = [\n RoleNames.WEREWOLF,\n RoleNames.PIED_PIPER,\n RoleNames.FOX,\n RoleNames.TWO_SISTERS,\n RoleNames.WHITE_WEREWOLF,\n RoleNames.VILE_FATHER_OF_WOLVES,\n ];\n\n expect(result).toHaveLength(6);\n expect(result.every(role => expectedRoleNames.includes(role.name))).toBe(true);\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts": { "tests": [ { - "id": "752", + "id": "753", "name": "Game Play Factory createGamePlaySheriffSettlesVotes should create game play sheriff settles votes when called.", "location": { "start": { @@ -105760,7 +105930,7 @@ } }, { - "id": "753", + "id": "754", "name": "Game Play Factory createGamePlaySheriffDelegates should create game play sheriff delegates when called.", "location": { "start": { @@ -105770,7 +105940,7 @@ } }, { - "id": "754", + "id": "755", "name": "Game Play Factory createGamePlayAllVote should create game play all vote when called.", "location": { "start": { @@ -105780,7 +105950,7 @@ } }, { - "id": "755", + "id": "756", "name": "Game Play Factory createGamePlayAllElectSheriff should create game play all elect sheriff when called.", "location": { "start": { @@ -105790,7 +105960,7 @@ } }, { - "id": "756", + "id": "757", "name": "Game Play Factory createGamePlayThiefChoosesCard should create game play thief chooses card when called.", "location": { "start": { @@ -105800,7 +105970,7 @@ } }, { - "id": "757", + "id": "758", "name": "Game Play Factory createGamePlayStutteringJudgeChoosesSign should create game play stuttering judge chooses sign when called.", "location": { "start": { @@ -105810,7 +105980,7 @@ } }, { - "id": "758", + "id": "759", "name": "Game Play Factory createGamePlayScapegoatBansVoting should create game play scapegoat bans voting when called.", "location": { "start": { @@ -105820,7 +105990,7 @@ } }, { - "id": "759", + "id": "760", "name": "Game Play Factory createGamePlayDogWolfChoosesSide should create game play dog wolf chooses side when called.", "location": { "start": { @@ -105830,7 +106000,7 @@ } }, { - "id": "760", + "id": "761", "name": "Game Play Factory createGamePlayWildChildChoosesModel should create game play wild child chooses model when called.", "location": { "start": { @@ -105840,7 +106010,7 @@ } }, { - "id": "761", + "id": "762", "name": "Game Play Factory createGamePlayFoxSniffs should create game play fox sniffs when called.", "location": { "start": { @@ -105850,7 +106020,7 @@ } }, { - "id": "762", + "id": "763", "name": "Game Play Factory createGamePlayCharmedMeetEachOther should create game play charmed players meet each other when called.", "location": { "start": { @@ -105860,7 +106030,7 @@ } }, { - "id": "763", + "id": "764", "name": "Game Play Factory createGamePlayLoversMeetEachOther should create game play lovers meet each other when called.", "location": { "start": { @@ -105870,7 +106040,7 @@ } }, { - "id": "764", + "id": "765", "name": "Game Play Factory createGamePlayThreeBrothersMeetEachOther should create game play three brothers meet each other when called.", "location": { "start": { @@ -105880,7 +106050,7 @@ } }, { - "id": "765", + "id": "766", "name": "Game Play Factory createGamePlayTwoSistersMeetEachOther should create game play two sisters meet each other when called.", "location": { "start": { @@ -105890,7 +106060,7 @@ } }, { - "id": "766", + "id": "767", "name": "Game Play Factory createGamePlayRavenMarks should create game play raven marks when called.", "location": { "start": { @@ -105900,7 +106070,7 @@ } }, { - "id": "767", + "id": "768", "name": "Game Play Factory createGamePlayGuardProtects should create game play guard protects when called.", "location": { "start": { @@ -105910,7 +106080,7 @@ } }, { - "id": "768", + "id": "769", "name": "Game Play Factory createGamePlayHunterShoots should create game play hunter shoots when called.", "location": { "start": { @@ -105920,7 +106090,7 @@ } }, { - "id": "769", + "id": "770", "name": "Game Play Factory createGamePlayWitchUsesPotions should create game play witch uses potions when called.", "location": { "start": { @@ -105930,7 +106100,7 @@ } }, { - "id": "770", + "id": "771", "name": "Game Play Factory createGamePlayPiedPiperCharms should create game play pied piper charms when called.", "location": { "start": { @@ -105940,7 +106110,7 @@ } }, { - "id": "771", + "id": "772", "name": "Game Play Factory createGamePlayCupidCharms should create game play cupid charms when called.", "location": { "start": { @@ -105950,7 +106120,7 @@ } }, { - "id": "772", + "id": "773", "name": "Game Play Factory createGamePlaySeerLooks should create game play seer looks when called.", "location": { "start": { @@ -105960,7 +106130,7 @@ } }, { - "id": "773", + "id": "774", "name": "Game Play Factory createGamePlayWhiteWerewolfEats should create game play white werewolf eats when called.", "location": { "start": { @@ -105970,7 +106140,7 @@ } }, { - "id": "774", + "id": "775", "name": "Game Play Factory createGamePlayBigBadWolfEats should create game play big bad wolf eats when called.", "location": { "start": { @@ -105980,7 +106150,7 @@ } }, { - "id": "775", + "id": "776", "name": "Game Play Factory createGamePlayWerewolvesEat should create game play werewolves eat when called.", "location": { "start": { @@ -105990,7 +106160,7 @@ } }, { - "id": "776", + "id": "777", "name": "Game Play Factory createGamePlaySource should create game play source when called.", "location": { "start": { @@ -106000,7 +106170,7 @@ } }, { - "id": "777", + "id": "778", "name": "Game Play Factory createGamePlay should create game play when called.", "location": { "start": { @@ -106010,12 +106180,12 @@ } } ], - "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GAME_PLAY_ACTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlay, createGamePlayAllElectSheriff, createGamePlayAllVote, createGamePlayBigBadWolfEats, createGamePlayCharmedMeetEachOther, createGamePlayCupidCharms, createGamePlayDogWolfChoosesSide, createGamePlayFoxSniffs, createGamePlayGuardProtects, createGamePlayHunterShoots, createGamePlayLoversMeetEachOther, createGamePlayPiedPiperCharms, createGamePlayRavenMarks, createGamePlayScapegoatBansVoting, createGamePlaySeerLooks, createGamePlaySheriffDelegates, createGamePlaySheriffSettlesVotes, createGamePlaySource, createGamePlayStutteringJudgeChoosesSign, createGamePlayThiefChoosesCard, createGamePlayThreeBrothersMeetEachOther, createGamePlayTwoSistersMeetEachOther, createGamePlayWerewolvesEat, createGamePlayWhiteWerewolfEats, createGamePlayWildChildChoosesModel, createGamePlayWitchUsesPotions } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { GamePlaySource } from \"@/modules/game/schemas/game-play/game-play-source/game-play-source.schema\";\nimport { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeGamePlay } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\n\ndescribe(\"Game Play Factory\", () => {\n describe(\"createGamePlaySheriffSettlesVotes\", () => {\n it(\"should create game play sheriff settles votes when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }),\n action: GAME_PLAY_ACTIONS.SETTLE_VOTES,\n });\n\n expect(createGamePlaySheriffSettlesVotes()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlaySheriffDelegates\", () => {\n it(\"should create game play sheriff delegates when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }),\n action: GAME_PLAY_ACTIONS.DELEGATE,\n });\n\n expect(createGamePlaySheriffDelegates()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayAllVote\", () => {\n it(\"should create game play all vote when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }),\n action: GAME_PLAY_ACTIONS.VOTE,\n });\n\n expect(createGamePlayAllVote()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayAllElectSheriff\", () => {\n it(\"should create game play all elect sheriff when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }),\n action: GAME_PLAY_ACTIONS.ELECT_SHERIFF,\n });\n\n expect(createGamePlayAllElectSheriff()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayThiefChoosesCard\", () => {\n it(\"should create game play thief chooses card when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.THIEF }),\n action: GAME_PLAY_ACTIONS.CHOOSE_CARD,\n });\n\n expect(createGamePlayThiefChoosesCard()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayStutteringJudgeChoosesSign\", () => {\n it(\"should create game play stuttering judge chooses sign when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.STUTTERING_JUDGE }),\n action: GAME_PLAY_ACTIONS.CHOOSE_SIGN,\n });\n\n expect(createGamePlayStutteringJudgeChoosesSign()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayScapegoatBansVoting\", () => {\n it(\"should create game play scapegoat bans voting when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.SCAPEGOAT }),\n action: GAME_PLAY_ACTIONS.BAN_VOTING,\n });\n\n expect(createGamePlayScapegoatBansVoting()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayDogWolfChoosesSide\", () => {\n it(\"should create game play dog wolf chooses side when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.DOG_WOLF }),\n action: GAME_PLAY_ACTIONS.CHOOSE_SIDE,\n });\n\n expect(createGamePlayDogWolfChoosesSide()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWildChildChoosesModel\", () => {\n it(\"should create game play wild child chooses model when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }),\n action: GAME_PLAY_ACTIONS.CHOOSE_MODEL,\n });\n\n expect(createGamePlayWildChildChoosesModel()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayFoxSniffs\", () => {\n it(\"should create game play fox sniffs when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.FOX }),\n action: GAME_PLAY_ACTIONS.SNIFF,\n });\n\n expect(createGamePlayFoxSniffs()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayCharmedMeetEachOther\", () => {\n it(\"should create game play charmed players meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PLAYER_GROUPS.CHARMED }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayCharmedMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayLoversMeetEachOther\", () => {\n it(\"should create game play lovers meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PLAYER_GROUPS.LOVERS }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayLoversMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayThreeBrothersMeetEachOther\", () => {\n it(\"should create game play three brothers meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.THREE_BROTHERS }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayThreeBrothersMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayTwoSistersMeetEachOther\", () => {\n it(\"should create game play two sisters meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.TWO_SISTERS }),\n action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayTwoSistersMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayRavenMarks\", () => {\n it(\"should create game play raven marks when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.RAVEN }),\n action: GAME_PLAY_ACTIONS.MARK,\n });\n\n expect(createGamePlayRavenMarks()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayGuardProtects\", () => {\n it(\"should create game play guard protects when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.GUARD }),\n action: GAME_PLAY_ACTIONS.PROTECT,\n });\n\n expect(createGamePlayGuardProtects()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayHunterShoots\", () => {\n it(\"should create game play hunter shoots when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.HUNTER }),\n action: GAME_PLAY_ACTIONS.SHOOT,\n });\n\n expect(createGamePlayHunterShoots()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWitchUsesPotions\", () => {\n it(\"should create game play witch uses potions when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.WITCH }),\n action: GAME_PLAY_ACTIONS.USE_POTIONS,\n });\n\n expect(createGamePlayWitchUsesPotions()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayPiedPiperCharms\", () => {\n it(\"should create game play pied piper charms when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.PIED_PIPER }),\n action: GAME_PLAY_ACTIONS.CHARM,\n });\n\n expect(createGamePlayPiedPiperCharms()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayCupidCharms\", () => {\n it(\"should create game play cupid charms when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.CUPID }),\n action: GAME_PLAY_ACTIONS.CHARM,\n });\n\n expect(createGamePlayCupidCharms()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlaySeerLooks\", () => {\n it(\"should create game play seer looks when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.SEER }),\n action: GAME_PLAY_ACTIONS.LOOK,\n });\n\n expect(createGamePlaySeerLooks()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWhiteWerewolfEats\", () => {\n it(\"should create game play white werewolf eats when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.WHITE_WEREWOLF }),\n action: GAME_PLAY_ACTIONS.EAT,\n });\n\n expect(createGamePlayWhiteWerewolfEats()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayBigBadWolfEats\", () => {\n it(\"should create game play big bad wolf eats when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: ROLE_NAMES.BIG_BAD_WOLF }),\n action: GAME_PLAY_ACTIONS.EAT,\n });\n\n expect(createGamePlayBigBadWolfEats()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWerewolvesEat\", () => {\n it(\"should create game play werewolves eat when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PLAYER_GROUPS.WEREWOLVES }),\n action: GAME_PLAY_ACTIONS.EAT,\n });\n\n expect(createGamePlayWerewolvesEat()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlaySource\", () => {\n it(\"should create game play source when called.\", () => {\n const gamePlaySource = {\n name: ROLE_NAMES.SEER,\n players: [createFakePlayer()],\n tata: \"toto\",\n };\n\n expect(createGamePlaySource(gamePlaySource)).toStrictEqual(plainToInstance(GamePlaySource, {\n name: ROLE_NAMES.SEER,\n players: gamePlaySource.players,\n }));\n });\n });\n\n describe(\"createGamePlay\", () => {\n it(\"should create game play when called.\", () => {\n const gamePlay: GamePlay = {\n source: createFakeGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }),\n action: GAME_PLAY_ACTIONS.CHOOSE_MODEL,\n };\n\n expect(createGamePlay(gamePlay)).toStrictEqual(plainToInstance(GamePlay, {\n source: createGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }),\n action: GAME_PLAY_ACTIONS.CHOOSE_MODEL,\n }));\n });\n });\n});" + "source": "import { plainToInstance } from \"class-transformer\";\n\nimport { GamePlayActions } from \"@/modules/game/enums/game-play.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { createGamePlay, createGamePlayAllElectSheriff, createGamePlayAllVote, createGamePlayBigBadWolfEats, createGamePlayCharmedMeetEachOther, createGamePlayCupidCharms, createGamePlayDogWolfChoosesSide, createGamePlayFoxSniffs, createGamePlayGuardProtects, createGamePlayHunterShoots, createGamePlayLoversMeetEachOther, createGamePlayPiedPiperCharms, createGamePlayRavenMarks, createGamePlayScapegoatBansVoting, createGamePlaySeerLooks, createGamePlaySheriffDelegates, createGamePlaySheriffSettlesVotes, createGamePlaySource, createGamePlayStutteringJudgeChoosesSign, createGamePlayThiefChoosesCard, createGamePlayThreeBrothersMeetEachOther, createGamePlayTwoSistersMeetEachOther, createGamePlayWerewolvesEat, createGamePlayWhiteWerewolfEats, createGamePlayWildChildChoosesModel, createGamePlayWitchUsesPotions } from \"@/modules/game/helpers/game-play/game-play.factory\";\nimport { GamePlaySource } from \"@/modules/game/schemas/game-play/game-play-source/game-play-source.schema\";\nimport { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeGamePlay } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGamePlaySource } from \"@tests/factories/game/schemas/game-play/game-play-source.schema.factory\";\n\ndescribe(\"Game Play Factory\", () => {\n describe(\"createGamePlaySheriffSettlesVotes\", () => {\n it(\"should create game play sheriff settles votes when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PlayerAttributeNames.SHERIFF }),\n action: GamePlayActions.SETTLE_VOTES,\n });\n\n expect(createGamePlaySheriffSettlesVotes()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlaySheriffDelegates\", () => {\n it(\"should create game play sheriff delegates when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PlayerAttributeNames.SHERIFF }),\n action: GamePlayActions.DELEGATE,\n });\n\n expect(createGamePlaySheriffDelegates()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayAllVote\", () => {\n it(\"should create game play all vote when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PlayerGroups.ALL }),\n action: GamePlayActions.VOTE,\n });\n\n expect(createGamePlayAllVote()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayAllElectSheriff\", () => {\n it(\"should create game play all elect sheriff when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PlayerGroups.ALL }),\n action: GamePlayActions.ELECT_SHERIFF,\n });\n\n expect(createGamePlayAllElectSheriff()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayThiefChoosesCard\", () => {\n it(\"should create game play thief chooses card when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.THIEF }),\n action: GamePlayActions.CHOOSE_CARD,\n });\n\n expect(createGamePlayThiefChoosesCard()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayStutteringJudgeChoosesSign\", () => {\n it(\"should create game play stuttering judge chooses sign when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.STUTTERING_JUDGE }),\n action: GamePlayActions.CHOOSE_SIGN,\n });\n\n expect(createGamePlayStutteringJudgeChoosesSign()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayScapegoatBansVoting\", () => {\n it(\"should create game play scapegoat bans voting when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.SCAPEGOAT }),\n action: GamePlayActions.BAN_VOTING,\n });\n\n expect(createGamePlayScapegoatBansVoting()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayDogWolfChoosesSide\", () => {\n it(\"should create game play dog wolf chooses side when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.DOG_WOLF }),\n action: GamePlayActions.CHOOSE_SIDE,\n });\n\n expect(createGamePlayDogWolfChoosesSide()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWildChildChoosesModel\", () => {\n it(\"should create game play wild child chooses model when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.WILD_CHILD }),\n action: GamePlayActions.CHOOSE_MODEL,\n });\n\n expect(createGamePlayWildChildChoosesModel()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayFoxSniffs\", () => {\n it(\"should create game play fox sniffs when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.FOX }),\n action: GamePlayActions.SNIFF,\n });\n\n expect(createGamePlayFoxSniffs()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayCharmedMeetEachOther\", () => {\n it(\"should create game play charmed players meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PlayerGroups.CHARMED }),\n action: GamePlayActions.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayCharmedMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayLoversMeetEachOther\", () => {\n it(\"should create game play lovers meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PlayerGroups.LOVERS }),\n action: GamePlayActions.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayLoversMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayThreeBrothersMeetEachOther\", () => {\n it(\"should create game play three brothers meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.THREE_BROTHERS }),\n action: GamePlayActions.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayThreeBrothersMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayTwoSistersMeetEachOther\", () => {\n it(\"should create game play two sisters meet each other when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.TWO_SISTERS }),\n action: GamePlayActions.MEET_EACH_OTHER,\n });\n\n expect(createGamePlayTwoSistersMeetEachOther()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayRavenMarks\", () => {\n it(\"should create game play raven marks when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.RAVEN }),\n action: GamePlayActions.MARK,\n });\n\n expect(createGamePlayRavenMarks()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayGuardProtects\", () => {\n it(\"should create game play guard protects when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.GUARD }),\n action: GamePlayActions.PROTECT,\n });\n\n expect(createGamePlayGuardProtects()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayHunterShoots\", () => {\n it(\"should create game play hunter shoots when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.HUNTER }),\n action: GamePlayActions.SHOOT,\n });\n\n expect(createGamePlayHunterShoots()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWitchUsesPotions\", () => {\n it(\"should create game play witch uses potions when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.WITCH }),\n action: GamePlayActions.USE_POTIONS,\n });\n\n expect(createGamePlayWitchUsesPotions()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayPiedPiperCharms\", () => {\n it(\"should create game play pied piper charms when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.PIED_PIPER }),\n action: GamePlayActions.CHARM,\n });\n\n expect(createGamePlayPiedPiperCharms()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayCupidCharms\", () => {\n it(\"should create game play cupid charms when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.CUPID }),\n action: GamePlayActions.CHARM,\n });\n\n expect(createGamePlayCupidCharms()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlaySeerLooks\", () => {\n it(\"should create game play seer looks when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.SEER }),\n action: GamePlayActions.LOOK,\n });\n\n expect(createGamePlaySeerLooks()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWhiteWerewolfEats\", () => {\n it(\"should create game play white werewolf eats when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.WHITE_WEREWOLF }),\n action: GamePlayActions.EAT,\n });\n\n expect(createGamePlayWhiteWerewolfEats()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayBigBadWolfEats\", () => {\n it(\"should create game play big bad wolf eats when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: RoleNames.BIG_BAD_WOLF }),\n action: GamePlayActions.EAT,\n });\n\n expect(createGamePlayBigBadWolfEats()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlayWerewolvesEat\", () => {\n it(\"should create game play werewolves eat when called.\", () => {\n const expectedGamePlay = createFakeGamePlay({\n source: createFakeGamePlaySource({ name: PlayerGroups.WEREWOLVES }),\n action: GamePlayActions.EAT,\n });\n\n expect(createGamePlayWerewolvesEat()).toStrictEqual(expectedGamePlay);\n });\n });\n\n describe(\"createGamePlaySource\", () => {\n it(\"should create game play source when called.\", () => {\n const gamePlaySource = {\n name: RoleNames.SEER,\n players: [createFakePlayer()],\n tata: \"toto\",\n };\n\n expect(createGamePlaySource(gamePlaySource)).toStrictEqual(plainToInstance(GamePlaySource, {\n name: RoleNames.SEER,\n players: gamePlaySource.players,\n }));\n });\n });\n\n describe(\"createGamePlay\", () => {\n it(\"should create game play when called.\", () => {\n const gamePlay: GamePlay = {\n source: createFakeGamePlaySource({ name: RoleNames.WILD_CHILD }),\n action: GamePlayActions.CHOOSE_MODEL,\n };\n\n expect(createGamePlay(gamePlay)).toStrictEqual(plainToInstance(GamePlay, {\n source: createGamePlaySource({ name: RoleNames.WILD_CHILD }),\n action: GamePlayActions.CHOOSE_MODEL,\n }));\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts": { "tests": [ { - "id": "778", + "id": "779", "name": "Game Play Helper getVotesWithRelationsFromMakeGamePlayDto should return undefined when votes are undefined.", "location": { "start": { @@ -106025,7 +106195,7 @@ } }, { - "id": "779", + "id": "780", "name": "Game Play Helper getVotesWithRelationsFromMakeGamePlayDto should throw error when votes contains one unknown source.", "location": { "start": { @@ -106035,7 +106205,7 @@ } }, { - "id": "780", + "id": "781", "name": "Game Play Helper getVotesWithRelationsFromMakeGamePlayDto should throw error when votes contains one unknown target.", "location": { "start": { @@ -106045,7 +106215,7 @@ } }, { - "id": "781", + "id": "782", "name": "Game Play Helper getVotesWithRelationsFromMakeGamePlayDto should fill votes with game players when called.", "location": { "start": { @@ -106055,7 +106225,7 @@ } }, { - "id": "782", + "id": "783", "name": "Game Play Helper getTargetsWithRelationsFromMakeGamePlayDto should return undefined when targets are undefined.", "location": { "start": { @@ -106065,7 +106235,7 @@ } }, { - "id": "783", + "id": "784", "name": "Game Play Helper getTargetsWithRelationsFromMakeGamePlayDto should throw error when targets contains one unknown player.", "location": { "start": { @@ -106075,7 +106245,7 @@ } }, { - "id": "784", + "id": "785", "name": "Game Play Helper getTargetsWithRelationsFromMakeGamePlayDto should fill targets with game players when called.", "location": { "start": { @@ -106085,7 +106255,7 @@ } }, { - "id": "785", + "id": "786", "name": "Game Play Helper getChosenCardFromMakeGamePlayDto should return undefined when chosenCardId is undefined.", "location": { "start": { @@ -106095,7 +106265,7 @@ } }, { - "id": "786", + "id": "787", "name": "Game Play Helper getChosenCardFromMakeGamePlayDto should throw error when chosen card is unknown from game cards.", "location": { "start": { @@ -106105,7 +106275,7 @@ } }, { - "id": "787", + "id": "788", "name": "Game Play Helper getChosenCardFromMakeGamePlayDto should return chosen card when called.", "location": { "start": { @@ -106115,7 +106285,7 @@ } }, { - "id": "788", + "id": "789", "name": "Game Play Helper createMakeGamePlayDtoWithRelations should return same dto with relations when called.", "location": { "start": { @@ -106125,7 +106295,7 @@ } }, { - "id": "789", + "id": "790", "name": "Game Play Helper findPlayPriorityIndex should return -1 when play is not found in priority list.", "location": { "start": { @@ -106135,7 +106305,7 @@ } }, { - "id": "790", + "id": "791", "name": "Game Play Helper findPlayPriorityIndex should return index when play is found in priority list.", "location": { "start": { @@ -106145,7 +106315,7 @@ } }, { - "id": "791", + "id": "792", "name": "Game Play Helper areGamePlaysEqual should return true when both plays are equal [#0].", "location": { "start": { @@ -106155,7 +106325,7 @@ } }, { - "id": "792", + "id": "793", "name": "Game Play Helper areGamePlaysEqual should return false when both sources are not equal [#1].", "location": { "start": { @@ -106165,7 +106335,7 @@ } }, { - "id": "793", + "id": "794", "name": "Game Play Helper areGamePlaysEqual should return false when both actions are not equal [#2].", "location": { "start": { @@ -106175,7 +106345,7 @@ } }, { - "id": "794", + "id": "795", "name": "Game Play Helper areGamePlaysEqual should return false when both causes are not equal [#3].", "location": { "start": { @@ -106185,12 +106355,12 @@ } } ], - "source": "import type { MakeGamePlayTargetWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto\";\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from \"@/modules/game/enums/game-play.enum\";\nimport { areGamePlaysEqual, createMakeGamePlayDtoWithRelations, findPlayPriorityIndex, getChosenCardFromMakeGamePlayDto, getTargetsWithRelationsFromMakeGamePlayDto, getVotesWithRelationsFromMakeGamePlayDto } from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport { createFakeMakeGamePlayTargetWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayVoteWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayDto } from \"@tests/factories/game/dto/make-game-play/make-game-play.dto.factory\";\nimport { bulkCreateFakeGameAdditionalCards } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayHunterShoots, createFakeGamePlaySeerLooks, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { bulkCreateFakePlayers } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\njest.mock(\"@/shared/exception/types/resource-not-found-exception.type\");\n\ndescribe(\"Game Play Helper\", () => {\n describe(\"getVotesWithRelationsFromMakeGamePlayDto\", () => {\n it(\"should return undefined when votes are undefined.\", () => {\n const game = createFakeGame();\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n\n expect(getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toBeUndefined();\n });\n\n it(\"should throw error when votes contains one unknown source.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const fakePlayerId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: fakePlayerId, targetId: game.players[0]._id },\n ],\n });\n\n expect(() => getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.PLAYERS, fakePlayerId.toString(), \"Game Play - Player in `votes.source` is not in the game players\");\n });\n\n it(\"should throw error when votes contains one unknown target.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const fakePlayerId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: game.players[1]._id, targetId: fakePlayerId },\n ],\n });\n\n expect(() => getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.PLAYERS, fakePlayerId.toString(), \"Game Play - Player in `votes.target` is not in the game players\");\n });\n\n it(\"should fill votes with game players when called.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: game.players[1]._id, targetId: game.players[0]._id },\n ],\n });\n const votes = getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game);\n const expectedVotes = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[0], target: game.players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[1], target: game.players[0] }),\n ];\n\n expect(votes).toStrictEqual(expectedVotes);\n });\n });\n\n describe(\"getTargetsWithRelationsFromMakeGamePlayDto\", () => {\n it(\"should return undefined when targets are undefined.\", () => {\n const game = createFakeGame();\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n\n expect(getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toBeUndefined();\n });\n\n it(\"should throw error when targets contains one unknown player.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const fakePlayerId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n targets: [\n { playerId: game.players[0]._id },\n { playerId: game.players[1]._id },\n { playerId: fakePlayerId },\n ],\n });\n\n expect(() => getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.PLAYERS, fakePlayerId.toString(), \"Game Play - Player in `targets.player` is not in the game players\");\n });\n\n it(\"should fill targets with game players when called.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n targets: [\n { playerId: game.players[0]._id, isInfected: true },\n { playerId: game.players[1]._id },\n { playerId: game.players[2]._id, drankPotion: WITCH_POTIONS.DEATH },\n ],\n });\n const expectedTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2], drankPotion: WITCH_POTIONS.DEATH }),\n ];\n\n expect(getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toStrictEqual(expectedTargets);\n });\n });\n\n describe(\"getChosenCardFromMakeGamePlayDto\", () => {\n it(\"should return undefined when chosenCardId is undefined.\", () => {\n const game = createFakeGame();\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n\n expect(getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game)).toBeUndefined();\n });\n\n it(\"should throw error when chosen card is unknown from game cards.\", () => {\n const game = createFakeGame({ additionalCards: bulkCreateFakeGameAdditionalCards(4) });\n const fakeCardId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({ chosenCardId: fakeCardId });\n\n expect(() => getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAME_ADDITIONAL_CARDS, fakeCardId.toString(), \"Game Play - Chosen card is not in the game additional cards\");\n });\n\n it(\"should return chosen card when called.\", () => {\n const game = createFakeGame({ additionalCards: bulkCreateFakeGameAdditionalCards(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({ chosenCardId: game.additionalCards?.[3]._id });\n\n expect(getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game)).toStrictEqual(game.additionalCards?.[3]);\n });\n });\n\n describe(\"createMakeGamePlayDtoWithRelations\", () => {\n it(\"should return same dto with relations when called.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4), additionalCards: bulkCreateFakeGameAdditionalCards(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: game.players[1]._id, targetId: game.players[0]._id },\n ],\n targets: [\n { playerId: game.players[0]._id, isInfected: true },\n { playerId: game.players[1]._id },\n { playerId: game.players[2]._id, drankPotion: WITCH_POTIONS.DEATH },\n ],\n chosenCardId: game.additionalCards?.[3]._id,\n doesJudgeRequestAnotherVote: true,\n chosenSide: ROLE_SIDES.WEREWOLVES,\n });\n const expectedMakeGamePlayDtoWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({\n votes: [\n { source: game.players[0], target: game.players[1] },\n { source: game.players[1], target: game.players[0] },\n ],\n targets: [\n { player: game.players[0], isInfected: true },\n { player: game.players[1] },\n { player: game.players[2], drankPotion: WITCH_POTIONS.DEATH },\n ],\n chosenCard: game.additionalCards?.[3],\n doesJudgeRequestAnotherVote: true,\n chosenSide: ROLE_SIDES.WEREWOLVES,\n });\n\n expect(createMakeGamePlayDtoWithRelations(makeGamePlayDto, game)).toStrictEqual(expectedMakeGamePlayDtoWithRelationsDto);\n });\n });\n\n describe(\"findPlayPriorityIndex\", () => {\n it(\"should return -1 when play is not found in priority list.\", () => {\n const gamePlay = createFakeGamePlaySeerLooks({ action: GAME_PLAY_ACTIONS.EAT });\n\n expect(findPlayPriorityIndex(gamePlay)).toBe(-1);\n });\n\n it(\"should return index when play is found in priority list.\", () => {\n const gamePlay = createFakeGamePlayHunterShoots();\n\n expect(findPlayPriorityIndex(gamePlay)).toBe(0);\n });\n });\n\n describe(\"areGamePlaysEqual\", () => {\n it.each<{ playA: GamePlay; playB: GamePlay; result: boolean; test: string }>([\n {\n playA: createFakeGamePlaySeerLooks(),\n playB: createFakeGamePlaySeerLooks(),\n result: true,\n test: \"both plays are equal\",\n },\n {\n playA: createFakeGamePlayWerewolvesEat(),\n playB: createFakeGamePlayWhiteWerewolfEats(),\n result: false,\n test: \"both sources are not equal\",\n },\n {\n playA: createFakeGamePlayAllVote(),\n playB: createFakeGamePlayAllElectSheriff(),\n result: false,\n test: \"both actions are not equal\",\n },\n {\n playA: createFakeGamePlayAllVote(),\n playB: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }),\n result: false,\n test: \"both causes are not equal\",\n },\n ])(\"should return $result when $test [#$#].\", ({ playA, playB, result }) => {\n expect(areGamePlaysEqual(playA, playB)).toBe(result);\n });\n });\n});" + "source": "import type { MakeGamePlayTargetWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto\";\nimport type { MakeGamePlayVoteWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto\";\nimport type { MakeGamePlayWithRelationsDto } from \"@/modules/game/dto/make-game-play/make-game-play-with-relations.dto\";\nimport { GamePlayActions, GamePlayCauses, WitchPotions } from \"@/modules/game/enums/game-play.enum\";\nimport { areGamePlaysEqual, createMakeGamePlayDtoWithRelations, findPlayPriorityIndex, getChosenCardFromMakeGamePlayDto, getTargetsWithRelationsFromMakeGamePlayDto, getVotesWithRelationsFromMakeGamePlayDto } from \"@/modules/game/helpers/game-play/game-play.helper\";\nimport type { GamePlay } from \"@/modules/game/schemas/game-play/game-play.schema\";\nimport { RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport { createFakeMakeGamePlayTargetWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayVoteWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-vote-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayWithRelationsDto } from \"@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-with-relations.dto.factory\";\nimport { createFakeMakeGamePlayDto } from \"@tests/factories/game/dto/make-game-play/make-game-play.dto.factory\";\nimport { bulkCreateFakeGameAdditionalCards } from \"@tests/factories/game/schemas/game-additional-card/game-additional-card.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote, createFakeGamePlayHunterShoots, createFakeGamePlaySeerLooks, createFakeGamePlayWerewolvesEat, createFakeGamePlayWhiteWerewolfEats } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { bulkCreateFakePlayers } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\njest.mock(\"@/shared/exception/types/resource-not-found-exception.type\");\n\ndescribe(\"Game Play Helper\", () => {\n describe(\"getVotesWithRelationsFromMakeGamePlayDto\", () => {\n it(\"should return undefined when votes are undefined.\", () => {\n const game = createFakeGame();\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n\n expect(getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toBeUndefined();\n });\n\n it(\"should throw error when votes contains one unknown source.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const fakePlayerId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: fakePlayerId, targetId: game.players[0]._id },\n ],\n });\n\n expect(() => getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.PLAYERS, fakePlayerId.toString(), \"Game Play - Player in `votes.source` is not in the game players\");\n });\n\n it(\"should throw error when votes contains one unknown target.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const fakePlayerId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: game.players[1]._id, targetId: fakePlayerId },\n ],\n });\n\n expect(() => getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.PLAYERS, fakePlayerId.toString(), \"Game Play - Player in `votes.target` is not in the game players\");\n });\n\n it(\"should fill votes with game players when called.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: game.players[1]._id, targetId: game.players[0]._id },\n ],\n });\n const votes = getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game);\n const expectedVotes = [\n createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[0], target: game.players[1] }),\n createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[1], target: game.players[0] }),\n ];\n\n expect(votes).toStrictEqual(expectedVotes);\n });\n });\n\n describe(\"getTargetsWithRelationsFromMakeGamePlayDto\", () => {\n it(\"should return undefined when targets are undefined.\", () => {\n const game = createFakeGame();\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n\n expect(getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toBeUndefined();\n });\n\n it(\"should throw error when targets contains one unknown player.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const fakePlayerId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n targets: [\n { playerId: game.players[0]._id },\n { playerId: game.players[1]._id },\n { playerId: fakePlayerId },\n ],\n });\n\n expect(() => getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.PLAYERS, fakePlayerId.toString(), \"Game Play - Player in `targets.player` is not in the game players\");\n });\n\n it(\"should fill targets with game players when called.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n targets: [\n { playerId: game.players[0]._id, isInfected: true },\n { playerId: game.players[1]._id },\n { playerId: game.players[2]._id, drankPotion: WitchPotions.DEATH },\n ],\n });\n const expectedTargets = [\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] }),\n createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2], drankPotion: WitchPotions.DEATH }),\n ];\n\n expect(getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toStrictEqual(expectedTargets);\n });\n });\n\n describe(\"getChosenCardFromMakeGamePlayDto\", () => {\n it(\"should return undefined when chosenCardId is undefined.\", () => {\n const game = createFakeGame();\n const makeGamePlayDto = createFakeMakeGamePlayDto();\n\n expect(getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game)).toBeUndefined();\n });\n\n it(\"should throw error when chosen card is unknown from game cards.\", () => {\n const game = createFakeGame({ additionalCards: bulkCreateFakeGameAdditionalCards(4) });\n const fakeCardId = createFakeObjectId();\n const makeGamePlayDto = createFakeMakeGamePlayDto({ chosenCardId: fakeCardId });\n\n expect(() => getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException);\n expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAME_ADDITIONAL_CARDS, fakeCardId.toString(), \"Game Play - Chosen card is not in the game additional cards\");\n });\n\n it(\"should return chosen card when called.\", () => {\n const game = createFakeGame({ additionalCards: bulkCreateFakeGameAdditionalCards(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({ chosenCardId: game.additionalCards?.[3]._id });\n\n expect(getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game)).toStrictEqual(game.additionalCards?.[3]);\n });\n });\n\n describe(\"createMakeGamePlayDtoWithRelations\", () => {\n it(\"should return same dto with relations when called.\", () => {\n const game = createFakeGame({ players: bulkCreateFakePlayers(4), additionalCards: bulkCreateFakeGameAdditionalCards(4) });\n const makeGamePlayDto = createFakeMakeGamePlayDto({\n votes: [\n { sourceId: game.players[0]._id, targetId: game.players[1]._id },\n { sourceId: game.players[1]._id, targetId: game.players[0]._id },\n ],\n targets: [\n { playerId: game.players[0]._id, isInfected: true },\n { playerId: game.players[1]._id },\n { playerId: game.players[2]._id, drankPotion: WitchPotions.DEATH },\n ],\n chosenCardId: game.additionalCards?.[3]._id,\n doesJudgeRequestAnotherVote: true,\n chosenSide: RoleSides.WEREWOLVES,\n });\n const expectedMakeGamePlayDtoWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({\n votes: [\n { source: game.players[0], target: game.players[1] },\n { source: game.players[1], target: game.players[0] },\n ],\n targets: [\n { player: game.players[0], isInfected: true },\n { player: game.players[1] },\n { player: game.players[2], drankPotion: WitchPotions.DEATH },\n ],\n chosenCard: game.additionalCards?.[3],\n doesJudgeRequestAnotherVote: true,\n chosenSide: RoleSides.WEREWOLVES,\n });\n\n expect(createMakeGamePlayDtoWithRelations(makeGamePlayDto, game)).toStrictEqual(expectedMakeGamePlayDtoWithRelationsDto);\n });\n });\n\n describe(\"findPlayPriorityIndex\", () => {\n it(\"should return -1 when play is not found in priority list.\", () => {\n const gamePlay = createFakeGamePlaySeerLooks({ action: GamePlayActions.EAT });\n\n expect(findPlayPriorityIndex(gamePlay)).toBe(-1);\n });\n\n it(\"should return index when play is found in priority list.\", () => {\n const gamePlay = createFakeGamePlayHunterShoots();\n\n expect(findPlayPriorityIndex(gamePlay)).toBe(0);\n });\n });\n\n describe(\"areGamePlaysEqual\", () => {\n it.each<{ playA: GamePlay; playB: GamePlay; result: boolean; test: string }>([\n {\n playA: createFakeGamePlaySeerLooks(),\n playB: createFakeGamePlaySeerLooks(),\n result: true,\n test: \"both plays are equal\",\n },\n {\n playA: createFakeGamePlayWerewolvesEat(),\n playB: createFakeGamePlayWhiteWerewolfEats(),\n result: false,\n test: \"both sources are not equal\",\n },\n {\n playA: createFakeGamePlayAllVote(),\n playB: createFakeGamePlayAllElectSheriff(),\n result: false,\n test: \"both actions are not equal\",\n },\n {\n playA: createFakeGamePlayAllVote(),\n playB: createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }),\n result: false,\n test: \"both causes are not equal\",\n },\n ])(\"should return $result when $test [#$#].\", ({ playA, playB, result }) => {\n expect(areGamePlaysEqual(playA, playB)).toBe(result);\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts": { "tests": [ { - "id": "795", + "id": "796", "name": "Player Attribute Helper isPlayerAttributeActive should return true when activation is undefined.", "location": { "start": { @@ -106200,7 +106370,7 @@ } }, { - "id": "796", + "id": "797", "name": "Player Attribute Helper isPlayerAttributeActive should return false when activation turn is not reached yet.", "location": { "start": { @@ -106210,7 +106380,7 @@ } }, { - "id": "797", + "id": "798", "name": "Player Attribute Helper isPlayerAttributeActive should return true when activation turn is reached (+1).", "location": { "start": { @@ -106220,7 +106390,7 @@ } }, { - "id": "798", + "id": "799", "name": "Player Attribute Helper isPlayerAttributeActive should return false when activation turn is same as game's turn but game's phase is NIGHT and activation phase is DAY.", "location": { "start": { @@ -106230,7 +106400,7 @@ } }, { - "id": "799", + "id": "800", "name": "Player Attribute Helper isPlayerAttributeActive should return true when activation turn is same as game's turn and phase too.", "location": { "start": { @@ -106240,7 +106410,7 @@ } }, { - "id": "800", + "id": "801", "name": "Player Attribute Helper isPlayerAttributeActive should return true when activation turn is same as game's turn, phase are different but game's phase is DAY anyway.", "location": { "start": { @@ -106250,7 +106420,7 @@ } }, { - "id": "801", + "id": "802", "name": "Player Attribute Helper getPlayerAttributeWithName should get attribute when player has this attribute.", "location": { "start": { @@ -106260,7 +106430,7 @@ } }, { - "id": "802", + "id": "803", "name": "Player Attribute Helper getPlayerAttributeWithName should return undefined when player doesn't have the attribute.", "location": { "start": { @@ -106270,7 +106440,7 @@ } }, { - "id": "803", + "id": "804", "name": "Player Attribute Helper doesPlayerHaveAttributeWithName should return false when player doesn't have any attributes.", "location": { "start": { @@ -106280,7 +106450,7 @@ } }, { - "id": "804", + "id": "805", "name": "Player Attribute Helper doesPlayerHaveAttributeWithName should return false when player doesn't have the attribute.", "location": { "start": { @@ -106290,7 +106460,7 @@ } }, { - "id": "805", + "id": "806", "name": "Player Attribute Helper doesPlayerHaveAttributeWithName should return true when player has the attribute.", "location": { "start": { @@ -106300,7 +106470,7 @@ } }, { - "id": "806", + "id": "807", "name": "Player Attribute Helper getActivePlayerAttributeWithName should return undefined when player doesn't have the attribute.", "location": { "start": { @@ -106310,7 +106480,7 @@ } }, { - "id": "807", + "id": "808", "name": "Player Attribute Helper getActivePlayerAttributeWithName should return undefined when player has the attribute but not active yet.", "location": { "start": { @@ -106320,7 +106490,7 @@ } }, { - "id": "808", + "id": "809", "name": "Player Attribute Helper getActivePlayerAttributeWithName should return the attribute when player has the attribute and is active yet.", "location": { "start": { @@ -106330,7 +106500,7 @@ } }, { - "id": "809", + "id": "810", "name": "Player Attribute Helper doesPlayerHaveActiveAttributeWithName should return false when player doesn't have the attribute.", "location": { "start": { @@ -106340,7 +106510,7 @@ } }, { - "id": "810", + "id": "811", "name": "Player Attribute Helper doesPlayerHaveActiveAttributeWithName should return false when player has the attribute but not active yet.", "location": { "start": { @@ -106350,7 +106520,7 @@ } }, { - "id": "811", + "id": "812", "name": "Player Attribute Helper doesPlayerHaveActiveAttributeWithName should return true when player has the attribute and is active yet.", "location": { "start": { @@ -106360,7 +106530,7 @@ } }, { - "id": "812", + "id": "813", "name": "Player Attribute Helper getPlayerAttributeWithNameAndSource should get attribute when player has this attribute.", "location": { "start": { @@ -106370,7 +106540,7 @@ } }, { - "id": "813", + "id": "814", "name": "Player Attribute Helper getPlayerAttributeWithNameAndSource should return undefined when player doesn't have the attribute with correct name.", "location": { "start": { @@ -106380,7 +106550,7 @@ } }, { - "id": "814", + "id": "815", "name": "Player Attribute Helper getPlayerAttributeWithNameAndSource should return undefined when player doesn't have the attribute with correct source.", "location": { "start": { @@ -106390,7 +106560,7 @@ } }, { - "id": "815", + "id": "816", "name": "Player Attribute Helper doesPlayerHaveAttributeWithNameAndSource should get attribute when player has this attribute.", "location": { "start": { @@ -106400,7 +106570,7 @@ } }, { - "id": "816", + "id": "817", "name": "Player Attribute Helper doesPlayerHaveAttributeWithNameAndSource should return undefined when player doesn't have the attribute with correct name.", "location": { "start": { @@ -106410,7 +106580,7 @@ } }, { - "id": "817", + "id": "818", "name": "Player Attribute Helper doesPlayerHaveAttributeWithNameAndSource should return undefined when player doesn't have the attribute with correct source.", "location": { "start": { @@ -106420,12 +106590,12 @@ } } ], - "source": "import { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport { doesPlayerHaveActiveAttributeWithName, doesPlayerHaveAttributeWithName, doesPlayerHaveAttributeWithNameAndSource, getActivePlayerAttributeWithName, getPlayerAttributeWithName, getPlayerAttributeWithNameAndSource, isPlayerAttributeActive } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeEatenByWerewolvesPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePlayerAttributeActivation, createFakePowerlessByAncientPlayerAttribute, createFakeSeenBySeerPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\n\ndescribe(\"Player Attribute Helper\", () => {\n describe(\"isPlayerAttributeActive\", () => {\n it(\"should return true when activation is undefined.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute();\n const game = createFakeGame();\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n\n it(\"should return false when activation turn is not reached yet.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GAME_PHASES.DAY }) });\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(false);\n });\n\n it(\"should return true when activation turn is reached (+1).\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) });\n const game = createFakeGame({ turn: 2, phase: GAME_PHASES.DAY });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n\n it(\"should return false when activation turn is same as game's turn but game's phase is NIGHT and activation phase is DAY.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) });\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.NIGHT });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(false);\n });\n\n it(\"should return true when activation turn is same as game's turn and phase too.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.NIGHT }) });\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.NIGHT });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n\n it(\"should return true when activation turn is same as game's turn, phase are different but game's phase is DAY anyway.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.NIGHT }) });\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n });\n\n describe(\"getPlayerAttributeWithName\", () => {\n it(\"should get attribute when player has this attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS)).toStrictEqual(attributes[1]);\n });\n\n it(\"should return undefined when player doesn't have the attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE)).toBeUndefined();\n });\n });\n\n describe(\"doesPlayerHaveAttributeWithName\", () => {\n it(\"should return false when player doesn't have any attributes.\", () => {\n const player = createFakePlayer({ attributes: [] });\n\n expect(doesPlayerHaveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBe(false);\n });\n\n it(\"should return false when player doesn't have the attribute.\", () => {\n const player = createFakePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] });\n\n expect(doesPlayerHaveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBe(false);\n });\n\n it(\"should return true when player has the attribute.\", () => {\n const player = createFakePlayer({ attributes: [createFakeSeenBySeerPlayerAttribute()] });\n\n expect(doesPlayerHaveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBe(true);\n });\n });\n\n describe(\"getActivePlayerAttributeWithName\", () => {\n it(\"should return undefined when player doesn't have the attribute.\", () => {\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getActivePlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBeUndefined();\n });\n\n it(\"should return undefined when player has the attribute but not active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GAME_PHASES.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getActivePlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBeUndefined();\n });\n\n it(\"should return the attribute when player has the attribute and is active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getActivePlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toStrictEqual(attributes[1]);\n });\n });\n\n describe(\"doesPlayerHaveActiveAttributeWithName\", () => {\n it(\"should return false when player doesn't have the attribute.\", () => {\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBe(false);\n });\n\n it(\"should return false when player has the attribute but not active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GAME_PHASES.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBe(false);\n });\n\n it(\"should return true when player has the attribute and is active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBe(true);\n });\n });\n\n describe(\"getPlayerAttributeWithNameAndSource\", () => {\n it(\"should get attribute when player has this attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.ANCIENT)).toStrictEqual(attributes[1]);\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct name.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, ROLE_NAMES.ANCIENT)).toBeUndefined();\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct source.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.CUPID)).toBeUndefined();\n });\n });\n\n describe(\"doesPlayerHaveAttributeWithNameAndSource\", () => {\n it(\"should get attribute when player has this attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.ANCIENT)).toBe(true);\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct name.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, ROLE_NAMES.ANCIENT)).toBe(false);\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct source.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.CUPID)).toBe(false);\n });\n });\n});" + "source": "import { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport { doesPlayerHaveActiveAttributeWithName, doesPlayerHaveAttributeWithName, doesPlayerHaveAttributeWithNameAndSource, getActivePlayerAttributeWithName, getPlayerAttributeWithName, getPlayerAttributeWithNameAndSource, isPlayerAttributeActive } from \"@/modules/game/helpers/player/player-attribute/player-attribute.helper\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeEatenByWerewolvesPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePlayerAttributeActivation, createFakePowerlessByAncientPlayerAttribute, createFakeSeenBySeerPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\n\ndescribe(\"Player Attribute Helper\", () => {\n describe(\"isPlayerAttributeActive\", () => {\n it(\"should return true when activation is undefined.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute();\n const game = createFakeGame();\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n\n it(\"should return false when activation turn is not reached yet.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GamePhases.DAY }) });\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(false);\n });\n\n it(\"should return true when activation turn is reached (+1).\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) });\n const game = createFakeGame({ turn: 2, phase: GamePhases.DAY });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n\n it(\"should return false when activation turn is same as game's turn but game's phase is NIGHT and activation phase is DAY.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) });\n const game = createFakeGame({ turn: 1, phase: GamePhases.NIGHT });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(false);\n });\n\n it(\"should return true when activation turn is same as game's turn and phase too.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.NIGHT }) });\n const game = createFakeGame({ turn: 1, phase: GamePhases.NIGHT });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n\n it(\"should return true when activation turn is same as game's turn, phase are different but game's phase is DAY anyway.\", () => {\n const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.NIGHT }) });\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n\n expect(isPlayerAttributeActive(attribute, game)).toBe(true);\n });\n });\n\n describe(\"getPlayerAttributeWithName\", () => {\n it(\"should get attribute when player has this attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithName(player, PlayerAttributeNames.POWERLESS)).toStrictEqual(attributes[1]);\n });\n\n it(\"should return undefined when player doesn't have the attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE)).toBeUndefined();\n });\n });\n\n describe(\"doesPlayerHaveAttributeWithName\", () => {\n it(\"should return false when player doesn't have any attributes.\", () => {\n const player = createFakePlayer({ attributes: [] });\n\n expect(doesPlayerHaveAttributeWithName(player, PlayerAttributeNames.SEEN)).toBe(false);\n });\n\n it(\"should return false when player doesn't have the attribute.\", () => {\n const player = createFakePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] });\n\n expect(doesPlayerHaveAttributeWithName(player, PlayerAttributeNames.SEEN)).toBe(false);\n });\n\n it(\"should return true when player has the attribute.\", () => {\n const player = createFakePlayer({ attributes: [createFakeSeenBySeerPlayerAttribute()] });\n\n expect(doesPlayerHaveAttributeWithName(player, PlayerAttributeNames.SEEN)).toBe(true);\n });\n });\n\n describe(\"getActivePlayerAttributeWithName\", () => {\n it(\"should return undefined when player doesn't have the attribute.\", () => {\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getActivePlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBeUndefined();\n });\n\n it(\"should return undefined when player has the attribute but not active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GamePhases.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getActivePlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBeUndefined();\n });\n\n it(\"should return the attribute when player has the attribute and is active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getActivePlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toStrictEqual(attributes[1]);\n });\n });\n\n describe(\"doesPlayerHaveActiveAttributeWithName\", () => {\n it(\"should return false when player doesn't have the attribute.\", () => {\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBe(false);\n });\n\n it(\"should return false when player has the attribute but not active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GamePhases.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBe(false);\n });\n\n it(\"should return true when player has the attribute and is active yet.\", () => {\n const game = createFakeGame({ turn: 1, phase: GamePhases.DAY });\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) }),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBe(true);\n });\n });\n\n describe(\"getPlayerAttributeWithNameAndSource\", () => {\n it(\"should get attribute when player has this attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.ANCIENT)).toStrictEqual(attributes[1]);\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct name.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithNameAndSource(player, PlayerAttributeNames.IN_LOVE, RoleNames.ANCIENT)).toBeUndefined();\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct source.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(getPlayerAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.CUPID)).toBeUndefined();\n });\n });\n\n describe(\"doesPlayerHaveAttributeWithNameAndSource\", () => {\n it(\"should get attribute when player has this attribute.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.ANCIENT)).toBe(true);\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct name.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveAttributeWithNameAndSource(player, PlayerAttributeNames.IN_LOVE, RoleNames.ANCIENT)).toBe(false);\n });\n\n it(\"should return undefined when player doesn't have the attribute with correct source.\", () => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakePowerlessByAncientPlayerAttribute(),\n ];\n const player = createFakePlayer({ attributes });\n\n expect(doesPlayerHaveAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.CUPID)).toBe(false);\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts": { "tests": [ { - "id": "818", + "id": "819", "name": "Player Attribute Factory createContaminatedByRustySwordKnightPlayerAttribute should create contaminated attribute by rusty sword knight when called.", "location": { "start": { @@ -106435,7 +106605,7 @@ } }, { - "id": "819", + "id": "820", "name": "Player Attribute Factory createGrowledByBearTamerPlayerAttribute should create growled attribute by bear tamer when called.", "location": { "start": { @@ -106445,7 +106615,7 @@ } }, { - "id": "820", + "id": "821", "name": "Player Attribute Factory createCharmedByPiedPiperPlayerAttribute should create charmed attribute by pied piper when called.", "location": { "start": { @@ -106455,7 +106625,7 @@ } }, { - "id": "821", + "id": "822", "name": "Player Attribute Factory createCantVoteByAllPlayerAttribute should create can't vote attribute by all when called.", "location": { "start": { @@ -106465,7 +106635,7 @@ } }, { - "id": "822", + "id": "823", "name": "Player Attribute Factory createCantVoteByScapegoatPlayerAttribute should create can't vote attribute by scapegoat active in next turn when game phase is day.", "location": { "start": { @@ -106475,7 +106645,7 @@ } }, { - "id": "823", + "id": "824", "name": "Player Attribute Factory createCantVoteByScapegoatPlayerAttribute should create can't vote attribute by scapegoat active in current turn when game phase is night.", "location": { "start": { @@ -106485,7 +106655,7 @@ } }, { - "id": "824", + "id": "825", "name": "Player Attribute Factory createPowerlessByFoxPlayerAttribute should create powerless attribute by fox when called.", "location": { "start": { @@ -106495,7 +106665,7 @@ } }, { - "id": "825", + "id": "826", "name": "Player Attribute Factory createPowerlessByAncientPlayerAttribute should create powerless attribute by ancient when called.", "location": { "start": { @@ -106505,7 +106675,7 @@ } }, { - "id": "826", + "id": "827", "name": "Player Attribute Factory createWorshipedByWildChildPlayerAttribute should create worshiped attribute by wild child when called.", "location": { "start": { @@ -106515,7 +106685,7 @@ } }, { - "id": "827", + "id": "828", "name": "Player Attribute Factory createInLoveByCupidPlayerAttribute should create in love attribute by cupid when called.", "location": { "start": { @@ -106525,7 +106695,7 @@ } }, { - "id": "828", + "id": "829", "name": "Player Attribute Factory createRavenMarkByRavenPlayerAttribute should create raven-marked attribute by raven when called.", "location": { "start": { @@ -106535,7 +106705,7 @@ } }, { - "id": "829", + "id": "830", "name": "Player Attribute Factory createProtectedByGuardPlayerAttribute should create protected attribute by guard when called.", "location": { "start": { @@ -106545,7 +106715,7 @@ } }, { - "id": "830", + "id": "831", "name": "Player Attribute Factory createDrankDeathPotionByWitchPlayerAttribute should create drank death potion attribute by witch when called.", "location": { "start": { @@ -106555,7 +106725,7 @@ } }, { - "id": "831", + "id": "832", "name": "Player Attribute Factory createDrankLifePotionByWitchPlayerAttribute should create drank life potion attribute by witch when called.", "location": { "start": { @@ -106565,7 +106735,7 @@ } }, { - "id": "832", + "id": "833", "name": "Player Attribute Factory createEatenByBigBadWolfPlayerAttribute should create eaten attribute by big bad wolf when called.", "location": { "start": { @@ -106575,7 +106745,7 @@ } }, { - "id": "833", + "id": "834", "name": "Player Attribute Factory createEatenByWhiteWerewolfPlayerAttribute should create eaten attribute by white werewolves when called.", "location": { "start": { @@ -106585,7 +106755,7 @@ } }, { - "id": "834", + "id": "835", "name": "Player Attribute Factory createEatenByWerewolvesPlayerAttribute should create eaten attribute by werewolves when called.", "location": { "start": { @@ -106595,7 +106765,7 @@ } }, { - "id": "835", + "id": "836", "name": "Player Attribute Factory createSeenBySeerPlayerAttribute should create seen attribute by seer when called.", "location": { "start": { @@ -106605,7 +106775,7 @@ } }, { - "id": "836", + "id": "837", "name": "Player Attribute Factory createSheriffBySheriffPlayerAttribute should create sheriff attribute by sheriff when called.", "location": { "start": { @@ -106615,7 +106785,7 @@ } }, { - "id": "837", + "id": "838", "name": "Player Attribute Factory createSheriffByAllPlayerAttribute should create sheriff attribute by all when called.", "location": { "start": { @@ -106625,7 +106795,7 @@ } }, { - "id": "838", + "id": "839", "name": "Player Attribute Factory createPlayerAttribute should create player attribute when called.", "location": { "start": { @@ -106635,12 +106805,12 @@ } } ], - "source": "import { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { createCantVoteByAllPlayerAttribute, createCantVoteByScapegoatPlayerAttribute, createCharmedByPiedPiperPlayerAttribute, createContaminatedByRustySwordKnightPlayerAttribute, createDrankDeathPotionByWitchPlayerAttribute, createDrankLifePotionByWitchPlayerAttribute, createEatenByBigBadWolfPlayerAttribute, createEatenByWerewolvesPlayerAttribute, createEatenByWhiteWerewolfPlayerAttribute, createGrowledByBearTamerPlayerAttribute, createInLoveByCupidPlayerAttribute, createPlayerAttribute, createPowerlessByAncientPlayerAttribute, createPowerlessByFoxPlayerAttribute, createProtectedByGuardPlayerAttribute, createRavenMarkByRavenPlayerAttribute, createSeenBySeerPlayerAttribute, createSheriffByAllPlayerAttribute, createSheriffBySheriffPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\n\ndescribe(\"Player Attribute Factory\", () => {\n describe(\"createContaminatedByRustySwordKnightPlayerAttribute\", () => {\n it(\"should create contaminated attribute by rusty sword knight when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CONTAMINATED,\n source: ROLE_NAMES.RUSTY_SWORD_KNIGHT,\n remainingPhases: 2,\n });\n \n expect(createContaminatedByRustySwordKnightPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createGrowledByBearTamerPlayerAttribute\", () => {\n it(\"should create growled attribute by bear tamer when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.GROWLED,\n source: ROLE_NAMES.BEAR_TAMER,\n remainingPhases: 1,\n });\n \n expect(createGrowledByBearTamerPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createCharmedByPiedPiperPlayerAttribute\", () => {\n it(\"should create charmed attribute by pied piper when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CHARMED,\n source: ROLE_NAMES.PIED_PIPER,\n });\n \n expect(createCharmedByPiedPiperPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createCantVoteByAllPlayerAttribute\", () => {\n it(\"should create can't vote attribute by all when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE,\n source: PLAYER_GROUPS.ALL,\n });\n \n expect(createCantVoteByAllPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createCantVoteByScapegoatPlayerAttribute\", () => {\n it(\"should create can't vote attribute by scapegoat active in next turn when game phase is day.\", () => {\n const game = createFakeGame({ turn: 2, phase: GAME_PHASES.DAY });\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE,\n source: ROLE_NAMES.SCAPEGOAT,\n remainingPhases: 1,\n activeAt: {\n turn: 3,\n phase: GAME_PHASES.DAY,\n },\n });\n \n expect(createCantVoteByScapegoatPlayerAttribute(game)).toStrictEqual(expectedAttribute);\n });\n\n it(\"should create can't vote attribute by scapegoat active in current turn when game phase is night.\", () => {\n const game = createFakeGame({ turn: 2, phase: GAME_PHASES.NIGHT });\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE,\n source: ROLE_NAMES.SCAPEGOAT,\n remainingPhases: 1,\n activeAt: {\n turn: 2,\n phase: GAME_PHASES.DAY,\n },\n });\n\n expect(createCantVoteByScapegoatPlayerAttribute(game)).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createPowerlessByFoxPlayerAttribute\", () => {\n it(\"should create powerless attribute by fox when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.POWERLESS,\n source: ROLE_NAMES.FOX,\n doesRemainAfterDeath: true,\n });\n \n expect(createPowerlessByFoxPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createPowerlessByAncientPlayerAttribute\", () => {\n it(\"should create powerless attribute by ancient when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.POWERLESS,\n source: ROLE_NAMES.ANCIENT,\n doesRemainAfterDeath: true,\n });\n \n expect(createPowerlessByAncientPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createWorshipedByWildChildPlayerAttribute\", () => {\n it(\"should create worshiped attribute by wild child when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.WORSHIPED,\n source: ROLE_NAMES.WILD_CHILD,\n });\n \n expect(createWorshipedByWildChildPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createInLoveByCupidPlayerAttribute\", () => {\n it(\"should create in love attribute by cupid when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.IN_LOVE,\n source: ROLE_NAMES.CUPID,\n });\n \n expect(createInLoveByCupidPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createRavenMarkByRavenPlayerAttribute\", () => {\n it(\"should create raven-marked attribute by raven when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.RAVEN_MARKED,\n source: ROLE_NAMES.RAVEN,\n remainingPhases: 2,\n });\n \n expect(createRavenMarkByRavenPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createProtectedByGuardPlayerAttribute\", () => {\n it(\"should create protected attribute by guard when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.PROTECTED,\n source: ROLE_NAMES.GUARD,\n remainingPhases: 1,\n });\n \n expect(createProtectedByGuardPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createDrankDeathPotionByWitchPlayerAttribute\", () => {\n it(\"should create drank death potion attribute by witch when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.DRANK_DEATH_POTION,\n source: ROLE_NAMES.WITCH,\n remainingPhases: 1,\n });\n \n expect(createDrankDeathPotionByWitchPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createDrankLifePotionByWitchPlayerAttribute\", () => {\n it(\"should create drank life potion attribute by witch when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.DRANK_LIFE_POTION,\n source: ROLE_NAMES.WITCH,\n remainingPhases: 1,\n });\n \n expect(createDrankLifePotionByWitchPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createEatenByBigBadWolfPlayerAttribute\", () => {\n it(\"should create eaten attribute by big bad wolf when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.EATEN,\n source: ROLE_NAMES.BIG_BAD_WOLF,\n remainingPhases: 1,\n });\n \n expect(createEatenByBigBadWolfPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createEatenByWhiteWerewolfPlayerAttribute\", () => {\n it(\"should create eaten attribute by white werewolves when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.EATEN,\n source: ROLE_NAMES.WHITE_WEREWOLF,\n remainingPhases: 1,\n });\n \n expect(createEatenByWhiteWerewolfPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createEatenByWerewolvesPlayerAttribute\", () => {\n it(\"should create eaten attribute by werewolves when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.EATEN,\n source: PLAYER_GROUPS.WEREWOLVES,\n remainingPhases: 1,\n });\n \n expect(createEatenByWerewolvesPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createSeenBySeerPlayerAttribute\", () => {\n it(\"should create seen attribute by seer when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.SEEN,\n source: ROLE_NAMES.SEER,\n remainingPhases: 1,\n });\n \n expect(createSeenBySeerPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createSheriffBySheriffPlayerAttribute\", () => {\n it(\"should create sheriff attribute by sheriff when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n source: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n doesRemainAfterDeath: true,\n });\n \n expect(createSheriffBySheriffPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createSheriffByAllPlayerAttribute\", () => {\n it(\"should create sheriff attribute by all when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n source: PLAYER_GROUPS.ALL,\n doesRemainAfterDeath: true,\n });\n \n expect(createSheriffByAllPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createPlayerAttribute\", () => {\n it(\"should create player attribute when called.\", () => {\n const playerAttribute: PlayerAttribute = {\n name: PLAYER_ATTRIBUTE_NAMES.GROWLED,\n source: ROLE_NAMES.BEAR_TAMER,\n };\n \n expect(createPlayerAttribute(playerAttribute)).toStrictEqual(createFakePlayerAttribute({\n name: PLAYER_ATTRIBUTE_NAMES.GROWLED,\n source: ROLE_NAMES.BEAR_TAMER,\n }));\n });\n });\n});" + "source": "import { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { PlayerAttributeNames, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { createCantVoteByAllPlayerAttribute, createCantVoteByScapegoatPlayerAttribute, createCharmedByPiedPiperPlayerAttribute, createContaminatedByRustySwordKnightPlayerAttribute, createDrankDeathPotionByWitchPlayerAttribute, createDrankLifePotionByWitchPlayerAttribute, createEatenByBigBadWolfPlayerAttribute, createEatenByWerewolvesPlayerAttribute, createEatenByWhiteWerewolfPlayerAttribute, createGrowledByBearTamerPlayerAttribute, createInLoveByCupidPlayerAttribute, createPlayerAttribute, createPowerlessByAncientPlayerAttribute, createPowerlessByFoxPlayerAttribute, createProtectedByGuardPlayerAttribute, createRavenMarkByRavenPlayerAttribute, createSeenBySeerPlayerAttribute, createSheriffByAllPlayerAttribute, createSheriffBySheriffPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from \"@/modules/game/helpers/player/player-attribute/player-attribute.factory\";\nimport type { PlayerAttribute } from \"@/modules/game/schemas/player/player-attribute/player-attribute.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\n\ndescribe(\"Player Attribute Factory\", () => {\n describe(\"createContaminatedByRustySwordKnightPlayerAttribute\", () => {\n it(\"should create contaminated attribute by rusty sword knight when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.CONTAMINATED,\n source: RoleNames.RUSTY_SWORD_KNIGHT,\n remainingPhases: 2,\n });\n \n expect(createContaminatedByRustySwordKnightPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createGrowledByBearTamerPlayerAttribute\", () => {\n it(\"should create growled attribute by bear tamer when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.GROWLED,\n source: RoleNames.BEAR_TAMER,\n remainingPhases: 1,\n });\n \n expect(createGrowledByBearTamerPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createCharmedByPiedPiperPlayerAttribute\", () => {\n it(\"should create charmed attribute by pied piper when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.CHARMED,\n source: RoleNames.PIED_PIPER,\n });\n \n expect(createCharmedByPiedPiperPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createCantVoteByAllPlayerAttribute\", () => {\n it(\"should create can't vote attribute by all when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.CANT_VOTE,\n source: PlayerGroups.ALL,\n });\n \n expect(createCantVoteByAllPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createCantVoteByScapegoatPlayerAttribute\", () => {\n it(\"should create can't vote attribute by scapegoat active in next turn when game phase is day.\", () => {\n const game = createFakeGame({ turn: 2, phase: GamePhases.DAY });\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.CANT_VOTE,\n source: RoleNames.SCAPEGOAT,\n remainingPhases: 1,\n activeAt: {\n turn: 3,\n phase: GamePhases.DAY,\n },\n });\n \n expect(createCantVoteByScapegoatPlayerAttribute(game)).toStrictEqual(expectedAttribute);\n });\n\n it(\"should create can't vote attribute by scapegoat active in current turn when game phase is night.\", () => {\n const game = createFakeGame({ turn: 2, phase: GamePhases.NIGHT });\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.CANT_VOTE,\n source: RoleNames.SCAPEGOAT,\n remainingPhases: 1,\n activeAt: {\n turn: 2,\n phase: GamePhases.DAY,\n },\n });\n\n expect(createCantVoteByScapegoatPlayerAttribute(game)).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createPowerlessByFoxPlayerAttribute\", () => {\n it(\"should create powerless attribute by fox when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.POWERLESS,\n source: RoleNames.FOX,\n doesRemainAfterDeath: true,\n });\n \n expect(createPowerlessByFoxPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createPowerlessByAncientPlayerAttribute\", () => {\n it(\"should create powerless attribute by ancient when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.POWERLESS,\n source: RoleNames.ANCIENT,\n doesRemainAfterDeath: true,\n });\n \n expect(createPowerlessByAncientPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createWorshipedByWildChildPlayerAttribute\", () => {\n it(\"should create worshiped attribute by wild child when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.WORSHIPED,\n source: RoleNames.WILD_CHILD,\n });\n \n expect(createWorshipedByWildChildPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createInLoveByCupidPlayerAttribute\", () => {\n it(\"should create in love attribute by cupid when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.IN_LOVE,\n source: RoleNames.CUPID,\n });\n \n expect(createInLoveByCupidPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createRavenMarkByRavenPlayerAttribute\", () => {\n it(\"should create raven-marked attribute by raven when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.RAVEN_MARKED,\n source: RoleNames.RAVEN,\n remainingPhases: 2,\n });\n \n expect(createRavenMarkByRavenPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createProtectedByGuardPlayerAttribute\", () => {\n it(\"should create protected attribute by guard when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.PROTECTED,\n source: RoleNames.GUARD,\n remainingPhases: 1,\n });\n \n expect(createProtectedByGuardPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createDrankDeathPotionByWitchPlayerAttribute\", () => {\n it(\"should create drank death potion attribute by witch when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.DRANK_DEATH_POTION,\n source: RoleNames.WITCH,\n remainingPhases: 1,\n });\n \n expect(createDrankDeathPotionByWitchPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createDrankLifePotionByWitchPlayerAttribute\", () => {\n it(\"should create drank life potion attribute by witch when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.DRANK_LIFE_POTION,\n source: RoleNames.WITCH,\n remainingPhases: 1,\n });\n \n expect(createDrankLifePotionByWitchPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createEatenByBigBadWolfPlayerAttribute\", () => {\n it(\"should create eaten attribute by big bad wolf when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.EATEN,\n source: RoleNames.BIG_BAD_WOLF,\n remainingPhases: 1,\n });\n \n expect(createEatenByBigBadWolfPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createEatenByWhiteWerewolfPlayerAttribute\", () => {\n it(\"should create eaten attribute by white werewolves when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.EATEN,\n source: RoleNames.WHITE_WEREWOLF,\n remainingPhases: 1,\n });\n \n expect(createEatenByWhiteWerewolfPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createEatenByWerewolvesPlayerAttribute\", () => {\n it(\"should create eaten attribute by werewolves when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.EATEN,\n source: PlayerGroups.WEREWOLVES,\n remainingPhases: 1,\n });\n \n expect(createEatenByWerewolvesPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createSeenBySeerPlayerAttribute\", () => {\n it(\"should create seen attribute by seer when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.SEEN,\n source: RoleNames.SEER,\n remainingPhases: 1,\n });\n \n expect(createSeenBySeerPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createSheriffBySheriffPlayerAttribute\", () => {\n it(\"should create sheriff attribute by sheriff when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.SHERIFF,\n source: PlayerAttributeNames.SHERIFF,\n doesRemainAfterDeath: true,\n });\n \n expect(createSheriffBySheriffPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createSheriffByAllPlayerAttribute\", () => {\n it(\"should create sheriff attribute by all when called.\", () => {\n const expectedAttribute = createFakePlayerAttribute({\n name: PlayerAttributeNames.SHERIFF,\n source: PlayerGroups.ALL,\n doesRemainAfterDeath: true,\n });\n \n expect(createSheriffByAllPlayerAttribute()).toStrictEqual(expectedAttribute);\n });\n });\n\n describe(\"createPlayerAttribute\", () => {\n it(\"should create player attribute when called.\", () => {\n const playerAttribute: PlayerAttribute = {\n name: PlayerAttributeNames.GROWLED,\n source: RoleNames.BEAR_TAMER,\n };\n \n expect(createPlayerAttribute(playerAttribute)).toStrictEqual(createFakePlayerAttribute({\n name: PlayerAttributeNames.GROWLED,\n source: RoleNames.BEAR_TAMER,\n }));\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts": { "tests": [ { - "id": "839", + "id": "840", "name": "Game Phase Service applyEndingGamePhasePlayerAttributesOutcomesToPlayers should call ending game phase method for each player when called.", "location": { "start": { @@ -106650,7 +106820,7 @@ } }, { - "id": "840", + "id": "841", "name": "Game Phase Service switchPhaseAndAppendGamePhaseUpcomingPlays should switch to night and append upcoming night plays when game's current phase is DAY.", "location": { "start": { @@ -106660,7 +106830,7 @@ } }, { - "id": "841", + "id": "842", "name": "Game Phase Service switchPhaseAndAppendGamePhaseUpcomingPlays should switch to day and append upcoming day plays when game's current phase is NIGHT.", "location": { "start": { @@ -106670,7 +106840,7 @@ } }, { - "id": "842", + "id": "843", "name": "Game Phase Service applyEndingDayPlayerAttributesOutcomesToPlayer should do nothing when player doesn't have the contaminated attribute.", "location": { "start": { @@ -106680,7 +106850,7 @@ } }, { - "id": "843", + "id": "844", "name": "Game Phase Service applyEndingDayPlayerAttributesOutcomesToPlayer should call contaminated method when player has the contaminated attribute.", "location": { "start": { @@ -106690,7 +106860,7 @@ } }, { - "id": "844", + "id": "845", "name": "Game Phase Service applyEndingNightPlayerAttributesOutcomesToPlayer should do nothing when player doesn't have any ending night attributes.", "location": { "start": { @@ -106700,7 +106870,7 @@ } }, { - "id": "845", + "id": "846", "name": "Game Phase Service applyEndingNightPlayerAttributesOutcomesToPlayer should call all attributes outcomes methods when player has every attributes.", "location": { "start": { @@ -106710,7 +106880,7 @@ } }, { - "id": "846", + "id": "847", "name": "Game Phase Service applyEndingGamePhasePlayerAttributesOutcomesToPlayer should call ending night method when game phase is night.", "location": { "start": { @@ -106720,7 +106890,7 @@ } }, { - "id": "847", + "id": "848", "name": "Game Phase Service applyEndingGamePhasePlayerAttributesOutcomesToPlayer should call ending day method when game phase is day.", "location": { "start": { @@ -106730,12 +106900,12 @@ } } ], - "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GAME_PHASES } from \"@/modules/game/enums/game.enum\";\nimport { GamePhaseService } from \"@/modules/game/providers/services/game-phase/game-phase.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\n\nimport { createFakeGamePlayAllVote, createFakeGamePlayHunterShoots, createFakeGamePlaySeerLooks, createFakeGamePlayWerewolvesEat } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeContaminatedByRustySwordKnightPlayerAttribute, createFakeDrankDeathPotionByWitchPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Game Phase Service\", () => {\n let services: { gamePhase: GamePhaseService };\n let mocks: {\n playerAttributeService: {\n applyDrankDeathPotionAttributeOutcomes: jest.SpyInstance;\n applyEatenAttributeOutcomes: jest.SpyInstance;\n applyContaminatedAttributeOutcomes: jest.SpyInstance;\n };\n gamePlayService: {\n getUpcomingNightPlays: jest.SpyInstance;\n getUpcomingDayPlays: jest.SpyInstance;\n };\n };\n\n beforeEach(async() => {\n mocks = {\n playerAttributeService: {\n applyDrankDeathPotionAttributeOutcomes: jest.fn(),\n applyEatenAttributeOutcomes: jest.fn(),\n applyContaminatedAttributeOutcomes: jest.fn(),\n },\n gamePlayService: {\n getUpcomingNightPlays: jest.fn(),\n getUpcomingDayPlays: jest.fn(),\n },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GamePhaseService,\n {\n provide: PlayerAttributeService,\n useValue: mocks.playerAttributeService,\n },\n {\n provide: GamePlayService,\n useValue: mocks.gamePlayService,\n },\n ],\n }).compile();\n\n services = { gamePhase: module.get(GamePhaseService) };\n });\n \n describe(\"applyEndingGamePhasePlayerAttributesOutcomesToPlayers\", () => {\n let localMocks: {\n gamePhaseService: {\n applyEndingGamePhasePlayerAttributesOutcomesToPlayer: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = { gamePhaseService: { applyEndingGamePhasePlayerAttributesOutcomesToPlayer: jest.spyOn(services.gamePhase as unknown as { applyEndingGamePhasePlayerAttributesOutcomesToPlayer }, \"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\").mockImplementation() } };\n });\n\n it(\"should call ending game phase method for each player when called.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ phase: GAME_PHASES.NIGHT, players });\n localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer.mockResolvedValue(game);\n await services.gamePhase.applyEndingGamePhasePlayerAttributesOutcomesToPlayers(game);\n\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(1, players[0], game);\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(2, players[1], game);\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(3, players[2], game);\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(4, players[3], game);\n });\n });\n\n describe(\"switchPhaseAndAppendGamePhaseUpcomingPlays\", () => {\n const upcomingDayPlays = [createFakeGamePlayAllVote()];\n const upcomingNightPlays = [createFakeGamePlayWerewolvesEat(), createFakeGamePlaySeerLooks()];\n\n beforeEach(() => {\n mocks.gamePlayService.getUpcomingDayPlays.mockReturnValue(upcomingDayPlays);\n mocks.gamePlayService.getUpcomingNightPlays.mockResolvedValue(upcomingNightPlays);\n });\n\n it(\"should switch to night and append upcoming night plays when game's current phase is DAY.\", async() => {\n const game = createFakeGame({ phase: GAME_PHASES.DAY, upcomingPlays: [createFakeGamePlayHunterShoots()] });\n const expectedGame = createFakeGame({\n ...game,\n phase: GAME_PHASES.NIGHT,\n turn: game.turn + 1,\n upcomingPlays: [...game.upcomingPlays, ...upcomingNightPlays],\n });\n\n await expect(services.gamePhase.switchPhaseAndAppendGamePhaseUpcomingPlays(game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should switch to day and append upcoming day plays when game's current phase is NIGHT.\", async() => {\n const game = createFakeGame({ phase: GAME_PHASES.NIGHT, upcomingPlays: [createFakeGamePlayHunterShoots()] });\n const expectedGame = createFakeGame({\n ...game,\n phase: GAME_PHASES.DAY,\n upcomingPlays: [...game.upcomingPlays, ...upcomingDayPlays],\n });\n\n await expect(services.gamePhase.switchPhaseAndAppendGamePhaseUpcomingPlays(game)).resolves.toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyEndingDayPlayerAttributesOutcomesToPlayer\", () => {\n it(\"should do nothing when player doesn't have the contaminated attribute.\", async() => {\n const player = createFakeWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] });\n const game = createFakeGame({ players: [player] });\n \n await expect(services.gamePhase[\"applyEndingDayPlayerAttributesOutcomesToPlayer\"](player, game)).resolves.toStrictEqual(game);\n expect(mocks.playerAttributeService.applyContaminatedAttributeOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call contaminated method when player has the contaminated attribute.\", async() => {\n const player = createFakeWerewolfAlivePlayer({ attributes: [createFakeContaminatedByRustySwordKnightPlayerAttribute()] });\n const game = createFakeGame({ players: [player] });\n await services.gamePhase[\"applyEndingDayPlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(mocks.playerAttributeService.applyContaminatedAttributeOutcomes).toHaveBeenCalledExactlyOnceWith(player, game);\n });\n });\n\n describe(\"applyEndingNightPlayerAttributesOutcomesToPlayer\", () => {\n it(\"should do nothing when player doesn't have any ending night attributes.\", async() => {\n const player = createFakeWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] });\n const game = createFakeGame({ players: [player] });\n\n await expect(services.gamePhase[\"applyEndingNightPlayerAttributesOutcomesToPlayer\"](player, game)).resolves.toStrictEqual(game);\n expect(mocks.playerAttributeService.applyEatenAttributeOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerAttributeService.applyDrankDeathPotionAttributeOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call all attributes outcomes methods when player has every attributes.\", async() => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeEatenByWerewolvesPlayerAttribute(),\n createFakeDrankDeathPotionByWitchPlayerAttribute(),\n ];\n const player = createFakeWerewolfAlivePlayer({ attributes });\n const game = createFakeGame({ players: [player] });\n mocks.playerAttributeService.applyEatenAttributeOutcomes.mockResolvedValue(game);\n mocks.playerAttributeService.applyDrankDeathPotionAttributeOutcomes.mockResolvedValue(game);\n await services.gamePhase[\"applyEndingNightPlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(mocks.playerAttributeService.applyEatenAttributeOutcomes).toHaveBeenCalledExactlyOnceWith(player, game, attributes[1]);\n expect(mocks.playerAttributeService.applyDrankDeathPotionAttributeOutcomes).toHaveBeenCalledExactlyOnceWith(player, game);\n });\n });\n\n describe(\"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\", () => {\n let localMocks: {\n gamePhaseService: {\n applyEndingNightPlayerAttributesOutcomesToPlayer: jest.SpyInstance;\n applyEndingDayPlayerAttributesOutcomesToPlayer: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePhaseService: {\n applyEndingNightPlayerAttributesOutcomesToPlayer: jest.spyOn(services.gamePhase as unknown as { applyEndingNightPlayerAttributesOutcomesToPlayer }, \"applyEndingNightPlayerAttributesOutcomesToPlayer\").mockImplementation(),\n applyEndingDayPlayerAttributesOutcomesToPlayer: jest.spyOn(services.gamePhase as unknown as { applyEndingDayPlayerAttributesOutcomesToPlayer }, \"applyEndingDayPlayerAttributesOutcomesToPlayer\").mockImplementation(),\n },\n };\n });\n\n it(\"should call ending night method when game phase is night.\", async() => {\n const player = createFakePlayer();\n const game = createFakeGame({ phase: GAME_PHASES.NIGHT });\n await services.gamePhase[\"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(localMocks.gamePhaseService.applyEndingNightPlayerAttributesOutcomesToPlayer).toHaveBeenCalledExactlyOnceWith(player, game);\n expect(localMocks.gamePhaseService.applyEndingDayPlayerAttributesOutcomesToPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should call ending day method when game phase is day.\", async() => {\n const player = createFakePlayer();\n const game = createFakeGame({ phase: GAME_PHASES.DAY });\n await services.gamePhase[\"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(localMocks.gamePhaseService.applyEndingDayPlayerAttributesOutcomesToPlayer).toHaveBeenCalledExactlyOnceWith(player, game);\n expect(localMocks.gamePhaseService.applyEndingNightPlayerAttributesOutcomesToPlayer).not.toHaveBeenCalled();\n });\n });\n});" + "source": "import { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GamePhases } from \"@/modules/game/enums/game.enum\";\nimport { GamePhaseService } from \"@/modules/game/providers/services/game-phase/game-phase.service\";\nimport { GamePlayService } from \"@/modules/game/providers/services/game-play/game-play.service\";\nimport { PlayerAttributeService } from \"@/modules/game/providers/services/player/player-attribute.service\";\n\nimport { createFakeGamePlayAllVote, createFakeGamePlayHunterShoots, createFakeGamePlaySeerLooks, createFakeGamePlayWerewolvesEat } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeContaminatedByRustySwordKnightPlayerAttribute, createFakeDrankDeathPotionByWitchPlayerAttribute, createFakeEatenByWerewolvesPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Game Phase Service\", () => {\n let services: { gamePhase: GamePhaseService };\n let mocks: {\n playerAttributeService: {\n applyDrankDeathPotionAttributeOutcomes: jest.SpyInstance;\n applyEatenAttributeOutcomes: jest.SpyInstance;\n applyContaminatedAttributeOutcomes: jest.SpyInstance;\n };\n gamePlayService: {\n getUpcomingNightPlays: jest.SpyInstance;\n getUpcomingDayPlays: jest.SpyInstance;\n };\n };\n\n beforeEach(async() => {\n mocks = {\n playerAttributeService: {\n applyDrankDeathPotionAttributeOutcomes: jest.fn(),\n applyEatenAttributeOutcomes: jest.fn(),\n applyContaminatedAttributeOutcomes: jest.fn(),\n },\n gamePlayService: {\n getUpcomingNightPlays: jest.fn(),\n getUpcomingDayPlays: jest.fn(),\n },\n };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GamePhaseService,\n {\n provide: PlayerAttributeService,\n useValue: mocks.playerAttributeService,\n },\n {\n provide: GamePlayService,\n useValue: mocks.gamePlayService,\n },\n ],\n }).compile();\n\n services = { gamePhase: module.get(GamePhaseService) };\n });\n \n describe(\"applyEndingGamePhasePlayerAttributesOutcomesToPlayers\", () => {\n let localMocks: {\n gamePhaseService: {\n applyEndingGamePhasePlayerAttributesOutcomesToPlayer: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = { gamePhaseService: { applyEndingGamePhasePlayerAttributesOutcomesToPlayer: jest.spyOn(services.gamePhase as unknown as { applyEndingGamePhasePlayerAttributesOutcomesToPlayer }, \"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\").mockImplementation() } };\n });\n\n it(\"should call ending game phase method for each player when called.\", async() => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ phase: GamePhases.NIGHT, players });\n localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer.mockResolvedValue(game);\n await services.gamePhase.applyEndingGamePhasePlayerAttributesOutcomesToPlayers(game);\n\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(1, players[0], game);\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(2, players[1], game);\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(3, players[2], game);\n expect(localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer).toHaveBeenNthCalledWith(4, players[3], game);\n });\n });\n\n describe(\"switchPhaseAndAppendGamePhaseUpcomingPlays\", () => {\n const upcomingDayPlays = [createFakeGamePlayAllVote()];\n const upcomingNightPlays = [createFakeGamePlayWerewolvesEat(), createFakeGamePlaySeerLooks()];\n\n beforeEach(() => {\n mocks.gamePlayService.getUpcomingDayPlays.mockReturnValue(upcomingDayPlays);\n mocks.gamePlayService.getUpcomingNightPlays.mockResolvedValue(upcomingNightPlays);\n });\n\n it(\"should switch to night and append upcoming night plays when game's current phase is DAY.\", async() => {\n const game = createFakeGame({ phase: GamePhases.DAY, upcomingPlays: [createFakeGamePlayHunterShoots()] });\n const expectedGame = createFakeGame({\n ...game,\n phase: GamePhases.NIGHT,\n turn: game.turn + 1,\n upcomingPlays: [...game.upcomingPlays, ...upcomingNightPlays],\n });\n\n await expect(services.gamePhase.switchPhaseAndAppendGamePhaseUpcomingPlays(game)).resolves.toStrictEqual(expectedGame);\n });\n\n it(\"should switch to day and append upcoming day plays when game's current phase is NIGHT.\", async() => {\n const game = createFakeGame({ phase: GamePhases.NIGHT, upcomingPlays: [createFakeGamePlayHunterShoots()] });\n const expectedGame = createFakeGame({\n ...game,\n phase: GamePhases.DAY,\n upcomingPlays: [...game.upcomingPlays, ...upcomingDayPlays],\n });\n\n await expect(services.gamePhase.switchPhaseAndAppendGamePhaseUpcomingPlays(game)).resolves.toStrictEqual(expectedGame);\n });\n });\n\n describe(\"applyEndingDayPlayerAttributesOutcomesToPlayer\", () => {\n it(\"should do nothing when player doesn't have the contaminated attribute.\", async() => {\n const player = createFakeWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] });\n const game = createFakeGame({ players: [player] });\n \n await expect(services.gamePhase[\"applyEndingDayPlayerAttributesOutcomesToPlayer\"](player, game)).resolves.toStrictEqual(game);\n expect(mocks.playerAttributeService.applyContaminatedAttributeOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call contaminated method when player has the contaminated attribute.\", async() => {\n const player = createFakeWerewolfAlivePlayer({ attributes: [createFakeContaminatedByRustySwordKnightPlayerAttribute()] });\n const game = createFakeGame({ players: [player] });\n await services.gamePhase[\"applyEndingDayPlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(mocks.playerAttributeService.applyContaminatedAttributeOutcomes).toHaveBeenCalledExactlyOnceWith(player, game);\n });\n });\n\n describe(\"applyEndingNightPlayerAttributesOutcomesToPlayer\", () => {\n it(\"should do nothing when player doesn't have any ending night attributes.\", async() => {\n const player = createFakeWerewolfAlivePlayer({ attributes: [createFakeSheriffByAllPlayerAttribute()] });\n const game = createFakeGame({ players: [player] });\n\n await expect(services.gamePhase[\"applyEndingNightPlayerAttributesOutcomesToPlayer\"](player, game)).resolves.toStrictEqual(game);\n expect(mocks.playerAttributeService.applyEatenAttributeOutcomes).not.toHaveBeenCalled();\n expect(mocks.playerAttributeService.applyDrankDeathPotionAttributeOutcomes).not.toHaveBeenCalled();\n });\n\n it(\"should call all attributes outcomes methods when player has every attributes.\", async() => {\n const attributes = [\n createFakeSheriffByAllPlayerAttribute(),\n createFakeEatenByWerewolvesPlayerAttribute(),\n createFakeDrankDeathPotionByWitchPlayerAttribute(),\n ];\n const player = createFakeWerewolfAlivePlayer({ attributes });\n const game = createFakeGame({ players: [player] });\n mocks.playerAttributeService.applyEatenAttributeOutcomes.mockResolvedValue(game);\n mocks.playerAttributeService.applyDrankDeathPotionAttributeOutcomes.mockResolvedValue(game);\n await services.gamePhase[\"applyEndingNightPlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(mocks.playerAttributeService.applyEatenAttributeOutcomes).toHaveBeenCalledExactlyOnceWith(player, game, attributes[1]);\n expect(mocks.playerAttributeService.applyDrankDeathPotionAttributeOutcomes).toHaveBeenCalledExactlyOnceWith(player, game);\n });\n });\n\n describe(\"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\", () => {\n let localMocks: {\n gamePhaseService: {\n applyEndingNightPlayerAttributesOutcomesToPlayer: jest.SpyInstance;\n applyEndingDayPlayerAttributesOutcomesToPlayer: jest.SpyInstance;\n };\n };\n\n beforeEach(() => {\n localMocks = {\n gamePhaseService: {\n applyEndingNightPlayerAttributesOutcomesToPlayer: jest.spyOn(services.gamePhase as unknown as { applyEndingNightPlayerAttributesOutcomesToPlayer }, \"applyEndingNightPlayerAttributesOutcomesToPlayer\").mockImplementation(),\n applyEndingDayPlayerAttributesOutcomesToPlayer: jest.spyOn(services.gamePhase as unknown as { applyEndingDayPlayerAttributesOutcomesToPlayer }, \"applyEndingDayPlayerAttributesOutcomesToPlayer\").mockImplementation(),\n },\n };\n });\n\n it(\"should call ending night method when game phase is night.\", async() => {\n const player = createFakePlayer();\n const game = createFakeGame({ phase: GamePhases.NIGHT });\n await services.gamePhase[\"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(localMocks.gamePhaseService.applyEndingNightPlayerAttributesOutcomesToPlayer).toHaveBeenCalledExactlyOnceWith(player, game);\n expect(localMocks.gamePhaseService.applyEndingDayPlayerAttributesOutcomesToPlayer).not.toHaveBeenCalled();\n });\n\n it(\"should call ending day method when game phase is day.\", async() => {\n const player = createFakePlayer();\n const game = createFakeGame({ phase: GamePhases.DAY });\n await services.gamePhase[\"applyEndingGamePhasePlayerAttributesOutcomesToPlayer\"](player, game);\n\n expect(localMocks.gamePhaseService.applyEndingDayPlayerAttributesOutcomesToPlayer).toHaveBeenCalledExactlyOnceWith(player, game);\n expect(localMocks.gamePhaseService.applyEndingNightPlayerAttributesOutcomesToPlayer).not.toHaveBeenCalled();\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/game.mutator.spec.ts": { "tests": [ { - "id": "848", + "id": "849", "name": "Game Mutator updatePlayerInGame should return game as is when player id is not found among players.", "location": { "start": { @@ -106745,7 +106915,7 @@ } }, { - "id": "849", + "id": "850", "name": "Game Mutator updatePlayerInGame should return game with updated player when player id found.", "location": { "start": { @@ -106755,7 +106925,7 @@ } }, { - "id": "850", + "id": "851", "name": "Game Mutator updatePlayerInGame should not mutate original game when called.", "location": { "start": { @@ -106765,7 +106935,7 @@ } }, { - "id": "851", + "id": "852", "name": "Game Mutator addPlayerAttributeInGame should return game as is when player id is not found among players.", "location": { "start": { @@ -106775,7 +106945,7 @@ } }, { - "id": "852", + "id": "853", "name": "Game Mutator addPlayerAttributeInGame should return game with player with new attribute when player is found.", "location": { "start": { @@ -106785,7 +106955,7 @@ } }, { - "id": "853", + "id": "854", "name": "Game Mutator addPlayerAttributeInGame should not mutate the original game when called.", "location": { "start": { @@ -106795,7 +106965,7 @@ } }, { - "id": "854", + "id": "855", "name": "Game Mutator addPlayersAttributeInGame should return game as is when player ids are not in the game.", "location": { "start": { @@ -106805,7 +106975,7 @@ } }, { - "id": "855", + "id": "856", "name": "Game Mutator addPlayersAttributeInGame should return game with players with new attribute when players are found.", "location": { "start": { @@ -106815,7 +106985,7 @@ } }, { - "id": "856", + "id": "857", "name": "Game Mutator addPlayersAttributeInGame should not mutate the original game when called.", "location": { "start": { @@ -106825,7 +106995,7 @@ } }, { - "id": "857", + "id": "858", "name": "Game Mutator removePlayerAttributeByNameInGame should return game as is when player is not found in game.", "location": { "start": { @@ -106835,7 +107005,7 @@ } }, { - "id": "858", + "id": "859", "name": "Game Mutator removePlayerAttributeByNameInGame should return game with player without his sheriff attribute when called.", "location": { "start": { @@ -106845,7 +107015,7 @@ } }, { - "id": "859", + "id": "860", "name": "Game Mutator removePlayerAttributeByNameInGame should not mutate the original game when called.", "location": { "start": { @@ -106855,7 +107025,7 @@ } }, { - "id": "860", + "id": "861", "name": "Game Mutator prependUpcomingPlayInGame should prepend play in upcoming plays when called.", "location": { "start": { @@ -106865,7 +107035,7 @@ } }, { - "id": "861", + "id": "862", "name": "Game Mutator prependUpcomingPlayInGame should not mutate the original game when called.", "location": { "start": { @@ -106875,7 +107045,7 @@ } }, { - "id": "862", + "id": "863", "name": "Game Mutator appendUpcomingPlayInGame should append play in upcoming plays when called.", "location": { "start": { @@ -106885,7 +107055,7 @@ } }, { - "id": "863", + "id": "864", "name": "Game Mutator appendUpcomingPlayInGame should not mutate the original game when called.", "location": { "start": { @@ -106895,12 +107065,12 @@ } } ], - "source": "import { PLAYER_ATTRIBUTE_NAMES } from \"@/modules/game/enums/player.enum\";\nimport { addPlayerAttributeInGame, addPlayersAttributeInGame, appendUpcomingPlayInGame, prependUpcomingPlayInGame, removePlayerAttributeByNameInGame, updatePlayerInGame } from \"@/modules/game/helpers/game.mutator\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { createFakeGamePlayCupidCharms, createFakeGamePlayHunterShoots } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCharmedByPiedPiperPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeSeerAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\ndescribe(\"Game Mutator\", () => {\n describe(\"updatePlayerInGame\", () => {\n it(\"should return game as is when player id is not found among players.\", () => {\n const unknownPlayerId = createFakeObjectId();\n const players = bulkCreateFakePlayers(4);\n const updatedPlayer = createFakeSeerAlivePlayer();\n const game = createFakeGame({ players });\n \n expect(updatePlayerInGame(unknownPlayerId, updatedPlayer, game)).toStrictEqual(game);\n });\n\n it(\"should return game with updated player when player id found.\", () => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const newName = \"It's a me, Mario !\";\n const updatedPlayer = createFakeSeerAlivePlayer({ ...players[2], name: newName });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(game.players[0]),\n createFakePlayer(game.players[1]),\n createFakePlayer({\n ...game.players[2],\n name: newName,\n }),\n createFakePlayer(game.players[3]),\n ],\n });\n \n expect(updatePlayerInGame(updatedPlayer._id, updatedPlayer, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate original game when called.\", () => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const newName = \"It's a me, Mario !\";\n const updatedPlayer = createFakeSeerAlivePlayer({ ...players[2], name: newName });\n const clonedGame = createFakeGame(game);\n updatePlayerInGame(updatedPlayer._id, updatedPlayer, game);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n \n describe(\"addPlayerAttributeInGame\", () => {\n it(\"should return game as is when player id is not found among players.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const unknownPlayerId = createFakeObjectId();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n \n expect(addPlayerAttributeInGame(unknownPlayerId, game, attributeToAdd)).toStrictEqual(game);\n });\n\n it(\"should return game with player with new attribute when player is found.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(game.players[0]),\n createFakePlayer(game.players[1]),\n createFakePlayer({\n ...game.players[2],\n attributes: [attributeToAdd],\n }),\n createFakePlayer(game.players[3]),\n ],\n });\n \n expect(addPlayerAttributeInGame(players[2]._id, game, attributeToAdd)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const clonedGame = createFakeGame(game);\n addPlayerAttributeInGame(players[2]._id, game, attributeToAdd);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"addPlayersAttributeInGame\", () => {\n it(\"should return game as is when player ids are not in the game.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const unknownPlayerIds = [\n createFakeObjectId(),\n createFakeObjectId(),\n createFakeObjectId(),\n ];\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n \n expect(addPlayersAttributeInGame(unknownPlayerIds, game, attributeToAdd)).toStrictEqual(game);\n });\n\n it(\"should return game with players with new attribute when players are found.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(game.players[0]),\n createFakePlayer({\n ...game.players[1],\n attributes: [attributeToAdd],\n }),\n createFakePlayer({\n ...game.players[2],\n attributes: [attributeToAdd],\n }),\n createFakePlayer(game.players[3]),\n ],\n });\n \n expect(addPlayersAttributeInGame([players[1]._id, players[2]._id], game, attributeToAdd)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const clonedGame = createFakeGame(game);\n addPlayersAttributeInGame([players[1]._id, players[2]._id], game, attributeToAdd);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"removePlayerAttributeByNameInGame\", () => {\n it(\"should return game as is when player is not found in game.\", () => {\n const game = createFakeGame();\n\n expect(removePlayerAttributeByNameInGame(createFakeObjectId(), game, PLAYER_ATTRIBUTE_NAMES.SHERIFF)).toStrictEqual(game);\n });\n\n it(\"should return game with player without his sheriff attribute when called.\", () => {\n const players = bulkCreateFakePlayers(4, [{}, { attributes: [createFakeSheriffByAllPlayerAttribute(), createFakeCharmedByPiedPiperPlayerAttribute()] }]);\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n game.players[0],\n createFakePlayer({ ...players[1], attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n game.players[2],\n game.players[3],\n ],\n });\n\n expect(removePlayerAttributeByNameInGame(game.players[1]._id, game, PLAYER_ATTRIBUTE_NAMES.SHERIFF)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const players = bulkCreateFakePlayers(4, [{}, { attributes: [createFakeSheriffByAllPlayerAttribute()] }]);\n const game = createFakeGame({ players });\n const clonedGame = createFakeGame(game);\n removePlayerAttributeByNameInGame(game.players[1]._id, game, PLAYER_ATTRIBUTE_NAMES.SHERIFF);\n\n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"prependUpcomingPlayInGame\", () => {\n it(\"should prepend play in upcoming plays when called.\", () => {\n const gamePlayToPrepend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [gamePlayToPrepend, ...game.upcomingPlays],\n });\n \n expect(prependUpcomingPlayInGame(gamePlayToPrepend, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const gamePlayToPrepend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const clonedGame = createFakeGame(game);\n prependUpcomingPlayInGame(gamePlayToPrepend, game);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"appendUpcomingPlayInGame\", () => {\n it(\"should append play in upcoming plays when called.\", () => {\n const gamePlayToAppend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [...game.upcomingPlays, gamePlayToAppend],\n });\n \n expect(appendUpcomingPlayInGame(gamePlayToAppend, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const gamePlayToAppend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const clonedGame = createFakeGame(game);\n appendUpcomingPlayInGame(gamePlayToAppend, game);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n});" + "source": "import { PlayerAttributeNames } from \"@/modules/game/enums/player.enum\";\nimport { addPlayerAttributeInGame, addPlayersAttributeInGame, appendUpcomingPlayInGame, prependUpcomingPlayInGame, removePlayerAttributeByNameInGame, updatePlayerInGame } from \"@/modules/game/helpers/game.mutator\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { createFakeGamePlayCupidCharms, createFakeGamePlayHunterShoots } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakeCharmedByPiedPiperPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakeSeerAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { bulkCreateFakePlayers, createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\ndescribe(\"Game Mutator\", () => {\n describe(\"updatePlayerInGame\", () => {\n it(\"should return game as is when player id is not found among players.\", () => {\n const unknownPlayerId = createFakeObjectId();\n const players = bulkCreateFakePlayers(4);\n const updatedPlayer = createFakeSeerAlivePlayer();\n const game = createFakeGame({ players });\n \n expect(updatePlayerInGame(unknownPlayerId, updatedPlayer, game)).toStrictEqual(game);\n });\n\n it(\"should return game with updated player when player id found.\", () => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const newName = \"It's a me, Mario !\";\n const updatedPlayer = createFakeSeerAlivePlayer({ ...players[2], name: newName });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(game.players[0]),\n createFakePlayer(game.players[1]),\n createFakePlayer({\n ...game.players[2],\n name: newName,\n }),\n createFakePlayer(game.players[3]),\n ],\n });\n \n expect(updatePlayerInGame(updatedPlayer._id, updatedPlayer, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate original game when called.\", () => {\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const newName = \"It's a me, Mario !\";\n const updatedPlayer = createFakeSeerAlivePlayer({ ...players[2], name: newName });\n const clonedGame = createFakeGame(game);\n updatePlayerInGame(updatedPlayer._id, updatedPlayer, game);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n \n describe(\"addPlayerAttributeInGame\", () => {\n it(\"should return game as is when player id is not found among players.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const unknownPlayerId = createFakeObjectId();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n \n expect(addPlayerAttributeInGame(unknownPlayerId, game, attributeToAdd)).toStrictEqual(game);\n });\n\n it(\"should return game with player with new attribute when player is found.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(game.players[0]),\n createFakePlayer(game.players[1]),\n createFakePlayer({\n ...game.players[2],\n attributes: [attributeToAdd],\n }),\n createFakePlayer(game.players[3]),\n ],\n });\n \n expect(addPlayerAttributeInGame(players[2]._id, game, attributeToAdd)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const clonedGame = createFakeGame(game);\n addPlayerAttributeInGame(players[2]._id, game, attributeToAdd);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"addPlayersAttributeInGame\", () => {\n it(\"should return game as is when player ids are not in the game.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const unknownPlayerIds = [\n createFakeObjectId(),\n createFakeObjectId(),\n createFakeObjectId(),\n ];\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n \n expect(addPlayersAttributeInGame(unknownPlayerIds, game, attributeToAdd)).toStrictEqual(game);\n });\n\n it(\"should return game with players with new attribute when players are found.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n createFakePlayer(game.players[0]),\n createFakePlayer({\n ...game.players[1],\n attributes: [attributeToAdd],\n }),\n createFakePlayer({\n ...game.players[2],\n attributes: [attributeToAdd],\n }),\n createFakePlayer(game.players[3]),\n ],\n });\n \n expect(addPlayersAttributeInGame([players[1]._id, players[2]._id], game, attributeToAdd)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const attributeToAdd = createFakeCharmedByPiedPiperPlayerAttribute();\n const players = bulkCreateFakePlayers(4);\n const game = createFakeGame({ players });\n const clonedGame = createFakeGame(game);\n addPlayersAttributeInGame([players[1]._id, players[2]._id], game, attributeToAdd);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"removePlayerAttributeByNameInGame\", () => {\n it(\"should return game as is when player is not found in game.\", () => {\n const game = createFakeGame();\n\n expect(removePlayerAttributeByNameInGame(createFakeObjectId(), game, PlayerAttributeNames.SHERIFF)).toStrictEqual(game);\n });\n\n it(\"should return game with player without his sheriff attribute when called.\", () => {\n const players = bulkCreateFakePlayers(4, [{}, { attributes: [createFakeSheriffByAllPlayerAttribute(), createFakeCharmedByPiedPiperPlayerAttribute()] }]);\n const game = createFakeGame({ players });\n const expectedGame = createFakeGame({\n ...game,\n players: [\n game.players[0],\n createFakePlayer({ ...players[1], attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }),\n game.players[2],\n game.players[3],\n ],\n });\n\n expect(removePlayerAttributeByNameInGame(game.players[1]._id, game, PlayerAttributeNames.SHERIFF)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const players = bulkCreateFakePlayers(4, [{}, { attributes: [createFakeSheriffByAllPlayerAttribute()] }]);\n const game = createFakeGame({ players });\n const clonedGame = createFakeGame(game);\n removePlayerAttributeByNameInGame(game.players[1]._id, game, PlayerAttributeNames.SHERIFF);\n\n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"prependUpcomingPlayInGame\", () => {\n it(\"should prepend play in upcoming plays when called.\", () => {\n const gamePlayToPrepend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [gamePlayToPrepend, ...game.upcomingPlays],\n });\n \n expect(prependUpcomingPlayInGame(gamePlayToPrepend, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const gamePlayToPrepend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const clonedGame = createFakeGame(game);\n prependUpcomingPlayInGame(gamePlayToPrepend, game);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n\n describe(\"appendUpcomingPlayInGame\", () => {\n it(\"should append play in upcoming plays when called.\", () => {\n const gamePlayToAppend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const expectedGame = createFakeGame({\n ...game,\n upcomingPlays: [...game.upcomingPlays, gamePlayToAppend],\n });\n \n expect(appendUpcomingPlayInGame(gamePlayToAppend, game)).toStrictEqual(expectedGame);\n });\n\n it(\"should not mutate the original game when called.\", () => {\n const gamePlayToAppend = createFakeGamePlayHunterShoots();\n const game = createFakeGame({ upcomingPlays: [createFakeGamePlayCupidCharms()] });\n const clonedGame = createFakeGame(game);\n appendUpcomingPlayInGame(gamePlayToAppend, game);\n \n expect(game).toStrictEqual(clonedGame);\n });\n });\n});" }, "tests/unit/specs/modules/game/providers/services/player/player-attribute.service.spec.ts": { "tests": [ { - "id": "864", + "id": "865", "name": "Player Attribute Service applyEatenAttributeOutcomes should call killOrRevealPlayer when called.", "location": { "start": { @@ -106910,7 +107080,7 @@ } }, { - "id": "865", + "id": "866", "name": "Player Attribute Service applyDrankDeathPotionAttributeOutcomes should call killOrRevealPlayer when called.", "location": { "start": { @@ -106920,7 +107090,7 @@ } }, { - "id": "866", + "id": "867", "name": "Player Attribute Service applyContaminatedAttributeOutcomes should call killOrRevealPlayer when called.", "location": { "start": { @@ -106930,7 +107100,7 @@ } }, { - "id": "867", + "id": "868", "name": "Player Attribute Service decreaseAttributeRemainingPhase should return attribute as is when there is no remaining phases.", "location": { "start": { @@ -106940,7 +107110,7 @@ } }, { - "id": "868", + "id": "869", "name": "Player Attribute Service decreaseAttributeRemainingPhase should return attribute as is when attribute is not active yet.", "location": { "start": { @@ -106950,7 +107120,7 @@ } }, { - "id": "869", + "id": "870", "name": "Player Attribute Service decreaseAttributeRemainingPhase should return decreased attribute when called.", "location": { "start": { @@ -106960,7 +107130,7 @@ } }, { - "id": "870", + "id": "871", "name": "Player Attribute Service decreaseRemainingPhasesAndRemoveObsoleteAttributes should return player as is when he is dead.", "location": { "start": { @@ -106970,7 +107140,7 @@ } }, { - "id": "871", + "id": "872", "name": "Player Attribute Service decreaseRemainingPhasesAndRemoveObsoleteAttributes should return player with one decreased attribute and other one removed when called.", "location": { "start": { @@ -106980,7 +107150,7 @@ } }, { - "id": "872", + "id": "873", "name": "Player Attribute Service decreaseRemainingPhasesAndRemoveObsoletePlayerAttributes should decrease and remove attributes among players when called.", "location": { "start": { @@ -106995,7 +107165,7 @@ "tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts": { "tests": [ { - "id": "873", + "id": "874", "name": "Additional Cards Presence Decorator isAdditionalCardsPresenceRespected should return false when additional cards are set but there is no thief in game.", "location": { "start": { @@ -107005,7 +107175,7 @@ } }, { - "id": "874", + "id": "875", "name": "Additional Cards Presence Decorator isAdditionalCardsPresenceRespected should return false when additional cards are not set but there is thief in game.", "location": { "start": { @@ -107015,7 +107185,7 @@ } }, { - "id": "875", + "id": "876", "name": "Additional Cards Presence Decorator isAdditionalCardsPresenceRespected should return false when additional cards are not an array.", "location": { "start": { @@ -107025,7 +107195,7 @@ } }, { - "id": "876", + "id": "877", "name": "Additional Cards Presence Decorator isAdditionalCardsPresenceRespected should return true when additional cards are set and a thief is in the game.", "location": { "start": { @@ -107035,7 +107205,7 @@ } }, { - "id": "877", + "id": "878", "name": "Additional Cards Presence Decorator isAdditionalCardsPresenceRespected should return true when additional cards are not set and there is no thief is in the game.", "location": { "start": { @@ -107045,7 +107215,7 @@ } }, { - "id": "878", + "id": "879", "name": "Additional Cards Presence Decorator getAdditionalCardsPresenceDefaultMessage should return additional cards required presence message when they are not set.", "location": { "start": { @@ -107055,7 +107225,7 @@ } }, { - "id": "879", + "id": "880", "name": "Additional Cards Presence Decorator getAdditionalCardsPresenceDefaultMessage should return additional cards forbidden presence message when they are set.", "location": { "start": { @@ -107065,12 +107235,12 @@ } } ], - "source": "import type { ValidationArguments } from \"class-validator\";\n\nimport { getAdditionalCardsPresenceDefaultMessage, isAdditionalCardsPresenceRespected } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\n\ndescribe(\"Additional Cards Presence Decorator\", () => {\n describe(\"isAdditionalCardsPresenceRespected\", () => {\n it(\"should return false when additional cards are set but there is no thief in game.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto(),\n createFakeCreateGameAdditionalCardDto(),\n ];\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.SEER } }),\n ],\n additionalCards,\n });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return false when additional cards are not set but there is thief in game.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(undefined, validationArguments)).toBe(false);\n });\n\n it(\"should return false when additional cards are not an array.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: \"coucou\",\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(\"coucou\", validationArguments)).toBe(false);\n });\n\n it(\"should return true when additional cards are set and a thief is in the game.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto(),\n createFakeCreateGameAdditionalCardDto(),\n ];\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(additionalCards, validationArguments)).toBe(true);\n });\n\n it(\"should return true when additional cards are not set and there is no thief is in the game.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.SEER } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(undefined, validationArguments)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsPresenceDefaultMessage\", () => {\n it(\"should return additional cards required presence message when they are not set.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(getAdditionalCardsPresenceDefaultMessage(validationArguments)).toBe(\"additionalCards must be set if there is a player with role `thief`\");\n });\n\n it(\"should return additional cards forbidden presence message when they are set.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto(),\n createFakeCreateGameAdditionalCardDto(),\n ];\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.SEER } }),\n ],\n additionalCards,\n });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(getAdditionalCardsPresenceDefaultMessage(validationArguments)).toBe(\"additionalCards can't be set if there is no player with role `thief`\");\n });\n });\n});" + "source": "import type { ValidationArguments } from \"class-validator\";\n\nimport { getAdditionalCardsPresenceDefaultMessage, isAdditionalCardsPresenceRespected } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\n\ndescribe(\"Additional Cards Presence Decorator\", () => {\n describe(\"isAdditionalCardsPresenceRespected\", () => {\n it(\"should return false when additional cards are set but there is no thief in game.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto(),\n createFakeCreateGameAdditionalCardDto(),\n ];\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.SEER } }),\n ],\n additionalCards,\n });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return false when additional cards are not set but there is thief in game.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(undefined, validationArguments)).toBe(false);\n });\n\n it(\"should return false when additional cards are not an array.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: \"coucou\",\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(\"coucou\", validationArguments)).toBe(false);\n });\n\n it(\"should return true when additional cards are set and a thief is in the game.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto(),\n createFakeCreateGameAdditionalCardDto(),\n ];\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(additionalCards, validationArguments)).toBe(true);\n });\n\n it(\"should return true when additional cards are not set and there is no thief is in the game.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.SEER } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsPresenceRespected(undefined, validationArguments)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsPresenceDefaultMessage\", () => {\n it(\"should return additional cards required presence message when they are not set.\", () => {\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.THIEF } }),\n ],\n });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(getAdditionalCardsPresenceDefaultMessage(validationArguments)).toBe(\"additionalCards must be set if there is a player with role `thief`\");\n });\n\n it(\"should return additional cards forbidden presence message when they are set.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto(),\n createFakeCreateGameAdditionalCardDto(),\n ];\n const createGameDto = createFakeCreateGameDto({\n players: [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.SEER } }),\n ],\n additionalCards,\n });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(getAdditionalCardsPresenceDefaultMessage(validationArguments)).toBe(\"additionalCards can't be set if there is no player with role `thief`\");\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts": { "tests": [ { - "id": "880", + "id": "881", "name": "Additional Cards Roles Max in Game Decorator areAdditionalCardsRolesMaxInGameRespected should return true when additional cards are not defined.", "location": { "start": { @@ -107080,7 +107250,7 @@ } }, { - "id": "881", + "id": "882", "name": "Additional Cards Roles Max in Game Decorator areAdditionalCardsRolesMaxInGameRespected should return false when players cards are not defined.", "location": { "start": { @@ -107090,7 +107260,7 @@ } }, { - "id": "882", + "id": "883", "name": "Additional Cards Roles Max in Game Decorator areAdditionalCardsRolesMaxInGameRespected should return false when at least one role max in game is not respected due to additional cards only.", "location": { "start": { @@ -107100,7 +107270,7 @@ } }, { - "id": "883", + "id": "884", "name": "Additional Cards Roles Max in Game Decorator areAdditionalCardsRolesMaxInGameRespected should return false when at least one role max in game is not respected due to additional cards and player roles together.", "location": { "start": { @@ -107110,7 +107280,7 @@ } }, { - "id": "884", + "id": "885", "name": "Additional Cards Roles Max in Game Decorator areAdditionalCardsRolesMaxInGameRespected should return true when at every role max in game are respected among additional cards and player roles together.", "location": { "start": { @@ -107120,7 +107290,7 @@ } }, { - "id": "885", + "id": "886", "name": "Additional Cards Roles Max in Game Decorator getAdditionalCardsRolesMaxInGameDefaultMessage should return additional cards roles max in game default message when called.", "location": { "start": { @@ -107130,12 +107300,12 @@ } } ], - "source": "import type { ValidationArguments } from \"class-validator\";\n\nimport { areAdditionalCardsRolesMaxInGameRespected, getAdditionalCardsRolesMaxInGameDefaultMessage } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\n\ndescribe(\"Additional Cards Roles Max in Game Decorator\", () => {\n describe(\"areAdditionalCardsRolesMaxInGameRespected\", () => {\n it(\"should return true when additional cards are not defined.\", () => {\n const additionalCards = undefined;\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: ROLE_NAMES.THIEF } }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(true);\n });\n\n it(\"should return false when players cards are not defined.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER_VILLAGER }),\n ];\n const game = createFakeCreateGameDto({ additionalCards }, { players: undefined });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return false when at least one role max in game is not respected due to additional cards only.\", () => {\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: ROLE_NAMES.THIEF } }),\n ];\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return false when at least one role max in game is not respected due to additional cards and player roles together.\", () => {\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.WITCH } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: ROLE_NAMES.THIEF } }),\n ];\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return true when at every role max in game are respected among additional cards and player roles together.\", () => {\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: ROLE_NAMES.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: ROLE_NAMES.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: ROLE_NAMES.WITCH } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: ROLE_NAMES.THIEF } }),\n ];\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.HUNTER }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsRolesMaxInGameDefaultMessage\", () => {\n it(\"should return additional cards roles max in game default message when called.\", () => {\n expect(getAdditionalCardsRolesMaxInGameDefaultMessage()).toBe(\"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\");\n });\n });\n});" + "source": "import type { ValidationArguments } from \"class-validator\";\n\nimport { areAdditionalCardsRolesMaxInGameRespected, getAdditionalCardsRolesMaxInGameDefaultMessage } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\n\ndescribe(\"Additional Cards Roles Max in Game Decorator\", () => {\n describe(\"areAdditionalCardsRolesMaxInGameRespected\", () => {\n it(\"should return true when additional cards are not defined.\", () => {\n const additionalCards = undefined;\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: RoleNames.THIEF } }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(true);\n });\n\n it(\"should return false when players cards are not defined.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER_VILLAGER }),\n ];\n const game = createFakeCreateGameDto({ additionalCards }, { players: undefined });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return false when at least one role max in game is not respected due to additional cards only.\", () => {\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.VILLAGER } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: RoleNames.THIEF } }),\n ];\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return false when at least one role max in game is not respected due to additional cards and player roles together.\", () => {\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.WITCH } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: RoleNames.THIEF } }),\n ];\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return true when at every role max in game are respected among additional cards and player roles together.\", () => {\n const players = [\n createFakeCreateGamePlayerDto({ name: \"Antoine\", role: { name: RoleNames.SEER } }),\n createFakeCreateGamePlayerDto({ name: \"JB\", role: { name: RoleNames.WEREWOLF } }),\n createFakeCreateGamePlayerDto({ name: \"Olivia\", role: { name: RoleNames.WITCH } }),\n createFakeCreateGamePlayerDto({ name: \"Thomas\", role: { name: RoleNames.THIEF } }),\n ];\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.HUNTER }),\n ];\n const game = createFakeCreateGameDto({ additionalCards, players });\n const validationArguments: ValidationArguments = {\n object: game,\n property: \"additionalCards\",\n targetName: \"CreateGameDto\",\n constraints: [],\n value: additionalCards,\n };\n\n expect(areAdditionalCardsRolesMaxInGameRespected(additionalCards, validationArguments)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsRolesMaxInGameDefaultMessage\", () => {\n it(\"should return additional cards roles max in game default message when called.\", () => {\n expect(getAdditionalCardsRolesMaxInGameDefaultMessage()).toBe(\"additionalCards.roleName can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\");\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/player/player-death/player-death.factory.spec.ts": { "tests": [ { - "id": "886", + "id": "887", "name": "Player Death Factory createPlayerDiseaseByRustySwordKnightDeath should create player contaminated by rusty sword knight when called.", "location": { "start": { @@ -107145,7 +107315,7 @@ } }, { - "id": "887", + "id": "888", "name": "Player Death Factory createPlayerBrokenHeartByCupidDeath should create player broken heart by cupid when called.", "location": { "start": { @@ -107155,7 +107325,7 @@ } }, { - "id": "888", + "id": "889", "name": "Player Death Factory createPlayerReconsiderPardonByAllDeath should create player reconsider pardon by all death when called.", "location": { "start": { @@ -107165,7 +107335,7 @@ } }, { - "id": "889", + "id": "890", "name": "Player Death Factory createPlayerVoteScapegoatedByAllDeath should create player vote scapegoated by all death when called.", "location": { "start": { @@ -107175,7 +107345,7 @@ } }, { - "id": "890", + "id": "891", "name": "Player Death Factory createPlayerVoteBySheriffDeath should create player vote by sheriff death when called.", "location": { "start": { @@ -107185,7 +107355,7 @@ } }, { - "id": "891", + "id": "892", "name": "Player Death Factory createPlayerVoteByAllDeath should create player vote by all death when called.", "location": { "start": { @@ -107195,7 +107365,7 @@ } }, { - "id": "892", + "id": "893", "name": "Player Death Factory createPlayerShotByHunterDeath should create player shot by hunter death when called.", "location": { "start": { @@ -107205,7 +107375,7 @@ } }, { - "id": "893", + "id": "894", "name": "Player Death Factory createPlayerEatenByWhiteWerewolfDeath should create player eaten by white werewolf death when called.", "location": { "start": { @@ -107215,7 +107385,7 @@ } }, { - "id": "894", + "id": "895", "name": "Player Death Factory createPlayerEatenByBigBadWolfDeath should create player eaten by big bad wolf death when called.", "location": { "start": { @@ -107225,7 +107395,7 @@ } }, { - "id": "895", + "id": "896", "name": "Player Death Factory createPlayerEatenByWerewolvesDeath should create player eaten by werewolves death when called.", "location": { "start": { @@ -107235,7 +107405,7 @@ } }, { - "id": "896", + "id": "897", "name": "Player Death Factory createPlayerDeathPotionByWitchDeath should create player death potion by witch death when called.", "location": { "start": { @@ -107245,7 +107415,7 @@ } }, { - "id": "897", + "id": "898", "name": "Player Death Factory createPlayerDeath should create player death when called.", "location": { "start": { @@ -107255,12 +107425,12 @@ } } ], - "source": "import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES, PLAYER_GROUPS } from \"@/modules/game/enums/player.enum\";\nimport { createPlayerBrokenHeartByCupidDeath, createPlayerDeath, createPlayerDeathPotionByWitchDeath, createPlayerDiseaseByRustySwordKnightDeath, createPlayerEatenByBigBadWolfDeath, createPlayerEatenByWerewolvesDeath, createPlayerEatenByWhiteWerewolfDeath, createPlayerReconsiderPardonByAllDeath, createPlayerShotByHunterDeath, createPlayerVoteByAllDeath, createPlayerVoteBySheriffDeath, createPlayerVoteScapegoatedByAllDeath } from \"@/modules/game/helpers/player/player-death/player-death.factory\";\nimport type { PlayerDeath } from \"@/modules/game/schemas/player/player-death.schema\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayerDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\n\ndescribe(\"Player Death Factory\", () => {\n describe(\"createPlayerDiseaseByRustySwordKnightDeath\", () => {\n it(\"should create player contaminated by rusty sword knight when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.DISEASE,\n source: ROLE_NAMES.RUSTY_SWORD_KNIGHT,\n });\n \n expect(createPlayerDiseaseByRustySwordKnightDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerBrokenHeartByCupidDeath\", () => {\n it(\"should create player broken heart by cupid when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.BROKEN_HEART,\n source: ROLE_NAMES.CUPID,\n });\n \n expect(createPlayerBrokenHeartByCupidDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerReconsiderPardonByAllDeath\", () => {\n it(\"should create player reconsider pardon by all death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.RECONSIDER_PARDON,\n source: PLAYER_GROUPS.ALL,\n });\n \n expect(createPlayerReconsiderPardonByAllDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerVoteScapegoatedByAllDeath\", () => {\n it(\"should create player vote scapegoated by all death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED,\n source: PLAYER_GROUPS.ALL,\n });\n \n expect(createPlayerVoteScapegoatedByAllDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerVoteBySheriffDeath\", () => {\n it(\"should create player vote by sheriff death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.VOTE,\n source: PLAYER_ATTRIBUTE_NAMES.SHERIFF,\n });\n \n expect(createPlayerVoteBySheriffDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerVoteByAllDeath\", () => {\n it(\"should create player vote by all death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.VOTE,\n source: PLAYER_GROUPS.ALL,\n });\n \n expect(createPlayerVoteByAllDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerShotByHunterDeath\", () => {\n it(\"should create player shot by hunter death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.SHOT,\n source: ROLE_NAMES.HUNTER,\n });\n \n expect(createPlayerShotByHunterDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerEatenByWhiteWerewolfDeath\", () => {\n it(\"should create player eaten by white werewolf death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.EATEN,\n source: ROLE_NAMES.WHITE_WEREWOLF,\n });\n \n expect(createPlayerEatenByWhiteWerewolfDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerEatenByBigBadWolfDeath\", () => {\n it(\"should create player eaten by big bad wolf death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.EATEN,\n source: ROLE_NAMES.BIG_BAD_WOLF,\n });\n \n expect(createPlayerEatenByBigBadWolfDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerEatenByWerewolvesDeath\", () => {\n it(\"should create player eaten by werewolves death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.EATEN,\n source: PLAYER_GROUPS.WEREWOLVES,\n });\n \n expect(createPlayerEatenByWerewolvesDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerDeathPotionByWitchDeath\", () => {\n it(\"should create player death potion by witch death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.DEATH_POTION,\n source: ROLE_NAMES.WITCH,\n });\n \n expect(createPlayerDeathPotionByWitchDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerDeath\", () => {\n it(\"should create player death when called.\", () => {\n const playerDeath: PlayerDeath = {\n cause: PLAYER_DEATH_CAUSES.DEATH_POTION,\n source: ROLE_NAMES.WITCH,\n };\n \n expect(createPlayerDeath(playerDeath)).toStrictEqual(createFakePlayerDeath({\n cause: PLAYER_DEATH_CAUSES.DEATH_POTION,\n source: ROLE_NAMES.WITCH,\n }));\n });\n });\n});" + "source": "import { PlayerAttributeNames, PlayerDeathCauses, PlayerGroups } from \"@/modules/game/enums/player.enum\";\nimport { createPlayerBrokenHeartByCupidDeath, createPlayerDeath, createPlayerDeathPotionByWitchDeath, createPlayerDiseaseByRustySwordKnightDeath, createPlayerEatenByBigBadWolfDeath, createPlayerEatenByWerewolvesDeath, createPlayerEatenByWhiteWerewolfDeath, createPlayerReconsiderPardonByAllDeath, createPlayerShotByHunterDeath, createPlayerVoteByAllDeath, createPlayerVoteBySheriffDeath, createPlayerVoteScapegoatedByAllDeath } from \"@/modules/game/helpers/player/player-death/player-death.factory\";\nimport type { PlayerDeath } from \"@/modules/game/schemas/player/player-death.schema\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakePlayerDeath } from \"@tests/factories/game/schemas/player/player-death/player-death.schema.factory\";\n\ndescribe(\"Player Death Factory\", () => {\n describe(\"createPlayerDiseaseByRustySwordKnightDeath\", () => {\n it(\"should create player contaminated by rusty sword knight when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.DISEASE,\n source: RoleNames.RUSTY_SWORD_KNIGHT,\n });\n \n expect(createPlayerDiseaseByRustySwordKnightDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerBrokenHeartByCupidDeath\", () => {\n it(\"should create player broken heart by cupid when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.BROKEN_HEART,\n source: RoleNames.CUPID,\n });\n \n expect(createPlayerBrokenHeartByCupidDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerReconsiderPardonByAllDeath\", () => {\n it(\"should create player reconsider pardon by all death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.RECONSIDER_PARDON,\n source: PlayerGroups.ALL,\n });\n \n expect(createPlayerReconsiderPardonByAllDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerVoteScapegoatedByAllDeath\", () => {\n it(\"should create player vote scapegoated by all death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.VOTE_SCAPEGOATED,\n source: PlayerGroups.ALL,\n });\n \n expect(createPlayerVoteScapegoatedByAllDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerVoteBySheriffDeath\", () => {\n it(\"should create player vote by sheriff death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.VOTE,\n source: PlayerAttributeNames.SHERIFF,\n });\n \n expect(createPlayerVoteBySheriffDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerVoteByAllDeath\", () => {\n it(\"should create player vote by all death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.VOTE,\n source: PlayerGroups.ALL,\n });\n \n expect(createPlayerVoteByAllDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerShotByHunterDeath\", () => {\n it(\"should create player shot by hunter death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.SHOT,\n source: RoleNames.HUNTER,\n });\n \n expect(createPlayerShotByHunterDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerEatenByWhiteWerewolfDeath\", () => {\n it(\"should create player eaten by white werewolf death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.EATEN,\n source: RoleNames.WHITE_WEREWOLF,\n });\n \n expect(createPlayerEatenByWhiteWerewolfDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerEatenByBigBadWolfDeath\", () => {\n it(\"should create player eaten by big bad wolf death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.EATEN,\n source: RoleNames.BIG_BAD_WOLF,\n });\n \n expect(createPlayerEatenByBigBadWolfDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerEatenByWerewolvesDeath\", () => {\n it(\"should create player eaten by werewolves death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.EATEN,\n source: PlayerGroups.WEREWOLVES,\n });\n \n expect(createPlayerEatenByWerewolvesDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerDeathPotionByWitchDeath\", () => {\n it(\"should create player death potion by witch death when called.\", () => {\n const expectedDeath = createFakePlayerDeath({\n cause: PlayerDeathCauses.DEATH_POTION,\n source: RoleNames.WITCH,\n });\n \n expect(createPlayerDeathPotionByWitchDeath()).toStrictEqual(expectedDeath);\n });\n });\n\n describe(\"createPlayerDeath\", () => {\n it(\"should create player death when called.\", () => {\n const playerDeath: PlayerDeath = {\n cause: PlayerDeathCauses.DEATH_POTION,\n source: RoleNames.WITCH,\n };\n \n expect(createPlayerDeath(playerDeath)).toStrictEqual(createFakePlayerDeath({\n cause: PlayerDeathCauses.DEATH_POTION,\n source: RoleNames.WITCH,\n }));\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts": { "tests": [ { - "id": "898", + "id": "899", "name": "Player Helper canPiedPiperCharm should return false when pied piper is powerless.", "location": { "start": { @@ -107270,7 +107440,7 @@ } }, { - "id": "899", + "id": "900", "name": "Player Helper canPiedPiperCharm should return false when pied piper is dead.", "location": { "start": { @@ -107280,7 +107450,7 @@ } }, { - "id": "900", + "id": "901", "name": "Player Helper canPiedPiperCharm should return false when pied piper is infected and thus is powerless.", "location": { "start": { @@ -107290,7 +107460,7 @@ } }, { - "id": "901", + "id": "902", "name": "Player Helper canPiedPiperCharm should return true when pied piper is infected but original rule is not respected.", "location": { "start": { @@ -107300,7 +107470,7 @@ } }, { - "id": "902", + "id": "903", "name": "Player Helper canPiedPiperCharm should return true when pied piper is not powerless and currently a villager.", "location": { "start": { @@ -107310,7 +107480,7 @@ } }, { - "id": "903", + "id": "904", "name": "Player Helper isPlayerAliveAndPowerful should return false when player is dead.", "location": { "start": { @@ -107320,7 +107490,7 @@ } }, { - "id": "904", + "id": "905", "name": "Player Helper isPlayerAliveAndPowerful should return false when player is powerless.", "location": { "start": { @@ -107330,7 +107500,7 @@ } }, { - "id": "905", + "id": "906", "name": "Player Helper isPlayerAliveAndPowerful should return true when player is alive and powerful.", "location": { "start": { @@ -107340,7 +107510,7 @@ } }, { - "id": "906", + "id": "907", "name": "Player Helper isPlayerOnWerewolvesSide should return false when player is on villagers side.", "location": { "start": { @@ -107350,7 +107520,7 @@ } }, { - "id": "907", + "id": "908", "name": "Player Helper isPlayerOnWerewolvesSide should return true when player is on werewolves side.", "location": { "start": { @@ -107360,7 +107530,7 @@ } }, { - "id": "908", + "id": "909", "name": "Player Helper isPlayerOnVillagersSide should return true when player is on villagers side.", "location": { "start": { @@ -107370,7 +107540,7 @@ } }, { - "id": "909", + "id": "910", "name": "Player Helper isPlayerOnVillagersSide should return false when player is on werewolves side.", "location": { "start": { @@ -107380,12 +107550,12 @@ } } ], - "source": "import { canPiedPiperCharm, isPlayerAliveAndPowerful, isPlayerOnVillagersSide, isPlayerOnWerewolvesSide } from \"@/modules/game/helpers/player/player.helper\";\nimport { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakePiedPiperGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakePowerlessByAncientPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakePiedPiperAlivePlayer, createFakeWhiteWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayer, createFakePlayerSide } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Player Helper\", () => {\n describe(\"canPiedPiperCharm\", () => {\n it(\"should return false when pied piper is powerless.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(false);\n });\n\n it(\"should return false when pied piper is dead.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ attributes: [], isAlive: false });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(false);\n });\n\n it(\"should return false when pied piper is infected and thus is powerless.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(false);\n });\n\n it(\"should return true when pied piper is infected but original rule is not respected.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(true);\n });\n\n it(\"should return true when pied piper is not powerless and currently a villager.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.VILLAGERS }) });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(true);\n });\n });\n\n describe(\"isPlayerAliveAndPowerful\", () => {\n it(\"should return false when player is dead.\", () => {\n const game = createFakeGame();\n const player = createFakePlayer({ isAlive: false, attributes: [] });\n\n expect(isPlayerAliveAndPowerful(player, game)).toBe(false);\n });\n\n it(\"should return false when player is powerless.\", () => {\n const game = createFakeGame();\n const player = createFakePlayer({ isAlive: true, attributes: [createFakePowerlessByAncientPlayerAttribute()] });\n\n expect(isPlayerAliveAndPowerful(player, game)).toBe(false);\n });\n\n it(\"should return true when player is alive and powerful.\", () => {\n const game = createFakeGame();\n const player = createFakePlayer({ isAlive: true, attributes: [] });\n \n expect(isPlayerAliveAndPowerful(player, game)).toBe(true);\n });\n });\n\n describe(\"isPlayerOnWerewolvesSide\", () => {\n it(\"should return false when player is on villagers side.\", () => {\n expect(isPlayerOnWerewolvesSide(createFakePiedPiperAlivePlayer())).toBe(false);\n });\n\n it(\"should return true when player is on werewolves side.\", () => {\n expect(isPlayerOnWerewolvesSide(createFakeWhiteWerewolfAlivePlayer())).toBe(true);\n });\n });\n\n describe(\"isPlayerOnVillagersSide\", () => {\n it(\"should return true when player is on villagers side.\", () => {\n expect(isPlayerOnVillagersSide(createFakePiedPiperAlivePlayer())).toBe(true);\n });\n\n it(\"should return false when player is on werewolves side.\", () => {\n expect(isPlayerOnVillagersSide(createFakeWhiteWerewolfAlivePlayer())).toBe(false);\n });\n });\n});" + "source": "import { canPiedPiperCharm, isPlayerAliveAndPowerful, isPlayerOnVillagersSide, isPlayerOnWerewolvesSide } from \"@/modules/game/helpers/player/player.helper\";\nimport { RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakePiedPiperGameOptions, createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakePowerlessByAncientPlayerAttribute } from \"@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory\";\nimport { createFakePiedPiperAlivePlayer, createFakeWhiteWerewolfAlivePlayer } from \"@tests/factories/game/schemas/player/player-with-role.schema.factory\";\nimport { createFakePlayer, createFakePlayerSide } from \"@tests/factories/game/schemas/player/player.schema.factory\";\n\ndescribe(\"Player Helper\", () => {\n describe(\"canPiedPiperCharm\", () => {\n it(\"should return false when pied piper is powerless.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(false);\n });\n\n it(\"should return false when pied piper is dead.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ attributes: [], isAlive: false });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(false);\n });\n\n it(\"should return false when pied piper is infected and thus is powerless.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(false);\n });\n\n it(\"should return true when pied piper is infected but original rule is not respected.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(true);\n });\n\n it(\"should return true when pied piper is not powerless and currently a villager.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) });\n const game = createFakeGame({ options });\n const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.VILLAGERS }) });\n \n expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(true);\n });\n });\n\n describe(\"isPlayerAliveAndPowerful\", () => {\n it(\"should return false when player is dead.\", () => {\n const game = createFakeGame();\n const player = createFakePlayer({ isAlive: false, attributes: [] });\n\n expect(isPlayerAliveAndPowerful(player, game)).toBe(false);\n });\n\n it(\"should return false when player is powerless.\", () => {\n const game = createFakeGame();\n const player = createFakePlayer({ isAlive: true, attributes: [createFakePowerlessByAncientPlayerAttribute()] });\n\n expect(isPlayerAliveAndPowerful(player, game)).toBe(false);\n });\n\n it(\"should return true when player is alive and powerful.\", () => {\n const game = createFakeGame();\n const player = createFakePlayer({ isAlive: true, attributes: [] });\n \n expect(isPlayerAliveAndPowerful(player, game)).toBe(true);\n });\n });\n\n describe(\"isPlayerOnWerewolvesSide\", () => {\n it(\"should return false when player is on villagers side.\", () => {\n expect(isPlayerOnWerewolvesSide(createFakePiedPiperAlivePlayer())).toBe(false);\n });\n\n it(\"should return true when player is on werewolves side.\", () => {\n expect(isPlayerOnWerewolvesSide(createFakeWhiteWerewolfAlivePlayer())).toBe(true);\n });\n });\n\n describe(\"isPlayerOnVillagersSide\", () => {\n it(\"should return true when player is on villagers side.\", () => {\n expect(isPlayerOnVillagersSide(createFakePiedPiperAlivePlayer())).toBe(true);\n });\n\n it(\"should return false when player is on werewolves side.\", () => {\n expect(isPlayerOnVillagersSide(createFakeWhiteWerewolfAlivePlayer())).toBe(false);\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator.spec.ts": { "tests": [ { - "id": "910", + "id": "911", "name": "Additional Cards For Thief Size Decorator isAdditionalCardsForThiefSizeRespected should return true when cards are not defined.", "location": { "start": { @@ -107395,7 +107565,7 @@ } }, { - "id": "911", + "id": "912", "name": "Additional Cards For Thief Size Decorator isAdditionalCardsForThiefSizeRespected should return false when cards are not an array.", "location": { "start": { @@ -107405,7 +107575,7 @@ } }, { - "id": "912", + "id": "913", "name": "Additional Cards For Thief Size Decorator isAdditionalCardsForThiefSizeRespected should return false when cards size doesn't respect the options.", "location": { "start": { @@ -107415,7 +107585,7 @@ } }, { - "id": "913", + "id": "914", "name": "Additional Cards For Thief Size Decorator isAdditionalCardsForThiefSizeRespected should return true when cards size doesn't respect the options.", "location": { "start": { @@ -107425,7 +107595,7 @@ } }, { - "id": "914", + "id": "915", "name": "Additional Cards For Thief Size Decorator getAdditionalCardsForThiefSizeDefaultMessage should default decorator message when called.", "location": { "start": { @@ -107435,12 +107605,12 @@ } } ], - "source": "import type { ValidationArguments } from \"class-validator\";\n\nimport { getAdditionalCardsForThiefSizeDefaultMessage, isAdditionalCardsForThiefSizeRespected } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeCreateThiefGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\n\ndescribe(\"Additional Cards For Thief Size Decorator\", () => {\n describe(\"isAdditionalCardsForThiefSizeRespected\", () => {\n it(\"should return true when cards are not defined.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const createGameDto = createFakeCreateGameDto({ options });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(undefined, validationArguments)).toBe(true);\n });\n\n it(\"should return false when cards are not an array.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const createGameDto = createFakeCreateGameDto({ options });\n const validationArguments: ValidationArguments = {\n value: null,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(null, validationArguments)).toBe(false);\n });\n \n it(\"should return false when cards size doesn't respect the options.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }),\n ];\n const createGameDto = createFakeCreateGameDto({ options, additionalCards });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return true when cards size doesn't respect the options.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }),\n ];\n const createGameDto = createFakeCreateGameDto({ options, additionalCards });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(additionalCards, validationArguments)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsForThiefSizeDefaultMessage\", () => {\n it(\"should default decorator message when called.\", () => {\n expect(getAdditionalCardsForThiefSizeDefaultMessage()).toBe(\"additionalCards length must be equal to options.roles.thief.additionalCardsCount\");\n });\n });\n});" + "source": "import type { ValidationArguments } from \"class-validator\";\n\nimport { getAdditionalCardsForThiefSizeDefaultMessage, isAdditionalCardsForThiefSizeRespected } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\nimport { createFakeCreateThiefGameOptionsDto } from \"@tests/factories/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.factory\";\nimport { createFakeCreateGameDto } from \"@tests/factories/game/dto/create-game/create-game.dto.factory\";\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeRolesGameOptions } from \"@tests/factories/game/schemas/game-options/game-roles-options.schema.factory\";\n\ndescribe(\"Additional Cards For Thief Size Decorator\", () => {\n describe(\"isAdditionalCardsForThiefSizeRespected\", () => {\n it(\"should return true when cards are not defined.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const createGameDto = createFakeCreateGameDto({ options });\n const validationArguments: ValidationArguments = {\n value: undefined,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(undefined, validationArguments)).toBe(true);\n });\n\n it(\"should return false when cards are not an array.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const createGameDto = createFakeCreateGameDto({ options });\n const validationArguments: ValidationArguments = {\n value: null,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(null, validationArguments)).toBe(false);\n });\n \n it(\"should return false when cards size doesn't respect the options.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }),\n ];\n const createGameDto = createFakeCreateGameDto({ options, additionalCards });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(additionalCards, validationArguments)).toBe(false);\n });\n\n it(\"should return true when cards size doesn't respect the options.\", () => {\n const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) });\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }),\n ];\n const createGameDto = createFakeCreateGameDto({ options, additionalCards });\n const validationArguments: ValidationArguments = {\n value: additionalCards,\n object: createGameDto,\n constraints: [],\n targetName: \"\",\n property: \"additionalCards\",\n };\n\n expect(isAdditionalCardsForThiefSizeRespected(additionalCards, validationArguments)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsForThiefSizeDefaultMessage\", () => {\n it(\"should default decorator message when called.\", () => {\n expect(getAdditionalCardsForThiefSizeDefaultMessage()).toBe(\"additionalCards length must be equal to options.roles.thief.additionalCardsCount\");\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts": { "tests": [ { - "id": "915", + "id": "916", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return false when players are undefined.", "location": { "start": { @@ -107450,7 +107620,7 @@ } }, { - "id": "916", + "id": "917", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return false when players are not an array.", "location": { "start": { @@ -107460,7 +107630,7 @@ } }, { - "id": "917", + "id": "918", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return false when one of the players is not an object.", "location": { "start": { @@ -107470,7 +107640,7 @@ } }, { - "id": "918", + "id": "919", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return true when there is no position set in composition.", "location": { "start": { @@ -107480,7 +107650,7 @@ } }, { - "id": "919", + "id": "920", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return false when there is one position set in composition but not the others.", "location": { "start": { @@ -107490,7 +107660,7 @@ } }, { - "id": "920", + "id": "921", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return false when there is twice the same position in composition.", "location": { "start": { @@ -107500,7 +107670,7 @@ } }, { - "id": "921", + "id": "922", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return false when positions sequence starts at 1.", "location": { "start": { @@ -107510,7 +107680,7 @@ } }, { - "id": "922", + "id": "923", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return false when there is one too high position in composition.", "location": { "start": { @@ -107520,7 +107690,7 @@ } }, { - "id": "923", + "id": "924", "name": "Composition Positions Consistency Decorator doesCompositionHaveConsistentPositions should return true when all positions are sequence in composition.", "location": { "start": { @@ -107530,7 +107700,7 @@ } }, { - "id": "924", + "id": "925", "name": "Composition Positions Consistency Decorator getCompositionPositionsConsistencyDefaultMessage should return default message when called.", "location": { "start": { @@ -107540,12 +107710,12 @@ } } ], - "source": "import {\n doesCompositionHaveConsistentPositions,\n getCompositionPositionsConsistencyDefaultMessage,\n} from \"@/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Positions Consistency Decorator\", () => {\n describe(\"doesCompositionHaveConsistentPositions\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(doesCompositionHaveConsistentPositions(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(doesCompositionHaveConsistentPositions(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveConsistentPositions([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return true when there is no position set in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(true);\n });\n\n it(\"should return false when there is one position set in composition but not the others.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER }, position: 0 },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return false when there is twice the same position in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER }, position: 0 },\n { role: { name: ROLE_NAMES.WITCH }, position: 1 },\n { role: { name: ROLE_NAMES.SEER }, position: 3 },\n { role: { name: ROLE_NAMES.WEREWOLF }, position: 3 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return false when positions sequence starts at 1.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER }, position: 1 },\n { role: { name: ROLE_NAMES.WITCH }, position: 2 },\n { role: { name: ROLE_NAMES.SEER }, position: 3 },\n { role: { name: ROLE_NAMES.WEREWOLF }, position: 4 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return false when there is one too high position in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER }, position: 0 },\n { role: { name: ROLE_NAMES.WITCH }, position: 1 },\n { role: { name: ROLE_NAMES.SEER }, position: 2 },\n { role: { name: ROLE_NAMES.WEREWOLF }, position: 666 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return true when all positions are sequence in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER }, position: 0 },\n { role: { name: ROLE_NAMES.WITCH }, position: 1 },\n { role: { name: ROLE_NAMES.SEER }, position: 2 },\n { role: { name: ROLE_NAMES.WEREWOLF }, position: 3 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(true);\n });\n });\n\n describe(\"getCompositionPositionsConsistencyDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionPositionsConsistencyDefaultMessage()).toBe(\"players.position must be all set or all undefined. Please check that every player has unique position, from 0 to players.length - 1\");\n });\n });\n});" + "source": "import {\n doesCompositionHaveConsistentPositions,\n getCompositionPositionsConsistencyDefaultMessage,\n} from \"@/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Positions Consistency Decorator\", () => {\n describe(\"doesCompositionHaveConsistentPositions\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(doesCompositionHaveConsistentPositions(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(doesCompositionHaveConsistentPositions(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveConsistentPositions([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return true when there is no position set in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(true);\n });\n\n it(\"should return false when there is one position set in composition but not the others.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER }, position: 0 },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return false when there is twice the same position in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER }, position: 0 },\n { role: { name: RoleNames.WITCH }, position: 1 },\n { role: { name: RoleNames.SEER }, position: 3 },\n { role: { name: RoleNames.WEREWOLF }, position: 3 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return false when positions sequence starts at 1.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER }, position: 1 },\n { role: { name: RoleNames.WITCH }, position: 2 },\n { role: { name: RoleNames.SEER }, position: 3 },\n { role: { name: RoleNames.WEREWOLF }, position: 4 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return false when there is one too high position in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER }, position: 0 },\n { role: { name: RoleNames.WITCH }, position: 1 },\n { role: { name: RoleNames.SEER }, position: 2 },\n { role: { name: RoleNames.WEREWOLF }, position: 666 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(false);\n });\n\n it(\"should return true when all positions are sequence in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER }, position: 0 },\n { role: { name: RoleNames.WITCH }, position: 1 },\n { role: { name: RoleNames.SEER }, position: 2 },\n { role: { name: RoleNames.WEREWOLF }, position: 3 },\n ]);\n\n expect(doesCompositionHaveConsistentPositions(players)).toBe(true);\n });\n });\n\n describe(\"getCompositionPositionsConsistencyDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionPositionsConsistencyDefaultMessage()).toBe(\"players.position must be all set or all undefined. Please check that every player has unique position, from 0 to players.length - 1\");\n });\n });\n});" }, "tests/unit/specs/server/server.spec.ts": { "tests": [ { - "id": "925", + "id": "926", "name": "Server bootstrap should create FastifyAdapter with default fastify server options when called.", "location": { "start": { @@ -107555,7 +107725,7 @@ } }, { - "id": "926", + "id": "927", "name": "Server bootstrap should call listen with the default port when no port is provided.", "location": { "start": { @@ -107565,7 +107735,7 @@ } }, { - "id": "927", + "id": "928", "name": "Server bootstrap should call listen with 4000 when port 4000 is provided.", "location": { "start": { @@ -107575,7 +107745,7 @@ } }, { - "id": "928", + "id": "929", "name": "Server bootstrap should add validation pipe with transform when Validation Pipe constructor is called.", "location": { "start": { @@ -107585,7 +107755,7 @@ } }, { - "id": "929", + "id": "930", "name": "Server bootstrap should serve public directory when called.", "location": { "start": { @@ -107595,7 +107765,7 @@ } }, { - "id": "930", + "id": "931", "name": "Server bootstrap should print server and docs address with specific port when port is provided.", "location": { "start": { @@ -107605,12 +107775,12 @@ } } ], - "source": "import * as NestCommon from \"@nestjs/common\";\nimport { NestFactory } from \"@nestjs/core\";\nimport { FastifyAdapter } from \"@nestjs/platform-fastify\";\nimport type { INestApplication } from \"@nestjs/common\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { fastifyServerDefaultOptions } from \"@/server/constants/server.constant\";\nimport { bootstrap } from \"@/server/server\";\n\njest.mock(\"@nestjs/common\", () => {\n const original = jest.requireActual(\"@nestjs/common\");\n return {\n ...original,\n ValidationPipe: jest.fn(),\n };\n});\njest.mock(\"@nestjs/core\");\njest.mock(\"@nestjs/platform-fastify\");\njest.mock(\"@/server/swagger/swagger\");\n\ndescribe(\"Server\", () => {\n describe(\"bootstrap\", () => {\n let mocks: {\n NestFactory: {\n create: {\n implementation: jest.SpyInstance;\n resolvedValue: {\n listen: jest.SpyInstance;\n getUrl: jest.SpyInstance;\n useGlobalPipes: jest.SpyInstance;\n useStaticAssets: jest.SpyInstance;\n close: jest.SpyInstance;\n };\n };\n };\n NestCommonLogger: { log: jest.SpyInstance };\n };\n \n let app: NestFastifyApplication;\n\n beforeEach(() => {\n const NestFactoryCreateMockResolvedValue = {\n listen: jest.fn(),\n getUrl: jest.fn().mockReturnValue(\"http://127.0.0.1:3000\"),\n useGlobalPipes: jest.fn(),\n useStaticAssets: jest.fn(),\n close: jest.fn(),\n };\n mocks = {\n NestFactory: {\n create: {\n implementation: jest.spyOn(NestFactory, \"create\").mockResolvedValue(NestFactoryCreateMockResolvedValue as unknown as INestApplication),\n resolvedValue: NestFactoryCreateMockResolvedValue,\n },\n },\n NestCommonLogger: { log: jest.spyOn(NestCommon.Logger, \"log\").mockImplementation() },\n };\n });\n\n afterEach(async() => {\n await app.close();\n });\n\n it(\"should create FastifyAdapter with default fastify server options when called.\", async() => {\n app = await bootstrap();\n \n expect(FastifyAdapter).toHaveBeenCalledExactlyOnceWith(fastifyServerDefaultOptions);\n });\n\n it(\"should call listen with the default port when no port is provided.\", async() => {\n app = await bootstrap();\n \n expect(mocks.NestFactory.create.resolvedValue.listen).toHaveBeenCalledExactlyOnceWith(3000, \"127.0.0.1\");\n });\n\n it(\"should call listen with 4000 when port 4000 is provided.\", async() => {\n app = await bootstrap(4000);\n \n expect(mocks.NestFactory.create.resolvedValue.listen).toHaveBeenCalledExactlyOnceWith(4000, \"127.0.0.1\");\n });\n\n it(\"should add validation pipe with transform when Validation Pipe constructor is called.\", async() => {\n app = await bootstrap();\n \n expect(NestCommon.ValidationPipe).toHaveBeenCalledExactlyOnceWith({\n transform: true,\n whitelist: true,\n transformOptions: {\n exposeDefaultValues: true,\n exposeUnsetFields: false,\n },\n });\n });\n\n it(\"should serve public directory when called.\", async() => {\n app = await bootstrap();\n \n expect(mocks.NestFactory.create.resolvedValue.useStaticAssets).toHaveBeenCalledExactlyOnceWith({\n root: `${process.cwd()}/public`,\n prefix: \"/public/\",\n });\n });\n\n it(\"should print server and docs address with specific port when port is provided.\", async() => {\n const port = 4500;\n mocks.NestFactory.create.resolvedValue.getUrl.mockReturnValue(`http://127.0.0.1:${port}`);\n app = await bootstrap(port);\n \n expect(mocks.NestCommonLogger.log).toHaveBeenCalledWith(\"🐺 App is available at http://127.0.0.1:4500\", \"NestApplication\");\n expect(mocks.NestCommonLogger.log).toHaveBeenCalledWith(\"📖 API Documentation is available at http://127.0.0.1:4500/docs\", \"NestApplication\");\n });\n });\n});" + "source": "import * as NestCommon from \"@nestjs/common\";\nimport { NestFactory } from \"@nestjs/core\";\nimport { FastifyAdapter } from \"@nestjs/platform-fastify\";\nimport type { INestApplication } from \"@nestjs/common\";\nimport type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { FASTIFY_SERVER_DEFAULT_OPTIONS } from \"@/server/constants/server.constant\";\nimport { bootstrap } from \"@/server/server\";\n\njest.mock(\"@nestjs/common\", () => {\n const original = jest.requireActual(\"@nestjs/common\");\n return {\n ...original,\n ValidationPipe: jest.fn(),\n };\n});\njest.mock(\"@nestjs/core\");\njest.mock(\"@nestjs/platform-fastify\");\njest.mock(\"@/server/swagger/swagger\");\n\ndescribe(\"Server\", () => {\n describe(\"bootstrap\", () => {\n let mocks: {\n NestFactory: {\n create: {\n implementation: jest.SpyInstance;\n resolvedValue: {\n listen: jest.SpyInstance;\n getUrl: jest.SpyInstance;\n useGlobalPipes: jest.SpyInstance;\n useStaticAssets: jest.SpyInstance;\n close: jest.SpyInstance;\n };\n };\n };\n NestCommonLogger: { log: jest.SpyInstance };\n };\n \n let app: NestFastifyApplication;\n\n beforeEach(() => {\n const NestFactoryCreateMockResolvedValue = {\n listen: jest.fn(),\n getUrl: jest.fn().mockReturnValue(\"http://127.0.0.1:3000\"),\n useGlobalPipes: jest.fn(),\n useStaticAssets: jest.fn(),\n close: jest.fn(),\n };\n mocks = {\n NestFactory: {\n create: {\n implementation: jest.spyOn(NestFactory, \"create\").mockResolvedValue(NestFactoryCreateMockResolvedValue as unknown as INestApplication),\n resolvedValue: NestFactoryCreateMockResolvedValue,\n },\n },\n NestCommonLogger: { log: jest.spyOn(NestCommon.Logger, \"log\").mockImplementation() },\n };\n });\n\n afterEach(async() => {\n await app.close();\n });\n\n it(\"should create FastifyAdapter with default fastify server options when called.\", async() => {\n app = await bootstrap();\n \n expect(FastifyAdapter).toHaveBeenCalledExactlyOnceWith(FASTIFY_SERVER_DEFAULT_OPTIONS);\n });\n\n it(\"should call listen with the default port when no port is provided.\", async() => {\n app = await bootstrap();\n \n expect(mocks.NestFactory.create.resolvedValue.listen).toHaveBeenCalledExactlyOnceWith(3000, \"127.0.0.1\");\n });\n\n it(\"should call listen with 4000 when port 4000 is provided.\", async() => {\n app = await bootstrap(4000);\n \n expect(mocks.NestFactory.create.resolvedValue.listen).toHaveBeenCalledExactlyOnceWith(4000, \"127.0.0.1\");\n });\n\n it(\"should add validation pipe with transform when Validation Pipe constructor is called.\", async() => {\n app = await bootstrap();\n \n expect(NestCommon.ValidationPipe).toHaveBeenCalledExactlyOnceWith({\n transform: true,\n whitelist: true,\n transformOptions: {\n exposeDefaultValues: true,\n exposeUnsetFields: false,\n },\n });\n });\n\n it(\"should serve public directory when called.\", async() => {\n app = await bootstrap();\n \n expect(mocks.NestFactory.create.resolvedValue.useStaticAssets).toHaveBeenCalledExactlyOnceWith({\n root: `${process.cwd()}/public`,\n prefix: \"/public/\",\n });\n });\n\n it(\"should print server and docs address with specific port when port is provided.\", async() => {\n const port = 4500;\n mocks.NestFactory.create.resolvedValue.getUrl.mockReturnValue(`http://127.0.0.1:${port}`);\n app = await bootstrap(port);\n \n expect(mocks.NestCommonLogger.log).toHaveBeenCalledWith(\"🐺 App is available at http://127.0.0.1:4500\", \"NestApplication\");\n expect(mocks.NestCommonLogger.log).toHaveBeenCalledWith(\"📖 API Documentation is available at http://127.0.0.1:4500/docs\", \"NestApplication\");\n });\n });\n});" }, "tests/unit/specs/server/swagger/swagger.spec.ts": { "tests": [ { - "id": "931", + "id": "932", "name": "Server Swagger createSwaggerDocument should call document builder methods when function is called with known version.", "location": { "start": { @@ -107620,7 +107790,7 @@ } }, { - "id": "932", + "id": "933", "name": "Server Swagger createSwaggerDocument should call document builder methods when function is called with unknown version.", "location": { "start": { @@ -107630,7 +107800,7 @@ } }, { - "id": "933", + "id": "934", "name": "Server Swagger createSwaggerDocument should call createDocument and setup functions when function is called.", "location": { "start": { @@ -107645,7 +107815,7 @@ "tests/unit/specs/shared/exception/helpers/unexpected-exception.factory.spec.ts": { "tests": [ { - "id": "934", + "id": "935", "name": "Unexpected Exception Factory createCantFindPlayerUnexpectedException should create player is dead unexpected exception when called.", "location": { "start": { @@ -107655,7 +107825,7 @@ } }, { - "id": "935", + "id": "936", "name": "Unexpected Exception Factory createPlayerIsDeadUnexpectedException should create player is dead unexpected exception when called.", "location": { "start": { @@ -107665,7 +107835,7 @@ } }, { - "id": "936", + "id": "937", "name": "Unexpected Exception Factory createCantGenerateGamePlaysUnexpectedException should create can't generate game plays unexpected exception when called.", "location": { "start": { @@ -107675,7 +107845,7 @@ } }, { - "id": "937", + "id": "938", "name": "Unexpected Exception Factory createNoCurrentGamePlayUnexpectedException should create no current game play unexpected exception when called.", "location": { "start": { @@ -107685,7 +107855,7 @@ } }, { - "id": "938", + "id": "939", "name": "Unexpected Exception Factory createNoGamePlayPriorityUnexpectedException should create no game play priority unexpected exception when called.", "location": { "start": { @@ -107700,7 +107870,7 @@ "tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts": { "tests": [ { - "id": "939", + "id": "940", "name": "Composition Roles Min In Game Decorator areCompositionRolesMinInGameRespected should return false when players are undefined.", "location": { "start": { @@ -107710,7 +107880,7 @@ } }, { - "id": "940", + "id": "941", "name": "Composition Roles Min In Game Decorator areCompositionRolesMinInGameRespected should return false when players are not an array.", "location": { "start": { @@ -107720,7 +107890,7 @@ } }, { - "id": "941", + "id": "942", "name": "Composition Roles Min In Game Decorator areCompositionRolesMinInGameRespected should return false when one of the players is not an object.", "location": { "start": { @@ -107730,7 +107900,7 @@ } }, { - "id": "942", + "id": "943", "name": "Composition Roles Min In Game Decorator areCompositionRolesMinInGameRespected should return false when one of the players doesn't have the good structure.", "location": { "start": { @@ -107740,7 +107910,7 @@ } }, { - "id": "943", + "id": "944", "name": "Composition Roles Min In Game Decorator areCompositionRolesMinInGameRespected should return false when there is only 1 player with a role which min in game is 2.", "location": { "start": { @@ -107750,7 +107920,7 @@ } }, { - "id": "944", + "id": "945", "name": "Composition Roles Min In Game Decorator areCompositionRolesMinInGameRespected should return true when players are empty.", "location": { "start": { @@ -107760,7 +107930,7 @@ } }, { - "id": "945", + "id": "946", "name": "Composition Roles Min In Game Decorator areCompositionRolesMinInGameRespected should return true when the limit for each role is respected.", "location": { "start": { @@ -107770,7 +107940,7 @@ } }, { - "id": "946", + "id": "947", "name": "Composition Roles Min In Game Decorator playersRoleLimitDefaultMessage should return default message when called.", "location": { "start": { @@ -107780,12 +107950,12 @@ } } ], - "source": "import {\n getCompositionRolesMinInGameDefaultMessage,\n areCompositionRolesMinInGameRespected,\n} from \"@/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Roles Min In Game Decorator\", () => {\n describe(\"areCompositionRolesMinInGameRespected\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(areCompositionRolesMinInGameRespected(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(areCompositionRolesMinInGameRespected(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected([...players, { name: \"bad\", role: { toto: \"tata\" } }])).toBe(false);\n });\n\n it(\"should return false when there is only 1 player with a role which min in game is 2.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected(players)).toBe(false);\n });\n\n it(\"should return true when players are empty.\", () => {\n expect(areCompositionRolesMinInGameRespected([])).toBe(true);\n });\n\n it(\"should return true when the limit for each role is respected.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(9, [\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.THREE_BROTHERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionRolesMinInGameDefaultMessage()).toBe(\"players.role minimum occurrences in game must be reached. Please check `minInGame` property of roles\");\n });\n });\n});" + "source": "import {\n getCompositionRolesMinInGameDefaultMessage,\n areCompositionRolesMinInGameRespected,\n} from \"@/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Roles Min In Game Decorator\", () => {\n describe(\"areCompositionRolesMinInGameRespected\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(areCompositionRolesMinInGameRespected(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(areCompositionRolesMinInGameRespected(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected([...players, { name: \"bad\", role: { toto: \"tata\" } }])).toBe(false);\n });\n\n it(\"should return false when there is only 1 player with a role which min in game is 2.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected(players)).toBe(false);\n });\n\n it(\"should return true when players are empty.\", () => {\n expect(areCompositionRolesMinInGameRespected([])).toBe(true);\n });\n\n it(\"should return true when the limit for each role is respected.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(9, [\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.THREE_BROTHERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n ]);\n\n expect(areCompositionRolesMinInGameRespected(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionRolesMinInGameDefaultMessage()).toBe(\"players.role minimum occurrences in game must be reached. Please check `minInGame` property of roles\");\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts": { "tests": [ { - "id": "947", + "id": "948", "name": "Composition Roles Max In Game Decorator areCompositionRolesMaxInGameRespected should return false when players are undefined.", "location": { "start": { @@ -107795,7 +107965,7 @@ } }, { - "id": "948", + "id": "949", "name": "Composition Roles Max In Game Decorator areCompositionRolesMaxInGameRespected should return false when players are not an array.", "location": { "start": { @@ -107805,7 +107975,7 @@ } }, { - "id": "949", + "id": "950", "name": "Composition Roles Max In Game Decorator areCompositionRolesMaxInGameRespected should return false when one of the players is not an object.", "location": { "start": { @@ -107815,7 +107985,7 @@ } }, { - "id": "950", + "id": "951", "name": "Composition Roles Max In Game Decorator areCompositionRolesMaxInGameRespected should return false when one of the players doesn't have the good structure.", "location": { "start": { @@ -107825,7 +107995,7 @@ } }, { - "id": "951", + "id": "952", "name": "Composition Roles Max In Game Decorator areCompositionRolesMaxInGameRespected should return false when there is 2 players with the same role but max in game is 1.", "location": { "start": { @@ -107835,7 +108005,7 @@ } }, { - "id": "952", + "id": "953", "name": "Composition Roles Max In Game Decorator areCompositionRolesMaxInGameRespected should return true when players are empty.", "location": { "start": { @@ -107845,7 +108015,7 @@ } }, { - "id": "953", + "id": "954", "name": "Composition Roles Max In Game Decorator areCompositionRolesMaxInGameRespected should return true when the limit for each role is respected.", "location": { "start": { @@ -107855,7 +108025,7 @@ } }, { - "id": "954", + "id": "955", "name": "Composition Roles Max In Game Decorator playersRoleLimitDefaultMessage should return default message when called.", "location": { "start": { @@ -107865,12 +108035,12 @@ } } ], - "source": "import {\n getCompositionRolesMaxInGameDefaultMessage,\n areCompositionRolesMaxInGameRespected,\n} from \"@/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Roles Max In Game Decorator\", () => {\n describe(\"areCompositionRolesMaxInGameRespected\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(areCompositionRolesMaxInGameRespected(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(areCompositionRolesMaxInGameRespected(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected([...players, { name: \"bad\", role: { toto: \"tata\" } }])).toBe(false);\n });\n\n it(\"should return false when there is 2 players with the same role but max in game is 1.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected(players)).toBe(false);\n });\n\n it(\"should return true when players are empty.\", () => {\n expect(areCompositionRolesMaxInGameRespected([])).toBe(true);\n });\n\n it(\"should return true when the limit for each role is respected.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(8, [\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionRolesMaxInGameDefaultMessage()).toBe(\"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\");\n });\n });\n});" + "source": "import {\n getCompositionRolesMaxInGameDefaultMessage,\n areCompositionRolesMaxInGameRespected,\n} from \"@/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Roles Max In Game Decorator\", () => {\n describe(\"areCompositionRolesMaxInGameRespected\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(areCompositionRolesMaxInGameRespected(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(areCompositionRolesMaxInGameRespected(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected([...players, { name: \"bad\", role: { toto: \"tata\" } }])).toBe(false);\n });\n\n it(\"should return false when there is 2 players with the same role but max in game is 1.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected(players)).toBe(false);\n });\n\n it(\"should return true when players are empty.\", () => {\n expect(areCompositionRolesMaxInGameRespected([])).toBe(true);\n });\n\n it(\"should return true when the limit for each role is respected.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(8, [\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n { role: { name: RoleNames.VILLAGER } },\n { role: { name: RoleNames.VILLAGER } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(areCompositionRolesMaxInGameRespected(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionRolesMaxInGameDefaultMessage()).toBe(\"players.role can't exceed role maximum occurrences in game. Please check `maxInGame` property of roles\");\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts": { "tests": [ { - "id": "955", + "id": "956", "name": "Composition Has Villager Decorator doesCompositionHaveAtLeastOneVillager should return false when players are undefined.", "location": { "start": { @@ -107880,7 +108050,7 @@ } }, { - "id": "956", + "id": "957", "name": "Composition Has Villager Decorator doesCompositionHaveAtLeastOneVillager should return false when players are not an array.", "location": { "start": { @@ -107890,7 +108060,7 @@ } }, { - "id": "957", + "id": "958", "name": "Composition Has Villager Decorator doesCompositionHaveAtLeastOneVillager should return false when one of the players is not an object.", "location": { "start": { @@ -107900,7 +108070,7 @@ } }, { - "id": "958", + "id": "959", "name": "Composition Has Villager Decorator doesCompositionHaveAtLeastOneVillager should return false when one of the players doesn't have the good structure.", "location": { "start": { @@ -107910,7 +108080,7 @@ } }, { - "id": "959", + "id": "960", "name": "Composition Has Villager Decorator doesCompositionHaveAtLeastOneVillager should return false when composition is full of werewolves.", "location": { "start": { @@ -107920,7 +108090,7 @@ } }, { - "id": "960", + "id": "961", "name": "Composition Has Villager Decorator doesCompositionHaveAtLeastOneVillager should return false when players are empty.", "location": { "start": { @@ -107930,7 +108100,7 @@ } }, { - "id": "961", + "id": "962", "name": "Composition Has Villager Decorator doesCompositionHaveAtLeastOneVillager should return true when there is at least one villager in composition.", "location": { "start": { @@ -107940,7 +108110,7 @@ } }, { - "id": "962", + "id": "963", "name": "Composition Has Villager Decorator playersRoleLimitDefaultMessage should return default message when called.", "location": { "start": { @@ -107950,12 +108120,12 @@ } } ], - "source": "import {\n doesCompositionHaveAtLeastOneVillager,\n getCompositionHasVillagerDefaultMessage,\n} from \"@/modules/game/dto/base/decorators/composition/composition-has-villager.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Has Villager Decorator\", () => {\n describe(\"doesCompositionHaveAtLeastOneVillager\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(doesCompositionHaveAtLeastOneVillager(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(doesCompositionHaveAtLeastOneVillager(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager([...players, { name: \"bad\", role: { titi: \"toto\" } }])).toBe(false);\n });\n\n it(\"should return false when composition is full of werewolves.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILE_FATHER_OF_WOLVES } },\n { role: { name: ROLE_NAMES.WHITE_WEREWOLF } },\n { role: { name: ROLE_NAMES.VILE_FATHER_OF_WOLVES } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager(players)).toBe(false);\n });\n\n it(\"should return false when players are empty.\", () => {\n expect(doesCompositionHaveAtLeastOneVillager([])).toBe(false);\n });\n\n it(\"should return true when there is at least one villager in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionHasVillagerDefaultMessage()).toBe(\"one of the players.role must have at least one role from `villagers` side\");\n });\n });\n});" + "source": "import {\n doesCompositionHaveAtLeastOneVillager,\n getCompositionHasVillagerDefaultMessage,\n} from \"@/modules/game/dto/base/decorators/composition/composition-has-villager.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Has Villager Decorator\", () => {\n describe(\"doesCompositionHaveAtLeastOneVillager\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(doesCompositionHaveAtLeastOneVillager(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(doesCompositionHaveAtLeastOneVillager(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager([...players, { name: \"bad\", role: { titi: \"toto\" } }])).toBe(false);\n });\n\n it(\"should return false when composition is full of werewolves.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILE_FATHER_OF_WOLVES } },\n { role: { name: RoleNames.WHITE_WEREWOLF } },\n { role: { name: RoleNames.VILE_FATHER_OF_WOLVES } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager(players)).toBe(false);\n });\n\n it(\"should return false when players are empty.\", () => {\n expect(doesCompositionHaveAtLeastOneVillager([])).toBe(false);\n });\n\n it(\"should return true when there is at least one villager in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneVillager(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionHasVillagerDefaultMessage()).toBe(\"one of the players.role must have at least one role from `villagers` side\");\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts": { "tests": [ { - "id": "963", + "id": "964", "name": "Composition Has Werewolf Decorator doesCompositionHaveAtLeastOneWerewolf should return false when players are undefined.", "location": { "start": { @@ -107965,7 +108135,7 @@ } }, { - "id": "964", + "id": "965", "name": "Composition Has Werewolf Decorator doesCompositionHaveAtLeastOneWerewolf should return false when players are not an array.", "location": { "start": { @@ -107975,7 +108145,7 @@ } }, { - "id": "965", + "id": "966", "name": "Composition Has Werewolf Decorator doesCompositionHaveAtLeastOneWerewolf should return false when one of the players is not an object.", "location": { "start": { @@ -107985,7 +108155,7 @@ } }, { - "id": "966", + "id": "967", "name": "Composition Has Werewolf Decorator doesCompositionHaveAtLeastOneWerewolf should return false when one of the players doesn't have the good structure.", "location": { "start": { @@ -107995,7 +108165,7 @@ } }, { - "id": "967", + "id": "968", "name": "Composition Has Werewolf Decorator doesCompositionHaveAtLeastOneWerewolf should return false when composition is full of villagers.", "location": { "start": { @@ -108005,7 +108175,7 @@ } }, { - "id": "968", + "id": "969", "name": "Composition Has Werewolf Decorator doesCompositionHaveAtLeastOneWerewolf should return false when players are empty.", "location": { "start": { @@ -108015,7 +108185,7 @@ } }, { - "id": "969", + "id": "970", "name": "Composition Has Werewolf Decorator doesCompositionHaveAtLeastOneWerewolf should return true when there is at least one werewolf in composition.", "location": { "start": { @@ -108025,7 +108195,7 @@ } }, { - "id": "970", + "id": "971", "name": "Composition Has Werewolf Decorator playersRoleLimitDefaultMessage should return default message when called.", "location": { "start": { @@ -108035,12 +108205,12 @@ } } ], - "source": "import {\n doesCompositionHaveAtLeastOneWerewolf,\n getCompositionHasWerewolfDefaultMessage,\n} from \"@/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Has Werewolf Decorator\", () => {\n describe(\"doesCompositionHaveAtLeastOneWerewolf\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(doesCompositionHaveAtLeastOneWerewolf(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(doesCompositionHaveAtLeastOneWerewolf(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.TWO_SISTERS } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n { role: { name: ROLE_NAMES.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf([...players, { name: \"bad\", role: { titi: \"toto\" } }])).toBe(false);\n });\n\n it(\"should return false when composition is full of villagers.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.VILLAGER } },\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.HUNTER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf(players)).toBe(false);\n });\n\n it(\"should return false when players are empty.\", () => {\n expect(doesCompositionHaveAtLeastOneWerewolf([])).toBe(false);\n });\n\n it(\"should return true when there is at least one werewolf in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: ROLE_NAMES.WITCH } },\n { role: { name: ROLE_NAMES.SEER } },\n { role: { name: ROLE_NAMES.HUNTER } },\n { role: { name: ROLE_NAMES.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionHasWerewolfDefaultMessage()).toBe(\"one of the players.role must have at least one role from `werewolves` side\");\n });\n });\n});" + "source": "import {\n doesCompositionHaveAtLeastOneWerewolf,\n getCompositionHasWerewolfDefaultMessage,\n} from \"@/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Composition Has Werewolf Decorator\", () => {\n describe(\"doesCompositionHaveAtLeastOneWerewolf\", () => {\n it(\"should return false when players are undefined.\", () => {\n expect(doesCompositionHaveAtLeastOneWerewolf(undefined)).toBe(false);\n });\n\n it(\"should return false when players are not an array.\", () => {\n expect(doesCompositionHaveAtLeastOneWerewolf(null)).toBe(false);\n });\n\n it(\"should return false when one of the players is not an object.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf([...players, \"toto\"])).toBe(false);\n });\n\n it(\"should return false when one of the players doesn't have the good structure.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.TWO_SISTERS } },\n { role: { name: RoleNames.WEREWOLF } },\n { role: { name: RoleNames.VILLAGER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf([...players, { name: \"bad\", role: { titi: \"toto\" } }])).toBe(false);\n });\n\n it(\"should return false when composition is full of villagers.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.VILLAGER } },\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.HUNTER } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf(players)).toBe(false);\n });\n\n it(\"should return false when players are empty.\", () => {\n expect(doesCompositionHaveAtLeastOneWerewolf([])).toBe(false);\n });\n\n it(\"should return true when there is at least one werewolf in composition.\", () => {\n const players = bulkCreateFakeCreateGamePlayerDto(4, [\n { role: { name: RoleNames.WITCH } },\n { role: { name: RoleNames.SEER } },\n { role: { name: RoleNames.HUNTER } },\n { role: { name: RoleNames.WEREWOLF } },\n ]);\n\n expect(doesCompositionHaveAtLeastOneWerewolf(players)).toBe(true);\n });\n });\n\n describe(\"playersRoleLimitDefaultMessage\", () => {\n it(\"should return default message when called.\", () => {\n expect(getCompositionHasWerewolfDefaultMessage()).toBe(\"one of the players.role must have at least one role from `werewolves` side\");\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/game-player/transformers/player-role.transformer.spec.ts": { "tests": [ { - "id": "971", + "id": "972", "name": "Player Role Transformer playerRoleTransformer should return null when value is null.", "location": { "start": { @@ -108050,7 +108220,7 @@ } }, { - "id": "972", + "id": "973", "name": "Player Role Transformer playerRoleTransformer should return same value when value is not an object.", "location": { "start": { @@ -108060,7 +108230,7 @@ } }, { - "id": "973", + "id": "974", "name": "Player Role Transformer playerRoleTransformer should return same value when value doesn't have the name field.", "location": { "start": { @@ -108070,7 +108240,7 @@ } }, { - "id": "974", + "id": "975", "name": "Player Role Transformer playerRoleTransformer should return same value when role is unknown.", "location": { "start": { @@ -108080,7 +108250,7 @@ } }, { - "id": "975", + "id": "976", "name": "Player Role Transformer playerRoleTransformer should fill player role (seer) fields when called.", "location": { "start": { @@ -108090,7 +108260,7 @@ } }, { - "id": "976", + "id": "977", "name": "Player Role Transformer playerRoleTransformer should fill player role (white-werewolf) fields when called.", "location": { "start": { @@ -108100,7 +108270,7 @@ } }, { - "id": "977", + "id": "978", "name": "Player Role Transformer playerRoleTransformer should fill player role fields with isRevealed true when role is villager villager.", "location": { "start": { @@ -108110,12 +108280,12 @@ } } ], - "source": "import type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { playerRoleTransformer } from \"@/modules/game/dto/base/game-player/transformers/player-role.transformer\";\nimport type { CreateGamePlayerRoleDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player-role/create-game-player-role.dto\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\ndescribe(\"Player Role Transformer\", () => {\n describe(\"playerRoleTransformer\", () => {\n it(\"should return null when value is null.\", () => {\n expect(playerRoleTransformer({ value: null } as TransformFnParams)).toBeNull();\n });\n\n it(\"should return same value when value is not an object.\", () => {\n expect(playerRoleTransformer({ value: \"toto\" } as TransformFnParams)).toBe(\"toto\");\n });\n\n it(\"should return same value when value doesn't have the name field.\", () => {\n expect(playerRoleTransformer({ value: {} } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should return same value when role is unknown.\", () => {\n expect(playerRoleTransformer({ value: { name: \"hello\" } } as TransformFnParams)).toStrictEqual({ name: \"hello\" });\n });\n\n it(\"should fill player role (seer) fields when called.\", () => {\n const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: ROLE_NAMES.SEER };\n\n expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({\n name: ROLE_NAMES.SEER,\n original: ROLE_NAMES.SEER,\n current: ROLE_NAMES.SEER,\n isRevealed: false,\n });\n });\n\n it(\"should fill player role (white-werewolf) fields when called.\", () => {\n const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: ROLE_NAMES.WHITE_WEREWOLF };\n\n expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({\n name: ROLE_NAMES.WHITE_WEREWOLF,\n original: ROLE_NAMES.WHITE_WEREWOLF,\n current: ROLE_NAMES.WHITE_WEREWOLF,\n isRevealed: false,\n });\n });\n\n it(\"should fill player role fields with isRevealed true when role is villager villager.\", () => {\n const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: ROLE_NAMES.VILLAGER_VILLAGER };\n\n expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({\n name: ROLE_NAMES.VILLAGER_VILLAGER,\n original: ROLE_NAMES.VILLAGER_VILLAGER,\n current: ROLE_NAMES.VILLAGER_VILLAGER,\n isRevealed: true,\n });\n });\n });\n});" + "source": "import type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { playerRoleTransformer } from \"@/modules/game/dto/base/game-player/transformers/player-role.transformer\";\nimport type { CreateGamePlayerRoleDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player-role/create-game-player-role.dto\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\ndescribe(\"Player Role Transformer\", () => {\n describe(\"playerRoleTransformer\", () => {\n it(\"should return null when value is null.\", () => {\n expect(playerRoleTransformer({ value: null } as TransformFnParams)).toBeNull();\n });\n\n it(\"should return same value when value is not an object.\", () => {\n expect(playerRoleTransformer({ value: \"toto\" } as TransformFnParams)).toBe(\"toto\");\n });\n\n it(\"should return same value when value doesn't have the name field.\", () => {\n expect(playerRoleTransformer({ value: {} } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should return same value when role is unknown.\", () => {\n expect(playerRoleTransformer({ value: { name: \"hello\" } } as TransformFnParams)).toStrictEqual({ name: \"hello\" });\n });\n\n it(\"should fill player role (seer) fields when called.\", () => {\n const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: RoleNames.SEER };\n\n expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({\n name: RoleNames.SEER,\n original: RoleNames.SEER,\n current: RoleNames.SEER,\n isRevealed: false,\n });\n });\n\n it(\"should fill player role (white-werewolf) fields when called.\", () => {\n const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: RoleNames.WHITE_WEREWOLF };\n\n expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({\n name: RoleNames.WHITE_WEREWOLF,\n original: RoleNames.WHITE_WEREWOLF,\n current: RoleNames.WHITE_WEREWOLF,\n isRevealed: false,\n });\n });\n\n it(\"should fill player role fields with isRevealed true when role is villager villager.\", () => {\n const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: RoleNames.VILLAGER_VILLAGER };\n\n expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({\n name: RoleNames.VILLAGER_VILLAGER,\n original: RoleNames.VILLAGER_VILLAGER,\n current: RoleNames.VILLAGER_VILLAGER,\n isRevealed: true,\n });\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts": { "tests": [ { - "id": "978", + "id": "979", "name": "Player Side Transformer playerSideTransformer should return null when value is null.", "location": { "start": { @@ -108125,7 +108295,7 @@ } }, { - "id": "979", + "id": "980", "name": "Player Side Transformer playerSideTransformer should return same value when value is not an object.", "location": { "start": { @@ -108135,7 +108305,7 @@ } }, { - "id": "980", + "id": "981", "name": "Player Side Transformer playerSideTransformer should return same value when obj is not an object.", "location": { "start": { @@ -108145,7 +108315,7 @@ } }, { - "id": "981", + "id": "982", "name": "Player Side Transformer playerSideTransformer should return same value when obj doesn't have the role.name field.", "location": { "start": { @@ -108155,7 +108325,7 @@ } }, { - "id": "982", + "id": "983", "name": "Player Side Transformer playerSideTransformer should return same value when role is unknown.", "location": { "start": { @@ -108165,7 +108335,7 @@ } }, { - "id": "983", + "id": "984", "name": "Player Side Transformer playerSideTransformer should fill player side with werewolf data when role is white werewolf.", "location": { "start": { @@ -108175,7 +108345,7 @@ } }, { - "id": "984", + "id": "985", "name": "Player Side Transformer playerSideTransformer should fill player side with villager data when role is witch.", "location": { "start": { @@ -108185,12 +108355,12 @@ } } ], - "source": "import type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { playerSideTransformer } from \"@/modules/game/dto/base/game-player/transformers/player-side.transformer\";\nimport type { CreateGamePlayerSideDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player-side/create-game-player-side.dto\";\nimport { ROLE_NAMES, ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Player Side Transformer\", () => {\n describe(\"playerSideTransformer\", () => {\n it(\"should return null when value is null.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WHITE_WEREWOLF } });\n\n expect(playerSideTransformer({ value: null, obj: player } as TransformFnParams)).toBeNull();\n });\n\n it(\"should return same value when value is not an object.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WHITE_WEREWOLF } });\n\n expect(playerSideTransformer({ value: \"toto\", obj: player } as TransformFnParams)).toBe(\"toto\");\n });\n\n it(\"should return same value when obj is not an object.\", () => {\n expect(playerSideTransformer({ value: {}, obj: null } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should return same value when obj doesn't have the role.name field.\", () => {\n expect(playerSideTransformer({ value: {}, obj: { role: { toto: ROLE_NAMES.WITCH } } } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should return same value when role is unknown.\", () => {\n expect(playerSideTransformer({ value: {}, obj: { role: { name: \"hello\" } } } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should fill player side with werewolf data when role is white werewolf.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WHITE_WEREWOLF } });\n\n expect(playerSideTransformer({ value: {}, obj: player } as TransformFnParams)).toStrictEqual({\n current: ROLE_SIDES.WEREWOLVES,\n original: ROLE_SIDES.WEREWOLVES,\n });\n });\n\n it(\"should fill player side with villager data when role is witch.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WITCH } });\n\n expect(playerSideTransformer({ value: {}, obj: player } as TransformFnParams)).toStrictEqual({\n current: ROLE_SIDES.VILLAGERS,\n original: ROLE_SIDES.VILLAGERS,\n });\n });\n });\n});" + "source": "import type { TransformFnParams } from \"class-transformer/types/interfaces\";\n\nimport { playerSideTransformer } from \"@/modules/game/dto/base/game-player/transformers/player-side.transformer\";\nimport type { CreateGamePlayerSideDto } from \"@/modules/game/dto/create-game/create-game-player/create-game-player-side/create-game-player-side.dto\";\nimport { RoleNames, RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGamePlayerDto } from \"@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory\";\n\ndescribe(\"Player Side Transformer\", () => {\n describe(\"playerSideTransformer\", () => {\n it(\"should return null when value is null.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WHITE_WEREWOLF } });\n\n expect(playerSideTransformer({ value: null, obj: player } as TransformFnParams)).toBeNull();\n });\n\n it(\"should return same value when value is not an object.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WHITE_WEREWOLF } });\n\n expect(playerSideTransformer({ value: \"toto\", obj: player } as TransformFnParams)).toBe(\"toto\");\n });\n\n it(\"should return same value when obj is not an object.\", () => {\n expect(playerSideTransformer({ value: {}, obj: null } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should return same value when obj doesn't have the role.name field.\", () => {\n expect(playerSideTransformer({ value: {}, obj: { role: { toto: RoleNames.WITCH } } } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should return same value when role is unknown.\", () => {\n expect(playerSideTransformer({ value: {}, obj: { role: { name: \"hello\" } } } as TransformFnParams)).toStrictEqual({});\n });\n\n it(\"should fill player side with werewolf data when role is white werewolf.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WHITE_WEREWOLF } });\n\n expect(playerSideTransformer({ value: {}, obj: player } as TransformFnParams)).toStrictEqual({\n current: RoleSides.WEREWOLVES,\n original: RoleSides.WEREWOLVES,\n });\n });\n\n it(\"should fill player side with villager data when role is witch.\", () => {\n const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WITCH } });\n\n expect(playerSideTransformer({ value: {}, obj: player } as TransformFnParams)).toStrictEqual({\n current: RoleSides.VILLAGERS,\n original: RoleSides.VILLAGERS,\n });\n });\n });\n});" }, "tests/unit/specs/modules/game/controllers/pipes/get-game-by-id.pipe.spec.ts": { "tests": [ { - "id": "985", + "id": "986", "name": "Get Game By Id Pipe transform should throw error when value is not a valid object id.", "location": { "start": { @@ -108200,7 +108370,7 @@ } }, { - "id": "986", + "id": "987", "name": "Get Game By Id Pipe transform should throw error when game is not found.", "location": { "start": { @@ -108210,7 +108380,7 @@ } }, { - "id": "987", + "id": "988", "name": "Get Game By Id Pipe transform should return existing game when game is found.", "location": { "start": { @@ -108220,12 +108390,12 @@ } } ], - "source": "import { faker } from \"@faker-js/faker\";\nimport { BadRequestException } from \"@nestjs/common\";\nimport { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GetGameByIdPipe } from \"@/modules/game/controllers/pipes/get-game-by-id.pipe\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\n\nimport { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport { createObjectIdFromString } from \"@tests/helpers/mongoose/mongoose.helper\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\n\ndescribe(\"Get Game By Id Pipe\", () => {\n let getGameByIdPipe: GetGameByIdPipe;\n let mocks: { gameRepository: { findOne: jest.SpyInstance } };\n let repositories: { game: GameRepository };\n \n beforeEach(async() => {\n mocks = { gameRepository: { findOne: jest.fn() } };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GameRepository,\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n ],\n }).compile();\n \n repositories = { game: module.get(GameRepository) };\n getGameByIdPipe = new GetGameByIdPipe(repositories.game);\n });\n \n describe(\"transform\", () => {\n const gameId = faker.database.mongodbObjectId();\n\n it(\"should throw error when value is not a valid object id.\", async() => {\n const expectedError = new BadRequestException(\"Validation failed (Mongo ObjectId is expected)\");\n\n await expect(getGameByIdPipe.transform(\"bad-id\")).rejects.toThrow(expectedError);\n });\n\n it(\"should throw error when game is not found.\", async() => {\n mocks.gameRepository.findOne.mockResolvedValue(null);\n const expectedError = new ResourceNotFoundException(API_RESOURCES.GAMES, gameId.toString());\n\n await expect(getGameByIdPipe.transform(gameId)).rejects.toThrow(expectedError);\n });\n \n it(\"should return existing game when game is found.\", async() => {\n const game = createFakeGame();\n mocks.gameRepository.findOne.mockResolvedValue(game);\n \n await expect(getGameByIdPipe.transform(gameId)).resolves.toStrictEqual(game);\n expect(mocks.gameRepository.findOne).toHaveBeenCalledExactlyOnceWith({ _id: createObjectIdFromString(gameId) });\n });\n });\n});" + "source": "import { faker } from \"@faker-js/faker\";\nimport { BadRequestException } from \"@nestjs/common\";\nimport { Test } from \"@nestjs/testing\";\nimport type { TestingModule } from \"@nestjs/testing\";\n\nimport { GetGameByIdPipe } from \"@/modules/game/controllers/pipes/get-game-by-id.pipe\";\nimport { GameRepository } from \"@/modules/game/providers/repositories/game.repository\";\n\nimport { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport { createObjectIdFromString } from \"@tests/helpers/mongoose/mongoose.helper\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\n\ndescribe(\"Get Game By Id Pipe\", () => {\n let getGameByIdPipe: GetGameByIdPipe;\n let mocks: { gameRepository: { findOne: jest.SpyInstance } };\n let repositories: { game: GameRepository };\n \n beforeEach(async() => {\n mocks = { gameRepository: { findOne: jest.fn() } };\n \n const module: TestingModule = await Test.createTestingModule({\n providers: [\n GameRepository,\n {\n provide: GameRepository,\n useValue: mocks.gameRepository,\n },\n ],\n }).compile();\n \n repositories = { game: module.get(GameRepository) };\n getGameByIdPipe = new GetGameByIdPipe(repositories.game);\n });\n \n describe(\"transform\", () => {\n const gameId = faker.database.mongodbObjectId();\n\n it(\"should throw error when value is not a valid object id.\", async() => {\n const expectedError = new BadRequestException(\"Validation failed (Mongo ObjectId is expected)\");\n\n await expect(getGameByIdPipe.transform(\"bad-id\")).rejects.toThrow(expectedError);\n });\n\n it(\"should throw error when game is not found.\", async() => {\n mocks.gameRepository.findOne.mockResolvedValue(null);\n const expectedError = new ResourceNotFoundException(ApiResources.GAMES, gameId.toString());\n\n await expect(getGameByIdPipe.transform(gameId)).rejects.toThrow(expectedError);\n });\n \n it(\"should return existing game when game is found.\", async() => {\n const game = createFakeGame();\n mocks.gameRepository.findOne.mockResolvedValue(game);\n \n await expect(getGameByIdPipe.transform(gameId)).resolves.toStrictEqual(game);\n expect(mocks.gameRepository.findOne).toHaveBeenCalledExactlyOnceWith({ _id: createObjectIdFromString(gameId) });\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.spec.ts": { "tests": [ { - "id": "988", + "id": "989", "name": "Additional Cards For Thief Roles Decorator areAdditionalCardsForThiefRolesRespected should return true when additional cards are not defined.", "location": { "start": { @@ -108235,7 +108405,7 @@ } }, { - "id": "989", + "id": "990", "name": "Additional Cards For Thief Roles Decorator areAdditionalCardsForThiefRolesRespected should return false when at least one additional card role is not for thief.", "location": { "start": { @@ -108245,7 +108415,7 @@ } }, { - "id": "990", + "id": "991", "name": "Additional Cards For Thief Roles Decorator areAdditionalCardsForThiefRolesRespected should return true when all additional cards roles are for thief.", "location": { "start": { @@ -108255,7 +108425,7 @@ } }, { - "id": "991", + "id": "992", "name": "Additional Cards For Thief Roles Decorator getAdditionalCardsForThiefRolesDefaultMessage should return additional cards for thief roles default message when called.", "location": { "start": { @@ -108265,12 +108435,12 @@ } } ], - "source": "import { gameAdditionalCardsThiefRoleNames } from \"@/modules/game/constants/game-additional-card/game-additional-card.constant\";\nimport { areAdditionalCardsForThiefRolesRespected, getAdditionalCardsForThiefRolesDefaultMessage } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator\";\nimport { ROLE_NAMES } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\n\ndescribe(\"Additional Cards For Thief Roles Decorator\", () => {\n describe(\"areAdditionalCardsForThiefRolesRespected\", () => {\n it(\"should return true when additional cards are not defined.\", () => {\n const additionalCards = undefined;\n\n expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(true);\n });\n\n it(\"should return false when at least one additional card role is not for thief.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.THIEF }),\n ];\n\n expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(false);\n });\n\n it(\"should return true when all additional cards roles are for thief.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.LITTLE_GIRL }),\n ];\n\n expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsForThiefRolesDefaultMessage\", () => {\n it(\"should return additional cards for thief roles default message when called.\", () => {\n expect(getAdditionalCardsForThiefRolesDefaultMessage()).toBe(`additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`);\n });\n });\n});" + "source": "import { GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES } from \"@/modules/game/constants/game-additional-cards/game-additional-cards.constant\";\nimport { areAdditionalCardsForThiefRolesRespected, getAdditionalCardsForThiefRolesDefaultMessage } from \"@/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator\";\nimport { RoleNames } from \"@/modules/role/enums/role.enum\";\n\nimport { createFakeCreateGameAdditionalCardDto } from \"@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory\";\n\ndescribe(\"Additional Cards For Thief Roles Decorator\", () => {\n describe(\"areAdditionalCardsForThiefRolesRespected\", () => {\n it(\"should return true when additional cards are not defined.\", () => {\n const additionalCards = undefined;\n\n expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(true);\n });\n\n it(\"should return false when at least one additional card role is not for thief.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.THIEF }),\n ];\n\n expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(false);\n });\n\n it(\"should return true when all additional cards roles are for thief.\", () => {\n const additionalCards = [\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }),\n createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.LITTLE_GIRL }),\n ];\n\n expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(true);\n });\n });\n\n describe(\"getAdditionalCardsForThiefRolesDefaultMessage\", () => {\n it(\"should return additional cards for thief roles default message when called.\", () => {\n expect(getAdditionalCardsForThiefRolesDefaultMessage()).toBe(`additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`);\n });\n });\n});" }, "tests/unit/specs/modules/config/database/helpers/database.helper.spec.ts": { "tests": [ { - "id": "992", + "id": "993", "name": "Database Helper mongooseModuleFactory should return connection string when called.", "location": { "start": { @@ -108285,7 +108455,7 @@ "tests/unit/specs/modules/game/dto/base/transformers/game-players-position.transformer.spec.ts": { "tests": [ { - "id": "993", + "id": "994", "name": "Game Players Position Transformer gamePlayersPositionTransformer should return same value when value is not an array.", "location": { "start": { @@ -108295,7 +108465,7 @@ } }, { - "id": "994", + "id": "995", "name": "Game Players Position Transformer gamePlayersPositionTransformer should return same value when one value of the array is not object.", "location": { "start": { @@ -108305,7 +108475,7 @@ } }, { - "id": "995", + "id": "996", "name": "Game Players Position Transformer gamePlayersPositionTransformer should return players as is when every position is set.", "location": { "start": { @@ -108315,7 +108485,7 @@ } }, { - "id": "996", + "id": "997", "name": "Game Players Position Transformer gamePlayersPositionTransformer should return players as is when at least one position is not set.", "location": { "start": { @@ -108325,7 +108495,7 @@ } }, { - "id": "997", + "id": "998", "name": "Game Players Position Transformer gamePlayersPositionTransformer should return players with sequential position when no positions are set.", "location": { "start": { @@ -108340,7 +108510,7 @@ "tests/unit/specs/modules/config/env/helpers/env.helper.spec.ts": { "tests": [ { - "id": "998", + "id": "999", "name": "Config Env Helper validate should return the validated config when there is no error in env variables.", "location": { "start": { @@ -108350,7 +108520,7 @@ } }, { - "id": "999", + "id": "1000", "name": "Config Env Helper validate should throw error when env variables is not valid.", "location": { "start": { @@ -108360,7 +108530,7 @@ } }, { - "id": "1000", + "id": "1001", "name": "Config Env Helper getEnvPath should return default development env path when NODE_ENV is undefined.", "location": { "start": { @@ -108370,7 +108540,7 @@ } }, { - "id": "1001", + "id": "1002", "name": "Config Env Helper getEnvPath should return test env path when NODE_ENV is test.", "location": { "start": { @@ -108380,7 +108550,7 @@ } }, { - "id": "1002", + "id": "1003", "name": "Config Env Helper getEnvPaths should return default and local test env paths when function is called.", "location": { "start": { @@ -108395,7 +108565,7 @@ "tests/unit/specs/modules/game/helpers/player/player.factory.spec.ts": { "tests": [ { - "id": "1003", + "id": "1004", "name": "Player Factory createPlayer should create a player when called.", "location": { "start": { @@ -108405,7 +108575,7 @@ } }, { - "id": "1004", + "id": "1005", "name": "Player Factory createPlayer should create a player without extraneous properties when called.", "location": { "start": { @@ -108420,7 +108590,7 @@ "tests/unit/specs/modules/role/helpers/role.helper.spec.ts": { "tests": [ { - "id": "1005", + "id": "1006", "name": "Role Helper getRolesWithSide should get all werewolf roles when werewolf side is provided.", "location": { "start": { @@ -108430,7 +108600,7 @@ } }, { - "id": "1006", + "id": "1007", "name": "Role Helper getRolesWithSide should get all villagers roles when villager side is provided.", "location": { "start": { @@ -108440,12 +108610,12 @@ } } ], - "source": "import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from \"@/modules/role/enums/role.enum\";\nimport { getRolesWithSide } from \"@/modules/role/helpers/role.helper\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\ndescribe(\"Role Helper\", () => {\n describe(\"getRolesWithSide\", () => {\n const roles: Role[] = [\n { name: ROLE_NAMES.WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 },\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.VILLAGER, maxInGame: 1 },\n { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.AMBIGUOUS, maxInGame: 1 },\n { name: ROLE_NAMES.WHITE_WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 },\n ];\n\n it(\"should get all werewolf roles when werewolf side is provided.\", () => {\n expect(getRolesWithSide(roles, ROLE_SIDES.WEREWOLVES)).toStrictEqual([\n { name: ROLE_NAMES.WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 },\n { name: ROLE_NAMES.WHITE_WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 },\n ]);\n });\n\n it(\"should get all villagers roles when villager side is provided.\", () => {\n expect(getRolesWithSide(roles, ROLE_SIDES.VILLAGERS)).toStrictEqual([\n { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.VILLAGER, maxInGame: 1 },\n { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.AMBIGUOUS, maxInGame: 1 },\n ]);\n });\n });\n});" + "source": "import { RoleNames, RoleSides, RoleTypes } from \"@/modules/role/enums/role.enum\";\nimport { getRolesWithSide } from \"@/modules/role/helpers/role.helper\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\ndescribe(\"Role Helper\", () => {\n describe(\"getRolesWithSide\", () => {\n const roles: Role[] = [\n { name: RoleNames.WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 },\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, type: RoleTypes.VILLAGER, maxInGame: 1 },\n { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, type: RoleTypes.AMBIGUOUS, maxInGame: 1 },\n { name: RoleNames.WHITE_WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 },\n ];\n\n it(\"should get all werewolf roles when werewolf side is provided.\", () => {\n expect(getRolesWithSide(roles, RoleSides.WEREWOLVES)).toStrictEqual([\n { name: RoleNames.WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 },\n { name: RoleNames.WHITE_WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 },\n ]);\n });\n\n it(\"should get all villagers roles when villager side is provided.\", () => {\n expect(getRolesWithSide(roles, RoleSides.VILLAGERS)).toStrictEqual([\n { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, type: RoleTypes.VILLAGER, maxInGame: 1 },\n { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, type: RoleTypes.AMBIGUOUS, maxInGame: 1 },\n ]);\n });\n });\n});" }, "tests/unit/specs/shared/api/pipes/validate-mongo-id.pipe.spec.ts": { "tests": [ { - "id": "1007", + "id": "1008", "name": "Validate MongoId Pipe transform should return the value as ObjectId when value is a correct MongoId (string).", "location": { "start": { @@ -108455,7 +108625,7 @@ } }, { - "id": "1008", + "id": "1009", "name": "Validate MongoId Pipe transform should return the value as ObjectId when value is a correct MongoId (objectId).", "location": { "start": { @@ -108465,7 +108635,7 @@ } }, { - "id": "1009", + "id": "1010", "name": "Validate MongoId Pipe transform should throw an error when value is a incorrect string MongoId.", "location": { "start": { @@ -108475,7 +108645,7 @@ } }, { - "id": "1010", + "id": "1011", "name": "Validate MongoId Pipe transform should throw an error when value is null.", "location": { "start": { @@ -108490,7 +108660,7 @@ "tests/unit/specs/modules/game/helpers/game.factory.spec.ts": { "tests": [ { - "id": "1011", + "id": "1012", "name": "Game Factory createGame should create a game when called.", "location": { "start": { @@ -108500,12 +108670,12 @@ } } ], - "source": "import { GAME_PHASES, GAME_STATUSES } from \"@/modules/game/enums/game.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\ndescribe(\"Game Factory\", () => {\n describe(\"createGame\", () => {\n it(\"should create a game when called.\", () => {\n const game: Game = {\n _id: createFakeObjectId(),\n currentPlay: createFakeGamePlayAllVote(),\n tick: 1,\n turn: 2,\n phase: GAME_PHASES.DAY,\n players: [createFakePlayer()],\n options: createFakeGameOptions(),\n upcomingPlays: [createFakeGamePlayAllElectSheriff()],\n status: GAME_STATUSES.PLAYING,\n createdAt: new Date(),\n updatedAt: new Date(),\n };\n \n expect(createGame(game)).toStrictEqual(createFakeGame(game));\n });\n });\n});" + "source": "import { GamePhases, GameStatuses } from \"@/modules/game/enums/game.enum\";\nimport { createGame } from \"@/modules/game/helpers/game.factory\";\nimport type { Game } from \"@/modules/game/schemas/game.schema\";\n\nimport { createFakeGameOptions } from \"@tests/factories/game/schemas/game-options/game-options.schema.factory\";\nimport { createFakeGamePlayAllElectSheriff, createFakeGamePlayAllVote } from \"@tests/factories/game/schemas/game-play/game-play.schema.factory\";\nimport { createFakeGame } from \"@tests/factories/game/schemas/game.schema.factory\";\nimport { createFakePlayer } from \"@tests/factories/game/schemas/player/player.schema.factory\";\nimport { createFakeObjectId } from \"@tests/factories/shared/mongoose/mongoose.factory\";\n\ndescribe(\"Game Factory\", () => {\n describe(\"createGame\", () => {\n it(\"should create a game when called.\", () => {\n const game: Game = {\n _id: createFakeObjectId(),\n currentPlay: createFakeGamePlayAllVote(),\n tick: 1,\n turn: 2,\n phase: GamePhases.DAY,\n players: [createFakePlayer()],\n options: createFakeGameOptions(),\n upcomingPlays: [createFakeGamePlayAllElectSheriff()],\n status: GameStatuses.PLAYING,\n createdAt: new Date(),\n updatedAt: new Date(),\n };\n \n expect(createGame(game)).toStrictEqual(createFakeGame(game));\n });\n });\n});" }, "tests/unit/specs/shared/exception/types/unexpected-exception.type.spec.ts": { "tests": [ { - "id": "1012", + "id": "1013", "name": "Unexpected exception type getResponse should get response with description without interpolations when interpolations are not necessary.", "location": { "start": { @@ -108515,7 +108685,7 @@ } }, { - "id": "1013", + "id": "1014", "name": "Unexpected exception type getResponse should get response with description with interpolations when interpolations necessary.", "location": { "start": { @@ -108525,12 +108695,12 @@ } } ], - "source": "import { UNEXPECTED_EXCEPTION_REASONS } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Unexpected exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response with description without interpolations when interpolations are not necessary.\", () => {\n const exception = new UnexpectedException(\"werewolvesEat\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 500,\n message: `Unexpected exception in werewolvesEat`,\n error: \"Can't find player with id \\\"undefined\\\" in game \\\"undefined\\\"\",\n });\n });\n\n it(\"should get response with description with interpolations when interpolations necessary.\", () => {\n const exception = new UnexpectedException(\"werewolvesEat\", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: \"123\", playerId: \"456\" });\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 500,\n message: `Unexpected exception in werewolvesEat`,\n error: `Can't find player with id \"456\" in game \"123\"`,\n });\n });\n });\n});" + "source": "import { UnexpectedExceptionReasons } from \"@/shared/exception/enums/unexpected-exception.enum\";\nimport { UnexpectedException } from \"@/shared/exception/types/unexpected-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Unexpected exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response with description without interpolations when interpolations are not necessary.\", () => {\n const exception = new UnexpectedException(\"werewolvesEat\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 500,\n message: `Unexpected exception in werewolvesEat`,\n error: \"Can't find player with id \\\"undefined\\\" in game \\\"undefined\\\"\",\n });\n });\n\n it(\"should get response with description with interpolations when interpolations necessary.\", () => {\n const exception = new UnexpectedException(\"werewolvesEat\", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: \"123\", playerId: \"456\" });\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 500,\n message: `Unexpected exception in werewolvesEat`,\n error: `Can't find player with id \"456\" in game \"123\"`,\n });\n });\n });\n});" }, "tests/unit/specs/shared/exception/types/resource-not-found-exception.type.spec.ts": { "tests": [ { - "id": "1014", + "id": "1015", "name": "Resource not found exception type getResponse should get response without description when called without reason.", "location": { "start": { @@ -108540,7 +108710,7 @@ } }, { - "id": "1015", + "id": "1016", "name": "Resource not found exception type getResponse should get response with description when called with reason.", "location": { "start": { @@ -108550,12 +108720,12 @@ } } ], - "source": "import { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { RESOURCE_NOT_FOUND_REASONS } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Resource not found exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response without description when called without reason.\", () => {\n const id = \"123\";\n const exception = new ResourceNotFoundException(API_RESOURCES.PLAYERS, id);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 404,\n message: `Player with id \"${id}\" not found`,\n error: undefined,\n });\n });\n\n it(\"should get response with description when called with reason.\", () => {\n const id = \"123\";\n const exception = new ResourceNotFoundException(API_RESOURCES.PLAYERS, id, RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 404,\n message: `Player with id \"${id}\" not found`,\n error: \"Game Play - Player in `votes.source` is not in the game players\",\n });\n });\n });\n});" + "source": "import { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { ResourceNotFoundReasons } from \"@/shared/exception/enums/resource-not-found-error.enum\";\nimport { ResourceNotFoundException } from \"@/shared/exception/types/resource-not-found-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Resource not found exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response without description when called without reason.\", () => {\n const id = \"123\";\n const exception = new ResourceNotFoundException(ApiResources.PLAYERS, id);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 404,\n message: `Player with id \"${id}\" not found`,\n error: undefined,\n });\n });\n\n it(\"should get response with description when called with reason.\", () => {\n const id = \"123\";\n const exception = new ResourceNotFoundException(ApiResources.PLAYERS, id, ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 404,\n message: `Player with id \"${id}\" not found`,\n error: \"Game Play - Player in `votes.source` is not in the game players\",\n });\n });\n });\n});" }, "tests/unit/specs/shared/exception/types/bad-resource-mutation-exception.type.spec.ts": { "tests": [ { - "id": "1016", + "id": "1017", "name": "Resource not found mutation exception type getResponse should get response without description when called without reason.", "location": { "start": { @@ -108565,7 +108735,7 @@ } }, { - "id": "1017", + "id": "1018", "name": "Resource not found mutation exception type getResponse should get response with description when called with reason.", "location": { "start": { @@ -108575,12 +108745,12 @@ } } ], - "source": "import { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { BAD_RESOURCE_MUTATION_REASONS } from \"@/shared/exception/enums/bad-resource-mutation-error.enum\";\nimport { BadResourceMutationException } from \"@/shared/exception/types/bad-resource-mutation-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Resource not found mutation exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response without description when called without reason.\", () => {\n const id = \"123\";\n const exception = new BadResourceMutationException(API_RESOURCES.GAMES, id);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 400,\n message: `Bad mutation for Game with id \"${id}\"`,\n error: undefined,\n });\n });\n\n it(\"should get response with description when called with reason.\", () => {\n const id = \"123\";\n const exception = new BadResourceMutationException(API_RESOURCES.GAMES, id, BAD_RESOURCE_MUTATION_REASONS.GAME_NOT_PLAYING);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 400,\n message: `Bad mutation for Game with id \"${id}\"`,\n error: `Game doesn't have status with value \"playing\"`,\n });\n });\n });\n});" + "source": "import { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { BadResourceMutationReasons } from \"@/shared/exception/enums/bad-resource-mutation-error.enum\";\nimport { BadResourceMutationException } from \"@/shared/exception/types/bad-resource-mutation-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Resource not found mutation exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response without description when called without reason.\", () => {\n const id = \"123\";\n const exception = new BadResourceMutationException(ApiResources.GAMES, id);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 400,\n message: `Bad mutation for Game with id \"${id}\"`,\n error: undefined,\n });\n });\n\n it(\"should get response with description when called with reason.\", () => {\n const id = \"123\";\n const exception = new BadResourceMutationException(ApiResources.GAMES, id, BadResourceMutationReasons.GAME_NOT_PLAYING);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 400,\n message: `Bad mutation for Game with id \"${id}\"`,\n error: `Game doesn't have status with value \"playing\"`,\n });\n });\n });\n});" }, "tests/unit/specs/modules/game/controllers/decorators/api-game-not-found-response.decorator.spec.ts": { "tests": [ { - "id": "1018", + "id": "1019", "name": "Api Game Not Found Response Decorator ApiGameNotFoundResponse should call api not found response function with default values when called without specific options.", "location": { "start": { @@ -108590,7 +108760,7 @@ } }, { - "id": "1019", + "id": "1020", "name": "Api Game Not Found Response Decorator ApiGameNotFoundResponse should call api not found response function with other values when called with specific options.", "location": { "start": { @@ -108605,7 +108775,7 @@ "tests/unit/specs/modules/game/controllers/decorators/api-game-id-param.decorator.spec.ts": { "tests": [ { - "id": "1020", + "id": "1021", "name": "Api Game Id Param Decorator ApiGameIdParam should call api param function with default values when called without specific options.", "location": { "start": { @@ -108615,7 +108785,7 @@ } }, { - "id": "1021", + "id": "1022", "name": "Api Game Id Param Decorator ApiGameIdParam should call api param function with other values when called with specific options.", "location": { "start": { @@ -108630,7 +108800,7 @@ "tests/unit/specs/modules/role/constants/role.constant.spec.ts": { "tests": [ { - "id": "1022", + "id": "1023", "name": "Role Constant werewolvesRoles should contain only roles with side 'werewolves' when called.", "location": { "start": { @@ -108640,7 +108810,7 @@ } }, { - "id": "1023", + "id": "1024", "name": "Role Constant villagerRoles should contain only roles with side 'villagers' when called.", "location": { "start": { @@ -108650,7 +108820,7 @@ } }, { - "id": "1024", + "id": "1025", "name": "Role Constant roles should contain all roles when called.", "location": { "start": { @@ -108660,12 +108830,12 @@ } } ], - "source": "import { roles, villagerRoles, werewolvesRoles } from \"@/modules/role/constants/role.constant\";\nimport { ROLE_SIDES } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeRoles } from \"@tests/factories/role/types/role.type.factory\";\n\ndescribe(\"Role Constant\", () => {\n describe(\"werewolvesRoles\", () => {\n it(\"should contain only roles with side 'werewolves' when called.\", () => {\n expect(werewolvesRoles.length).toBeGreaterThan(0);\n expect(werewolvesRoles.every(role => role.side === ROLE_SIDES.WEREWOLVES)).toBe(true);\n });\n });\n\n describe(\"villagerRoles\", () => {\n it(\"should contain only roles with side 'villagers' when called.\", () => {\n expect(villagerRoles.length).toBeGreaterThan(0);\n expect(villagerRoles.every(role => role.side === ROLE_SIDES.VILLAGERS)).toBe(true);\n });\n });\n\n describe(\"roles\", () => {\n it(\"should contain all roles when called.\", () => {\n expect(roles).toStrictEqual(bulkCreateFakeRoles([...werewolvesRoles, ...villagerRoles].length, [...werewolvesRoles, ...villagerRoles]));\n });\n });\n});" + "source": "import { ROLES, VILLAGER_ROLES, WEREWOLF_ROLES } from \"@/modules/role/constants/role.constant\";\nimport { RoleSides } from \"@/modules/role/enums/role.enum\";\n\nimport { bulkCreateFakeRoles } from \"@tests/factories/role/types/role.type.factory\";\n\ndescribe(\"Role Constant\", () => {\n describe(\"werewolvesRoles\", () => {\n it(\"should contain only roles with side 'werewolves' when called.\", () => {\n expect(WEREWOLF_ROLES.length).toBeGreaterThan(0);\n expect(WEREWOLF_ROLES.every(role => role.side === RoleSides.WEREWOLVES)).toBe(true);\n });\n });\n\n describe(\"villagerRoles\", () => {\n it(\"should contain only roles with side 'villagers' when called.\", () => {\n expect(VILLAGER_ROLES.length).toBeGreaterThan(0);\n expect(VILLAGER_ROLES.every(role => role.side === RoleSides.VILLAGERS)).toBe(true);\n });\n });\n\n describe(\"roles\", () => {\n it(\"should contain all roles when called.\", () => {\n expect(ROLES).toStrictEqual(bulkCreateFakeRoles([...WEREWOLF_ROLES, ...VILLAGER_ROLES].length, [...WEREWOLF_ROLES, ...VILLAGER_ROLES]));\n });\n });\n});" }, "tests/e2e/specs/modules/health/controllers/health.controller.e2e-spec.ts": { "tests": [ { - "id": "1025", + "id": "1026", "name": "Health Controller GET /health should return app health when route is called.", "location": { "start": { @@ -108680,7 +108850,7 @@ "tests/e2e/specs/modules/role/controllers/role.controller.e2e-spec.ts": { "tests": [ { - "id": "1026", + "id": "1027", "name": "Role Controller GET /roles should return roles when route is called.", "location": { "start": { @@ -108690,12 +108860,12 @@ } } ], - "source": "import type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { roles } from \"@/modules/role/constants/role.constant\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nimport { bulkCreateFakeRoles } from \"@tests/factories/role/types/role.type.factory\";\nimport { initNestApp } from \"@tests/e2e/helpers/nest-app.helper\";\n\ndescribe(\"Role Controller\", () => {\n let app: NestFastifyApplication;\n\n beforeAll(async() => {\n const { app: server } = await initNestApp();\n app = server;\n });\n\n afterAll(async() => {\n await app.close();\n });\n\n describe(\"GET /roles\", () => {\n it(\"should return roles when route is called.\", async() => {\n const response = await app.inject({ method: \"GET\", url: \"/roles\" });\n const respondedRoles = response.json();\n\n expect(response.statusCode).toBe(200);\n expect(bulkCreateFakeRoles(respondedRoles.length, respondedRoles)).toStrictEqual(roles);\n });\n });\n});" + "source": "import type { NestFastifyApplication } from \"@nestjs/platform-fastify\";\n\nimport { ROLES } from \"@/modules/role/constants/role.constant\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nimport { bulkCreateFakeRoles } from \"@tests/factories/role/types/role.type.factory\";\nimport { initNestApp } from \"@tests/e2e/helpers/nest-app.helper\";\n\ndescribe(\"Role Controller\", () => {\n let app: NestFastifyApplication;\n\n beforeAll(async() => {\n const { app: server } = await initNestApp();\n app = server;\n });\n\n afterAll(async() => {\n await app.close();\n });\n\n describe(\"GET /roles\", () => {\n it(\"should return roles when route is called.\", async() => {\n const response = await app.inject({ method: \"GET\", url: \"/roles\" });\n const respondedRoles = response.json();\n\n expect(response.statusCode).toBe(200);\n expect(bulkCreateFakeRoles(respondedRoles.length, respondedRoles)).toStrictEqual(ROLES);\n });\n });\n});" }, "tests/unit/specs/shared/validation/transformers/validation.transformer.spec.ts": { "tests": [ { - "id": "1027", + "id": "1028", "name": "Validation Transformer toBoolean should return true when input is {\"value\": \"true\"} [#0].", "location": { "start": { @@ -108705,7 +108875,7 @@ } }, { - "id": "1028", + "id": "1029", "name": "Validation Transformer toBoolean should return false when input is {\"value\": \"false\"} [#1].", "location": { "start": { @@ -108715,7 +108885,7 @@ } }, { - "id": "1029", + "id": "1030", "name": "Validation Transformer toBoolean should return false2 when input is {\"value\": \"false2\"} [#2].", "location": { "start": { @@ -108725,7 +108895,7 @@ } }, { - "id": "1030", + "id": "1031", "name": "Validation Transformer toBoolean should return true when input is {\"value\": true} [#3].", "location": { "start": { @@ -108735,7 +108905,7 @@ } }, { - "id": "1031", + "id": "1032", "name": "Validation Transformer toBoolean should return false when input is {\"value\": false} [#4].", "location": { "start": { @@ -108745,7 +108915,7 @@ } }, { - "id": "1032", + "id": "1033", "name": "Validation Transformer toBoolean should return 0 when input is {\"value\": 0} [#5].", "location": { "start": { @@ -108755,7 +108925,7 @@ } }, { - "id": "1033", + "id": "1034", "name": "Validation Transformer toBoolean should return 1 when input is {\"value\": 1} [#6].", "location": { "start": { @@ -108770,7 +108940,7 @@ "tests/unit/specs/shared/validation/helpers/validation.helper.spec.ts": { "tests": [ { - "id": "1034", + "id": "1035", "name": "Validation Helper doesArrayRespectBounds should return true when no bounds are provided.", "location": { "start": { @@ -108780,7 +108950,7 @@ } }, { - "id": "1035", + "id": "1036", "name": "Validation Helper doesArrayRespectBounds should return false when min bound is not respected.", "location": { "start": { @@ -108790,7 +108960,7 @@ } }, { - "id": "1036", + "id": "1037", "name": "Validation Helper doesArrayRespectBounds should return false when max bound is not respected.", "location": { "start": { @@ -108800,7 +108970,7 @@ } }, { - "id": "1037", + "id": "1038", "name": "Validation Helper doesArrayRespectBounds should return true when min and max bounds are respected.", "location": { "start": { @@ -108815,7 +108985,7 @@ "tests/unit/specs/shared/exception/types/bad-game-play-payload-exception.type.spec.ts": { "tests": [ { - "id": "1038", + "id": "1039", "name": "Bad game play payload exception type getResponse should get response when called.", "location": { "start": { @@ -108825,12 +108995,12 @@ } } ], - "source": "import { BAD_GAME_PLAY_PAYLOAD_REASONS } from \"@/shared/exception/enums/bad-game-play-payload-error.enum\";\nimport { BadGamePlayPayloadException } from \"@/shared/exception/types/bad-game-play-payload-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Bad game play payload exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response when called.\", () => {\n const exception = new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_TARGETS);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 400,\n message: `Bad game play payload`,\n error: `There are too much targets for this current game's state`,\n });\n });\n });\n});" + "source": "import { BadGamePlayPayloadReasons } from \"@/shared/exception/enums/bad-game-play-payload-error.enum\";\nimport { BadGamePlayPayloadException } from \"@/shared/exception/types/bad-game-play-payload-exception.type\";\n\nimport type { ExceptionResponse } from \"@tests/types/exception/exception.types\";\n\ndescribe(\"Bad game play payload exception type\", () => {\n describe(\"getResponse\", () => {\n it(\"should get response when called.\", () => {\n const exception = new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_TARGETS);\n\n expect(exception.getResponse()).toStrictEqual({\n statusCode: 400,\n message: `Bad game play payload`,\n error: `There are too much targets for this current game's state`,\n });\n });\n });\n});" }, "tests/unit/specs/shared/api/helpers/api.helper.spec.ts": { "tests": [ { - "id": "1039", + "id": "1040", "name": "API Helper getResourceSingularForm should return game when called with games [#0].", "location": { "start": { @@ -108840,7 +109010,7 @@ } }, { - "id": "1040", + "id": "1041", "name": "API Helper getResourceSingularForm should return player when called with players [#1].", "location": { "start": { @@ -108850,7 +109020,7 @@ } }, { - "id": "1041", + "id": "1042", "name": "API Helper getResourceSingularForm should return additional card when called with game-additional-cards [#2].", "location": { "start": { @@ -108860,7 +109030,7 @@ } }, { - "id": "1042", + "id": "1043", "name": "API Helper getResourceSingularForm should return role when called with roles [#3].", "location": { "start": { @@ -108870,7 +109040,7 @@ } }, { - "id": "1043", + "id": "1044", "name": "API Helper getResourceSingularForm should return health when called with health [#4].", "location": { "start": { @@ -108880,12 +109050,12 @@ } } ], - "source": "import { API_RESOURCES } from \"@/shared/api/enums/api.enum\";\nimport { getResourceSingularForm } from \"@/shared/api/helpers/api.helper\";\n\ndescribe(\"API Helper\", () => {\n describe(\"getResourceSingularForm\", () => {\n it.each<{ resource: API_RESOURCES; singular: string }>([\n { resource: API_RESOURCES.GAMES, singular: \"game\" },\n { resource: API_RESOURCES.PLAYERS, singular: \"player\" },\n { resource: API_RESOURCES.GAME_ADDITIONAL_CARDS, singular: \"additional card\" },\n { resource: API_RESOURCES.ROLES, singular: \"role\" },\n { resource: API_RESOURCES.HEALTH, singular: \"health\" },\n ])(\"should return $singular when called with $resource [#$#].\", ({ resource, singular }) => {\n expect(getResourceSingularForm(resource)).toBe(singular);\n });\n });\n});" + "source": "import { ApiResources } from \"@/shared/api/enums/api.enum\";\nimport { getResourceSingularForm } from \"@/shared/api/helpers/api.helper\";\n\ndescribe(\"API Helper\", () => {\n describe(\"getResourceSingularForm\", () => {\n it.each<{ resource: ApiResources; singular: string }>([\n { resource: ApiResources.GAMES, singular: \"game\" },\n { resource: ApiResources.PLAYERS, singular: \"player\" },\n { resource: ApiResources.GAME_ADDITIONAL_CARDS, singular: \"additional card\" },\n { resource: ApiResources.ROLES, singular: \"role\" },\n { resource: ApiResources.HEALTH, singular: \"health\" },\n ])(\"should return $singular when called with $resource [#$#].\", ({ resource, singular }) => {\n expect(getResourceSingularForm(resource)).toBe(singular);\n });\n });\n});" }, "tests/unit/specs/modules/game/dto/base/decorators/composition/composition-unique-names.decorator.spec.ts": { "tests": [ { - "id": "1044", + "id": "1045", "name": "Composition Unique Names Decorator getPlayerName should return same value when value is null.", "location": { "start": { @@ -108895,7 +109065,7 @@ } }, { - "id": "1045", + "id": "1046", "name": "Composition Unique Names Decorator getPlayerName should return same value when value is not an object.", "location": { "start": { @@ -108905,7 +109075,7 @@ } }, { - "id": "1046", + "id": "1047", "name": "Composition Unique Names Decorator getPlayerName should return same value when value doesn't have name field.", "location": { "start": { @@ -108915,7 +109085,7 @@ } }, { - "id": "1047", + "id": "1048", "name": "Composition Unique Names Decorator getPlayerName should return name when called.", "location": { "start": { @@ -108930,7 +109100,7 @@ "tests/unit/specs/modules/role/helpers/role.factory.spec.ts": { "tests": [ { - "id": "1048", + "id": "1049", "name": "Role Factory createRole should create a role when called.", "location": { "start": { @@ -108940,12 +109110,12 @@ } } ], - "source": "import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from \"@/modules/role/enums/role.enum\";\nimport { createRole } from \"@/modules/role/helpers/role.factory\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nimport { createFakeRole } from \"@tests/factories/role/types/role.type.factory\";\n\ndescribe(\"Role Factory\", () => {\n describe(\"createRole\", () => {\n it(\"should create a role when called.\", () => {\n const role: Role = {\n name: ROLE_NAMES.ANCIENT,\n type: ROLE_TYPES.AMBIGUOUS,\n side: ROLE_SIDES.VILLAGERS,\n maxInGame: 1,\n minInGame: 1,\n };\n \n expect(createRole(role)).toStrictEqual(createFakeRole(role));\n });\n });\n});" + "source": "import { RoleNames, RoleSides, RoleTypes } from \"@/modules/role/enums/role.enum\";\nimport { createRole } from \"@/modules/role/helpers/role.factory\";\nimport type { Role } from \"@/modules/role/types/role.type\";\n\nimport { createFakeRole } from \"@tests/factories/role/types/role.type.factory\";\n\ndescribe(\"Role Factory\", () => {\n describe(\"createRole\", () => {\n it(\"should create a role when called.\", () => {\n const role: Role = {\n name: RoleNames.ANCIENT,\n type: RoleTypes.AMBIGUOUS,\n side: RoleSides.VILLAGERS,\n maxInGame: 1,\n minInGame: 1,\n };\n \n expect(createRole(role)).toStrictEqual(createFakeRole(role));\n });\n });\n});" }, "tests/unit/specs/modules/game/helpers/game-phase/game-phase.helper.spec.ts": { "tests": [ { - "id": "1049", + "id": "1050", "name": "Game Phase Helper isGamePhaseOver should return false when the phase is not over.", "location": { "start": { @@ -108955,7 +109125,7 @@ } }, { - "id": "1050", + "id": "1051", "name": "Game Phase Helper isGamePhaseOver should return true when the phase is over.", "location": { "start": { @@ -108970,7 +109140,7 @@ "tests/e2e/specs/app.controller.e2e-spec.ts": { "tests": [ { - "id": "1051", + "id": "1052", "name": "App Controller GET / should return status code 204 when route is called.", "location": { "start": { @@ -108985,7 +109155,7 @@ "tests/unit/specs/server/helpers/server.helper.spec.ts": { "tests": [ { - "id": "1052", + "id": "1053", "name": "Server Helper queryStringParser should call qs parse method with specific options when called.", "location": { "start": { @@ -109000,7 +109170,7 @@ "tests/unit/specs/server/constants/server.constant.spec.ts": { "tests": [ { - "id": "1053", + "id": "1054", "name": "Server Constant fastifyServerDefaultOptions should get fastify server default options when called.", "location": { "start": { @@ -109010,7 +109180,7 @@ } } ], - "source": "import type { FastifyServerOptions } from \"fastify\";\n\nimport { fastifyServerDefaultOptions } from \"@/server/constants/server.constant\";\n\ndescribe(\"Server Constant\", () => {\n describe(\"fastifyServerDefaultOptions\", () => {\n it(\"should get fastify server default options when called.\", () => {\n expect(fastifyServerDefaultOptions).toStrictEqual({ querystringParser: expect.any(Function) as (string) => Record });\n });\n });\n});" + "source": "import type { FastifyServerOptions } from \"fastify\";\n\nimport { FASTIFY_SERVER_DEFAULT_OPTIONS } from \"@/server/constants/server.constant\";\n\ndescribe(\"Server Constant\", () => {\n describe(\"fastifyServerDefaultOptions\", () => {\n it(\"should get fastify server default options when called.\", () => {\n expect(FASTIFY_SERVER_DEFAULT_OPTIONS).toStrictEqual({ querystringParser: expect.any(Function) as (string) => Record });\n });\n });\n});" } }, "projectRoot": "/Users/antoinezanardi/WebstormProjects/werewolves-assistant-api-next", diff --git a/tests/unit/specs/modules/game/controllers/pipes/get-game-by-id.pipe.spec.ts b/tests/unit/specs/modules/game/controllers/pipes/get-game-by-id.pipe.spec.ts index 7181052c3..1d39a0cbc 100644 --- a/tests/unit/specs/modules/game/controllers/pipes/get-game-by-id.pipe.spec.ts +++ b/tests/unit/specs/modules/game/controllers/pipes/get-game-by-id.pipe.spec.ts @@ -6,7 +6,7 @@ import type { TestingModule } from "@nestjs/testing"; import { GetGameByIdPipe } from "@/modules/game/controllers/pipes/get-game-by-id.pipe"; import { GameRepository } from "@/modules/game/providers/repositories/game.repository"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; import { createObjectIdFromString } from "@tests/helpers/mongoose/mongoose.helper"; @@ -45,7 +45,7 @@ describe("Get Game By Id Pipe", () => { it("should throw error when game is not found.", async() => { mocks.gameRepository.findOne.mockResolvedValue(null); - const expectedError = new ResourceNotFoundException(API_RESOURCES.GAMES, gameId.toString()); + const expectedError = new ResourceNotFoundException(ApiResources.GAMES, gameId.toString()); await expect(getGameByIdPipe.transform(gameId)).rejects.toThrow(expectedError); }); diff --git a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.spec.ts index bf5350e09..cf0d30396 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator.spec.ts @@ -1,6 +1,6 @@ -import { gameAdditionalCardsThiefRoleNames } from "@/modules/game/constants/game-additional-card/game-additional-card.constant"; +import { GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES } from "@/modules/game/constants/game-additional-cards/game-additional-cards.constant"; import { areAdditionalCardsForThiefRolesRespected, getAdditionalCardsForThiefRolesDefaultMessage } from "@/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-roles.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakeCreateGameAdditionalCardDto } from "@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory"; @@ -14,8 +14,8 @@ describe("Additional Cards For Thief Roles Decorator", () => { it("should return false when at least one additional card role is not for thief.", () => { const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.THIEF }), ]; expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(false); @@ -23,8 +23,8 @@ describe("Additional Cards For Thief Roles Decorator", () => { it("should return true when all additional cards roles are for thief.", () => { const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.LITTLE_GIRL }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.LITTLE_GIRL }), ]; expect(areAdditionalCardsForThiefRolesRespected(additionalCards)).toBe(true); @@ -33,7 +33,7 @@ describe("Additional Cards For Thief Roles Decorator", () => { describe("getAdditionalCardsForThiefRolesDefaultMessage", () => { it("should return additional cards for thief roles default message when called.", () => { - expect(getAdditionalCardsForThiefRolesDefaultMessage()).toBe(`additionalCards.roleName must be one of the following values: ${gameAdditionalCardsThiefRoleNames.toString()}`); + expect(getAdditionalCardsForThiefRolesDefaultMessage()).toBe(`additionalCards.roleName must be one of the following values: ${GAME_ADDITIONAL_CARDS_THIEF_ROLE_NAMES.toString()}`); }); }); }); \ No newline at end of file diff --git a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator.spec.ts index e1f024498..ccb5ac2f6 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator.spec.ts @@ -1,7 +1,7 @@ import type { ValidationArguments } from "class-validator"; import { getAdditionalCardsForThiefSizeDefaultMessage, isAdditionalCardsForThiefSizeRespected } from "@/modules/game/dto/base/decorators/additional-cards/additional-cards-for-thief-size.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakeCreateGameAdditionalCardDto } from "@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory"; import { createFakeCreateThiefGameOptionsDto } from "@tests/factories/game/dto/create-game/create-game-options/create-roles-game-options/create-roles-game-options.dto.factory"; @@ -42,11 +42,11 @@ describe("Additional Cards For Thief Size Decorator", () => { it("should return false when cards size doesn't respect the options.", () => { const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) }); const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }), ]; const createGameDto = createFakeCreateGameDto({ options, additionalCards }); const validationArguments: ValidationArguments = { @@ -63,8 +63,8 @@ describe("Additional Cards For Thief Size Decorator", () => { it("should return true when cards size doesn't respect the options.", () => { const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeCreateThiefGameOptionsDto({ additionalCardsCount: 2 }) }) }); const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER, recipient: ROLE_NAMES.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER, recipient: RoleNames.THIEF }), ]; const createGameDto = createFakeCreateGameDto({ options, additionalCards }); const validationArguments: ValidationArguments = { diff --git a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts index f42f7bf37..6c6999148 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator.spec.ts @@ -1,7 +1,7 @@ import type { ValidationArguments } from "class-validator"; import { getAdditionalCardsPresenceDefaultMessage, isAdditionalCardsPresenceRespected } from "@/modules/game/dto/base/decorators/additional-cards/additional-cards-presence.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakeCreateGameAdditionalCardDto } from "@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory"; import { createFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; @@ -16,9 +16,9 @@ describe("Additional Cards Presence Decorator", () => { ]; const createGameDto = createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.SEER } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.SEER } }), ], additionalCards, }); @@ -36,9 +36,9 @@ describe("Additional Cards Presence Decorator", () => { it("should return false when additional cards are not set but there is thief in game.", () => { const createGameDto = createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.THIEF } }), ], }); const validationArguments: ValidationArguments = { @@ -55,9 +55,9 @@ describe("Additional Cards Presence Decorator", () => { it("should return false when additional cards are not an array.", () => { const createGameDto = createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.THIEF } }), ], }); const validationArguments: ValidationArguments = { @@ -78,9 +78,9 @@ describe("Additional Cards Presence Decorator", () => { ]; const createGameDto = createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.THIEF } }), ], }); const validationArguments: ValidationArguments = { @@ -97,9 +97,9 @@ describe("Additional Cards Presence Decorator", () => { it("should return true when additional cards are not set and there is no thief is in the game.", () => { const createGameDto = createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.SEER } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.SEER } }), ], }); const validationArguments: ValidationArguments = { @@ -118,9 +118,9 @@ describe("Additional Cards Presence Decorator", () => { it("should return additional cards required presence message when they are not set.", () => { const createGameDto = createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.THIEF } }), ], }); const validationArguments: ValidationArguments = { @@ -141,9 +141,9 @@ describe("Additional Cards Presence Decorator", () => { ]; const createGameDto = createFakeCreateGameDto({ players: [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.SEER } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.SEER } }), ], additionalCards, }); diff --git a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts index a660bb0fa..95edf19aa 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator.spec.ts @@ -1,7 +1,7 @@ import type { ValidationArguments } from "class-validator"; import { areAdditionalCardsRolesMaxInGameRespected, getAdditionalCardsRolesMaxInGameDefaultMessage } from "@/modules/game/dto/base/decorators/additional-cards/additional-cards-roles-max-in-game.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakeCreateGameAdditionalCardDto } from "@tests/factories/game/dto/create-game/create-game-additional-card/create-game-additional-card.dto.factory"; import { createFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; @@ -12,10 +12,10 @@ describe("Additional Cards Roles Max in Game Decorator", () => { it("should return true when additional cards are not defined.", () => { const additionalCards = undefined; const players = [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.SEER } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.SEER } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: RoleNames.THIEF } }), ]; const game = createFakeCreateGameDto({ additionalCards, players }); const validationArguments: ValidationArguments = { @@ -31,8 +31,8 @@ describe("Additional Cards Roles Max in Game Decorator", () => { it("should return false when players cards are not defined.", () => { const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.VILLAGER_VILLAGER }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.VILLAGER_VILLAGER }), ]; const game = createFakeCreateGameDto({ additionalCards }, { players: undefined }); const validationArguments: ValidationArguments = { @@ -48,14 +48,14 @@ describe("Additional Cards Roles Max in Game Decorator", () => { it("should return false when at least one role max in game is not respected due to additional cards only.", () => { const players = [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.SEER } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.VILLAGER } }), - createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.SEER } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.VILLAGER } }), + createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: RoleNames.THIEF } }), ]; const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH }), ]; const game = createFakeCreateGameDto({ additionalCards, players }); const validationArguments: ValidationArguments = { @@ -71,14 +71,14 @@ describe("Additional Cards Roles Max in Game Decorator", () => { it("should return false when at least one role max in game is not respected due to additional cards and player roles together.", () => { const players = [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.SEER } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.WITCH } }), - createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.SEER } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.WITCH } }), + createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: RoleNames.THIEF } }), ]; const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WITCH }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WITCH }), ]; const game = createFakeCreateGameDto({ additionalCards, players }); const validationArguments: ValidationArguments = { @@ -94,14 +94,14 @@ describe("Additional Cards Roles Max in Game Decorator", () => { it("should return true when at every role max in game are respected among additional cards and player roles together.", () => { const players = [ - createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: ROLE_NAMES.SEER } }), - createFakeCreateGamePlayerDto({ name: "JB", role: { name: ROLE_NAMES.WEREWOLF } }), - createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: ROLE_NAMES.WITCH } }), - createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: ROLE_NAMES.THIEF } }), + createFakeCreateGamePlayerDto({ name: "Antoine", role: { name: RoleNames.SEER } }), + createFakeCreateGamePlayerDto({ name: "JB", role: { name: RoleNames.WEREWOLF } }), + createFakeCreateGamePlayerDto({ name: "Olivia", role: { name: RoleNames.WITCH } }), + createFakeCreateGamePlayerDto({ name: "Thomas", role: { name: RoleNames.THIEF } }), ]; const additionalCards = [ - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeCreateGameAdditionalCardDto({ roleName: ROLE_NAMES.HUNTER }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.WEREWOLF }), + createFakeCreateGameAdditionalCardDto({ roleName: RoleNames.HUNTER }), ]; const game = createFakeCreateGameDto({ additionalCards, players }); const validationArguments: ValidationArguments = { diff --git a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts index e00c0eb70..102a21188 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-villager.decorator.spec.ts @@ -2,7 +2,7 @@ import { doesCompositionHaveAtLeastOneVillager, getCompositionHasVillagerDefaultMessage, } from "@/modules/game/dto/base/decorators/composition/composition-has-villager.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { bulkCreateFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; @@ -18,10 +18,10 @@ describe("Composition Has Villager Decorator", () => { it("should return false when one of the players is not an object.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(doesCompositionHaveAtLeastOneVillager([...players, "toto"])).toBe(false); @@ -29,10 +29,10 @@ describe("Composition Has Villager Decorator", () => { it("should return false when one of the players doesn't have the good structure.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(doesCompositionHaveAtLeastOneVillager([...players, { name: "bad", role: { titi: "toto" } }])).toBe(false); @@ -40,10 +40,10 @@ describe("Composition Has Villager Decorator", () => { it("should return false when composition is full of werewolves.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILE_FATHER_OF_WOLVES } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, - { role: { name: ROLE_NAMES.VILE_FATHER_OF_WOLVES } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILE_FATHER_OF_WOLVES } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, + { role: { name: RoleNames.VILE_FATHER_OF_WOLVES } }, ]); expect(doesCompositionHaveAtLeastOneVillager(players)).toBe(false); @@ -55,10 +55,10 @@ describe("Composition Has Villager Decorator", () => { it("should return true when there is at least one villager in composition.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WEREWOLF } }, ]); expect(doesCompositionHaveAtLeastOneVillager(players)).toBe(true); diff --git a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts index 1acbeb596..4a0454b78 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator.spec.ts @@ -2,7 +2,7 @@ import { doesCompositionHaveAtLeastOneWerewolf, getCompositionHasWerewolfDefaultMessage, } from "@/modules/game/dto/base/decorators/composition/composition-has-werewolf.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { bulkCreateFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; @@ -18,10 +18,10 @@ describe("Composition Has Werewolf Decorator", () => { it("should return false when one of the players is not an object.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(doesCompositionHaveAtLeastOneWerewolf([...players, "toto"])).toBe(false); @@ -29,10 +29,10 @@ describe("Composition Has Werewolf Decorator", () => { it("should return false when one of the players doesn't have the good structure.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(doesCompositionHaveAtLeastOneWerewolf([...players, { name: "bad", role: { titi: "toto" } }])).toBe(false); @@ -40,10 +40,10 @@ describe("Composition Has Werewolf Decorator", () => { it("should return false when composition is full of villagers.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.HUNTER } }, + { role: { name: RoleNames.VILLAGER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.HUNTER } }, ]); expect(doesCompositionHaveAtLeastOneWerewolf(players)).toBe(false); @@ -55,10 +55,10 @@ describe("Composition Has Werewolf Decorator", () => { it("should return true when there is at least one werewolf in composition.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.HUNTER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.HUNTER } }, + { role: { name: RoleNames.WEREWOLF } }, ]); expect(doesCompositionHaveAtLeastOneWerewolf(players)).toBe(true); diff --git a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts index e9b90ccb7..9d7210faf 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator.spec.ts @@ -2,7 +2,7 @@ import { doesCompositionHaveConsistentPositions, getCompositionPositionsConsistencyDefaultMessage, } from "@/modules/game/dto/base/decorators/composition/composition-positions-consistency.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { bulkCreateFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; @@ -18,10 +18,10 @@ describe("Composition Positions Consistency Decorator", () => { it("should return false when one of the players is not an object.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(doesCompositionHaveConsistentPositions([...players, "toto"])).toBe(false); @@ -29,10 +29,10 @@ describe("Composition Positions Consistency Decorator", () => { it("should return true when there is no position set in composition.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, ]); expect(doesCompositionHaveConsistentPositions(players)).toBe(true); @@ -40,10 +40,10 @@ describe("Composition Positions Consistency Decorator", () => { it("should return false when there is one position set in composition but not the others.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER }, position: 0 }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER }, position: 0 }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, ]); expect(doesCompositionHaveConsistentPositions(players)).toBe(false); @@ -51,10 +51,10 @@ describe("Composition Positions Consistency Decorator", () => { it("should return false when there is twice the same position in composition.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER }, position: 0 }, - { role: { name: ROLE_NAMES.WITCH }, position: 1 }, - { role: { name: ROLE_NAMES.SEER }, position: 3 }, - { role: { name: ROLE_NAMES.WEREWOLF }, position: 3 }, + { role: { name: RoleNames.VILLAGER }, position: 0 }, + { role: { name: RoleNames.WITCH }, position: 1 }, + { role: { name: RoleNames.SEER }, position: 3 }, + { role: { name: RoleNames.WEREWOLF }, position: 3 }, ]); expect(doesCompositionHaveConsistentPositions(players)).toBe(false); @@ -62,10 +62,10 @@ describe("Composition Positions Consistency Decorator", () => { it("should return false when positions sequence starts at 1.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER }, position: 1 }, - { role: { name: ROLE_NAMES.WITCH }, position: 2 }, - { role: { name: ROLE_NAMES.SEER }, position: 3 }, - { role: { name: ROLE_NAMES.WEREWOLF }, position: 4 }, + { role: { name: RoleNames.VILLAGER }, position: 1 }, + { role: { name: RoleNames.WITCH }, position: 2 }, + { role: { name: RoleNames.SEER }, position: 3 }, + { role: { name: RoleNames.WEREWOLF }, position: 4 }, ]); expect(doesCompositionHaveConsistentPositions(players)).toBe(false); @@ -73,10 +73,10 @@ describe("Composition Positions Consistency Decorator", () => { it("should return false when there is one too high position in composition.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER }, position: 0 }, - { role: { name: ROLE_NAMES.WITCH }, position: 1 }, - { role: { name: ROLE_NAMES.SEER }, position: 2 }, - { role: { name: ROLE_NAMES.WEREWOLF }, position: 666 }, + { role: { name: RoleNames.VILLAGER }, position: 0 }, + { role: { name: RoleNames.WITCH }, position: 1 }, + { role: { name: RoleNames.SEER }, position: 2 }, + { role: { name: RoleNames.WEREWOLF }, position: 666 }, ]); expect(doesCompositionHaveConsistentPositions(players)).toBe(false); @@ -84,10 +84,10 @@ describe("Composition Positions Consistency Decorator", () => { it("should return true when all positions are sequence in composition.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER }, position: 0 }, - { role: { name: ROLE_NAMES.WITCH }, position: 1 }, - { role: { name: ROLE_NAMES.SEER }, position: 2 }, - { role: { name: ROLE_NAMES.WEREWOLF }, position: 3 }, + { role: { name: RoleNames.VILLAGER }, position: 0 }, + { role: { name: RoleNames.WITCH }, position: 1 }, + { role: { name: RoleNames.SEER }, position: 2 }, + { role: { name: RoleNames.WEREWOLF }, position: 3 }, ]); expect(doesCompositionHaveConsistentPositions(players)).toBe(true); diff --git a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts index 3a5daefd2..256b53d8d 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator.spec.ts @@ -2,7 +2,7 @@ import { getCompositionRolesMaxInGameDefaultMessage, areCompositionRolesMaxInGameRespected, } from "@/modules/game/dto/base/decorators/composition/composition-roles-max-in-game.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { bulkCreateFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; @@ -18,10 +18,10 @@ describe("Composition Roles Max In Game Decorator", () => { it("should return false when one of the players is not an object.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(areCompositionRolesMaxInGameRespected([...players, "toto"])).toBe(false); @@ -29,10 +29,10 @@ describe("Composition Roles Max In Game Decorator", () => { it("should return false when one of the players doesn't have the good structure.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(areCompositionRolesMaxInGameRespected([...players, { name: "bad", role: { toto: "tata" } }])).toBe(false); @@ -40,10 +40,10 @@ describe("Composition Roles Max In Game Decorator", () => { it("should return false when there is 2 players with the same role but max in game is 1.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(areCompositionRolesMaxInGameRespected(players)).toBe(false); @@ -55,14 +55,14 @@ describe("Composition Roles Max In Game Decorator", () => { it("should return true when the limit for each role is respected.", () => { const players = bulkCreateFakeCreateGamePlayerDto(8, [ - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, - { role: { name: ROLE_NAMES.VILLAGER } }, - { role: { name: ROLE_NAMES.VILLAGER } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, + { role: { name: RoleNames.VILLAGER } }, + { role: { name: RoleNames.VILLAGER } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(areCompositionRolesMaxInGameRespected(players)).toBe(true); diff --git a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts index 49c90c80c..66a5cbad7 100644 --- a/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator.spec.ts @@ -2,7 +2,7 @@ import { getCompositionRolesMinInGameDefaultMessage, areCompositionRolesMinInGameRespected, } from "@/modules/game/dto/base/decorators/composition/composition-roles-min-in-game.decorator"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { bulkCreateFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; @@ -18,10 +18,10 @@ describe("Composition Roles Min In Game Decorator", () => { it("should return false when one of the players is not an object.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(areCompositionRolesMinInGameRespected([...players, "toto"])).toBe(false); @@ -29,10 +29,10 @@ describe("Composition Roles Min In Game Decorator", () => { it("should return false when one of the players doesn't have the good structure.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(areCompositionRolesMinInGameRespected([...players, { name: "bad", role: { toto: "tata" } }])).toBe(false); @@ -40,10 +40,10 @@ describe("Composition Roles Min In Game Decorator", () => { it("should return false when there is only 1 player with a role which min in game is 2.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.VILLAGER } }, ]); expect(areCompositionRolesMinInGameRespected(players)).toBe(false); @@ -55,15 +55,15 @@ describe("Composition Roles Min In Game Decorator", () => { it("should return true when the limit for each role is respected.", () => { const players = bulkCreateFakeCreateGamePlayerDto(9, [ - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, ]); expect(areCompositionRolesMinInGameRespected(players)).toBe(true); diff --git a/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-role.transformer.spec.ts b/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-role.transformer.spec.ts index 69aa51a43..c5ce1a044 100644 --- a/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-role.transformer.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-role.transformer.spec.ts @@ -2,7 +2,7 @@ import type { TransformFnParams } from "class-transformer/types/interfaces"; import { playerRoleTransformer } from "@/modules/game/dto/base/game-player/transformers/player-role.transformer"; import type { CreateGamePlayerRoleDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player-role/create-game-player-role.dto"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; describe("Player Role Transformer", () => { describe("playerRoleTransformer", () => { @@ -23,34 +23,34 @@ describe("Player Role Transformer", () => { }); it("should fill player role (seer) fields when called.", () => { - const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: ROLE_NAMES.SEER }; + const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: RoleNames.SEER }; expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({ - name: ROLE_NAMES.SEER, - original: ROLE_NAMES.SEER, - current: ROLE_NAMES.SEER, + name: RoleNames.SEER, + original: RoleNames.SEER, + current: RoleNames.SEER, isRevealed: false, }); }); it("should fill player role (white-werewolf) fields when called.", () => { - const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: ROLE_NAMES.WHITE_WEREWOLF }; + const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: RoleNames.WHITE_WEREWOLF }; expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({ - name: ROLE_NAMES.WHITE_WEREWOLF, - original: ROLE_NAMES.WHITE_WEREWOLF, - current: ROLE_NAMES.WHITE_WEREWOLF, + name: RoleNames.WHITE_WEREWOLF, + original: RoleNames.WHITE_WEREWOLF, + current: RoleNames.WHITE_WEREWOLF, isRevealed: false, }); }); it("should fill player role fields with isRevealed true when role is villager villager.", () => { - const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: ROLE_NAMES.VILLAGER_VILLAGER }; + const createPlayerRoleDto: CreateGamePlayerRoleDto = { name: RoleNames.VILLAGER_VILLAGER }; expect(playerRoleTransformer({ value: createPlayerRoleDto } as TransformFnParams)).toStrictEqual({ - name: ROLE_NAMES.VILLAGER_VILLAGER, - original: ROLE_NAMES.VILLAGER_VILLAGER, - current: ROLE_NAMES.VILLAGER_VILLAGER, + name: RoleNames.VILLAGER_VILLAGER, + original: RoleNames.VILLAGER_VILLAGER, + current: RoleNames.VILLAGER_VILLAGER, isRevealed: true, }); }); diff --git a/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts b/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts index ab30b59d8..77eebb468 100644 --- a/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts +++ b/tests/unit/specs/modules/game/dto/base/game-player/transformers/player-side.transformer.spec.ts @@ -2,20 +2,20 @@ import type { TransformFnParams } from "class-transformer/types/interfaces"; import { playerSideTransformer } from "@/modules/game/dto/base/game-player/transformers/player-side.transformer"; import type { CreateGamePlayerSideDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player-side/create-game-player-side.dto"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import { createFakeCreateGamePlayerDto } from "@tests/factories/game/dto/create-game/create-game-player/create-game-player.dto.factory"; describe("Player Side Transformer", () => { describe("playerSideTransformer", () => { it("should return null when value is null.", () => { - const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WHITE_WEREWOLF } }); + const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WHITE_WEREWOLF } }); expect(playerSideTransformer({ value: null, obj: player } as TransformFnParams)).toBeNull(); }); it("should return same value when value is not an object.", () => { - const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WHITE_WEREWOLF } }); + const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WHITE_WEREWOLF } }); expect(playerSideTransformer({ value: "toto", obj: player } as TransformFnParams)).toBe("toto"); }); @@ -25,7 +25,7 @@ describe("Player Side Transformer", () => { }); it("should return same value when obj doesn't have the role.name field.", () => { - expect(playerSideTransformer({ value: {}, obj: { role: { toto: ROLE_NAMES.WITCH } } } as TransformFnParams)).toStrictEqual({}); + expect(playerSideTransformer({ value: {}, obj: { role: { toto: RoleNames.WITCH } } } as TransformFnParams)).toStrictEqual({}); }); it("should return same value when role is unknown.", () => { @@ -33,20 +33,20 @@ describe("Player Side Transformer", () => { }); it("should fill player side with werewolf data when role is white werewolf.", () => { - const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WHITE_WEREWOLF } }); + const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WHITE_WEREWOLF } }); expect(playerSideTransformer({ value: {}, obj: player } as TransformFnParams)).toStrictEqual({ - current: ROLE_SIDES.WEREWOLVES, - original: ROLE_SIDES.WEREWOLVES, + current: RoleSides.WEREWOLVES, + original: RoleSides.WEREWOLVES, }); }); it("should fill player side with villager data when role is witch.", () => { - const player = createFakeCreateGamePlayerDto({ role: { name: ROLE_NAMES.WITCH } }); + const player = createFakeCreateGamePlayerDto({ role: { name: RoleNames.WITCH } }); expect(playerSideTransformer({ value: {}, obj: player } as TransformFnParams)).toStrictEqual({ - current: ROLE_SIDES.VILLAGERS, - original: ROLE_SIDES.VILLAGERS, + current: RoleSides.VILLAGERS, + original: RoleSides.VILLAGERS, }); }); }); diff --git a/tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts b/tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts index 528695304..1ac1e4cfa 100644 --- a/tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts +++ b/tests/unit/specs/modules/game/helpers/game-play/game-play.factory.spec.ts @@ -1,11 +1,11 @@ import { plainToInstance } from "class-transformer"; -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { createGamePlay, createGamePlayAllElectSheriff, createGamePlayAllVote, createGamePlayBigBadWolfEats, createGamePlayCharmedMeetEachOther, createGamePlayCupidCharms, createGamePlayDogWolfChoosesSide, createGamePlayFoxSniffs, createGamePlayGuardProtects, createGamePlayHunterShoots, createGamePlayLoversMeetEachOther, createGamePlayPiedPiperCharms, createGamePlayRavenMarks, createGamePlayScapegoatBansVoting, createGamePlaySeerLooks, createGamePlaySheriffDelegates, createGamePlaySheriffSettlesVotes, createGamePlaySource, createGamePlayStutteringJudgeChoosesSign, createGamePlayThiefChoosesCard, createGamePlayThreeBrothersMeetEachOther, createGamePlayTwoSistersMeetEachOther, createGamePlayWerewolvesEat, createGamePlayWhiteWerewolfEats, createGamePlayWildChildChoosesModel, createGamePlayWitchUsesPotions } from "@/modules/game/helpers/game-play/game-play.factory"; import { GamePlaySource } from "@/modules/game/schemas/game-play/game-play-source/game-play-source.schema"; import { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakePlayer } from "@tests/factories/game/schemas/player/player.schema.factory"; import { createFakeGamePlay } from "@tests/factories/game/schemas/game-play/game-play.schema.factory"; @@ -15,8 +15,8 @@ describe("Game Play Factory", () => { describe("createGamePlaySheriffSettlesVotes", () => { it("should create game play sheriff settles votes when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }), - action: GAME_PLAY_ACTIONS.SETTLE_VOTES, + source: createFakeGamePlaySource({ name: PlayerAttributeNames.SHERIFF }), + action: GamePlayActions.SETTLE_VOTES, }); expect(createGamePlaySheriffSettlesVotes()).toStrictEqual(expectedGamePlay); @@ -26,8 +26,8 @@ describe("Game Play Factory", () => { describe("createGamePlaySheriffDelegates", () => { it("should create game play sheriff delegates when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_ATTRIBUTE_NAMES.SHERIFF }), - action: GAME_PLAY_ACTIONS.DELEGATE, + source: createFakeGamePlaySource({ name: PlayerAttributeNames.SHERIFF }), + action: GamePlayActions.DELEGATE, }); expect(createGamePlaySheriffDelegates()).toStrictEqual(expectedGamePlay); @@ -37,8 +37,8 @@ describe("Game Play Factory", () => { describe("createGamePlayAllVote", () => { it("should create game play all vote when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }), - action: GAME_PLAY_ACTIONS.VOTE, + source: createFakeGamePlaySource({ name: PlayerGroups.ALL }), + action: GamePlayActions.VOTE, }); expect(createGamePlayAllVote()).toStrictEqual(expectedGamePlay); @@ -48,8 +48,8 @@ describe("Game Play Factory", () => { describe("createGamePlayAllElectSheriff", () => { it("should create game play all elect sheriff when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }), - action: GAME_PLAY_ACTIONS.ELECT_SHERIFF, + source: createFakeGamePlaySource({ name: PlayerGroups.ALL }), + action: GamePlayActions.ELECT_SHERIFF, }); expect(createGamePlayAllElectSheriff()).toStrictEqual(expectedGamePlay); @@ -59,8 +59,8 @@ describe("Game Play Factory", () => { describe("createGamePlayThiefChoosesCard", () => { it("should create game play thief chooses card when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.THIEF }), - action: GAME_PLAY_ACTIONS.CHOOSE_CARD, + source: createFakeGamePlaySource({ name: RoleNames.THIEF }), + action: GamePlayActions.CHOOSE_CARD, }); expect(createGamePlayThiefChoosesCard()).toStrictEqual(expectedGamePlay); @@ -70,8 +70,8 @@ describe("Game Play Factory", () => { describe("createGamePlayStutteringJudgeChoosesSign", () => { it("should create game play stuttering judge chooses sign when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.STUTTERING_JUDGE }), - action: GAME_PLAY_ACTIONS.CHOOSE_SIGN, + source: createFakeGamePlaySource({ name: RoleNames.STUTTERING_JUDGE }), + action: GamePlayActions.CHOOSE_SIGN, }); expect(createGamePlayStutteringJudgeChoosesSign()).toStrictEqual(expectedGamePlay); @@ -81,8 +81,8 @@ describe("Game Play Factory", () => { describe("createGamePlayScapegoatBansVoting", () => { it("should create game play scapegoat bans voting when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.SCAPEGOAT }), - action: GAME_PLAY_ACTIONS.BAN_VOTING, + source: createFakeGamePlaySource({ name: RoleNames.SCAPEGOAT }), + action: GamePlayActions.BAN_VOTING, }); expect(createGamePlayScapegoatBansVoting()).toStrictEqual(expectedGamePlay); @@ -92,8 +92,8 @@ describe("Game Play Factory", () => { describe("createGamePlayDogWolfChoosesSide", () => { it("should create game play dog wolf chooses side when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.DOG_WOLF }), - action: GAME_PLAY_ACTIONS.CHOOSE_SIDE, + source: createFakeGamePlaySource({ name: RoleNames.DOG_WOLF }), + action: GamePlayActions.CHOOSE_SIDE, }); expect(createGamePlayDogWolfChoosesSide()).toStrictEqual(expectedGamePlay); @@ -103,8 +103,8 @@ describe("Game Play Factory", () => { describe("createGamePlayWildChildChoosesModel", () => { it("should create game play wild child chooses model when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }), - action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, + source: createFakeGamePlaySource({ name: RoleNames.WILD_CHILD }), + action: GamePlayActions.CHOOSE_MODEL, }); expect(createGamePlayWildChildChoosesModel()).toStrictEqual(expectedGamePlay); @@ -114,8 +114,8 @@ describe("Game Play Factory", () => { describe("createGamePlayFoxSniffs", () => { it("should create game play fox sniffs when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.FOX }), - action: GAME_PLAY_ACTIONS.SNIFF, + source: createFakeGamePlaySource({ name: RoleNames.FOX }), + action: GamePlayActions.SNIFF, }); expect(createGamePlayFoxSniffs()).toStrictEqual(expectedGamePlay); @@ -125,8 +125,8 @@ describe("Game Play Factory", () => { describe("createGamePlayCharmedMeetEachOther", () => { it("should create game play charmed players meet each other when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.CHARMED }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: PlayerGroups.CHARMED }), + action: GamePlayActions.MEET_EACH_OTHER, }); expect(createGamePlayCharmedMeetEachOther()).toStrictEqual(expectedGamePlay); @@ -136,8 +136,8 @@ describe("Game Play Factory", () => { describe("createGamePlayLoversMeetEachOther", () => { it("should create game play lovers meet each other when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.LOVERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: PlayerGroups.LOVERS }), + action: GamePlayActions.MEET_EACH_OTHER, }); expect(createGamePlayLoversMeetEachOther()).toStrictEqual(expectedGamePlay); @@ -147,8 +147,8 @@ describe("Game Play Factory", () => { describe("createGamePlayThreeBrothersMeetEachOther", () => { it("should create game play three brothers meet each other when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.THREE_BROTHERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: RoleNames.THREE_BROTHERS }), + action: GamePlayActions.MEET_EACH_OTHER, }); expect(createGamePlayThreeBrothersMeetEachOther()).toStrictEqual(expectedGamePlay); @@ -158,8 +158,8 @@ describe("Game Play Factory", () => { describe("createGamePlayTwoSistersMeetEachOther", () => { it("should create game play two sisters meet each other when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.TWO_SISTERS }), - action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, + source: createFakeGamePlaySource({ name: RoleNames.TWO_SISTERS }), + action: GamePlayActions.MEET_EACH_OTHER, }); expect(createGamePlayTwoSistersMeetEachOther()).toStrictEqual(expectedGamePlay); @@ -169,8 +169,8 @@ describe("Game Play Factory", () => { describe("createGamePlayRavenMarks", () => { it("should create game play raven marks when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.RAVEN }), - action: GAME_PLAY_ACTIONS.MARK, + source: createFakeGamePlaySource({ name: RoleNames.RAVEN }), + action: GamePlayActions.MARK, }); expect(createGamePlayRavenMarks()).toStrictEqual(expectedGamePlay); @@ -180,8 +180,8 @@ describe("Game Play Factory", () => { describe("createGamePlayGuardProtects", () => { it("should create game play guard protects when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.GUARD }), - action: GAME_PLAY_ACTIONS.PROTECT, + source: createFakeGamePlaySource({ name: RoleNames.GUARD }), + action: GamePlayActions.PROTECT, }); expect(createGamePlayGuardProtects()).toStrictEqual(expectedGamePlay); @@ -191,8 +191,8 @@ describe("Game Play Factory", () => { describe("createGamePlayHunterShoots", () => { it("should create game play hunter shoots when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.HUNTER }), - action: GAME_PLAY_ACTIONS.SHOOT, + source: createFakeGamePlaySource({ name: RoleNames.HUNTER }), + action: GamePlayActions.SHOOT, }); expect(createGamePlayHunterShoots()).toStrictEqual(expectedGamePlay); @@ -202,8 +202,8 @@ describe("Game Play Factory", () => { describe("createGamePlayWitchUsesPotions", () => { it("should create game play witch uses potions when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.WITCH }), - action: GAME_PLAY_ACTIONS.USE_POTIONS, + source: createFakeGamePlaySource({ name: RoleNames.WITCH }), + action: GamePlayActions.USE_POTIONS, }); expect(createGamePlayWitchUsesPotions()).toStrictEqual(expectedGamePlay); @@ -213,8 +213,8 @@ describe("Game Play Factory", () => { describe("createGamePlayPiedPiperCharms", () => { it("should create game play pied piper charms when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.PIED_PIPER }), - action: GAME_PLAY_ACTIONS.CHARM, + source: createFakeGamePlaySource({ name: RoleNames.PIED_PIPER }), + action: GamePlayActions.CHARM, }); expect(createGamePlayPiedPiperCharms()).toStrictEqual(expectedGamePlay); @@ -224,8 +224,8 @@ describe("Game Play Factory", () => { describe("createGamePlayCupidCharms", () => { it("should create game play cupid charms when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.CUPID }), - action: GAME_PLAY_ACTIONS.CHARM, + source: createFakeGamePlaySource({ name: RoleNames.CUPID }), + action: GamePlayActions.CHARM, }); expect(createGamePlayCupidCharms()).toStrictEqual(expectedGamePlay); @@ -235,8 +235,8 @@ describe("Game Play Factory", () => { describe("createGamePlaySeerLooks", () => { it("should create game play seer looks when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.SEER }), - action: GAME_PLAY_ACTIONS.LOOK, + source: createFakeGamePlaySource({ name: RoleNames.SEER }), + action: GamePlayActions.LOOK, }); expect(createGamePlaySeerLooks()).toStrictEqual(expectedGamePlay); @@ -246,8 +246,8 @@ describe("Game Play Factory", () => { describe("createGamePlayWhiteWerewolfEats", () => { it("should create game play white werewolf eats when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.WHITE_WEREWOLF }), - action: GAME_PLAY_ACTIONS.EAT, + source: createFakeGamePlaySource({ name: RoleNames.WHITE_WEREWOLF }), + action: GamePlayActions.EAT, }); expect(createGamePlayWhiteWerewolfEats()).toStrictEqual(expectedGamePlay); @@ -257,8 +257,8 @@ describe("Game Play Factory", () => { describe("createGamePlayBigBadWolfEats", () => { it("should create game play big bad wolf eats when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: ROLE_NAMES.BIG_BAD_WOLF }), - action: GAME_PLAY_ACTIONS.EAT, + source: createFakeGamePlaySource({ name: RoleNames.BIG_BAD_WOLF }), + action: GamePlayActions.EAT, }); expect(createGamePlayBigBadWolfEats()).toStrictEqual(expectedGamePlay); @@ -268,8 +268,8 @@ describe("Game Play Factory", () => { describe("createGamePlayWerewolvesEat", () => { it("should create game play werewolves eat when called.", () => { const expectedGamePlay = createFakeGamePlay({ - source: createFakeGamePlaySource({ name: PLAYER_GROUPS.WEREWOLVES }), - action: GAME_PLAY_ACTIONS.EAT, + source: createFakeGamePlaySource({ name: PlayerGroups.WEREWOLVES }), + action: GamePlayActions.EAT, }); expect(createGamePlayWerewolvesEat()).toStrictEqual(expectedGamePlay); @@ -279,13 +279,13 @@ describe("Game Play Factory", () => { describe("createGamePlaySource", () => { it("should create game play source when called.", () => { const gamePlaySource = { - name: ROLE_NAMES.SEER, + name: RoleNames.SEER, players: [createFakePlayer()], tata: "toto", }; expect(createGamePlaySource(gamePlaySource)).toStrictEqual(plainToInstance(GamePlaySource, { - name: ROLE_NAMES.SEER, + name: RoleNames.SEER, players: gamePlaySource.players, })); }); @@ -294,13 +294,13 @@ describe("Game Play Factory", () => { describe("createGamePlay", () => { it("should create game play when called.", () => { const gamePlay: GamePlay = { - source: createFakeGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }), - action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, + source: createFakeGamePlaySource({ name: RoleNames.WILD_CHILD }), + action: GamePlayActions.CHOOSE_MODEL, }; expect(createGamePlay(gamePlay)).toStrictEqual(plainToInstance(GamePlay, { - source: createGamePlaySource({ name: ROLE_NAMES.WILD_CHILD }), - action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, + source: createGamePlaySource({ name: RoleNames.WILD_CHILD }), + action: GamePlayActions.CHOOSE_MODEL, })); }); }); diff --git a/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts b/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts index ac6002127..9e4bff29b 100644 --- a/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts +++ b/tests/unit/specs/modules/game/helpers/game-play/game-play.helper.spec.ts @@ -1,12 +1,12 @@ import type { MakeGamePlayTargetWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-target/make-game-play-target-with-relations.dto"; import type { MakeGamePlayVoteWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto"; import type { MakeGamePlayWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-with-relations.dto"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; +import { GamePlayActions, GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; import { areGamePlaysEqual, createMakeGamePlayDtoWithRelations, findPlayPriorityIndex, getChosenCardFromMakeGamePlayDto, getTargetsWithRelationsFromMakeGamePlayDto, getVotesWithRelationsFromMakeGamePlayDto } from "@/modules/game/helpers/game-play/game-play.helper"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; import { createFakeMakeGamePlayTargetWithRelationsDto } from "@tests/factories/game/dto/make-game-play/make-game-play-with-relations/make-game-play-target-with-relations.dto.factory"; @@ -41,7 +41,7 @@ describe("Game Play Helper", () => { }); expect(() => getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException); - expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.PLAYERS, fakePlayerId.toString(), "Game Play - Player in `votes.source` is not in the game players"); + expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.PLAYERS, fakePlayerId.toString(), "Game Play - Player in `votes.source` is not in the game players"); }); it("should throw error when votes contains one unknown target.", () => { @@ -55,7 +55,7 @@ describe("Game Play Helper", () => { }); expect(() => getVotesWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException); - expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.PLAYERS, fakePlayerId.toString(), "Game Play - Player in `votes.target` is not in the game players"); + expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.PLAYERS, fakePlayerId.toString(), "Game Play - Player in `votes.target` is not in the game players"); }); it("should fill votes with game players when called.", () => { @@ -96,7 +96,7 @@ describe("Game Play Helper", () => { }); expect(() => getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException); - expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.PLAYERS, fakePlayerId.toString(), "Game Play - Player in `targets.player` is not in the game players"); + expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.PLAYERS, fakePlayerId.toString(), "Game Play - Player in `targets.player` is not in the game players"); }); it("should fill targets with game players when called.", () => { @@ -105,13 +105,13 @@ describe("Game Play Helper", () => { targets: [ { playerId: game.players[0]._id, isInfected: true }, { playerId: game.players[1]._id }, - { playerId: game.players[2]._id, drankPotion: WITCH_POTIONS.DEATH }, + { playerId: game.players[2]._id, drankPotion: WitchPotions.DEATH }, ], }); const expectedTargets = [ createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0], isInfected: true }), createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1] }), - createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2], drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2], drankPotion: WitchPotions.DEATH }), ]; expect(getTargetsWithRelationsFromMakeGamePlayDto(makeGamePlayDto, game)).toStrictEqual(expectedTargets); @@ -132,7 +132,7 @@ describe("Game Play Helper", () => { const makeGamePlayDto = createFakeMakeGamePlayDto({ chosenCardId: fakeCardId }); expect(() => getChosenCardFromMakeGamePlayDto(makeGamePlayDto, game)).toThrow(ResourceNotFoundException); - expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAME_ADDITIONAL_CARDS, fakeCardId.toString(), "Game Play - Chosen card is not in the game additional cards"); + expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAME_ADDITIONAL_CARDS, fakeCardId.toString(), "Game Play - Chosen card is not in the game additional cards"); }); it("should return chosen card when called.", () => { @@ -154,11 +154,11 @@ describe("Game Play Helper", () => { targets: [ { playerId: game.players[0]._id, isInfected: true }, { playerId: game.players[1]._id }, - { playerId: game.players[2]._id, drankPotion: WITCH_POTIONS.DEATH }, + { playerId: game.players[2]._id, drankPotion: WitchPotions.DEATH }, ], chosenCardId: game.additionalCards?.[3]._id, doesJudgeRequestAnotherVote: true, - chosenSide: ROLE_SIDES.WEREWOLVES, + chosenSide: RoleSides.WEREWOLVES, }); const expectedMakeGamePlayDtoWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ votes: [ @@ -168,11 +168,11 @@ describe("Game Play Helper", () => { targets: [ { player: game.players[0], isInfected: true }, { player: game.players[1] }, - { player: game.players[2], drankPotion: WITCH_POTIONS.DEATH }, + { player: game.players[2], drankPotion: WitchPotions.DEATH }, ], chosenCard: game.additionalCards?.[3], doesJudgeRequestAnotherVote: true, - chosenSide: ROLE_SIDES.WEREWOLVES, + chosenSide: RoleSides.WEREWOLVES, }); expect(createMakeGamePlayDtoWithRelations(makeGamePlayDto, game)).toStrictEqual(expectedMakeGamePlayDtoWithRelationsDto); @@ -181,7 +181,7 @@ describe("Game Play Helper", () => { describe("findPlayPriorityIndex", () => { it("should return -1 when play is not found in priority list.", () => { - const gamePlay = createFakeGamePlaySeerLooks({ action: GAME_PLAY_ACTIONS.EAT }); + const gamePlay = createFakeGamePlaySeerLooks({ action: GamePlayActions.EAT }); expect(findPlayPriorityIndex(gamePlay)).toBe(-1); }); @@ -215,7 +215,7 @@ describe("Game Play Helper", () => { }, { playA: createFakeGamePlayAllVote(), - playB: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), + playB: createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), result: false, test: "both causes are not equal", }, diff --git a/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts b/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts index 4dc86fe87..0ce332e7c 100644 --- a/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts +++ b/tests/unit/specs/modules/game/helpers/game-victory/game-victory.helper.spec.ts @@ -1,8 +1,8 @@ -import { GAME_PLAY_ACTIONS } from "@/modules/game/enums/game-play.enum"; -import { GAME_VICTORY_TYPES } from "@/modules/game/enums/game-victory.enum"; +import { GamePlayActions } from "@/modules/game/enums/game-play.enum"; +import { GameVictoryTypes } from "@/modules/game/enums/game-victory.enum"; import { doesAngelWin, doesPiedPiperWin, doesWhiteWerewolfWin, doLoversWin, doVillagersWin, doWerewolvesWin, generateGameVictoryData, isGameOver } from "@/modules/game/helpers/game-victory/game-victory.helper"; import type { GameVictory } from "@/modules/game/schemas/game-victory/game-victory.schema"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import * as UnexpectedExceptionFactory from "@/shared/exception/helpers/unexpected-exception.factory"; @@ -277,7 +277,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), - createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }), + createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }), ]; const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) }); const game = createFakeGame({ players, options }); @@ -290,7 +290,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), - createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }), + createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }), ]; const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) }); const game = createFakeGame({ players, options }); @@ -430,7 +430,7 @@ describe("Game Victory Helper", () => { createFakeSeerAlivePlayer({ isAlive: false }), ]; const upcomingPlays = [ - createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: ROLE_NAMES.HUNTER }) }), + createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: RoleNames.HUNTER }) }), createFakeGamePlayWerewolvesEat(), ]; const currentPlay = createFakeGamePlayAllVote(); @@ -477,7 +477,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer(), ]; const upcomingPlays = [ - createFakeGamePlayHunterShoots({ action: GAME_PLAY_ACTIONS.LOOK }), + createFakeGamePlayHunterShoots({ action: GamePlayActions.LOOK }), createFakeGamePlayWerewolvesEat(), ]; const currentPlay = createFakeGamePlayAllVote(); @@ -494,7 +494,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ isAlive: false }), ]; const upcomingPlays = [ - createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: ROLE_NAMES.THIEF }) }), + createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: RoleNames.THIEF }) }), createFakeGamePlayAllVote(), createFakeGamePlayWerewolvesEat(), ]; @@ -542,7 +542,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), - createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }), + createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }), ]; const upcomingPlays = [ createFakeGamePlayAllVote(), @@ -581,11 +581,11 @@ describe("Game Victory Helper", () => { createFakeSeerAlivePlayer({ isAlive: false }), ]; const upcomingPlays = [ - createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: ROLE_NAMES.HUNTER }) }), + createFakeGamePlayHunterShoots({ source: createFakeGamePlaySource({ name: RoleNames.HUNTER }) }), createFakeGamePlayWerewolvesEat(), ]; const game = createFakeGame({ players, upcomingPlays }); - const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.NONE }); + const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.NONE }); expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory); }); @@ -599,7 +599,7 @@ describe("Game Victory Helper", () => { ]; const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) }); const game = createFakeGame({ players, options, turn: 1 }); - const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.ANGEL, winners: [players[3]] }); + const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.ANGEL, winners: [players[3]] }); expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory); }); @@ -612,7 +612,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ attributes: [createFakeInLoveByCupidPlayerAttribute()] }), ]; const game = createFakeGame({ players }); - const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.LOVERS, winners: [players[2], players[3]] }); + const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.LOVERS, winners: [players[2], players[3]] }); expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory); }); @@ -622,11 +622,11 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeSeerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), createFakeVillagerAlivePlayer({ attributes: [createFakeCharmedByPiedPiperPlayerAttribute()] }), - createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }), + createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }), ]; const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) }); const game = createFakeGame({ players, options }); - const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.PIED_PIPER, winners: [players[3]] }); + const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.PIED_PIPER, winners: [players[3]] }); expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory); }); @@ -638,7 +638,7 @@ describe("Game Victory Helper", () => { createFakeWhiteWerewolfAlivePlayer({ isAlive: true }), ]; const game = createFakeGame({ players }); - const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.WHITE_WEREWOLF, winners: [players[2]] }); + const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.WHITE_WEREWOLF, winners: [players[2]] }); expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory); }); @@ -651,7 +651,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ isAlive: false }), ]; const game = createFakeGame({ players }); - const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.WEREWOLVES, winners: [players[2], players[3]] }); + const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.WEREWOLVES, winners: [players[2], players[3]] }); expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory); }); @@ -664,7 +664,7 @@ describe("Game Victory Helper", () => { createFakeWerewolfAlivePlayer({ isAlive: false }), ]; const game = createFakeGame({ players }); - const expectedGameVictory = createFakeGameVictory({ type: GAME_VICTORY_TYPES.VILLAGERS, winners: [players[0], players[1]] }); + const expectedGameVictory = createFakeGameVictory({ type: GameVictoryTypes.VILLAGERS, winners: [players[0], players[1]] }); expect(generateGameVictoryData(game)).toStrictEqual(expectedGameVictory); }); diff --git a/tests/unit/specs/modules/game/helpers/game.factory.spec.ts b/tests/unit/specs/modules/game/helpers/game.factory.spec.ts index 329eb0070..6001eed76 100644 --- a/tests/unit/specs/modules/game/helpers/game.factory.spec.ts +++ b/tests/unit/specs/modules/game/helpers/game.factory.spec.ts @@ -1,4 +1,4 @@ -import { GAME_PHASES, GAME_STATUSES } from "@/modules/game/enums/game.enum"; +import { GamePhases, GameStatuses } from "@/modules/game/enums/game.enum"; import { createGame } from "@/modules/game/helpers/game.factory"; import type { Game } from "@/modules/game/schemas/game.schema"; @@ -16,11 +16,11 @@ describe("Game Factory", () => { currentPlay: createFakeGamePlayAllVote(), tick: 1, turn: 2, - phase: GAME_PHASES.DAY, + phase: GamePhases.DAY, players: [createFakePlayer()], options: createFakeGameOptions(), upcomingPlays: [createFakeGamePlayAllElectSheriff()], - status: GAME_STATUSES.PLAYING, + status: GameStatuses.PLAYING, createdAt: new Date(), updatedAt: new Date(), }; diff --git a/tests/unit/specs/modules/game/helpers/game.helper.spec.ts b/tests/unit/specs/modules/game/helpers/game.helper.spec.ts index cdbf2024c..e762c7d00 100644 --- a/tests/unit/specs/modules/game/helpers/game.helper.spec.ts +++ b/tests/unit/specs/modules/game/helpers/game.helper.spec.ts @@ -1,11 +1,11 @@ -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { areAllPlayersDead, areAllVillagersAlive, areAllWerewolvesAlive, getAdditionalCardWithId, getAlivePlayers, getAliveVillagerSidedPlayers, getAliveWerewolfSidedPlayers, getExpectedPlayersToPlay, getFoxSniffedPlayers, getGroupOfPlayers, getLeftToCharmByPiedPiperPlayers, getLeftToEatByWerewolvesPlayers, getLeftToEatByWhiteWerewolfPlayers, getNearestAliveNeighbor, getNonexistentPlayer, getNonexistentPlayerId, getPlayerDtoWithRole, getPlayersWithActiveAttributeName, getPlayersWithCurrentRole, getPlayersWithCurrentSide, getPlayerWithActiveAttributeName, getPlayerWithCurrentRole, getPlayerWithId, getPlayerWithIdOrThrow, getPlayerWithName, getPlayerWithNameOrThrow, isGameSourceGroup, isGameSourceRole } from "@/modules/game/helpers/game.helper"; import type { Player } from "@/modules/game/schemas/player/player.schema"; import type { GetNearestPlayerOptions } from "@/modules/game/types/game.type"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import type { ExceptionInterpolations } from "@/shared/exception/types/exception.type"; -import { UNEXPECTED_EXCEPTION_REASONS } from "@/shared/exception/enums/unexpected-exception.enum"; +import { UnexpectedExceptionReasons } from "@/shared/exception/enums/unexpected-exception.enum"; import * as UnexpectedExceptionFactory from "@/shared/exception/helpers/unexpected-exception.factory"; import { UnexpectedException } from "@/shared/exception/types/unexpected-exception.type"; @@ -32,61 +32,61 @@ describe("Game Helper", () => { describe("getPlayerDtoWithRole", () => { const players = bulkCreateFakeCreateGamePlayerDto(6, [ - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.IDIOT } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.IDIOT } }, ]); const game = createFakeCreateGameDto({ players }); it("should return player with role when a player has this role.", () => { - expect(getPlayerDtoWithRole(game, ROLE_NAMES.WEREWOLF)).toStrictEqual(game.players[2]); + expect(getPlayerDtoWithRole(game, RoleNames.WEREWOLF)).toStrictEqual(game.players[2]); }); it("should return undefined when player with role is not found.", () => { - expect(getPlayerDtoWithRole(game, ROLE_NAMES.THREE_BROTHERS)).toBeUndefined(); + expect(getPlayerDtoWithRole(game, RoleNames.THREE_BROTHERS)).toBeUndefined(); }); }); describe("getPlayerWithCurrentRole", () => { const players = bulkCreateFakePlayers(6, [ - { role: { current: ROLE_NAMES.WITCH, original: ROLE_NAMES.WITCH, isRevealed: false } }, - { role: { current: ROLE_NAMES.SEER, original: ROLE_NAMES.SEER, isRevealed: false } }, - { role: { current: ROLE_NAMES.WEREWOLF, original: ROLE_NAMES.WEREWOLF, isRevealed: false } }, - { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } }, - { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } }, - { role: { current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT, isRevealed: false } }, + { role: { current: RoleNames.WITCH, original: RoleNames.WITCH, isRevealed: false } }, + { role: { current: RoleNames.SEER, original: RoleNames.SEER, isRevealed: false } }, + { role: { current: RoleNames.WEREWOLF, original: RoleNames.WEREWOLF, isRevealed: false } }, + { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } }, + { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } }, + { role: { current: RoleNames.IDIOT, original: RoleNames.IDIOT, isRevealed: false } }, ]); const game = createFakeGame({ players }); it("should return player with role when a player has this role.", () => { - expect(getPlayerWithCurrentRole(game, ROLE_NAMES.SEER)).toStrictEqual(players[1]); + expect(getPlayerWithCurrentRole(game, RoleNames.SEER)).toStrictEqual(players[1]); }); it("should return undefined when player with role is not found.", () => { - expect(getPlayerWithCurrentRole(game, ROLE_NAMES.BIG_BAD_WOLF)).toBeUndefined(); + expect(getPlayerWithCurrentRole(game, RoleNames.BIG_BAD_WOLF)).toBeUndefined(); }); }); describe("getPlayersWithCurrentRole", () => { const players = bulkCreateFakePlayers(6, [ - { role: { current: ROLE_NAMES.THREE_BROTHERS, original: ROLE_NAMES.WITCH, isRevealed: false } }, - { role: { current: ROLE_NAMES.THREE_BROTHERS, original: ROLE_NAMES.SEER, isRevealed: false } }, - { role: { current: ROLE_NAMES.THREE_BROTHERS, original: ROLE_NAMES.WEREWOLF, isRevealed: false } }, - { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } }, - { role: { current: ROLE_NAMES.TWO_SISTERS, original: ROLE_NAMES.TWO_SISTERS, isRevealed: false } }, - { role: { current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT, isRevealed: false } }, + { role: { current: RoleNames.THREE_BROTHERS, original: RoleNames.WITCH, isRevealed: false } }, + { role: { current: RoleNames.THREE_BROTHERS, original: RoleNames.SEER, isRevealed: false } }, + { role: { current: RoleNames.THREE_BROTHERS, original: RoleNames.WEREWOLF, isRevealed: false } }, + { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } }, + { role: { current: RoleNames.TWO_SISTERS, original: RoleNames.TWO_SISTERS, isRevealed: false } }, + { role: { current: RoleNames.IDIOT, original: RoleNames.IDIOT, isRevealed: false } }, ]); const game = createFakeGame({ players }); it("should return players when they have this role.", () => { - expect(getPlayersWithCurrentRole(game, ROLE_NAMES.THREE_BROTHERS)).toStrictEqual([players[0], players[1], players[2]]); + expect(getPlayersWithCurrentRole(game, RoleNames.THREE_BROTHERS)).toStrictEqual([players[0], players[1], players[2]]); }); it("should return empty array when no one has the role.", () => { - expect(getPlayersWithCurrentRole(game, ROLE_NAMES.WEREWOLF)).toStrictEqual([]); + expect(getPlayersWithCurrentRole(game, RoleNames.WEREWOLF)).toStrictEqual([]); }); }); @@ -102,11 +102,11 @@ describe("Game Helper", () => { const game = createFakeGame({ players }); it("should return werewolves when they have this side.", () => { - expect(getPlayersWithCurrentSide(game, ROLE_SIDES.WEREWOLVES)).toStrictEqual([players[0], players[1], players[4], players[5]]); + expect(getPlayersWithCurrentSide(game, RoleSides.WEREWOLVES)).toStrictEqual([players[0], players[1], players[4], players[5]]); }); it("should return villagers when they have this side.", () => { - expect(getPlayersWithCurrentSide(game, ROLE_SIDES.VILLAGERS)).toStrictEqual([players[2], players[3]]); + expect(getPlayersWithCurrentSide(game, RoleSides.VILLAGERS)).toStrictEqual([players[2], players[3]]); }); }); @@ -131,7 +131,7 @@ describe("Game Helper", () => { const players = bulkCreateFakePlayers(6); const game = createFakeGame({ players }); const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: players[2]._id.toString() }; - const exception = new UnexpectedException("killPlayer", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); + const exception = new UnexpectedException("killPlayer", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); expect(getPlayerWithIdOrThrow(players[2]._id, game, exception)).toStrictEqual(players[2]); }); @@ -141,7 +141,7 @@ describe("Game Helper", () => { const game = createFakeGame({ players }); const unknownPlayerId = createFakeObjectId(); const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() }; - const exception = new UnexpectedException("killPlayer", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); + const exception = new UnexpectedException("killPlayer", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); expect(() => getPlayerWithIdOrThrow(unknownPlayerId, game, exception)).toThrow(exception); }); @@ -168,7 +168,7 @@ describe("Game Helper", () => { const players = bulkCreateFakePlayers(6); const game = createFakeGame({ players }); const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: players[2].name }; - const exception = new UnexpectedException("killPlayer", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); + const exception = new UnexpectedException("killPlayer", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); expect(getPlayerWithNameOrThrow(players[2].name, game, exception)).toStrictEqual(players[2]); }); @@ -178,7 +178,7 @@ describe("Game Helper", () => { const game = createFakeGame({ players }); const unknownPlayerName = "i-cant-be-a-valid-name-that-is-bad"; const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerName }; - const exception = new UnexpectedException("killPlayer", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); + const exception = new UnexpectedException("killPlayer", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); expect(() => getPlayerWithNameOrThrow(unknownPlayerName, game, exception)).toThrow(exception); }); @@ -290,7 +290,7 @@ describe("Game Helper", () => { ]); const game = createFakeGame({ players }); - expect(getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.CHARMED)).toStrictEqual(players[2]); + expect(getPlayerWithActiveAttributeName(game, PlayerAttributeNames.CHARMED)).toStrictEqual(players[2]); }); it("should return undefined when player with attribute is not found.", () => { @@ -302,7 +302,7 @@ describe("Game Helper", () => { ]); const game = createFakeGame({ players }); - expect(getPlayerWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBeUndefined(); + expect(getPlayerWithActiveAttributeName(game, PlayerAttributeNames.SEEN)).toBeUndefined(); }); }); @@ -316,11 +316,11 @@ describe("Game Helper", () => { const game = createFakeGame({ players }); it("should return players when they have the attribute.", () => { - expect(getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.CHARMED)).toStrictEqual([players[0], players[2]]); + expect(getPlayersWithActiveAttributeName(game, PlayerAttributeNames.CHARMED)).toStrictEqual([players[0], players[2]]); }); it("should return empty array when none has the attribute.", () => { - expect(getPlayersWithActiveAttributeName(game, PLAYER_ATTRIBUTE_NAMES.SEEN)).toStrictEqual([]); + expect(getPlayersWithActiveAttributeName(game, PlayerAttributeNames.SEEN)).toStrictEqual([]); }); }); @@ -423,43 +423,43 @@ describe("Game Helper", () => { const game = createFakeGame({ players }); it("should return all players when group is all.", () => { - expect(getGroupOfPlayers(game, PLAYER_GROUPS.ALL)).toStrictEqual(players); + expect(getGroupOfPlayers(game, PlayerGroups.ALL)).toStrictEqual(players); }); it("should return players in love when group is lovers.", () => { - expect(getGroupOfPlayers(game, PLAYER_GROUPS.LOVERS)).toStrictEqual([players[2], players[5]]); + expect(getGroupOfPlayers(game, PlayerGroups.LOVERS)).toStrictEqual([players[2], players[5]]); }); it("should return charmed players when group is charmed.", () => { - expect(getGroupOfPlayers(game, PLAYER_GROUPS.CHARMED)).toStrictEqual([players[0], players[3]]); + expect(getGroupOfPlayers(game, PlayerGroups.CHARMED)).toStrictEqual([players[0], players[3]]); }); it("should return villagers when group is villagers.", () => { - expect(getGroupOfPlayers(game, PLAYER_GROUPS.VILLAGERS)).toStrictEqual([players[0], players[2], players[4]]); + expect(getGroupOfPlayers(game, PlayerGroups.VILLAGERS)).toStrictEqual([players[0], players[2], players[4]]); }); it("should return werewolves when group is werewolves.", () => { - expect(getGroupOfPlayers(game, PLAYER_GROUPS.WEREWOLVES)).toStrictEqual([players[1], players[3], players[5]]); + expect(getGroupOfPlayers(game, PlayerGroups.WEREWOLVES)).toStrictEqual([players[1], players[3], players[5]]); }); }); describe("isGameSourceRole", () => { it("should return true when source is role.", () => { - expect(isGameSourceRole(ROLE_NAMES.WITCH)).toBe(true); + expect(isGameSourceRole(RoleNames.WITCH)).toBe(true); }); it("should return false when source is group.", () => { - expect(isGameSourceRole(PLAYER_GROUPS.ALL)).toBe(false); + expect(isGameSourceRole(PlayerGroups.ALL)).toBe(false); }); }); describe("isGameSourceGroup", () => { it("should return true when source is group.", () => { - expect(isGameSourceGroup(PLAYER_GROUPS.WEREWOLVES)).toBe(true); + expect(isGameSourceGroup(PlayerGroups.WEREWOLVES)).toBe(true); }); it("should return false when source is role.", () => { - expect(isGameSourceGroup(ROLE_NAMES.SEER)).toBe(false); + expect(isGameSourceGroup(RoleNames.SEER)).toBe(false); }); }); @@ -571,7 +571,7 @@ describe("Game Helper", () => { const game = createFakeGame({ players }); const unknownPlayerId = createFakeObjectId(); const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() }; - const exception = new UnexpectedException("getFoxSniffedTargets", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); + const exception = new UnexpectedException("getFoxSniffedTargets", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); expect(() => getFoxSniffedPlayers(unknownPlayerId, game)).toThrow(exception); }); @@ -591,7 +591,7 @@ describe("Game Helper", () => { const options: GetNearestPlayerOptions = { direction: "right" }; const unknownPlayerId = createFakeObjectId(); const exceptionInterpolations: ExceptionInterpolations = { gameId: game._id.toString(), playerId: unknownPlayerId.toString() }; - const exception = new UnexpectedException("getNearestAliveNeighbor", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); + const exception = new UnexpectedException("getNearestAliveNeighbor", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); expect(() => getNearestAliveNeighbor(unknownPlayerId, game, options)).toThrow(exception); }); @@ -636,7 +636,7 @@ describe("Game Helper", () => { createFakeWerewolfAlivePlayer({ position: 2 }), ]; const game = createFakeGame({ players }); - const options: GetNearestPlayerOptions = { direction: "left", playerSide: ROLE_SIDES.VILLAGERS }; + const options: GetNearestPlayerOptions = { direction: "left", playerSide: RoleSides.VILLAGERS }; expect(getNearestAliveNeighbor(players[3]._id, game, options)).toStrictEqual(players[1]); }); @@ -651,7 +651,7 @@ describe("Game Helper", () => { createFakeVillagerAlivePlayer({ position: 5, isAlive: false }), ]; const game = createFakeGame({ players }); - const options: GetNearestPlayerOptions = { direction: "left", playerSide: ROLE_SIDES.WEREWOLVES }; + const options: GetNearestPlayerOptions = { direction: "left", playerSide: RoleSides.WEREWOLVES }; expect(getNearestAliveNeighbor(players[1]._id, game, options)).toStrictEqual(players[0]); }); @@ -666,7 +666,7 @@ describe("Game Helper", () => { createFakeWerewolfAlivePlayer({ position: 2, isAlive: false }), ]; const game = createFakeGame({ players }); - const options: GetNearestPlayerOptions = { direction: "left", playerSide: ROLE_SIDES.WEREWOLVES }; + const options: GetNearestPlayerOptions = { direction: "left", playerSide: RoleSides.WEREWOLVES }; expect(getNearestAliveNeighbor(players[4]._id, game, options)).toBeUndefined(); }); @@ -681,7 +681,7 @@ describe("Game Helper", () => { createFakeWerewolfAlivePlayer({ position: 2, isAlive: false }), ]; const game = createFakeGame({ players }); - const options: GetNearestPlayerOptions = { direction: "left", playerSide: ROLE_SIDES.WEREWOLVES }; + const options: GetNearestPlayerOptions = { direction: "left", playerSide: RoleSides.WEREWOLVES }; expect(getNearestAliveNeighbor(players[4]._id, game, options)).toBeUndefined(); }); diff --git a/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts b/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts index 8609344f5..56a9e2af7 100644 --- a/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts +++ b/tests/unit/specs/modules/game/helpers/game.mutator.spec.ts @@ -1,4 +1,4 @@ -import { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { addPlayerAttributeInGame, addPlayersAttributeInGame, appendUpcomingPlayInGame, prependUpcomingPlayInGame, removePlayerAttributeByNameInGame, updatePlayerInGame } from "@/modules/game/helpers/game.mutator"; import type { Game } from "@/modules/game/schemas/game.schema"; @@ -146,7 +146,7 @@ describe("Game Mutator", () => { it("should return game as is when player is not found in game.", () => { const game = createFakeGame(); - expect(removePlayerAttributeByNameInGame(createFakeObjectId(), game, PLAYER_ATTRIBUTE_NAMES.SHERIFF)).toStrictEqual(game); + expect(removePlayerAttributeByNameInGame(createFakeObjectId(), game, PlayerAttributeNames.SHERIFF)).toStrictEqual(game); }); it("should return game with player without his sheriff attribute when called.", () => { @@ -162,14 +162,14 @@ describe("Game Mutator", () => { ], }); - expect(removePlayerAttributeByNameInGame(game.players[1]._id, game, PLAYER_ATTRIBUTE_NAMES.SHERIFF)).toStrictEqual(expectedGame); + expect(removePlayerAttributeByNameInGame(game.players[1]._id, game, PlayerAttributeNames.SHERIFF)).toStrictEqual(expectedGame); }); it("should not mutate the original game when called.", () => { const players = bulkCreateFakePlayers(4, [{}, { attributes: [createFakeSheriffByAllPlayerAttribute()] }]); const game = createFakeGame({ players }); const clonedGame = createFakeGame(game); - removePlayerAttributeByNameInGame(game.players[1]._id, game, PLAYER_ATTRIBUTE_NAMES.SHERIFF); + removePlayerAttributeByNameInGame(game.players[1]._id, game, PlayerAttributeNames.SHERIFF); expect(game).toStrictEqual(clonedGame); }); diff --git a/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts b/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts index 7ecb4be87..eb02cdfcc 100644 --- a/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts +++ b/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.factory.spec.ts @@ -1,8 +1,8 @@ -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { createCantVoteByAllPlayerAttribute, createCantVoteByScapegoatPlayerAttribute, createCharmedByPiedPiperPlayerAttribute, createContaminatedByRustySwordKnightPlayerAttribute, createDrankDeathPotionByWitchPlayerAttribute, createDrankLifePotionByWitchPlayerAttribute, createEatenByBigBadWolfPlayerAttribute, createEatenByWerewolvesPlayerAttribute, createEatenByWhiteWerewolfPlayerAttribute, createGrowledByBearTamerPlayerAttribute, createInLoveByCupidPlayerAttribute, createPlayerAttribute, createPowerlessByAncientPlayerAttribute, createPowerlessByFoxPlayerAttribute, createProtectedByGuardPlayerAttribute, createRavenMarkByRavenPlayerAttribute, createSeenBySeerPlayerAttribute, createSheriffByAllPlayerAttribute, createSheriffBySheriffPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from "@/modules/game/helpers/player/player-attribute/player-attribute.factory"; import type { PlayerAttribute } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakePlayerAttribute } from "@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory"; import { createFakeGame } from "@tests/factories/game/schemas/game.schema.factory"; @@ -11,8 +11,8 @@ describe("Player Attribute Factory", () => { describe("createContaminatedByRustySwordKnightPlayerAttribute", () => { it("should create contaminated attribute by rusty sword knight when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CONTAMINATED, - source: ROLE_NAMES.RUSTY_SWORD_KNIGHT, + name: PlayerAttributeNames.CONTAMINATED, + source: RoleNames.RUSTY_SWORD_KNIGHT, remainingPhases: 2, }); @@ -23,8 +23,8 @@ describe("Player Attribute Factory", () => { describe("createGrowledByBearTamerPlayerAttribute", () => { it("should create growled attribute by bear tamer when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.GROWLED, - source: ROLE_NAMES.BEAR_TAMER, + name: PlayerAttributeNames.GROWLED, + source: RoleNames.BEAR_TAMER, remainingPhases: 1, }); @@ -35,8 +35,8 @@ describe("Player Attribute Factory", () => { describe("createCharmedByPiedPiperPlayerAttribute", () => { it("should create charmed attribute by pied piper when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CHARMED, - source: ROLE_NAMES.PIED_PIPER, + name: PlayerAttributeNames.CHARMED, + source: RoleNames.PIED_PIPER, }); expect(createCharmedByPiedPiperPlayerAttribute()).toStrictEqual(expectedAttribute); @@ -46,8 +46,8 @@ describe("Player Attribute Factory", () => { describe("createCantVoteByAllPlayerAttribute", () => { it("should create can't vote attribute by all when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, - source: PLAYER_GROUPS.ALL, + name: PlayerAttributeNames.CANT_VOTE, + source: PlayerGroups.ALL, }); expect(createCantVoteByAllPlayerAttribute()).toStrictEqual(expectedAttribute); @@ -56,14 +56,14 @@ describe("Player Attribute Factory", () => { describe("createCantVoteByScapegoatPlayerAttribute", () => { it("should create can't vote attribute by scapegoat active in next turn when game phase is day.", () => { - const game = createFakeGame({ turn: 2, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ turn: 2, phase: GamePhases.DAY }); const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, - source: ROLE_NAMES.SCAPEGOAT, + name: PlayerAttributeNames.CANT_VOTE, + source: RoleNames.SCAPEGOAT, remainingPhases: 1, activeAt: { turn: 3, - phase: GAME_PHASES.DAY, + phase: GamePhases.DAY, }, }); @@ -71,14 +71,14 @@ describe("Player Attribute Factory", () => { }); it("should create can't vote attribute by scapegoat active in current turn when game phase is night.", () => { - const game = createFakeGame({ turn: 2, phase: GAME_PHASES.NIGHT }); + const game = createFakeGame({ turn: 2, phase: GamePhases.NIGHT }); const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.CANT_VOTE, - source: ROLE_NAMES.SCAPEGOAT, + name: PlayerAttributeNames.CANT_VOTE, + source: RoleNames.SCAPEGOAT, remainingPhases: 1, activeAt: { turn: 2, - phase: GAME_PHASES.DAY, + phase: GamePhases.DAY, }, }); @@ -89,8 +89,8 @@ describe("Player Attribute Factory", () => { describe("createPowerlessByFoxPlayerAttribute", () => { it("should create powerless attribute by fox when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.POWERLESS, - source: ROLE_NAMES.FOX, + name: PlayerAttributeNames.POWERLESS, + source: RoleNames.FOX, doesRemainAfterDeath: true, }); @@ -101,8 +101,8 @@ describe("Player Attribute Factory", () => { describe("createPowerlessByAncientPlayerAttribute", () => { it("should create powerless attribute by ancient when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.POWERLESS, - source: ROLE_NAMES.ANCIENT, + name: PlayerAttributeNames.POWERLESS, + source: RoleNames.ANCIENT, doesRemainAfterDeath: true, }); @@ -113,8 +113,8 @@ describe("Player Attribute Factory", () => { describe("createWorshipedByWildChildPlayerAttribute", () => { it("should create worshiped attribute by wild child when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.WORSHIPED, - source: ROLE_NAMES.WILD_CHILD, + name: PlayerAttributeNames.WORSHIPED, + source: RoleNames.WILD_CHILD, }); expect(createWorshipedByWildChildPlayerAttribute()).toStrictEqual(expectedAttribute); @@ -124,8 +124,8 @@ describe("Player Attribute Factory", () => { describe("createInLoveByCupidPlayerAttribute", () => { it("should create in love attribute by cupid when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.IN_LOVE, - source: ROLE_NAMES.CUPID, + name: PlayerAttributeNames.IN_LOVE, + source: RoleNames.CUPID, }); expect(createInLoveByCupidPlayerAttribute()).toStrictEqual(expectedAttribute); @@ -135,8 +135,8 @@ describe("Player Attribute Factory", () => { describe("createRavenMarkByRavenPlayerAttribute", () => { it("should create raven-marked attribute by raven when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.RAVEN_MARKED, - source: ROLE_NAMES.RAVEN, + name: PlayerAttributeNames.RAVEN_MARKED, + source: RoleNames.RAVEN, remainingPhases: 2, }); @@ -147,8 +147,8 @@ describe("Player Attribute Factory", () => { describe("createProtectedByGuardPlayerAttribute", () => { it("should create protected attribute by guard when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.PROTECTED, - source: ROLE_NAMES.GUARD, + name: PlayerAttributeNames.PROTECTED, + source: RoleNames.GUARD, remainingPhases: 1, }); @@ -159,8 +159,8 @@ describe("Player Attribute Factory", () => { describe("createDrankDeathPotionByWitchPlayerAttribute", () => { it("should create drank death potion attribute by witch when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.DRANK_DEATH_POTION, - source: ROLE_NAMES.WITCH, + name: PlayerAttributeNames.DRANK_DEATH_POTION, + source: RoleNames.WITCH, remainingPhases: 1, }); @@ -171,8 +171,8 @@ describe("Player Attribute Factory", () => { describe("createDrankLifePotionByWitchPlayerAttribute", () => { it("should create drank life potion attribute by witch when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.DRANK_LIFE_POTION, - source: ROLE_NAMES.WITCH, + name: PlayerAttributeNames.DRANK_LIFE_POTION, + source: RoleNames.WITCH, remainingPhases: 1, }); @@ -183,8 +183,8 @@ describe("Player Attribute Factory", () => { describe("createEatenByBigBadWolfPlayerAttribute", () => { it("should create eaten attribute by big bad wolf when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: ROLE_NAMES.BIG_BAD_WOLF, + name: PlayerAttributeNames.EATEN, + source: RoleNames.BIG_BAD_WOLF, remainingPhases: 1, }); @@ -195,8 +195,8 @@ describe("Player Attribute Factory", () => { describe("createEatenByWhiteWerewolfPlayerAttribute", () => { it("should create eaten attribute by white werewolves when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: ROLE_NAMES.WHITE_WEREWOLF, + name: PlayerAttributeNames.EATEN, + source: RoleNames.WHITE_WEREWOLF, remainingPhases: 1, }); @@ -207,8 +207,8 @@ describe("Player Attribute Factory", () => { describe("createEatenByWerewolvesPlayerAttribute", () => { it("should create eaten attribute by werewolves when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.EATEN, - source: PLAYER_GROUPS.WEREWOLVES, + name: PlayerAttributeNames.EATEN, + source: PlayerGroups.WEREWOLVES, remainingPhases: 1, }); @@ -219,8 +219,8 @@ describe("Player Attribute Factory", () => { describe("createSeenBySeerPlayerAttribute", () => { it("should create seen attribute by seer when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SEEN, - source: ROLE_NAMES.SEER, + name: PlayerAttributeNames.SEEN, + source: RoleNames.SEER, remainingPhases: 1, }); @@ -231,8 +231,8 @@ describe("Player Attribute Factory", () => { describe("createSheriffBySheriffPlayerAttribute", () => { it("should create sheriff attribute by sheriff when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, - source: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, + source: PlayerAttributeNames.SHERIFF, doesRemainAfterDeath: true, }); @@ -243,8 +243,8 @@ describe("Player Attribute Factory", () => { describe("createSheriffByAllPlayerAttribute", () => { it("should create sheriff attribute by all when called.", () => { const expectedAttribute = createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, - source: PLAYER_GROUPS.ALL, + name: PlayerAttributeNames.SHERIFF, + source: PlayerGroups.ALL, doesRemainAfterDeath: true, }); @@ -255,13 +255,13 @@ describe("Player Attribute Factory", () => { describe("createPlayerAttribute", () => { it("should create player attribute when called.", () => { const playerAttribute: PlayerAttribute = { - name: PLAYER_ATTRIBUTE_NAMES.GROWLED, - source: ROLE_NAMES.BEAR_TAMER, + name: PlayerAttributeNames.GROWLED, + source: RoleNames.BEAR_TAMER, }; expect(createPlayerAttribute(playerAttribute)).toStrictEqual(createFakePlayerAttribute({ - name: PLAYER_ATTRIBUTE_NAMES.GROWLED, - source: ROLE_NAMES.BEAR_TAMER, + name: PlayerAttributeNames.GROWLED, + source: RoleNames.BEAR_TAMER, })); }); }); diff --git a/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts b/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts index 76f7eb2dc..77e553d96 100644 --- a/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts +++ b/tests/unit/specs/modules/game/helpers/player/player-attribute/player-attribute.helper.spec.ts @@ -1,8 +1,8 @@ -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_ATTRIBUTE_NAMES } from "@/modules/game/enums/player.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerAttributeNames } from "@/modules/game/enums/player.enum"; import { doesPlayerHaveActiveAttributeWithName, doesPlayerHaveAttributeWithName, doesPlayerHaveAttributeWithNameAndSource, getActivePlayerAttributeWithName, getPlayerAttributeWithName, getPlayerAttributeWithNameAndSource, isPlayerAttributeActive } from "@/modules/game/helpers/player/player-attribute/player-attribute.helper"; import type { PlayerAttribute } from "@/modules/game/schemas/player/player-attribute/player-attribute.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakePlayer } from "@tests/factories/game/schemas/player/player.schema.factory"; import { createFakeEatenByWerewolvesPlayerAttribute, createFakeInLoveByCupidPlayerAttribute, createFakePlayerAttributeActivation, createFakePowerlessByAncientPlayerAttribute, createFakeSeenBySeerPlayerAttribute, createFakeSheriffByAllPlayerAttribute } from "@tests/factories/game/schemas/player/player-attribute/player-attribute.schema.factory"; @@ -18,36 +18,36 @@ describe("Player Attribute Helper", () => { }); it("should return false when activation turn is not reached yet.", () => { - const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GAME_PHASES.DAY }) }); - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GamePhases.DAY }) }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); expect(isPlayerAttributeActive(attribute, game)).toBe(false); }); it("should return true when activation turn is reached (+1).", () => { - const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) }); - const game = createFakeGame({ turn: 2, phase: GAME_PHASES.DAY }); + const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) }); + const game = createFakeGame({ turn: 2, phase: GamePhases.DAY }); expect(isPlayerAttributeActive(attribute, game)).toBe(true); }); it("should return false when activation turn is same as game's turn but game's phase is NIGHT and activation phase is DAY.", () => { - const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) }); - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.NIGHT }); + const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) }); + const game = createFakeGame({ turn: 1, phase: GamePhases.NIGHT }); expect(isPlayerAttributeActive(attribute, game)).toBe(false); }); it("should return true when activation turn is same as game's turn and phase too.", () => { - const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.NIGHT }) }); - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.NIGHT }); + const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.NIGHT }) }); + const game = createFakeGame({ turn: 1, phase: GamePhases.NIGHT }); expect(isPlayerAttributeActive(attribute, game)).toBe(true); }); it("should return true when activation turn is same as game's turn, phase are different but game's phase is DAY anyway.", () => { - const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.NIGHT }) }); - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const attribute = createFakePowerlessByAncientPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.NIGHT }) }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); expect(isPlayerAttributeActive(attribute, game)).toBe(true); }); @@ -61,7 +61,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(getPlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS)).toStrictEqual(attributes[1]); + expect(getPlayerAttributeWithName(player, PlayerAttributeNames.POWERLESS)).toStrictEqual(attributes[1]); }); it("should return undefined when player doesn't have the attribute.", () => { @@ -71,7 +71,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(getPlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE)).toBeUndefined(); + expect(getPlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE)).toBeUndefined(); }); }); @@ -79,89 +79,89 @@ describe("Player Attribute Helper", () => { it("should return false when player doesn't have any attributes.", () => { const player = createFakePlayer({ attributes: [] }); - expect(doesPlayerHaveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBe(false); + expect(doesPlayerHaveAttributeWithName(player, PlayerAttributeNames.SEEN)).toBe(false); }); it("should return false when player doesn't have the attribute.", () => { const player = createFakePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }); - expect(doesPlayerHaveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBe(false); + expect(doesPlayerHaveAttributeWithName(player, PlayerAttributeNames.SEEN)).toBe(false); }); it("should return true when player has the attribute.", () => { const player = createFakePlayer({ attributes: [createFakeSeenBySeerPlayerAttribute()] }); - expect(doesPlayerHaveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.SEEN)).toBe(true); + expect(doesPlayerHaveAttributeWithName(player, PlayerAttributeNames.SEEN)).toBe(true); }); }); describe("getActivePlayerAttributeWithName", () => { it("should return undefined when player doesn't have the attribute.", () => { - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); const attributes = [ createFakeSheriffByAllPlayerAttribute(), createFakePowerlessByAncientPlayerAttribute(), ]; const player = createFakePlayer({ attributes }); - expect(getActivePlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBeUndefined(); + expect(getActivePlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBeUndefined(); }); it("should return undefined when player has the attribute but not active yet.", () => { - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); const attributes = [ createFakeSheriffByAllPlayerAttribute(), - createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GAME_PHASES.DAY }) }), + createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GamePhases.DAY }) }), ]; const player = createFakePlayer({ attributes }); - expect(getActivePlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBeUndefined(); + expect(getActivePlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBeUndefined(); }); it("should return the attribute when player has the attribute and is active yet.", () => { - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); const attributes = [ createFakeSheriffByAllPlayerAttribute(), - createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) }), + createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) }), ]; const player = createFakePlayer({ attributes }); - expect(getActivePlayerAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toStrictEqual(attributes[1]); + expect(getActivePlayerAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toStrictEqual(attributes[1]); }); }); describe("doesPlayerHaveActiveAttributeWithName", () => { it("should return false when player doesn't have the attribute.", () => { - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); const attributes = [ createFakeSheriffByAllPlayerAttribute(), createFakePowerlessByAncientPlayerAttribute(), ]; const player = createFakePlayer({ attributes }); - expect(doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBe(false); + expect(doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBe(false); }); it("should return false when player has the attribute but not active yet.", () => { - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); const attributes = [ createFakeSheriffByAllPlayerAttribute(), - createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GAME_PHASES.DAY }) }), + createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 2, phase: GamePhases.DAY }) }), ]; const player = createFakePlayer({ attributes }); - expect(doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBe(false); + expect(doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBe(false); }); it("should return true when player has the attribute and is active yet.", () => { - const game = createFakeGame({ turn: 1, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ turn: 1, phase: GamePhases.DAY }); const attributes = [ createFakeSheriffByAllPlayerAttribute(), - createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GAME_PHASES.DAY }) }), + createFakeInLoveByCupidPlayerAttribute({ activeAt: createFakePlayerAttributeActivation({ turn: 1, phase: GamePhases.DAY }) }), ]; const player = createFakePlayer({ attributes }); - expect(doesPlayerHaveActiveAttributeWithName(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, game)).toBe(true); + expect(doesPlayerHaveActiveAttributeWithName(player, PlayerAttributeNames.IN_LOVE, game)).toBe(true); }); }); @@ -173,7 +173,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(getPlayerAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.ANCIENT)).toStrictEqual(attributes[1]); + expect(getPlayerAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.ANCIENT)).toStrictEqual(attributes[1]); }); it("should return undefined when player doesn't have the attribute with correct name.", () => { @@ -183,7 +183,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(getPlayerAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, ROLE_NAMES.ANCIENT)).toBeUndefined(); + expect(getPlayerAttributeWithNameAndSource(player, PlayerAttributeNames.IN_LOVE, RoleNames.ANCIENT)).toBeUndefined(); }); it("should return undefined when player doesn't have the attribute with correct source.", () => { @@ -193,7 +193,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(getPlayerAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.CUPID)).toBeUndefined(); + expect(getPlayerAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.CUPID)).toBeUndefined(); }); }); @@ -205,7 +205,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(doesPlayerHaveAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.ANCIENT)).toBe(true); + expect(doesPlayerHaveAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.ANCIENT)).toBe(true); }); it("should return undefined when player doesn't have the attribute with correct name.", () => { @@ -215,7 +215,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(doesPlayerHaveAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.IN_LOVE, ROLE_NAMES.ANCIENT)).toBe(false); + expect(doesPlayerHaveAttributeWithNameAndSource(player, PlayerAttributeNames.IN_LOVE, RoleNames.ANCIENT)).toBe(false); }); it("should return undefined when player doesn't have the attribute with correct source.", () => { @@ -225,7 +225,7 @@ describe("Player Attribute Helper", () => { ]; const player = createFakePlayer({ attributes }); - expect(doesPlayerHaveAttributeWithNameAndSource(player, PLAYER_ATTRIBUTE_NAMES.POWERLESS, ROLE_NAMES.CUPID)).toBe(false); + expect(doesPlayerHaveAttributeWithNameAndSource(player, PlayerAttributeNames.POWERLESS, RoleNames.CUPID)).toBe(false); }); }); }); \ No newline at end of file diff --git a/tests/unit/specs/modules/game/helpers/player/player-death/player-death.factory.spec.ts b/tests/unit/specs/modules/game/helpers/player/player-death/player-death.factory.spec.ts index 54bd2aa69..a0e1ed3ec 100644 --- a/tests/unit/specs/modules/game/helpers/player/player-death/player-death.factory.spec.ts +++ b/tests/unit/specs/modules/game/helpers/player/player-death/player-death.factory.spec.ts @@ -1,7 +1,7 @@ -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_DEATH_CAUSES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { PlayerAttributeNames, PlayerDeathCauses, PlayerGroups } from "@/modules/game/enums/player.enum"; import { createPlayerBrokenHeartByCupidDeath, createPlayerDeath, createPlayerDeathPotionByWitchDeath, createPlayerDiseaseByRustySwordKnightDeath, createPlayerEatenByBigBadWolfDeath, createPlayerEatenByWerewolvesDeath, createPlayerEatenByWhiteWerewolfDeath, createPlayerReconsiderPardonByAllDeath, createPlayerShotByHunterDeath, createPlayerVoteByAllDeath, createPlayerVoteBySheriffDeath, createPlayerVoteScapegoatedByAllDeath } from "@/modules/game/helpers/player/player-death/player-death.factory"; import type { PlayerDeath } from "@/modules/game/schemas/player/player-death.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import { createFakePlayerDeath } from "@tests/factories/game/schemas/player/player-death/player-death.schema.factory"; @@ -9,8 +9,8 @@ describe("Player Death Factory", () => { describe("createPlayerDiseaseByRustySwordKnightDeath", () => { it("should create player contaminated by rusty sword knight when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.DISEASE, - source: ROLE_NAMES.RUSTY_SWORD_KNIGHT, + cause: PlayerDeathCauses.DISEASE, + source: RoleNames.RUSTY_SWORD_KNIGHT, }); expect(createPlayerDiseaseByRustySwordKnightDeath()).toStrictEqual(expectedDeath); @@ -20,8 +20,8 @@ describe("Player Death Factory", () => { describe("createPlayerBrokenHeartByCupidDeath", () => { it("should create player broken heart by cupid when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.BROKEN_HEART, - source: ROLE_NAMES.CUPID, + cause: PlayerDeathCauses.BROKEN_HEART, + source: RoleNames.CUPID, }); expect(createPlayerBrokenHeartByCupidDeath()).toStrictEqual(expectedDeath); @@ -31,8 +31,8 @@ describe("Player Death Factory", () => { describe("createPlayerReconsiderPardonByAllDeath", () => { it("should create player reconsider pardon by all death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.RECONSIDER_PARDON, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.RECONSIDER_PARDON, + source: PlayerGroups.ALL, }); expect(createPlayerReconsiderPardonByAllDeath()).toStrictEqual(expectedDeath); @@ -42,8 +42,8 @@ describe("Player Death Factory", () => { describe("createPlayerVoteScapegoatedByAllDeath", () => { it("should create player vote scapegoated by all death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE_SCAPEGOATED, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.VOTE_SCAPEGOATED, + source: PlayerGroups.ALL, }); expect(createPlayerVoteScapegoatedByAllDeath()).toStrictEqual(expectedDeath); @@ -53,8 +53,8 @@ describe("Player Death Factory", () => { describe("createPlayerVoteBySheriffDeath", () => { it("should create player vote by sheriff death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE, - source: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + cause: PlayerDeathCauses.VOTE, + source: PlayerAttributeNames.SHERIFF, }); expect(createPlayerVoteBySheriffDeath()).toStrictEqual(expectedDeath); @@ -64,8 +64,8 @@ describe("Player Death Factory", () => { describe("createPlayerVoteByAllDeath", () => { it("should create player vote by all death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.VOTE, - source: PLAYER_GROUPS.ALL, + cause: PlayerDeathCauses.VOTE, + source: PlayerGroups.ALL, }); expect(createPlayerVoteByAllDeath()).toStrictEqual(expectedDeath); @@ -75,8 +75,8 @@ describe("Player Death Factory", () => { describe("createPlayerShotByHunterDeath", () => { it("should create player shot by hunter death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.SHOT, - source: ROLE_NAMES.HUNTER, + cause: PlayerDeathCauses.SHOT, + source: RoleNames.HUNTER, }); expect(createPlayerShotByHunterDeath()).toStrictEqual(expectedDeath); @@ -86,8 +86,8 @@ describe("Player Death Factory", () => { describe("createPlayerEatenByWhiteWerewolfDeath", () => { it("should create player eaten by white werewolf death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: ROLE_NAMES.WHITE_WEREWOLF, + cause: PlayerDeathCauses.EATEN, + source: RoleNames.WHITE_WEREWOLF, }); expect(createPlayerEatenByWhiteWerewolfDeath()).toStrictEqual(expectedDeath); @@ -97,8 +97,8 @@ describe("Player Death Factory", () => { describe("createPlayerEatenByBigBadWolfDeath", () => { it("should create player eaten by big bad wolf death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: ROLE_NAMES.BIG_BAD_WOLF, + cause: PlayerDeathCauses.EATEN, + source: RoleNames.BIG_BAD_WOLF, }); expect(createPlayerEatenByBigBadWolfDeath()).toStrictEqual(expectedDeath); @@ -108,8 +108,8 @@ describe("Player Death Factory", () => { describe("createPlayerEatenByWerewolvesDeath", () => { it("should create player eaten by werewolves death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.EATEN, - source: PLAYER_GROUPS.WEREWOLVES, + cause: PlayerDeathCauses.EATEN, + source: PlayerGroups.WEREWOLVES, }); expect(createPlayerEatenByWerewolvesDeath()).toStrictEqual(expectedDeath); @@ -119,8 +119,8 @@ describe("Player Death Factory", () => { describe("createPlayerDeathPotionByWitchDeath", () => { it("should create player death potion by witch death when called.", () => { const expectedDeath = createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.DEATH_POTION, - source: ROLE_NAMES.WITCH, + cause: PlayerDeathCauses.DEATH_POTION, + source: RoleNames.WITCH, }); expect(createPlayerDeathPotionByWitchDeath()).toStrictEqual(expectedDeath); @@ -130,13 +130,13 @@ describe("Player Death Factory", () => { describe("createPlayerDeath", () => { it("should create player death when called.", () => { const playerDeath: PlayerDeath = { - cause: PLAYER_DEATH_CAUSES.DEATH_POTION, - source: ROLE_NAMES.WITCH, + cause: PlayerDeathCauses.DEATH_POTION, + source: RoleNames.WITCH, }; expect(createPlayerDeath(playerDeath)).toStrictEqual(createFakePlayerDeath({ - cause: PLAYER_DEATH_CAUSES.DEATH_POTION, - source: ROLE_NAMES.WITCH, + cause: PlayerDeathCauses.DEATH_POTION, + source: RoleNames.WITCH, })); }); }); diff --git a/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts b/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts index d14fc3200..42828e6ff 100644 --- a/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts +++ b/tests/unit/specs/modules/game/helpers/player/player.helper.spec.ts @@ -1,5 +1,5 @@ import { canPiedPiperCharm, isPlayerAliveAndPowerful, isPlayerOnVillagersSide, isPlayerOnWerewolvesSide } from "@/modules/game/helpers/player/player.helper"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; import { createFakeGameOptions } from "@tests/factories/game/schemas/game-options/game-options.schema.factory"; import { createFakePiedPiperGameOptions, createFakeRolesGameOptions } from "@tests/factories/game/schemas/game-options/game-roles-options.schema.factory"; @@ -29,7 +29,7 @@ describe("Player Helper", () => { it("should return false when pied piper is infected and thus is powerless.", () => { const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) }); const game = createFakeGame({ options }); - const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }); + const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }); expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(false); }); @@ -37,7 +37,7 @@ describe("Player Helper", () => { it("should return true when pied piper is infected but original rule is not respected.", () => { const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: false }) }) }); const game = createFakeGame({ options }); - const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.WEREWOLVES }) }); + const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.WEREWOLVES }) }); expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(true); }); @@ -45,7 +45,7 @@ describe("Player Helper", () => { it("should return true when pied piper is not powerless and currently a villager.", () => { const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ piedPiper: createFakePiedPiperGameOptions({ isPowerlessIfInfected: true }) }) }); const game = createFakeGame({ options }); - const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: ROLE_SIDES.VILLAGERS }) }); + const piedPiperPlayer = createFakePiedPiperAlivePlayer({ side: createFakePlayerSide({ current: RoleSides.VILLAGERS }) }); expect(canPiedPiperCharm(piedPiperPlayer, game)).toBe(true); }); diff --git a/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts b/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts index 39eaa435a..c98bb4ff4 100644 --- a/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/game-history/game-history-record.service.spec.ts @@ -2,9 +2,9 @@ import { Test } from "@nestjs/testing"; import { when } from "jest-when"; import type { TestingModule } from "@nestjs/testing"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; +import { GamePlayActions, GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import { createGamePlayAllElectSheriff } from "@/modules/game/helpers/game-play/game-play.factory"; import { GameHistoryRecordRepository } from "@/modules/game/providers/repositories/game-history-record.repository"; import { GameRepository } from "@/modules/game/providers/repositories/game.repository"; @@ -13,9 +13,9 @@ import { GamePlayVoteService } from "@/modules/game/providers/services/game-play import type { GameHistoryRecordPlay } from "@/modules/game/schemas/game-history-record/game-history-record-play/game-history-record-play.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; import type { GameHistoryRecordToInsert } from "@/modules/game/types/game-history-record.type"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleSides } from "@/modules/role/enums/role.enum"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; import * as UnexpectedExceptionFactory from "@/shared/exception/helpers/unexpected-exception.factory"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; @@ -125,25 +125,25 @@ describe("Game History Record Service", () => { describe("getLastGameHistoryTieInVotesRecord", () => { it("should get game history when all voted and there was a tie when called.", async() => { const gameId = createFakeObjectId(); - await services.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GAME_PLAY_ACTIONS.VOTE); + await services.gameHistoryRecord.getLastGameHistoryTieInVotesRecord(gameId, GamePlayActions.VOTE); - expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord).toHaveBeenCalledExactlyOnceWith(gameId, GAME_PLAY_ACTIONS.VOTE); + expect(repositories.gameHistoryRecord.getLastGameHistoryTieInVotesRecord).toHaveBeenCalledExactlyOnceWith(gameId, GamePlayActions.VOTE); }); }); describe("getGameHistoryWitchUsesSpecificPotionRecords", () => { it("should get game history records when witch used life potion when called.", async() => { const gameId = createFakeObjectId(); - await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.LIFE); + await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.LIFE); - expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WITCH_POTIONS.LIFE); + expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WitchPotions.LIFE); }); it("should get game history records when witch used death potion when called.", async() => { const gameId = createFakeObjectId(); - await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WITCH_POTIONS.DEATH); + await services.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords(gameId, WitchPotions.DEATH); - expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WITCH_POTIONS.DEATH); + expect(repositories.gameHistoryRecord.getGameHistoryWitchUsesSpecificPotionRecords).toHaveBeenCalledExactlyOnceWith(gameId, WitchPotions.DEATH); }); }); @@ -445,7 +445,7 @@ describe("Game History Record Service", () => { targets: [createFakeGameHistoryRecordPlayTarget({ isInfected: true })], votes: [createFakeGameHistoryRecordPlayVote()], chosenCard: createFakeGameAdditionalCard(), - chosenSide: ROLE_SIDES.VILLAGERS, + chosenSide: RoleSides.VILLAGERS, }); const expectedGameHistoryRecordPlaySource = { name: undefined, players: undefined }; localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlaySourceToInsert.mockReturnValue(expectedGameHistoryRecordPlaySource); @@ -482,7 +482,7 @@ describe("Game History Record Service", () => { }); const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert(); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.SHERIFF_ELECTION); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.SHERIFF_ELECTION); }); it("should return tie when there is no sheriff in the game after election.", () => { @@ -504,7 +504,7 @@ describe("Game History Record Service", () => { }); const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert(); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.TIE); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.TIE); }); it("should return skipped when there are no vote set.", () => { @@ -527,7 +527,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: undefined }); const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() })] }); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.SKIPPED); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.SKIPPED); }); it("should return skipped when votes are empty.", () => { @@ -550,7 +550,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [] }); const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteByAllDeath() })] }); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.SKIPPED); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.SKIPPED); }); it("should return death when there is at least one dead player from votes.", () => { @@ -577,7 +577,7 @@ describe("Game History Record Service", () => { ]; const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers }); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.DEATH); }); it("should return death when there is at least one dead player from scapegoat votes.", () => { @@ -600,7 +600,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }); const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerVoteScapegoatedByAllDeath() })] }); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.DEATH); }); it("should return inconsequential when there is no death from votes and current play was already after a tie.", () => { @@ -610,7 +610,7 @@ describe("Game History Record Service", () => { createFakeHunterAlivePlayer(), createFakeSeerAlivePlayer(), ]; - const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }) }); + const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }) }); const newGame = createFakeGame({ ...game, players: [ @@ -623,7 +623,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }); const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() })] }); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.INCONSEQUENTIAL); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.INCONSEQUENTIAL); }); it("should return tie when there is no death from votes and current play was not after a tie.", () => { @@ -633,7 +633,7 @@ describe("Game History Record Service", () => { createFakeHunterAlivePlayer(), createFakeSeerAlivePlayer(), ]; - const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }) }); + const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }) }); const newGame = createFakeGame({ ...game, players: [ @@ -646,7 +646,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordPlay = createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }); const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: gameHistoryRecordPlay, deadPlayers: [createFakePlayer({ ...players[1], isAlive: false, death: createFakePlayerDeathPotionByWitchDeath() })] }); - expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GAME_HISTORY_RECORD_VOTING_RESULTS.TIE); + expect(services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingResultToInsert"](game, newGame, gameHistoryRecordToInsert)).toBe(GameHistoryRecordVotingResults.TIE); }); }); @@ -672,9 +672,9 @@ describe("Game History Record Service", () => { const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert(); const nominatedPlayers = [players[2]]; mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers); - localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH); + localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH); const expectedCurrentGameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ - result: GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH, + result: GameHistoryRecordVotingResults.DEATH, nominatedPlayers, }); @@ -692,7 +692,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert(); const nominatedPlayers = [players[2]]; mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers); - localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH); + localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH); services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingToInsert"](game, newGame, gameHistoryRecordToInsert); expect(mocks.gamePlayVoteService.getNominatedPlayers).toHaveBeenCalledExactlyOnceWith([], game); @@ -709,7 +709,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }) }); const nominatedPlayers = [players[2]]; mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers); - localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH); + localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH); services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingToInsert"](game, newGame, gameHistoryRecordToInsert); expect(mocks.gamePlayVoteService.getNominatedPlayers).toHaveBeenCalledExactlyOnceWith(gameHistoryRecordToInsert.play.votes, game); @@ -726,7 +726,7 @@ describe("Game History Record Service", () => { const gameHistoryRecordToInsert = createFakeGameHistoryRecordToInsert({ play: createFakeGameHistoryRecordPlay({ votes: [createFakeGameHistoryRecordPlayVote()] }) }); const nominatedPlayers = [players[2]]; mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers); - localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GAME_HISTORY_RECORD_VOTING_RESULTS.DEATH); + localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert.mockReturnValue(GameHistoryRecordVotingResults.DEATH); services.gameHistoryRecord["generateCurrentGameHistoryRecordPlayVotingToInsert"](game, newGame, gameHistoryRecordToInsert); expect(localMocks.gameHistoryRecordService.generateCurrentGameHistoryRecordPlayVotingResultToInsert).toHaveBeenCalledExactlyOnceWith(game, newGame, gameHistoryRecordToInsert); @@ -742,7 +742,7 @@ describe("Game History Record Service", () => { createFakeVillagerAlivePlayer(), ]; const expectedPlayers = [players[0], players[1], players[3]]; - const game = createFakeGameWithCurrentPlay({ currentPlay: createGamePlayAllElectSheriff({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL, players: expectedPlayers }) }), players }); + const game = createFakeGameWithCurrentPlay({ currentPlay: createGamePlayAllElectSheriff({ source: createFakeGamePlaySource({ name: PlayerGroups.ALL, players: expectedPlayers }) }), players }); const expectedGameHistoryRecordPlaySource = createFakeGameHistoryRecordPlaySource({ name: game.currentPlay.source.name, players: expectedPlayers, @@ -758,55 +758,55 @@ describe("Game History Record Service", () => { const fakePlayer = createFakePlayer(); const fakeCard = createFakeGameAdditionalCard(); - it.each<{ play: GameHistoryRecordPlay; test: string; errorParameters: [API_RESOURCES, string, string] }>([ + it.each<{ play: GameHistoryRecordPlay; test: string; errorParameters: [ApiResources, string, string] }>([ { - play: createFakeGameHistoryRecordPlay({ source: { name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, players: [fakePlayer] } }), + play: createFakeGameHistoryRecordPlay({ source: { name: PlayerAttributeNames.SHERIFF, players: [fakePlayer] } }), test: "a source is not in the game", - errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `source.players` is not in the game players"], + errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `source.players` is not in the game players"], }, { play: createFakeGameHistoryRecordPlay({ source: { - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, players: fakeGame.players, }, targets: [{ player: fakePlayer }], }), test: "a target is not in the game", - errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `targets.player` is not in the game players"], + errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `targets.player` is not in the game players"], }, { play: createFakeGameHistoryRecordPlay({ source: { - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, players: fakeGame.players, }, votes: [{ source: fakePlayer, target: fakeGame.players[0] }], }), test: "a vote source is not in the game", - errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `votes.source` is not in the game players"], + errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `votes.source` is not in the game players"], }, { play: createFakeGameHistoryRecordPlay({ source: { - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, players: fakeGame.players, }, votes: [{ target: fakePlayer, source: fakeGame.players[0] }], }), test: "a vote target is not in the game", - errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `votes.target` is not in the game players"], + errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `votes.target` is not in the game players"], }, { play: createFakeGameHistoryRecordPlay({ source: { - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, players: fakeGame.players, }, chosenCard: fakeCard, }), test: "chosen card is not in the game", - errorParameters: [API_RESOURCES.GAME_ADDITIONAL_CARDS, fakeCard._id.toString(), "Game Play - Chosen card is not in the game additional cards"], + errorParameters: [ApiResources.GAME_ADDITIONAL_CARDS, fakeCard._id.toString(), "Game Play - Chosen card is not in the game additional cards"], }, ])("should throw resource not found error when $test [#$#].", ({ play, errorParameters }) => { expect(() => services.gameHistoryRecord["validateGameHistoryRecordToInsertPlayData"](play, fakeGame)).toThrow(ResourceNotFoundException); @@ -816,7 +816,7 @@ describe("Game History Record Service", () => { it("should not throw any errors when called with valid play data.", () => { const validPlay = createFakeGameHistoryRecordPlay({ source: { - name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, + name: PlayerAttributeNames.SHERIFF, players: fakeGame.players, }, targets: [{ player: fakeGame.players[0] }], @@ -839,21 +839,21 @@ describe("Game History Record Service", () => { when(mocks.gameRepository.findOne).calledWith({ _id: existingId.toJSON() }).mockResolvedValue(existingGame); }); - it.each<{ gameHistoryRecord: GameHistoryRecordToInsert; test: string; errorParameters: [API_RESOURCES, string, string] }>([ + it.each<{ gameHistoryRecord: GameHistoryRecordToInsert; test: string; errorParameters: [ApiResources, string, string] }>([ { gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: unknownId }), test: "game is not found with specified gameId", - errorParameters: [API_RESOURCES.GAMES, unknownId.toString(), "Game Play - Game Id is unknown in database"], + errorParameters: [ApiResources.GAMES, unknownId.toString(), "Game Play - Game Id is unknown in database"], }, { gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: existingId, revealedPlayers: [fakePlayer] }), test: "a revealed player is not in the game", - errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `revealedPlayers` is not in the game players"], + errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `revealedPlayers` is not in the game players"], }, { gameHistoryRecord: createFakeGameHistoryRecordToInsert({ gameId: existingId, deadPlayers: [fakePlayer] }), test: "a dead player is not in the game", - errorParameters: [API_RESOURCES.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `deadPlayers` is not in the game players"], + errorParameters: [ApiResources.PLAYERS, fakePlayer._id.toString(), "Game Play - Player in `deadPlayers` is not in the game players"], }, ])("should throw resource not found error when $test [#$#].", async({ gameHistoryRecord, errorParameters }) => { await expect(services.gameHistoryRecord["validateGameHistoryRecordToInsertData"](gameHistoryRecord)).toReject(); @@ -863,7 +863,7 @@ describe("Game History Record Service", () => { it("should not throw any errors when called with valid data.", async() => { const validPlay = createFakeGameHistoryRecordToInsert({ gameId: existingId, - play: createFakeGameHistoryRecordPlay({ source: { name: PLAYER_ATTRIBUTE_NAMES.SHERIFF, players: existingGame.players } }), + play: createFakeGameHistoryRecordPlay({ source: { name: PlayerAttributeNames.SHERIFF, players: existingGame.players } }), revealedPlayers: existingGame.players, deadPlayers: existingGame.players, }); diff --git a/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts b/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts index 66aac734f..1278e4e78 100644 --- a/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/game-phase/game-phase.service.spec.ts @@ -1,7 +1,7 @@ import { Test } from "@nestjs/testing"; import type { TestingModule } from "@nestjs/testing"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; import { GamePhaseService } from "@/modules/game/providers/services/game-phase/game-phase.service"; import { GamePlayService } from "@/modules/game/providers/services/game-play/game-play.service"; import { PlayerAttributeService } from "@/modules/game/providers/services/player/player-attribute.service"; @@ -69,7 +69,7 @@ describe("Game Phase Service", () => { it("should call ending game phase method for each player when called.", async() => { const players = bulkCreateFakePlayers(4); - const game = createFakeGame({ phase: GAME_PHASES.NIGHT, players }); + const game = createFakeGame({ phase: GamePhases.NIGHT, players }); localMocks.gamePhaseService.applyEndingGamePhasePlayerAttributesOutcomesToPlayer.mockResolvedValue(game); await services.gamePhase.applyEndingGamePhasePlayerAttributesOutcomesToPlayers(game); @@ -90,10 +90,10 @@ describe("Game Phase Service", () => { }); it("should switch to night and append upcoming night plays when game's current phase is DAY.", async() => { - const game = createFakeGame({ phase: GAME_PHASES.DAY, upcomingPlays: [createFakeGamePlayHunterShoots()] }); + const game = createFakeGame({ phase: GamePhases.DAY, upcomingPlays: [createFakeGamePlayHunterShoots()] }); const expectedGame = createFakeGame({ ...game, - phase: GAME_PHASES.NIGHT, + phase: GamePhases.NIGHT, turn: game.turn + 1, upcomingPlays: [...game.upcomingPlays, ...upcomingNightPlays], }); @@ -102,10 +102,10 @@ describe("Game Phase Service", () => { }); it("should switch to day and append upcoming day plays when game's current phase is NIGHT.", async() => { - const game = createFakeGame({ phase: GAME_PHASES.NIGHT, upcomingPlays: [createFakeGamePlayHunterShoots()] }); + const game = createFakeGame({ phase: GamePhases.NIGHT, upcomingPlays: [createFakeGamePlayHunterShoots()] }); const expectedGame = createFakeGame({ ...game, - phase: GAME_PHASES.DAY, + phase: GamePhases.DAY, upcomingPlays: [...game.upcomingPlays, ...upcomingDayPlays], }); @@ -177,7 +177,7 @@ describe("Game Phase Service", () => { it("should call ending night method when game phase is night.", async() => { const player = createFakePlayer(); - const game = createFakeGame({ phase: GAME_PHASES.NIGHT }); + const game = createFakeGame({ phase: GamePhases.NIGHT }); await services.gamePhase["applyEndingGamePhasePlayerAttributesOutcomesToPlayer"](player, game); expect(localMocks.gamePhaseService.applyEndingNightPlayerAttributesOutcomesToPlayer).toHaveBeenCalledExactlyOnceWith(player, game); @@ -186,7 +186,7 @@ describe("Game Phase Service", () => { it("should call ending day method when game phase is day.", async() => { const player = createFakePlayer(); - const game = createFakeGame({ phase: GAME_PHASES.DAY }); + const game = createFakeGame({ phase: GamePhases.DAY }); await services.gamePhase["applyEndingGamePhasePlayerAttributesOutcomesToPlayer"](player, game); expect(localMocks.gamePhaseService.applyEndingDayPlayerAttributesOutcomesToPlayer).toHaveBeenCalledExactlyOnceWith(player, game); diff --git a/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts b/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts index a7f63ca3c..cb1ca798a 100644 --- a/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/game-play/game-play-maker.service.spec.ts @@ -3,15 +3,15 @@ import lodash from "lodash"; import type { TestingModule } from "@nestjs/testing"; import type { MakeGamePlayVoteWithRelationsDto } from "@/modules/game/dto/make-game-play/make-game-play-vote/make-game-play-vote-with-relations.dto"; -import { GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_ATTRIBUTE_NAMES, PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { PlayerAttributeNames, PlayerGroups } from "@/modules/game/enums/player.enum"; import * as GameMutator from "@/modules/game/helpers/game.mutator"; import { GamePlayMakerService } from "@/modules/game/providers/services/game-play/game-play-maker.service"; import { GamePlayVoteService } from "@/modules/game/providers/services/game-play/game-play-vote/game-play-vote.service"; import { PlayerKillerService } from "@/modules/game/providers/services/player/player-killer.service"; import type { Game } from "@/modules/game/schemas/game.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import * as UnexpectedExceptionFactory from "@/shared/exception/helpers/unexpected-exception.factory"; @@ -70,9 +70,9 @@ describe("Game Play Maker Service", () => { describe("gameSourcePlayMethods", () => { it("should contain play methods from game play sources when accessed.", () => { - expect(services.gamePlayMaker["gameSourcePlayMethods"][PLAYER_GROUPS.WEREWOLVES]).toStrictEqual(expect.any(Function)); - expect(services.gamePlayMaker["gameSourcePlayMethods"][ROLE_NAMES.FOX]).toStrictEqual(expect.any(Function)); - expect(services.gamePlayMaker["gameSourcePlayMethods"][PLAYER_ATTRIBUTE_NAMES.SHERIFF]).toStrictEqual(expect.any(Function)); + expect(services.gamePlayMaker["gameSourcePlayMethods"][PlayerGroups.WEREWOLVES]).toStrictEqual(expect.any(Function)); + expect(services.gamePlayMaker["gameSourcePlayMethods"][RoleNames.FOX]).toStrictEqual(expect.any(Function)); + expect(services.gamePlayMaker["gameSourcePlayMethods"][PlayerAttributeNames.SHERIFF]).toStrictEqual(expect.any(Function)); }); }); @@ -485,7 +485,7 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), ]; const game = createFakeGameWithCurrentPlay({ players }); - const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); await services.gamePlayMaker["handleTieInVotes"](game); expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlayAllVote, game); @@ -499,7 +499,7 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), ]; const game = createFakeGameWithCurrentPlay({ players }); - const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + const gamePlayAllVote = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); await services.gamePlayMaker["handleTieInVotes"](game); expect(localMocks.gameMutator.prependUpcomingPlayInGame).toHaveBeenCalledExactlyOnceWith(gamePlayAllVote, game); @@ -512,7 +512,7 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), createFakeWerewolfAlivePlayer(), ]; - const currentPlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + const currentPlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); const game = createFakeGameWithCurrentPlay({ players, currentPlay }); const expectedGame = createFakeGame(game); @@ -601,7 +601,7 @@ describe("Game Play Maker Service", () => { const nominatedPlayers = [players[1], players[2]]; const expectedGame = createFakeGameWithCurrentPlay({ ...game, - upcomingPlays: [createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST })], + upcomingPlays: [createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST })], }); mocks.gamePlayVoteService.getNominatedPlayers.mockReturnValue(nominatedPlayers); await services.gamePlayMaker["allVote"](play, game); @@ -645,13 +645,13 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), createFakeWerewolfAlivePlayer(), ]; - const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }); + const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }); const upcomingPlays = [createFakeGamePlayHunterShoots()]; const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays }); const nominatedPlayers = [players[0], players[1]]; const expectedGame = createFakeGame({ ...game, - upcomingPlays: [createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), ...upcomingPlays], + upcomingPlays: [createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), ...upcomingPlays], }); expect(services.gamePlayMaker["handleTieInSheriffElection"](nominatedPlayers, game)).toStrictEqual(expectedGame); @@ -665,7 +665,7 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), ]; localMocks.lodash.sample.mockReturnValue(players[0]); - const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); const upcomingPlays = [createFakeGamePlayHunterShoots()]; const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays }); const nominatedPlayers = [players[0], players[1]]; @@ -693,7 +693,7 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), ]; localMocks.lodash.sample.mockReturnValue(undefined); - const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + const currentPlay = createFakeGamePlayAllElectSheriff({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); const upcomingPlays = [createFakeGamePlayHunterShoots()]; const game = createFakeGameWithCurrentPlay({ currentPlay, players, upcomingPlays }); const nominatedPlayers = [players[0], players[1]]; @@ -890,13 +890,13 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), createFakeWerewolfAlivePlayer(), ]; - const additionalCards = bulkCreateFakeGameAdditionalCards(4, [createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF })]); + const additionalCards = bulkCreateFakeGameAdditionalCards(4, [createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF })]); const game = createFakeGameWithCurrentPlay({ players, additionalCards }); const play = createFakeMakeGamePlayWithRelationsDto({ chosenCard: additionalCards[0] }); const expectedThiefPlayer = createFakePlayer({ ...players[0], - role: { ...players[0].role, current: ROLE_NAMES.WEREWOLF }, - side: { ...players[0].side, current: ROLE_SIDES.WEREWOLVES }, + role: { ...players[0].role, current: RoleNames.WEREWOLF }, + side: { ...players[0].side, current: RoleSides.WEREWOLVES }, }); const expectedGame = createFakeGame({ ...game, @@ -977,7 +977,7 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), ]; const game = createFakeGameWithCurrentPlay({ players }); - const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES }); + const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES }); const expectedGame = createFakeGame(game); expect(services.gamePlayMaker["dogWolfChoosesSide"](play, game)).toStrictEqual(expectedGame); @@ -991,10 +991,10 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), ]; const game = createFakeGameWithCurrentPlay({ players }); - const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES }); + const play = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES }); const expectedDogWolfPlayer = createFakePlayer({ ...players[1], - side: { ...players[1].side, current: ROLE_SIDES.WEREWOLVES }, + side: { ...players[1].side, current: RoleSides.WEREWOLVES }, }); const expectedGame = createFakeGame({ ...game, @@ -1285,7 +1285,7 @@ describe("Game Play Maker Service", () => { createFakeWerewolfAlivePlayer(), ]; const game = createFakeGameWithCurrentPlay({ players }); - const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WITCH_POTIONS.LIFE })]; + const targets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WitchPotions.LIFE })]; const play = createFakeMakeGamePlayWithRelationsDto({ targets }); const expectedTargetedPlayer = createFakePlayer({ ...players[1], @@ -1313,8 +1313,8 @@ describe("Game Play Maker Service", () => { ]; const game = createFakeGameWithCurrentPlay({ players }); const targets = [ - createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WITCH_POTIONS.LIFE }), - createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2], drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ player: players[1], drankPotion: WitchPotions.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ player: players[2], drankPotion: WitchPotions.DEATH }), ]; const play = createFakeMakeGamePlayWithRelationsDto({ targets }); const expectedFirstTargetedPlayer = createFakePlayer({ @@ -1666,7 +1666,7 @@ describe("Game Play Maker Service", () => { mocks.playerKillerService.isAncientKillable.mockReturnValue(false); const expectedTargetedPlayer = createFakePlayer({ ...players[1], - side: { ...players[1].side, current: ROLE_SIDES.WEREWOLVES }, + side: { ...players[1].side, current: RoleSides.WEREWOLVES }, }); const expectedGame = createFakeGame({ ...game, @@ -1694,7 +1694,7 @@ describe("Game Play Maker Service", () => { mocks.playerKillerService.isAncientKillable.mockReturnValue(true); const expectedTargetedPlayer = createFakePlayer({ ...players[1], - side: { ...players[1].side, current: ROLE_SIDES.WEREWOLVES }, + side: { ...players[1].side, current: RoleSides.WEREWOLVES }, }); const expectedGame = createFakeGame({ ...game, diff --git a/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts b/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts index 340841d07..07a47f120 100644 --- a/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/game-play/game-play-validator.service.spec.ts @@ -2,15 +2,15 @@ import { Test } from "@nestjs/testing"; import { when } from "jest-when"; import type { TestingModule } from "@nestjs/testing"; -import { GAME_HISTORY_RECORD_VOTING_RESULTS } from "@/modules/game/enums/game-history-record.enum"; -import { GAME_PLAY_ACTIONS, GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { GameHistoryRecordVotingResults } from "@/modules/game/enums/game-history-record.enum"; +import { GamePlayActions, GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { PlayerGroups } from "@/modules/game/enums/player.enum"; import * as GameHelper from "@/modules/game/helpers/game.helper"; import { GameHistoryRecordRepository } from "@/modules/game/providers/repositories/game-history-record.repository"; import { GameRepository } from "@/modules/game/providers/repositories/game.repository"; import { GameHistoryRecordService } from "@/modules/game/providers/services/game-history/game-history-record.service"; import { GamePlayValidatorService } from "@/modules/game/providers/services/game-play/game-play-validator.service"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; import * as UnexpectedExceptionFactory from "@/shared/exception/helpers/unexpected-exception.factory"; import { BadGamePlayPayloadException } from "@/shared/exception/types/bad-game-play-payload-exception.type"; @@ -156,8 +156,8 @@ describe("Game Play Validator Service", () => { const chosenCard = createFakeGameAdditionalCard(); const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: false }) }) }); const additionalCards = [ - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WHITE_WEREWOLF }), + createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }), + createFakeGameAdditionalCard({ roleName: RoleNames.WHITE_WEREWOLF }), ]; const game = createFakeGameWithCurrentPlay({ additionalCards, options }); @@ -168,8 +168,8 @@ describe("Game Play Validator Service", () => { const chosenCard = undefined; const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) }); const additionalCards = [ - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.SEER }), + createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }), + createFakeGameAdditionalCard({ roleName: RoleNames.SEER }), ]; const game = createFakeGameWithCurrentPlay({ additionalCards, options }); @@ -180,8 +180,8 @@ describe("Game Play Validator Service", () => { const chosenCard = createFakeGameAdditionalCard(); const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) }); const additionalCards = [ - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WHITE_WEREWOLF }), + createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }), + createFakeGameAdditionalCard({ roleName: RoleNames.WHITE_WEREWOLF }), ]; const game = createFakeGameWithCurrentPlay({ additionalCards, options }); @@ -192,8 +192,8 @@ describe("Game Play Validator Service", () => { const chosenCard = undefined; const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ thief: createFakeThiefGameOptions({ mustChooseBetweenWerewolves: true }) }) }); const additionalCards = [ - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WEREWOLF }), - createFakeGameAdditionalCard({ roleName: ROLE_NAMES.WHITE_WEREWOLF }), + createFakeGameAdditionalCard({ roleName: RoleNames.WEREWOLF }), + createFakeGameAdditionalCard({ roleName: RoleNames.WHITE_WEREWOLF }), ]; const game = createFakeGameWithCurrentPlay({ additionalCards, options }); @@ -241,8 +241,8 @@ describe("Game Play Validator Service", () => { describe("validateDrankLifePotionTargets", () => { it("should throw error when there are too much targets for life potion.", () => { const drankLifePotionTargets = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), ]; const game = createFakeGame(); @@ -252,7 +252,7 @@ describe("Game Play Validator Service", () => { it("should throw error when life potion target is not alive.", () => { const targetedPlayer = createFakePlayer({ isAlive: false, attributes: [createFakeEatenByWerewolvesPlayerAttribute()] }); - const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.LIFE })]; + const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.LIFE })]; const game = createFakeGame(); expect(() => services.gamePlayValidator["validateDrankLifePotionTargets"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException); @@ -261,7 +261,7 @@ describe("Game Play Validator Service", () => { it("should throw error when life potion target is not eaten by werewolves.", () => { const targetedPlayer = createFakePlayer({ isAlive: true, attributes: [] }); - const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.LIFE })]; + const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.LIFE })]; const game = createFakeGame(); expect(() => services.gamePlayValidator["validateDrankLifePotionTargets"](drankLifePotionTargets, game)).toThrow(BadGamePlayPayloadException); @@ -276,7 +276,7 @@ describe("Game Play Validator Service", () => { it("should do nothing when life potion target is applied on valid target.", () => { const targetedPlayer = createFakePlayer({ attributes: [createFakeEatenByWerewolvesPlayerAttribute()], isAlive: true }); - const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.LIFE })]; + const drankLifePotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.LIFE })]; const game = createFakeGame(); expect(() => services.gamePlayValidator["validateDrankLifePotionTargets"](drankLifePotionTargets, game)).not.toThrow(); @@ -286,8 +286,8 @@ describe("Game Play Validator Service", () => { describe("validateDrankDeathPotionTargets", () => { it("should throw error when there are too much targets for death potion.", () => { const drankDeathPotionTargets = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), ]; expect(() => services.gamePlayValidator["validateDrankDeathPotionTargets"](drankDeathPotionTargets)).toThrow(BadGamePlayPayloadException); @@ -296,7 +296,7 @@ describe("Game Play Validator Service", () => { it("should throw error when death potion target is not alive.", () => { const targetedPlayer = createFakePlayer({ isAlive: false }); - const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.DEATH })]; + const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.DEATH })]; expect(() => services.gamePlayValidator["validateDrankDeathPotionTargets"](drankDeathPotionTargets)).toThrow(BadGamePlayPayloadException); expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith("Death potion can't be applied to this target (`targets.drankPotion`)"); @@ -308,7 +308,7 @@ describe("Game Play Validator Service", () => { it("should do nothing when death potion target is applied on valid target.", () => { const targetedPlayer = createFakePlayer({ isAlive: true }); - const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WITCH_POTIONS.DEATH })]; + const drankDeathPotionTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ player: targetedPlayer, drankPotion: WitchPotions.DEATH })]; expect(() => services.gamePlayValidator["validateDrankDeathPotionTargets"](drankDeathPotionTargets)).not.toThrow(); }); @@ -334,19 +334,19 @@ describe("Game Play Validator Service", () => { it("should throw error when witch targeted someone with life potion but already used it with death potion before.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), createFakeMakeGamePlayTargetWithRelationsDto(), ]; const gameHistoryRecordTargets = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), ]; const gameHistoryRecords = [ createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }), createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }), ]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toReject(); expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith("`targets.drankPotion` can't be set on this current game's state"); @@ -355,16 +355,16 @@ describe("Game Play Validator Service", () => { it("should throw error when witch targeted someone with life potion but already used it alone before.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), createFakeMakeGamePlayTargetWithRelationsDto({}), ]; - const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE })]; + const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE })]; const gameHistoryRecords = [ createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }), createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }), ]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toReject(); expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith("`targets.drankPotion` can't be set on this current game's state"); @@ -373,19 +373,19 @@ describe("Game Play Validator Service", () => { it("should throw error when witch targeted someone with death potion but already used it with life potion before.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), createFakeMakeGamePlayTargetWithRelationsDto(), ]; const gameHistoryRecordTargets = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), ]; const gameHistoryRecords = [ createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }), createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }), ]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toReject(); expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith("`targets.drankPotion` can't be set on this current game's state"); @@ -394,16 +394,16 @@ describe("Game Play Validator Service", () => { it("should throw error when witch targeted someone with death potion but already used it alone before.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1], drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[1], drankPotion: WitchPotions.DEATH }), createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[2] }), ]; - const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH })]; + const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH })]; const gameHistoryRecords = [ createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay() }), createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) }), ]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toReject(); expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith("`targets.drankPotion` can't be set on this current game's state"); @@ -412,8 +412,8 @@ describe("Game Play Validator Service", () => { it("should call potions validators without players when called with valid data but no target drank potions.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeSeerAlivePlayer() })]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toResolve(); expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([], game); @@ -423,11 +423,11 @@ describe("Game Play Validator Service", () => { it("should call potions validators with players when called without bad data and without witch history.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), ]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toResolve(); expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]], game); @@ -436,11 +436,11 @@ describe("Game Play Validator Service", () => { it("should call potions validators with players when called for valid life potion data and some witch history.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); - const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE })]; - const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH })]; + const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE })]; + const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH })]; const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) })]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockReturnValue([]); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockReturnValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue(gameHistoryRecords); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toResolve(); expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([makeGamePlayTargetsWithRelationsDto[0]], game); @@ -449,11 +449,11 @@ describe("Game Play Validator Service", () => { it("should call potions validators with players when called for valid death potion data and some witch history.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); - const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH })]; - const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE })]; + const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH })]; + const gameHistoryRecordTargets = [createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE })]; const gameHistoryRecords = [createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWitchUsePotionsPlay({ targets: gameHistoryRecordTargets }) })]; - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue(gameHistoryRecords); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue(gameHistoryRecords); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]); await expect(services.gamePlayValidator["validateGamePlayWitchTargets"](makeGamePlayTargetsWithRelationsDto, game)).toResolve(); expect(localMocks.gamePlayValidatorService.validateDrankLifePotionTargets).toHaveBeenCalledExactlyOnceWith([], game); @@ -1016,7 +1016,7 @@ describe("Game Play Validator Service", () => { describe("validateGamePlaySheriffTargets", () => { it("should do nothing when game play action is not DELEGATE nor SETTLE_VOTES.", async() => { - const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates({ action: GAME_PLAY_ACTIONS.USE_POTIONS }) }); + const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffDelegates({ action: GamePlayActions.USE_POTIONS }) }); const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto()]; await expect(services.gamePlayValidator["validateGamePlaySheriffTargets"](makeGamePlayTargetsWithRelationsDto, game)).toResolve(); }); @@ -1039,7 +1039,7 @@ describe("Game Play Validator Service", () => { it("should throw error when targeted player is not in last tie in votes and upcoming action is SETTLE_VOTES.", async() => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlaySheriffSettlesVotes() }); const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: createFakeVillagerAlivePlayer({ isAlive: false }) })]; - const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE, nominatedPlayers: [createFakeSeerAlivePlayer()] }); + const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE, nominatedPlayers: [createFakeSeerAlivePlayer()] }); mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayVoting }) })); await expect(services.gamePlayValidator["validateGamePlaySheriffTargets"](makeGamePlayTargetsWithRelationsDto, game)).toReject(); @@ -1049,7 +1049,7 @@ describe("Game Play Validator Service", () => { it("should do nothing when targeted player for sheriff settling votes is valid.", async() => { const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlaySheriffSettlesVotes() }); const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ player: game.players[0] })]; - const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GAME_HISTORY_RECORD_VOTING_RESULTS.TIE, nominatedPlayers: [game.players[0]] }); + const gameHistoryRecordPlayVoting = createFakeGameHistoryRecordPlayVoting({ result: GameHistoryRecordVotingResults.TIE, nominatedPlayers: [game.players[0]] }); mocks.gameHistoryRecordService.getLastGameHistoryTieInVotesRecord.mockResolvedValue(createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordAllVotePlay({ voting: gameHistoryRecordPlayVoting }) })); await expect(services.gamePlayValidator["validateGamePlaySheriffTargets"](makeGamePlayTargetsWithRelationsDto, game)).toResolve(); @@ -1138,7 +1138,7 @@ describe("Game Play Validator Service", () => { }); it("should do nothing when game source doesn't have a validation method.", async() => { - const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlay({ source: createFakeGamePlaySource({ name: ROLE_NAMES.IDIOT }) }) }); + const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlay({ source: createFakeGamePlaySource({ name: RoleNames.IDIOT }) }) }); await services.gamePlayValidator["validateGamePlaySourceTargets"]([], game); expect(localMocks.gamePlayValidatorService.validateGamePlaySheriffTargets).not.toHaveBeenCalled(); @@ -1415,7 +1415,7 @@ describe("Game Play Validator Service", () => { createFakeWerewolfAlivePlayer(), createFakeVileFatherOfWolvesAlivePlayer(), ]); - const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ action: GAME_PLAY_ACTIONS.CHOOSE_CARD }), players }); + const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ action: GamePlayActions.CHOOSE_CARD }), players }); const makeGamePlayTargetsWithRelationsDto = [ createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true }), createFakeMakeGamePlayTargetWithRelationsDto(), @@ -1432,7 +1432,7 @@ describe("Game Play Validator Service", () => { createFakeWerewolfAlivePlayer(), createFakeVileFatherOfWolvesAlivePlayer(), ]); - const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.ALL }) }), players }); + const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PlayerGroups.ALL }) }), players }); const makeGamePlayTargetsWithRelationsDto = [createFakeMakeGamePlayTargetWithRelationsDto({ isInfected: true })]; expect(() => services.gamePlayValidator["validateInfectedTargetsAndPotionUsage"](makeGamePlayTargetsWithRelationsDto, game)).toThrow(BadGamePlayPayloadException); @@ -1453,10 +1453,10 @@ describe("Game Play Validator Service", () => { }); it("should throw error when expected action is not USE_POTIONS but targets drank potions.", () => { - const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ action: GAME_PLAY_ACTIONS.CHOOSE_CARD }) }); + const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ action: GamePlayActions.CHOOSE_CARD }) }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), createFakeMakeGamePlayTargetWithRelationsDto(), ]; @@ -1465,10 +1465,10 @@ describe("Game Play Validator Service", () => { }); it("should throw error when expected source is not WITCH but targets drank potions.", () => { - const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ source: createFakeGamePlaySource({ name: ROLE_NAMES.THIEF }) }) }); + const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions({ source: createFakeGamePlaySource({ name: RoleNames.THIEF }) }) }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), createFakeMakeGamePlayTargetWithRelationsDto(), ]; @@ -1479,8 +1479,8 @@ describe("Game Play Validator Service", () => { it("should do nothing when expected some players drank potions and game play is valid.", () => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayWitchUsesPotions() }); const makeGamePlayTargetsWithRelationsDto = [ - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.LIFE }), - createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WITCH_POTIONS.DEATH }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.LIFE }), + createFakeMakeGamePlayTargetWithRelationsDto({ drankPotion: WitchPotions.DEATH }), createFakeMakeGamePlayTargetWithRelationsDto(), ]; @@ -1699,7 +1699,7 @@ describe("Game Play Validator Service", () => { createFakeVillagerAlivePlayer(), ]; const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) }); - const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE, action: GAME_PLAY_ACTIONS.CHOOSE_CARD }), options }); + const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE, action: GamePlayActions.CHOOSE_CARD }), options }); expect(() => services.gamePlayValidator["validateUnsetGamePlayVotesWithRelationsDto"](game)).not.toThrow(); }); @@ -1740,7 +1740,7 @@ describe("Game Play Validator Service", () => { createFakeVillagerAlivePlayer(), ]; const options = createFakeGameOptions({ votes: createFakeVotesGameOptions({ canBeSkipped: true }) }); - const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }), options }); + const game = createFakeGameWithCurrentPlay({ players, currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }), options }); expect(() => services.gamePlayValidator["validateUnsetGamePlayVotesWithRelationsDto"](game)).toThrow(BadGamePlayPayloadException); expect(BadGamePlayPayloadException).toHaveBeenCalledExactlyOnceWith("`votes` is required on this current game's state"); @@ -1795,7 +1795,7 @@ describe("Game Play Validator Service", () => { }); it("should call validateGamePlayVotesTieBreakerWithRelationsDto when current play is because of previous votes were in ties.", async() => { - const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }) }); + const game = createFakeGameWithCurrentPlay({ players: bulkCreateFakePlayers(4), currentPlay: createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }) }); const makeGamePlayVotesWithRelationsDto = [createFakeMakeGamePlayVoteWithRelationsDto({ source: game.players[0], target: game.players[1] })]; await expect(services.gamePlayValidator["validateGamePlayVotesWithRelationsDto"](makeGamePlayVotesWithRelationsDto, game)).toResolve(); @@ -1821,7 +1821,7 @@ describe("Game Play Validator Service", () => { it("should throw error when chosenSide is defined and game play action is not CHOOSE_SIDE.", () => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayAllVote() }); - const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES }); + const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES }); expect(() => services.gamePlayValidator["validateGamePlayWithRelationsDtoChosenSide"](makeGamePlayWithRelationsDto, game)).toThrow(BadGamePlayPayloadException); expect(BadGamePlayPayloadException).toHaveBeenCalledWith("`chosenSide` can't be set on this current game's state"); @@ -1836,7 +1836,7 @@ describe("Game Play Validator Service", () => { it("should do nothing when chosenSide is defined and game play action is CHOOSE_SIDE.", () => { const game = createFakeGameWithCurrentPlay({ currentPlay: createFakeGamePlayDogWolfChoosesSide() }); - const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: ROLE_SIDES.WEREWOLVES }); + const makeGamePlayWithRelationsDto = createFakeMakeGamePlayWithRelationsDto({ chosenSide: RoleSides.WEREWOLVES }); expect(() => services.gamePlayValidator["validateGamePlayWithRelationsDtoChosenSide"](makeGamePlayWithRelationsDto, game)).not.toThrow(); }); diff --git a/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts b/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts index 8c8c0a927..04a734cb0 100644 --- a/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/game-play/game-play.service.spec.ts @@ -2,17 +2,17 @@ import { Test } from "@nestjs/testing"; import { when } from "jest-when"; import type { TestingModule } from "@nestjs/testing"; -import { defaultGameOptions } from "@/modules/game/constants/game-options/game-options.constant"; -import { GAME_PLAY_CAUSES, WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { GAME_PHASES } from "@/modules/game/enums/game.enum"; -import { PLAYER_GROUPS } from "@/modules/game/enums/player.enum"; +import { DEFAULT_GAME_OPTIONS } from "@/modules/game/constants/game-options/game-options.constant"; +import { GamePlayCauses, WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { GamePhases } from "@/modules/game/enums/game.enum"; +import { PlayerGroups } from "@/modules/game/enums/player.enum"; import * as GameHelper from "@/modules/game/helpers/game.helper"; import * as PlayerHelper from "@/modules/game/helpers/player/player.helper"; import { GameHistoryRecordService } from "@/modules/game/providers/services/game-history/game-history-record.service"; import { GamePlayService } from "@/modules/game/providers/services/game-play/game-play.service"; import type { GamePlay } from "@/modules/game/schemas/game-play/game-play.schema"; import type { Game } from "@/modules/game/schemas/game.schema"; -import { ROLE_NAMES } from "@/modules/role/enums/role.enum"; +import { RoleNames } from "@/modules/role/enums/role.enum"; import * as UnexpectedExceptionFactory from "@/shared/exception/helpers/unexpected-exception.factory"; @@ -164,14 +164,14 @@ describe("Game Play Service", () => { test: "it's the first night with official rules and some roles", game: createFakeGame({ turn: 1, - phase: GAME_PHASES.NIGHT, + phase: GamePhases.NIGHT, players: bulkCreateFakePlayers(4, [ createFakeVillagerAlivePlayer(), createFakeWerewolfAlivePlayer(), createFakeWerewolfAlivePlayer(), createFakeSeerAlivePlayer(), ]), - options: defaultGameOptions, + options: DEFAULT_GAME_OPTIONS, }), output: [ createFakeGamePlayAllElectSheriff(), @@ -183,7 +183,7 @@ describe("Game Play Service", () => { test: "it's the first night with official rules and all roles who act during the night", game: createFakeGame({ turn: 1, - phase: GAME_PHASES.NIGHT, + phase: GamePhases.NIGHT, players: bulkCreateFakePlayers(22, [ createFakeVillagerAlivePlayer(), createFakeWerewolfAlivePlayer(), @@ -208,11 +208,11 @@ describe("Game Play Service", () => { createFakeWitchAlivePlayer(), createFakePiedPiperAlivePlayer(), ]), - options: defaultGameOptions, + options: DEFAULT_GAME_OPTIONS, }), output: [ createFakeGamePlayAllElectSheriff(), - createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }), + createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }), createFakeGamePlayThiefChoosesCard(), createFakeGamePlayDogWolfChoosesSide(), createFakeGamePlayCupidCharms(), @@ -237,7 +237,7 @@ describe("Game Play Service", () => { test: "it's the second night with official rules and some roles", game: createFakeGame({ turn: 2, - phase: GAME_PHASES.NIGHT, + phase: GamePhases.NIGHT, players: bulkCreateFakePlayers(4, [ createFakeCupidAlivePlayer(), createFakeWerewolfAlivePlayer(), @@ -245,7 +245,7 @@ describe("Game Play Service", () => { createFakeWitchAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }), createFakeAngelAlivePlayer(), ]), - options: defaultGameOptions, + options: DEFAULT_GAME_OPTIONS, }), output: [createFakeGamePlayWerewolvesEat()], }, @@ -381,23 +381,23 @@ describe("Game Play Service", () => { }); it("should call getUpcomingNightPlays method with night phase when game phase is night.", async() => { - const game = createFakeGame({ phase: GAME_PHASES.NIGHT }); + const game = createFakeGame({ phase: GamePhases.NIGHT }); await services.gamePlay["getNewUpcomingPlaysForCurrentPhase"](game); expect(localMocks.gamePlayService.getUpcomingNightPlays).toHaveBeenCalledExactlyOnceWith(game); - expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GAME_PHASES.NIGHT); + expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GamePhases.NIGHT); }); it("should call getUpcomingNightPlays method with day phase when game phase is day.", async() => { - const game = createFakeGame({ phase: GAME_PHASES.DAY }); + const game = createFakeGame({ phase: GamePhases.DAY }); await services.gamePlay["getNewUpcomingPlaysForCurrentPhase"](game); expect(localMocks.gamePlayService.getUpcomingDayPlays).toHaveBeenCalledExactlyOnceWith(); - expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GAME_PHASES.DAY); + expect(mocks.gameHistoryRecordService.getGameHistoryPhaseRecords).toHaveBeenCalledExactlyOnceWith(game._id, game.turn, GamePhases.DAY); }); it("should call isUpcomingPlayNewForCurrentPhase method for as much times as there are upcoming phase plays when filtering them.", async() => { - const game = createFakeGame({ phase: GAME_PHASES.NIGHT }); + const game = createFakeGame({ phase: GamePhases.NIGHT }); const upcomingPlays = [ createFakeGamePlayAllElectSheriff(), createFakeGamePlaySeerLooks(), @@ -417,7 +417,7 @@ describe("Game Play Service", () => { const upcomingPlays = [ createFakeGamePlayAllElectSheriff(), createFakeGamePlayHunterShoots(), - createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), + createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), ]; expect(() => services.gamePlay["validateUpcomingPlaysPriority"](upcomingPlays)).not.toThrow(); @@ -425,9 +425,9 @@ describe("Game Play Service", () => { it("should throw an error when the first upcoming play doesn't have a priority.", () => { const upcomingPlays = [ - createFakeGamePlayWitchUsesPotions({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), + createFakeGamePlayWitchUsesPotions({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), createFakeGamePlayHunterShoots(), - createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), + createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), ]; expect(() => services.gamePlay["validateUpcomingPlaysPriority"](upcomingPlays)).toThrow(undefined); @@ -447,16 +447,16 @@ describe("Game Play Service", () => { createFakeGamePlayBigBadWolfEats(), createFakeGamePlayWerewolvesEat(), createFakeGamePlaySeerLooks(), - createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }), + createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }), createFakeGamePlayWitchUsesPotions(), createFakeGamePlayHunterShoots(), - createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), + createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), ]; const expectedUpcomingPlays = [ createFakeGamePlayHunterShoots(), createFakeGamePlayAllElectSheriff(), - createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }), - createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.STUTTERING_JUDGE_REQUEST }), + createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }), + createFakeGamePlayAllVote({ cause: GamePlayCauses.STUTTERING_JUDGE_REQUEST }), createFakeGamePlayAllVote(), createFakeGamePlaySeerLooks(), createFakeGamePlayWerewolvesEat(), @@ -470,37 +470,37 @@ describe("Game Play Service", () => { describe("isSheriffElectionTime", () => { it("should return false when sheriff is not enabled even if it's the time.", () => { - const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.NIGHT }, isEnabled: false, hasDoubledVote: false }); + const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.NIGHT }, isEnabled: false, hasDoubledVote: false }); - expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 1, GAME_PHASES.NIGHT)).toBe(false); + expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 1, GamePhases.NIGHT)).toBe(false); }); it("should return false when it's not the right turn.", () => { - const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.NIGHT }, isEnabled: true, hasDoubledVote: false }); + const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.NIGHT }, isEnabled: true, hasDoubledVote: false }); - expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 2, GAME_PHASES.NIGHT)).toBe(false); + expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 2, GamePhases.NIGHT)).toBe(false); }); it("should return false when it's not the right phase.", () => { - const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.DAY }, isEnabled: true, hasDoubledVote: false }); + const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.DAY }, isEnabled: true, hasDoubledVote: false }); - expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 1, GAME_PHASES.NIGHT)).toBe(false); + expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 1, GamePhases.NIGHT)).toBe(false); }); it("should return true when it's the right phase and turn.", () => { - const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GAME_PHASES.NIGHT }, isEnabled: true, hasDoubledVote: false }); + const sheriffGameOptions = createFakeSheriffGameOptions({ electedAt: { turn: 1, phase: GamePhases.NIGHT }, isEnabled: true, hasDoubledVote: false }); - expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 1, GAME_PHASES.NIGHT)).toBe(true); + expect(services.gamePlay["isSheriffElectionTime"](sheriffGameOptions, 1, GamePhases.NIGHT)).toBe(true); }); }); describe("isLoversGamePlaySuitableForCurrentPhase", () => { it("should return false when there is no cupid in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -509,10 +509,10 @@ describe("Game Play Service", () => { it("should return true when there is cupid in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.CUPID } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.CUPID } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -600,7 +600,7 @@ describe("Game Play Service", () => { createFakeVileFatherOfWolvesAlivePlayer(), createFakeVillagerVillagerAlivePlayer(), ]); - const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.DAY }); + const game = createFakeGame({ players, turn: 1, phase: GamePhases.DAY }); const gamePlay = createFakeGamePlayAllElectSheriff(); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](game, gamePlay)).toBe(true); @@ -613,34 +613,34 @@ describe("Game Play Service", () => { createFakeVileFatherOfWolvesAlivePlayer(), createFakeVillagerVillagerAlivePlayer(), ]); - const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.DAY }); - const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.PREVIOUS_VOTES_WERE_IN_TIES }); + const game = createFakeGame({ players, turn: 1, phase: GamePhases.DAY }); + const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.PREVIOUS_VOTES_WERE_IN_TIES }); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](game, gamePlay)).toBe(true); }); it("should return false when there is no angel in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); - const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }); + const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](gameDto, gamePlay)).toBe(false); }); it("should return true when there is angel in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.ANGEL } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.ANGEL } }, ]); const gameDto = createFakeCreateGameDto({ players }); - const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }); + const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](gameDto, gamePlay)).toBe(true); }); @@ -652,8 +652,8 @@ describe("Game Play Service", () => { createFakeVileFatherOfWolvesAlivePlayer(), createFakeVillagerVillagerAlivePlayer(), ]); - const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT }); - const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }); + const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT }); + const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](game, gamePlay)).toBe(false); }); @@ -665,8 +665,8 @@ describe("Game Play Service", () => { createFakeVileFatherOfWolvesAlivePlayer(), createFakeAngelAlivePlayer({ isAlive: false }), ]); - const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT }); - const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }); + const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT }); + const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](game, gamePlay)).toBe(false); }); @@ -678,8 +678,8 @@ describe("Game Play Service", () => { createFakeVileFatherOfWolvesAlivePlayer(), createFakeAngelAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }), ]); - const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT }); - const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }); + const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT }); + const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](game, gamePlay)).toBe(false); }); @@ -691,8 +691,8 @@ describe("Game Play Service", () => { createFakeVileFatherOfWolvesAlivePlayer(), createFakeAngelAlivePlayer(), ]); - const game = createFakeGame({ players, turn: 1, phase: GAME_PHASES.NIGHT }); - const gamePlay = createFakeGamePlayAllVote({ cause: GAME_PLAY_CAUSES.ANGEL_PRESENCE }); + const game = createFakeGame({ players, turn: 1, phase: GamePhases.NIGHT }); + const gamePlay = createFakeGamePlayAllVote({ cause: GamePlayCauses.ANGEL_PRESENCE }); expect(services.gamePlay["isAllGamePlaySuitableForCurrentPhase"](game, gamePlay)).toBe(true); }); @@ -750,7 +750,7 @@ describe("Game Play Service", () => { it("should return false when game plays source group is villagers and game is dto.", () => { const gameDto = createFakeCreateGameDto(); - const gamePlay = createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PLAYER_GROUPS.VILLAGERS }) }); + const gamePlay = createFakeGamePlayWerewolvesEat({ source: createFakeGamePlaySource({ name: PlayerGroups.VILLAGERS }) }); expect(services.gamePlay["isGroupGamePlaySuitableForCurrentPhase"](gameDto, gamePlay)).toBe(false); }); @@ -785,10 +785,10 @@ describe("Game Play Service", () => { describe("isWitchGamePlaySuitableForCurrentPhase", () => { it("should return false when witch is not in the game dto.", async() => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -868,8 +868,8 @@ describe("Game Play Service", () => { ]); const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) }); const game = createFakeGame({ players, options }); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([]); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([createFakeGameHistoryRecord()]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([createFakeGameHistoryRecord()]); await expect(services.gamePlay["isWitchGamePlaySuitableForCurrentPhase"](game)).resolves.toBe(true); }); @@ -883,8 +883,8 @@ describe("Game Play Service", () => { ]); const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ doSkipCallIfNoTarget: true }) }); const game = createFakeGame({ players, options }); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.LIFE).mockResolvedValue([createFakeGameHistoryRecord()]); - when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WITCH_POTIONS.DEATH).mockResolvedValue([]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.LIFE).mockResolvedValue([createFakeGameHistoryRecord()]); + when(mocks.gameHistoryRecordService.getGameHistoryWitchUsesSpecificPotionRecords).calledWith(game._id, WitchPotions.DEATH).mockResolvedValue([]); await expect(services.gamePlay["isWitchGamePlaySuitableForCurrentPhase"](game)).resolves.toBe(true); }); @@ -893,10 +893,10 @@ describe("Game Play Service", () => { describe("isWhiteWerewolfGamePlaySuitableForCurrentPhase", () => { it("should return false when white werewolf is not in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -905,10 +905,10 @@ describe("Game Play Service", () => { it("should return false when white werewolf is in the game dto but options specify that he's never called.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, ]); const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ whiteWerewolf: { wakingUpInterval: 0 } }) }); const gameDto = createFakeCreateGameDto({ players, options }); @@ -918,10 +918,10 @@ describe("Game Play Service", () => { it("should return true when white werewolf is in the game dto and options specify that he's called every other night.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, ]); const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ whiteWerewolf: { wakingUpInterval: 2 } }) }); const gameDto = createFakeCreateGameDto({ players, options }); @@ -1038,10 +1038,10 @@ describe("Game Play Service", () => { describe("isPiedPiperGamePlaySuitableForCurrentPhase", () => { it("should return false when pied piper is not in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -1050,10 +1050,10 @@ describe("Game Play Service", () => { it("should return true when pied piper is in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.PIED_PIPER } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.PIED_PIPER } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -1102,10 +1102,10 @@ describe("Game Play Service", () => { describe("isBigBadWolfGamePlaySuitableForCurrentPhase", () => { it("should return false when big bad wolf is not in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]); @@ -1115,10 +1115,10 @@ describe("Game Play Service", () => { it("should return true when big bad wolf is in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.BIG_BAD_WOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.BIG_BAD_WOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); mocks.gameHelper.getLeftToEatByWerewolvesPlayers.mockReturnValue([players[0]]); @@ -1240,10 +1240,10 @@ describe("Game Play Service", () => { describe("isThreeBrothersGamePlaySuitableForCurrentPhase", () => { it("should return false when three brothers are not in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -1252,10 +1252,10 @@ describe("Game Play Service", () => { it("should return false when three brothers are in the game dto but options specify that they are never called.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.THREE_BROTHERS } }, ]); const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 0 } }) }); const gameDto = createFakeCreateGameDto({ players, options }); @@ -1265,10 +1265,10 @@ describe("Game Play Service", () => { it("should return true when three brother are in the game dto and options specify that they are called every other night.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, - { role: { name: ROLE_NAMES.THREE_BROTHERS } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.THREE_BROTHERS } }, + { role: { name: RoleNames.THREE_BROTHERS } }, ]); const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ threeBrothers: { wakingUpInterval: 2 } }) }); const gameDto = createFakeCreateGameDto({ players, options }); @@ -1357,10 +1357,10 @@ describe("Game Play Service", () => { describe("isTwoSistersGamePlaySuitableForCurrentPhase", () => { it("should return false when two sisters are not in the game dto.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.WITCH } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.WITCH } }, + { role: { name: RoleNames.WEREWOLF } }, ]); const gameDto = createFakeCreateGameDto({ players }); @@ -1369,10 +1369,10 @@ describe("Game Play Service", () => { it("should return false when two sisters are in the game dto but options specify that they are never called.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, + { role: { name: RoleNames.VILLAGER_VILLAGER } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, ]); const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 0 } }) }); const gameDto = createFakeCreateGameDto({ players, options }); @@ -1382,10 +1382,10 @@ describe("Game Play Service", () => { it("should return true when two sisters are in the game dto and options specify that they are called every other night.", () => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.WEREWOLF } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, - { role: { name: ROLE_NAMES.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.WEREWOLF } }, + { role: { name: RoleNames.TWO_SISTERS } }, + { role: { name: RoleNames.TWO_SISTERS } }, ]); const options = createFakeGameOptionsDto({ roles: createFakeRolesGameOptions({ twoSisters: { wakingUpInterval: 2 } }) }); const gameDto = createFakeCreateGameDto({ players, options }); @@ -1583,10 +1583,10 @@ describe("Game Play Service", () => { it("should return true when game plays source role is hunter and player is dto.", async() => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.HUNTER } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } }, - { role: { name: ROLE_NAMES.LITTLE_GIRL } }, + { role: { name: RoleNames.HUNTER } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, + { role: { name: RoleNames.VILLAGER_VILLAGER } }, + { role: { name: RoleNames.LITTLE_GIRL } }, ]); const gameDto = createFakeCreateGameDto({ players }); const gamePlay = createFakeGamePlayHunterShoots(); @@ -1622,10 +1622,10 @@ describe("Game Play Service", () => { it("should return true when game plays source role is scapegoat and player is dto.", async() => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SCAPEGOAT } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } }, - { role: { name: ROLE_NAMES.LITTLE_GIRL } }, + { role: { name: RoleNames.SCAPEGOAT } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, + { role: { name: RoleNames.VILLAGER_VILLAGER } }, + { role: { name: RoleNames.LITTLE_GIRL } }, ]); const gameDto = createFakeCreateGameDto({ players }); const gamePlay = createFakeGamePlayScapegoatBansVoting(); @@ -1661,10 +1661,10 @@ describe("Game Play Service", () => { it("should return true when player is dto.", async() => { const players = bulkCreateFakeCreateGamePlayerDto(4, [ - { role: { name: ROLE_NAMES.SEER } }, - { role: { name: ROLE_NAMES.WHITE_WEREWOLF } }, - { role: { name: ROLE_NAMES.VILLAGER_VILLAGER } }, - { role: { name: ROLE_NAMES.LITTLE_GIRL } }, + { role: { name: RoleNames.SEER } }, + { role: { name: RoleNames.WHITE_WEREWOLF } }, + { role: { name: RoleNames.VILLAGER_VILLAGER } }, + { role: { name: RoleNames.LITTLE_GIRL } }, ]); const gameDto = createFakeCreateGameDto({ players }); const gamePlay = createFakeGamePlaySeerLooks(); diff --git a/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts b/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts index 6ff8fe14c..6622e71ee 100644 --- a/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/game-random-composition.service.spec.ts @@ -8,8 +8,8 @@ import { areCompositionRolesMinInGameRespected } from "@/modules/game/dto/base/d import type { CreateGamePlayerDto } from "@/modules/game/dto/create-game/create-game-player/create-game-player.dto"; import type { GetGameRandomCompositionDto } from "@/modules/game/dto/get-game-random-composition/get-game-random-composition.dto"; import { GameRandomCompositionService } from "@/modules/game/providers/services/game-random-composition.service"; -import { roles } from "@/modules/role/constants/role.constant"; -import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from "@/modules/role/enums/role.enum"; +import { ROLES } from "@/modules/role/constants/role.constant"; +import { RoleNames, RoleSides, RoleTypes } from "@/modules/role/enums/role.enum"; import type { Role } from "@/modules/role/types/role.type"; import { createFakeGetGameRandomCompositionDto } from "@tests/factories/game/dto/get-game-random-composition/get-game-random-composition.dto.factory"; @@ -44,98 +44,98 @@ describe("Game Random Composition Service", () => { describe("getRandomRolesForSide", () => { it("should get only werewolves when side is werewolves and no roles are available.", () => { - const result = services.gameRandomComposition["getRandomRolesForSide"]([], 10, ROLE_SIDES.WEREWOLVES); + const result = services.gameRandomComposition["getRandomRolesForSide"]([], 10, RoleSides.WEREWOLVES); expect(result).toHaveLength(10); - expect(result.every(role => role.name === ROLE_NAMES.WEREWOLF)).toBe(true); + expect(result.every(role => role.name === RoleNames.WEREWOLF)).toBe(true); }); it("should get only villagers when side is villagers and no roles are available.", () => { - const result = services.gameRandomComposition["getRandomRolesForSide"]([], 24, ROLE_SIDES.VILLAGERS); + const result = services.gameRandomComposition["getRandomRolesForSide"]([], 24, RoleSides.VILLAGERS); expect(result).toHaveLength(24); - expect(result.every(role => role.name === ROLE_NAMES.VILLAGER)).toBe(true); + expect(result.every(role => role.name === RoleNames.VILLAGER)).toBe(true); }); it("should get seer, witch, pied piper, and all others are villagers when side is villagers and only seer and witch are available.", () => { const availableRoles: Role[] = [ - { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, + { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER }, + { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER }, ]; - const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 10, ROLE_SIDES.VILLAGERS); + const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 10, RoleSides.VILLAGERS); expect(result).toIncludeAllMembers([ - { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, maxInGame: 99, type: ROLE_TYPES.VILLAGER }, + { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, maxInGame: 99, type: RoleTypes.VILLAGER }, ]); }); it("should not get fox when minInGame is too high for left to pick.", () => { const availableRoles: Role[] = [ - { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.FOX, side: ROLE_SIDES.VILLAGERS, minInGame: 99, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, + { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER }, + { name: RoleNames.FOX, side: RoleSides.VILLAGERS, minInGame: 99, maxInGame: 1, type: RoleTypes.VILLAGER }, ]; - const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 90, ROLE_SIDES.VILLAGERS); + const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 90, RoleSides.VILLAGERS); expect(result).toHaveLength(90); - expect(result.find(role => role.name === ROLE_NAMES.FOX)).toBeUndefined(); + expect(result.find(role => role.name === RoleNames.FOX)).toBeUndefined(); }); it("should get three brothers when minInGame is exactly left to pick count.", () => { - const availableRoles: Role[] = [{ name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 3, type: ROLE_TYPES.VILLAGER }]; - const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 3, ROLE_SIDES.VILLAGERS); + const availableRoles: Role[] = [{ name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 3, type: RoleTypes.VILLAGER }]; + const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 3, RoleSides.VILLAGERS); expect(result).toHaveLength(3); expect(result).toIncludeAllMembers([ - { name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.THREE_BROTHERS, side: ROLE_SIDES.VILLAGERS, minInGame: 3, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, + { name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.THREE_BROTHERS, side: RoleSides.VILLAGERS, minInGame: 3, maxInGame: 0, type: RoleTypes.VILLAGER }, ]); }); it("should get two sisters when minInGame is lower than left to pick count.", () => { const availableRoles: Role[] = [ - { name: ROLE_NAMES.TWO_SISTERS, side: ROLE_SIDES.VILLAGERS, minInGame: 2, maxInGame: 2, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 1, type: ROLE_TYPES.VILLAGER }, + { name: RoleNames.TWO_SISTERS, side: RoleSides.VILLAGERS, minInGame: 2, maxInGame: 2, type: RoleTypes.VILLAGER }, + { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 1, type: RoleTypes.VILLAGER }, ]; - const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 4, ROLE_SIDES.VILLAGERS); + const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 4, RoleSides.VILLAGERS); expect(result).toHaveLength(4); expect(result).toIncludeAllMembers([ - { name: ROLE_NAMES.TWO_SISTERS, side: ROLE_SIDES.VILLAGERS, minInGame: 2, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.TWO_SISTERS, side: ROLE_SIDES.VILLAGERS, minInGame: 2, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.SEER, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, + { name: RoleNames.TWO_SISTERS, side: RoleSides.VILLAGERS, minInGame: 2, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.TWO_SISTERS, side: RoleSides.VILLAGERS, minInGame: 2, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.SEER, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, ]); }); it("should get full witches when maxInGame is equal to left to pick count.", () => { - const availableRoles: Role[] = [{ name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 10, type: ROLE_TYPES.VILLAGER }]; - const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 10, ROLE_SIDES.VILLAGERS); + const availableRoles: Role[] = [{ name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 10, type: RoleTypes.VILLAGER }]; + const result = services.gameRandomComposition["getRandomRolesForSide"](availableRoles, 10, RoleSides.VILLAGERS); expect(result).toHaveLength(10); expect(result).toIncludeAllMembers([ - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, - { name: ROLE_NAMES.WITCH, side: ROLE_SIDES.VILLAGERS, maxInGame: 0, type: ROLE_TYPES.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, + { name: RoleNames.WITCH, side: RoleSides.VILLAGERS, maxInGame: 0, type: RoleTypes.VILLAGER }, ]); }); }); @@ -156,7 +156,7 @@ describe("Game Random Composition Service", () => { describe("getAvailableRolesForGameRandomComposition", () => { const players = bulkCreateFakeCreateGamePlayerDto(60); it("should not include some roles when there are excluded.", () => { - const excludedRoles: ROLE_NAMES[] = [ROLE_NAMES.SEER, ROLE_NAMES.WITCH, ROLE_NAMES.PIED_PIPER, ROLE_NAMES.WHITE_WEREWOLF]; + const excludedRoles: RoleNames[] = [RoleNames.SEER, RoleNames.WITCH, RoleNames.PIED_PIPER, RoleNames.WHITE_WEREWOLF]; const result = services.gameRandomComposition["getAvailableRolesForGameRandomComposition"](createFakeGetGameRandomCompositionDto({ players, excludedRoles })); expect(result.every(role => !excludedRoles.includes(role.name))).toBe(true); @@ -166,56 +166,56 @@ describe("Game Random Composition Service", () => { const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulVillagerRolesPrioritized: false }); const result = services.gameRandomComposition["getAvailableRolesForGameRandomComposition"](compositionDto); - expect(result.some(role => role.name === ROLE_NAMES.VILLAGER)).toBe(true); + expect(result.some(role => role.name === RoleNames.VILLAGER)).toBe(true); }); it("should include default villager role when powerful villager roles are not prioritized.", () => { const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulVillagerRolesPrioritized: true }); const result = services.gameRandomComposition["getAvailableRolesForGameRandomComposition"](compositionDto); - expect(result.some(role => role.name === ROLE_NAMES.VILLAGER)).toBe(false); + expect(result.some(role => role.name === RoleNames.VILLAGER)).toBe(false); }); it("should not include default werewolf role when powerful werewolf roles are prioritized.", () => { const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulWerewolfRolesPrioritized: false }); const result = services.gameRandomComposition["getAvailableRolesForGameRandomComposition"](compositionDto); - expect(result.some(role => role.name === ROLE_NAMES.WEREWOLF)).toBe(true); + expect(result.some(role => role.name === RoleNames.WEREWOLF)).toBe(true); }); it("should include default werewolf role when powerful werewolf roles are not prioritized.", () => { const compositionDto = createFakeGetGameRandomCompositionDto({ players, arePowerfulWerewolfRolesPrioritized: true }); const result = services.gameRandomComposition["getAvailableRolesForGameRandomComposition"](compositionDto); - expect(result.some(role => role.name === ROLE_NAMES.WEREWOLF)).toBe(false); + expect(result.some(role => role.name === RoleNames.WEREWOLF)).toBe(false); }); it("should not include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true and not enough players.", () => { - const rolesWithoutRecommendedMinPlayers = roles.filter(role => role.recommendedMinPlayers === undefined); + const rolesWithoutRecommendedMinPlayers = ROLES.filter(role => role.recommendedMinPlayers === undefined); const result = services.gameRandomComposition["getAvailableRolesForGameRandomComposition"](createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(10), excludedRoles: rolesWithoutRecommendedMinPlayers.map(({ name }) => name), areRecommendedMinPlayersRespected: true, })); - const expectedRoleNames = [ROLE_NAMES.VILLAGER, ROLE_NAMES.WEREWOLF]; + const expectedRoleNames = [RoleNames.VILLAGER, RoleNames.WEREWOLF]; expect(result.every(role => expectedRoleNames.includes(role.name))).toBe(true); }); it("should include roles with recommended minimum of players when areRecommendedMinPlayersRespected is true when enough players.", () => { - const rolesWithoutRecommendedMinPlayers = roles.filter(role => role.recommendedMinPlayers === undefined); + const rolesWithoutRecommendedMinPlayers = ROLES.filter(role => role.recommendedMinPlayers === undefined); const result = services.gameRandomComposition["getAvailableRolesForGameRandomComposition"](createFakeGetGameRandomCompositionDto({ players: bulkCreateFakeCreateGamePlayerDto(12), excludedRoles: rolesWithoutRecommendedMinPlayers.map(({ name }) => name), areRecommendedMinPlayersRespected: true, })); const expectedRoleNames = [ - ROLE_NAMES.WEREWOLF, - ROLE_NAMES.PIED_PIPER, - ROLE_NAMES.FOX, - ROLE_NAMES.TWO_SISTERS, - ROLE_NAMES.WHITE_WEREWOLF, - ROLE_NAMES.VILE_FATHER_OF_WOLVES, + RoleNames.WEREWOLF, + RoleNames.PIED_PIPER, + RoleNames.FOX, + RoleNames.TWO_SISTERS, + RoleNames.WHITE_WEREWOLF, + RoleNames.VILE_FATHER_OF_WOLVES, ]; expect(result).toHaveLength(6); diff --git a/tests/unit/specs/modules/game/providers/services/game.service.spec.ts b/tests/unit/specs/modules/game/providers/services/game.service.spec.ts index 9de6b51da..4ad7c2f90 100644 --- a/tests/unit/specs/modules/game/providers/services/game.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/game.service.spec.ts @@ -1,7 +1,7 @@ import { Test } from "@nestjs/testing"; import type { TestingModule } from "@nestjs/testing"; -import { GAME_STATUSES } from "@/modules/game/enums/game.enum"; +import { GameStatuses } from "@/modules/game/enums/game.enum"; import * as GamePhaseHelper from "@/modules/game/helpers/game-phase/game-phase.helper"; import * as GamePlayHelper from "@/modules/game/helpers/game-play/game-play.helper"; import * as GameVictoryHelper from "@/modules/game/helpers/game-victory/game-victory.helper"; @@ -18,8 +18,8 @@ import { GameService } from "@/modules/game/providers/services/game.service"; import { PlayerAttributeService } from "@/modules/game/providers/services/player/player-attribute.service"; import type { Game } from "@/modules/game/schemas/game.schema"; -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import { UNEXPECTED_EXCEPTION_REASONS } from "@/shared/exception/enums/unexpected-exception.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; +import { UnexpectedExceptionReasons } from "@/shared/exception/enums/unexpected-exception.enum"; import { BadResourceMutationException } from "@/shared/exception/types/bad-resource-mutation-exception.type"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; import { UnexpectedException } from "@/shared/exception/types/unexpected-exception.type"; @@ -165,7 +165,7 @@ describe("Game Service", () => { it("should throw error when can't generate upcoming plays.", async() => { mocks.gamePlayService.getUpcomingNightPlays.mockReturnValue([]); const toCreateGame = createFakeCreateGameDto(); - const exception = new UnexpectedException("createGame", UNEXPECTED_EXCEPTION_REASONS.CANT_GENERATE_GAME_PLAYS); + const exception = new UnexpectedException("createGame", UnexpectedExceptionReasons.CANT_GENERATE_GAME_PLAYS); await expect(services.game.createGame(toCreateGame)).rejects.toThrow(exception); }); @@ -201,23 +201,23 @@ describe("Game Service", () => { describe("cancelGame", () => { let localMocks: { gameService: { updateGame: jest.SpyInstance } }; - const existingPlayingGame = createFakeGame({ status: GAME_STATUSES.PLAYING }); + const existingPlayingGame = createFakeGame({ status: GameStatuses.PLAYING }); beforeEach(() => { localMocks = { gameService: { updateGame: jest.spyOn(services.game as unknown as { updateGame }, "updateGame").mockReturnValue(existingPlayingGame) } }; }); it("should throw error when game is not playing.", async() => { - const canceledGame = createFakeGame({ status: GAME_STATUSES.CANCELED }); + const canceledGame = createFakeGame({ status: GameStatuses.CANCELED }); await expect(services.game.cancelGame(canceledGame)).toReject(); - expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAMES, canceledGame._id.toString(), `Game doesn't have status with value "playing"`); + expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAMES, canceledGame._id.toString(), `Game doesn't have status with value "playing"`); }); it("should call update method when game can be canceled.", async() => { await services.game.cancelGame(existingPlayingGame); - expect(localMocks.gameService.updateGame).toHaveBeenCalledExactlyOnceWith(existingPlayingGame._id, { status: GAME_STATUSES.CANCELED }); + expect(localMocks.gameService.updateGame).toHaveBeenCalledExactlyOnceWith(existingPlayingGame._id, { status: GameStatuses.CANCELED }); }); }); @@ -235,7 +235,7 @@ describe("Game Service", () => { createFakeVillagerAlivePlayer(), createFakeVillagerAlivePlayer(), ]; - const game = createFakeGame({ status: GAME_STATUSES.PLAYING, players, currentPlay: createFakeGamePlayAllVote() }); + const game = createFakeGame({ status: GameStatuses.PLAYING, players, currentPlay: createFakeGamePlayAllVote() }); const play = createFakeMakeGamePlayWithRelationsDto(); beforeEach(() => { @@ -255,10 +255,10 @@ describe("Game Service", () => { it("should throw an error when game is not playing.", async() => { const makeGamePlayDto = createFakeMakeGamePlayDto(); - const canceledGame = createFakeGame({ status: GAME_STATUSES.CANCELED }); + const canceledGame = createFakeGame({ status: GameStatuses.CANCELED }); await expect(services.game.makeGamePlay(canceledGame, makeGamePlayDto)).toReject(); - expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAMES, canceledGame._id.toString(), `Game doesn't have status with value "playing"`); + expect(BadResourceMutationException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAMES, canceledGame._id.toString(), `Game doesn't have status with value "playing"`); }); it("should call play validator method when called.", async() => { @@ -381,13 +381,13 @@ describe("Game Service", () => { const unknownObjectId = createFakeObjectId(); mocks.gameRepository.updateOne.mockResolvedValue(null); - await expect(services.game["updateGame"](unknownObjectId, { status: GAME_STATUSES.OVER })).toReject(); - expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(API_RESOURCES.GAMES, unknownObjectId.toString()); + await expect(services.game["updateGame"](unknownObjectId, { status: GameStatuses.OVER })).toReject(); + expect(ResourceNotFoundException).toHaveBeenCalledExactlyOnceWith(ApiResources.GAMES, unknownObjectId.toString()); }); it("should return updated game when called.", async() => { const game = createFakeGame(); - const gameDataToUpdate: Partial = { status: GAME_STATUSES.OVER }; + const gameDataToUpdate: Partial = { status: GameStatuses.OVER }; mocks.gameRepository.updateOne.mockResolvedValue(game); await expect(services.game["updateGame"](game._id, gameDataToUpdate)).resolves.toStrictEqual(game); @@ -397,12 +397,12 @@ describe("Game Service", () => { describe("setGameAsOver", () => { it("should set game as over when called.", () => { - const game = createFakeGame({ status: GAME_STATUSES.PLAYING }); + const game = createFakeGame({ status: GameStatuses.PLAYING }); const gameVictoryData = createFakeGameVictory(); jest.spyOn(GameVictoryHelper, "generateGameVictoryData").mockReturnValue(gameVictoryData); const expectedGame = createFakeGame({ ...game, - status: GAME_STATUSES.OVER, + status: GameStatuses.OVER, victory: gameVictoryData, }); diff --git a/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts b/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts index 98f135e63..766d9c774 100644 --- a/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts +++ b/tests/unit/specs/modules/game/providers/services/player/player-killer.service.spec.ts @@ -1,8 +1,8 @@ import { Test } from "@nestjs/testing"; import type { TestingModule } from "@nestjs/testing"; -import { WITCH_POTIONS } from "@/modules/game/enums/game-play.enum"; -import { PLAYER_DEATH_CAUSES } from "@/modules/game/enums/player.enum"; +import { WitchPotions } from "@/modules/game/enums/game-play.enum"; +import { PlayerDeathCauses } from "@/modules/game/enums/player.enum"; import * as GameHelper from "@/modules/game/helpers/game.helper"; import * as GameMutator from "@/modules/game/helpers/game.mutator"; import { createPowerlessByAncientPlayerAttribute, createWorshipedByWildChildPlayerAttribute } from "@/modules/game/helpers/player/player-attribute/player-attribute.factory"; @@ -10,9 +10,9 @@ import { GameHistoryRecordService } from "@/modules/game/providers/services/game import { PlayerKillerService } from "@/modules/game/providers/services/player/player-killer.service"; import type { Game } from "@/modules/game/schemas/game.schema"; import type { Player } from "@/modules/game/schemas/player/player.schema"; -import { ROLE_NAMES, ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides } from "@/modules/role/enums/role.enum"; -import { UNEXPECTED_EXCEPTION_REASONS } from "@/shared/exception/enums/unexpected-exception.enum"; +import { UnexpectedExceptionReasons } from "@/shared/exception/enums/unexpected-exception.enum"; import * as UnexpectedExceptionFactory from "@/shared/exception/helpers/unexpected-exception.factory"; import { UnexpectedException } from "@/shared/exception/types/unexpected-exception.type"; @@ -201,28 +201,28 @@ describe("Player Killer Service", () => { const game = createFakeGame(); jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, "getAncientLivesCountAgainstWerewolves").mockReturnValue(2); - await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.VOTE)).resolves.toBe(true); + await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.VOTE)).resolves.toBe(true); }); it("should return false when cause is EATEN but ancient still have at least one life left.", async() => { const game = createFakeGame(); jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, "getAncientLivesCountAgainstWerewolves").mockReturnValue(2); - await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(false); + await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.EATEN)).resolves.toBe(false); }); it("should return true when cause is EATEN but ancient has only one life left.", async() => { const game = createFakeGame(); jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, "getAncientLivesCountAgainstWerewolves").mockReturnValue(1); - await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(true); + await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.EATEN)).resolves.toBe(true); }); it("should return true when cause is EATEN but ancient has 0 life left.", async() => { const game = createFakeGame(); jest.spyOn(services.playerKiller as unknown as { getAncientLivesCountAgainstWerewolves }, "getAncientLivesCountAgainstWerewolves").mockReturnValue(0); - await expect(services.playerKiller.isAncientKillable(game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(true); + await expect(services.playerKiller.isAncientKillable(game, PlayerDeathCauses.EATEN)).resolves.toBe(true); }); }); @@ -237,7 +237,7 @@ describe("Player Killer Service", () => { const game = createFakeGame({ players }); const unknownPlayer = createFakePlayer(); const interpolations = { gameId: game._id.toString(), playerId: unknownPlayer._id.toString() }; - const exception = new UnexpectedException("revealPlayerRole", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations); + const exception = new UnexpectedException("revealPlayerRole", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations); mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, "createCantFindPlayerUnexpectedException").mockReturnValue(exception); @@ -357,7 +357,7 @@ describe("Player Killer Service", () => { const options = createFakeGameOptions({ roles: createFakeRolesGameOptions({ ancient: createFakeAncientGameOptions({ livesCountAgainstWerewolves }) }) }); const game = createFakeGame({ options }); const gameHistoryRecordPlayAncientTarget = createFakeGameHistoryRecordPlayTarget({ player: createFakeAncientAlivePlayer() }); - const gameHistoryRecordPlayAncientDrankLifePotionTarget = createFakeGameHistoryRecordPlayTarget({ ...gameHistoryRecordPlayAncientTarget, drankPotion: WITCH_POTIONS.LIFE }); + const gameHistoryRecordPlayAncientDrankLifePotionTarget = createFakeGameHistoryRecordPlayTarget({ ...gameHistoryRecordPlayAncientTarget, drankPotion: WitchPotions.LIFE }); const werewolvesEatAncientRecords = [ createFakeGameHistoryRecord({ play: createFakeGameHistoryRecordWerewolvesEatPlay({ targets: [gameHistoryRecordPlayAncientTarget] }), @@ -412,28 +412,28 @@ describe("Player Killer Service", () => { const player = createFakeIdiotAlivePlayer(); player.role.isRevealed = true; - expect(services.playerKiller["isIdiotKillable"](player, PLAYER_DEATH_CAUSES.VOTE, game)).toBe(true); + expect(services.playerKiller["isIdiotKillable"](player, PlayerDeathCauses.VOTE, game)).toBe(true); }); it("should return true when idiot is killed by other cause than a vote.", () => { const game = createFakeGame(); const player = createFakeIdiotAlivePlayer(); - expect(services.playerKiller["isIdiotKillable"](player, PLAYER_DEATH_CAUSES.DEATH_POTION, game)).toBe(true); + expect(services.playerKiller["isIdiotKillable"](player, PlayerDeathCauses.DEATH_POTION, game)).toBe(true); }); it("should return true when idiot is killed by vote but powerless.", () => { const game = createFakeGame(); const player = createFakeIdiotAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }); - expect(services.playerKiller["isIdiotKillable"](player, PLAYER_DEATH_CAUSES.VOTE, game)).toBe(true); + expect(services.playerKiller["isIdiotKillable"](player, PlayerDeathCauses.VOTE, game)).toBe(true); }); it("should return false when idiot is not revealed, dies from votes and is not powerless.", () => { const game = createFakeGame(); const player = createFakeIdiotAlivePlayer(); - expect(services.playerKiller["isIdiotKillable"](player, PLAYER_DEATH_CAUSES.VOTE, game)).toBe(false); + expect(services.playerKiller["isIdiotKillable"](player, PlayerDeathCauses.VOTE, game)).toBe(false); }); }); @@ -483,14 +483,14 @@ describe("Player Killer Service", () => { const player = createFakePlayer(); const game = createFakeGame(); - await expect(services.playerKiller["isPlayerKillable"](player, game, PLAYER_DEATH_CAUSES.EATEN)).resolves.toBe(false); + await expect(services.playerKiller["isPlayerKillable"](player, game, PlayerDeathCauses.EATEN)).resolves.toBe(false); }); it("should not call can player be eaten validator when cause is not EATEN.", async() => { const canPlayerBeEatenMock = jest.spyOn(services.playerKiller as unknown as { canPlayerBeEaten }, "canPlayerBeEaten").mockReturnValue(false); const player = createFakePlayer(); const game = createFakeGame(); - await services.playerKiller["isPlayerKillable"](player, game, PLAYER_DEATH_CAUSES.VOTE); + await services.playerKiller["isPlayerKillable"](player, game, PlayerDeathCauses.VOTE); expect(canPlayerBeEatenMock).not.toHaveBeenCalled(); }); @@ -499,16 +499,16 @@ describe("Player Killer Service", () => { const isIdiotKillableMock = jest.spyOn(services.playerKiller as unknown as { isIdiotKillable }, "isIdiotKillable").mockReturnValue(false); const player = createFakeIdiotAlivePlayer(); const game = createFakeGame(); - await services.playerKiller["isPlayerKillable"](player, game, PLAYER_DEATH_CAUSES.VOTE); + await services.playerKiller["isPlayerKillable"](player, game, PlayerDeathCauses.VOTE); - expect(isIdiotKillableMock).toHaveBeenCalledExactlyOnceWith(player, PLAYER_DEATH_CAUSES.VOTE, game); + expect(isIdiotKillableMock).toHaveBeenCalledExactlyOnceWith(player, PlayerDeathCauses.VOTE, game); }); it("should not call is idiot killable when player is not an idiot.", async() => { const isIdiotKillableMock = jest.spyOn(services.playerKiller as unknown as { isIdiotKillable }, "isIdiotKillable").mockReturnValue(false); const player = createFakeSeerAlivePlayer(); const game = createFakeGame(); - await services.playerKiller["isPlayerKillable"](player, game, PLAYER_DEATH_CAUSES.VOTE); + await services.playerKiller["isPlayerKillable"](player, game, PlayerDeathCauses.VOTE); expect(isIdiotKillableMock).not.toHaveBeenCalled(); }); @@ -517,16 +517,16 @@ describe("Player Killer Service", () => { const isAncientKillableMock = jest.spyOn(services.playerKiller as unknown as { isAncientKillable }, "isAncientKillable").mockReturnValue(false); const player = createFakeAncientAlivePlayer(); const game = createFakeGame(); - await services.playerKiller["isPlayerKillable"](player, game, PLAYER_DEATH_CAUSES.VOTE); + await services.playerKiller["isPlayerKillable"](player, game, PlayerDeathCauses.VOTE); - expect(isAncientKillableMock).toHaveBeenCalledExactlyOnceWith(game, PLAYER_DEATH_CAUSES.VOTE); + expect(isAncientKillableMock).toHaveBeenCalledExactlyOnceWith(game, PlayerDeathCauses.VOTE); }); it("should not call is ancient killable when player is not an ancient.", async() => { const isAncientKillableMock = jest.spyOn(services.playerKiller as unknown as { isAncientKillable }, "isAncientKillable").mockReturnValue(false); const player = createFakeSeerAlivePlayer(); const game = createFakeGame(); - await services.playerKiller["isPlayerKillable"](player, game, PLAYER_DEATH_CAUSES.VOTE); + await services.playerKiller["isPlayerKillable"](player, game, PlayerDeathCauses.VOTE); expect(isAncientKillableMock).not.toHaveBeenCalled(); }); @@ -535,7 +535,7 @@ describe("Player Killer Service", () => { const player = createFakeSeerAlivePlayer(); const game = createFakeGame(); - await expect(services.playerKiller["isPlayerKillable"](player, game, PLAYER_DEATH_CAUSES.VOTE)).resolves.toBe(true); + await expect(services.playerKiller["isPlayerKillable"](player, game, PlayerDeathCauses.VOTE)).resolves.toBe(true); }); }); @@ -604,7 +604,7 @@ describe("Player Killer Service", () => { game.players[2], createFakePlayer({ ...game.players[3], - side: createFakePlayerSide({ ...game.players[3].side, current: ROLE_SIDES.WEREWOLVES }), + side: createFakePlayerSide({ ...game.players[3].side, current: RoleSides.WEREWOLVES }), }), ], }); @@ -756,7 +756,7 @@ describe("Player Killer Service", () => { ]; const game = createFakeGame({ players }); const interpolations = { gameId: game._id.toString(), playerId: players[2]._id.toString() }; - const exception = new UnexpectedException("applyPlayerAttributesDeathOutcomes", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations); + const exception = new UnexpectedException("applyPlayerAttributesDeathOutcomes", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, interpolations); mocks.playerKillerService.applySheriffPlayerDeathOutcomes.mockReturnValue(game); mocks.playerKillerService.applyInLovePlayerDeathOutcomes.mockReturnValue(game); @@ -913,7 +913,7 @@ describe("Player Killer Service", () => { it("should return game as is when killed player is not ancient.", () => { const players = [ createFakeWerewolfAlivePlayer(), - createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }), + createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }), createFakeWerewolfAlivePlayer(), createFakeGuardAlivePlayer(), ]; @@ -929,7 +929,7 @@ describe("Player Killer Service", () => { it("should return game as is when killed player is powerless.", () => { const players = [ createFakeAncientAlivePlayer({ attributes: [createFakePowerlessByAncientPlayerAttribute()] }), - createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }), + createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }), createFakeWerewolfAlivePlayer(), createFakeWerewolfAlivePlayer(), createFakeGuardAlivePlayer(), @@ -997,7 +997,7 @@ describe("Player Killer Service", () => { it("should return game as is when idiot was revealed before but doesn't die on ancient death thanks to game options.", () => { const players = [ createFakeAncientAlivePlayer({ isAlive: false }), - createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }), + createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }), createFakeWerewolfAlivePlayer(), createFakeGuardAlivePlayer(), createFakeSeerAlivePlayer({ isAlive: false }), @@ -1016,7 +1016,7 @@ describe("Player Killer Service", () => { it("should return game with killed idiot when idiot was revealed before.", () => { const players = [ createFakeAncientAlivePlayer({ isAlive: false }), - createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: ROLE_NAMES.IDIOT, original: ROLE_NAMES.IDIOT }) }), + createFakeIdiotAlivePlayer({ role: createFakePlayerRole({ isRevealed: true, current: RoleNames.IDIOT, original: RoleNames.IDIOT }) }), createFakeWerewolfAlivePlayer(), createFakeGuardAlivePlayer(), createFakeSeerAlivePlayer({ isAlive: false }), @@ -1179,7 +1179,7 @@ describe("Player Killer Service", () => { ]; const game = createFakeGame({ players }); const death = createFakePlayerDeathPotionByWitchDeath(); - const exception = new UnexpectedException("applyPlayerAttributesDeathOutcomes", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() }); + const exception = new UnexpectedException("applyPlayerAttributesDeathOutcomes", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() }); mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, "createCantFindPlayerUnexpectedException").mockReturnValue(exception); const applyPlayerRoleDeathOutcomesMock = jest.spyOn(services.playerKiller as unknown as { applyPlayerRoleDeathOutcomes }, "applyPlayerRoleDeathOutcomes").mockReturnValue(game); @@ -1204,7 +1204,7 @@ describe("Player Killer Service", () => { ]; const game = createFakeGame({ players }); const death = createFakePlayerDeathPotionByWitchDeath(); - const exception = new UnexpectedException("applyPlayerAttributesDeathOutcomes", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() }); + const exception = new UnexpectedException("applyPlayerAttributesDeathOutcomes", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: game._id.toString(), playerId: players[0]._id.toString() }); const expectedKilledPlayer = createFakePlayer({ ...players[0], isAlive: false, role: createFakePlayerRole({ ...players[0].role, isRevealed: true }), death }); mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, "createCantFindPlayerUnexpectedException").mockReturnValue(exception); @@ -1233,8 +1233,8 @@ describe("Player Killer Service", () => { ]; const game = createFakeGame({ players }); const exceptionInterpolations = { gameId: game._id.toString(), playerId: players[1]._id.toString() }; - const cantFindPlayerException = new UnexpectedException("getPlayerToKillInGame", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); - const playerIsDeadException = new UnexpectedException("getPlayerToKillInGame", UNEXPECTED_EXCEPTION_REASONS.PLAYER_IS_DEAD, exceptionInterpolations); + const cantFindPlayerException = new UnexpectedException("getPlayerToKillInGame", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, exceptionInterpolations); + const playerIsDeadException = new UnexpectedException("getPlayerToKillInGame", UnexpectedExceptionReasons.PLAYER_IS_DEAD, exceptionInterpolations); mocks.unexpectedExceptionFactory.createCantFindPlayerUnexpectedException = jest.spyOn(UnexpectedExceptionFactory, "createCantFindPlayerUnexpectedException").mockReturnValue(cantFindPlayerException); const createPlayerIsDeadUnexpectedExceptionMock = jest.spyOn(UnexpectedExceptionFactory, "createPlayerIsDeadUnexpectedException").mockReturnValue(playerIsDeadException); diff --git a/tests/unit/specs/modules/role/constants/role.constant.spec.ts b/tests/unit/specs/modules/role/constants/role.constant.spec.ts index 70d933ace..19caefd2a 100644 --- a/tests/unit/specs/modules/role/constants/role.constant.spec.ts +++ b/tests/unit/specs/modules/role/constants/role.constant.spec.ts @@ -1,26 +1,26 @@ -import { roles, villagerRoles, werewolvesRoles } from "@/modules/role/constants/role.constant"; -import { ROLE_SIDES } from "@/modules/role/enums/role.enum"; +import { ROLES, VILLAGER_ROLES, WEREWOLF_ROLES } from "@/modules/role/constants/role.constant"; +import { RoleSides } from "@/modules/role/enums/role.enum"; import { bulkCreateFakeRoles } from "@tests/factories/role/types/role.type.factory"; describe("Role Constant", () => { describe("werewolvesRoles", () => { it("should contain only roles with side 'werewolves' when called.", () => { - expect(werewolvesRoles.length).toBeGreaterThan(0); - expect(werewolvesRoles.every(role => role.side === ROLE_SIDES.WEREWOLVES)).toBe(true); + expect(WEREWOLF_ROLES.length).toBeGreaterThan(0); + expect(WEREWOLF_ROLES.every(role => role.side === RoleSides.WEREWOLVES)).toBe(true); }); }); describe("villagerRoles", () => { it("should contain only roles with side 'villagers' when called.", () => { - expect(villagerRoles.length).toBeGreaterThan(0); - expect(villagerRoles.every(role => role.side === ROLE_SIDES.VILLAGERS)).toBe(true); + expect(VILLAGER_ROLES.length).toBeGreaterThan(0); + expect(VILLAGER_ROLES.every(role => role.side === RoleSides.VILLAGERS)).toBe(true); }); }); describe("roles", () => { it("should contain all roles when called.", () => { - expect(roles).toStrictEqual(bulkCreateFakeRoles([...werewolvesRoles, ...villagerRoles].length, [...werewolvesRoles, ...villagerRoles])); + expect(ROLES).toStrictEqual(bulkCreateFakeRoles([...WEREWOLF_ROLES, ...VILLAGER_ROLES].length, [...WEREWOLF_ROLES, ...VILLAGER_ROLES])); }); }); }); \ No newline at end of file diff --git a/tests/unit/specs/modules/role/helpers/role.factory.spec.ts b/tests/unit/specs/modules/role/helpers/role.factory.spec.ts index c1a277a87..ba31ce3a7 100644 --- a/tests/unit/specs/modules/role/helpers/role.factory.spec.ts +++ b/tests/unit/specs/modules/role/helpers/role.factory.spec.ts @@ -1,4 +1,4 @@ -import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides, RoleTypes } from "@/modules/role/enums/role.enum"; import { createRole } from "@/modules/role/helpers/role.factory"; import type { Role } from "@/modules/role/types/role.type"; @@ -8,9 +8,9 @@ describe("Role Factory", () => { describe("createRole", () => { it("should create a role when called.", () => { const role: Role = { - name: ROLE_NAMES.ANCIENT, - type: ROLE_TYPES.AMBIGUOUS, - side: ROLE_SIDES.VILLAGERS, + name: RoleNames.ANCIENT, + type: RoleTypes.AMBIGUOUS, + side: RoleSides.VILLAGERS, maxInGame: 1, minInGame: 1, }; diff --git a/tests/unit/specs/modules/role/helpers/role.helper.spec.ts b/tests/unit/specs/modules/role/helpers/role.helper.spec.ts index a9c994048..53b117793 100644 --- a/tests/unit/specs/modules/role/helpers/role.helper.spec.ts +++ b/tests/unit/specs/modules/role/helpers/role.helper.spec.ts @@ -1,27 +1,27 @@ -import { ROLE_NAMES, ROLE_SIDES, ROLE_TYPES } from "@/modules/role/enums/role.enum"; +import { RoleNames, RoleSides, RoleTypes } from "@/modules/role/enums/role.enum"; import { getRolesWithSide } from "@/modules/role/helpers/role.helper"; import type { Role } from "@/modules/role/types/role.type"; describe("Role Helper", () => { describe("getRolesWithSide", () => { const roles: Role[] = [ - { name: ROLE_NAMES.WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 }, - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.VILLAGER, maxInGame: 1 }, - { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.AMBIGUOUS, maxInGame: 1 }, - { name: ROLE_NAMES.WHITE_WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 }, + { name: RoleNames.WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 }, + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, type: RoleTypes.VILLAGER, maxInGame: 1 }, + { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, type: RoleTypes.AMBIGUOUS, maxInGame: 1 }, + { name: RoleNames.WHITE_WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 }, ]; it("should get all werewolf roles when werewolf side is provided.", () => { - expect(getRolesWithSide(roles, ROLE_SIDES.WEREWOLVES)).toStrictEqual([ - { name: ROLE_NAMES.WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 }, - { name: ROLE_NAMES.WHITE_WEREWOLF, side: ROLE_SIDES.WEREWOLVES, type: ROLE_TYPES.WEREWOLF, maxInGame: 1 }, + expect(getRolesWithSide(roles, RoleSides.WEREWOLVES)).toStrictEqual([ + { name: RoleNames.WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 }, + { name: RoleNames.WHITE_WEREWOLF, side: RoleSides.WEREWOLVES, type: RoleTypes.WEREWOLF, maxInGame: 1 }, ]); }); it("should get all villagers roles when villager side is provided.", () => { - expect(getRolesWithSide(roles, ROLE_SIDES.VILLAGERS)).toStrictEqual([ - { name: ROLE_NAMES.VILLAGER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.VILLAGER, maxInGame: 1 }, - { name: ROLE_NAMES.PIED_PIPER, side: ROLE_SIDES.VILLAGERS, type: ROLE_TYPES.AMBIGUOUS, maxInGame: 1 }, + expect(getRolesWithSide(roles, RoleSides.VILLAGERS)).toStrictEqual([ + { name: RoleNames.VILLAGER, side: RoleSides.VILLAGERS, type: RoleTypes.VILLAGER, maxInGame: 1 }, + { name: RoleNames.PIED_PIPER, side: RoleSides.VILLAGERS, type: RoleTypes.AMBIGUOUS, maxInGame: 1 }, ]); }); }); diff --git a/tests/unit/specs/server/constants/server.constant.spec.ts b/tests/unit/specs/server/constants/server.constant.spec.ts index 11972e8c3..77dbb7a67 100644 --- a/tests/unit/specs/server/constants/server.constant.spec.ts +++ b/tests/unit/specs/server/constants/server.constant.spec.ts @@ -1,11 +1,11 @@ import type { FastifyServerOptions } from "fastify"; -import { fastifyServerDefaultOptions } from "@/server/constants/server.constant"; +import { FASTIFY_SERVER_DEFAULT_OPTIONS } from "@/server/constants/server.constant"; describe("Server Constant", () => { describe("fastifyServerDefaultOptions", () => { it("should get fastify server default options when called.", () => { - expect(fastifyServerDefaultOptions).toStrictEqual({ querystringParser: expect.any(Function) as (string) => Record }); + expect(FASTIFY_SERVER_DEFAULT_OPTIONS).toStrictEqual({ querystringParser: expect.any(Function) as (string) => Record }); }); }); }); \ No newline at end of file diff --git a/tests/unit/specs/server/server.spec.ts b/tests/unit/specs/server/server.spec.ts index 2d6376f77..cfc5ef1f8 100644 --- a/tests/unit/specs/server/server.spec.ts +++ b/tests/unit/specs/server/server.spec.ts @@ -4,7 +4,7 @@ import { FastifyAdapter } from "@nestjs/platform-fastify"; import type { INestApplication } from "@nestjs/common"; import type { NestFastifyApplication } from "@nestjs/platform-fastify"; -import { fastifyServerDefaultOptions } from "@/server/constants/server.constant"; +import { FASTIFY_SERVER_DEFAULT_OPTIONS } from "@/server/constants/server.constant"; import { bootstrap } from "@/server/server"; jest.mock("@nestjs/common", () => { @@ -64,7 +64,7 @@ describe("Server", () => { it("should create FastifyAdapter with default fastify server options when called.", async() => { app = await bootstrap(); - expect(FastifyAdapter).toHaveBeenCalledExactlyOnceWith(fastifyServerDefaultOptions); + expect(FastifyAdapter).toHaveBeenCalledExactlyOnceWith(FASTIFY_SERVER_DEFAULT_OPTIONS); }); it("should call listen with the default port when no port is provided.", async() => { diff --git a/tests/unit/specs/shared/api/helpers/api.helper.spec.ts b/tests/unit/specs/shared/api/helpers/api.helper.spec.ts index dc41ef004..0134179f6 100644 --- a/tests/unit/specs/shared/api/helpers/api.helper.spec.ts +++ b/tests/unit/specs/shared/api/helpers/api.helper.spec.ts @@ -1,14 +1,14 @@ -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; import { getResourceSingularForm } from "@/shared/api/helpers/api.helper"; describe("API Helper", () => { describe("getResourceSingularForm", () => { - it.each<{ resource: API_RESOURCES; singular: string }>([ - { resource: API_RESOURCES.GAMES, singular: "game" }, - { resource: API_RESOURCES.PLAYERS, singular: "player" }, - { resource: API_RESOURCES.GAME_ADDITIONAL_CARDS, singular: "additional card" }, - { resource: API_RESOURCES.ROLES, singular: "role" }, - { resource: API_RESOURCES.HEALTH, singular: "health" }, + it.each<{ resource: ApiResources; singular: string }>([ + { resource: ApiResources.GAMES, singular: "game" }, + { resource: ApiResources.PLAYERS, singular: "player" }, + { resource: ApiResources.GAME_ADDITIONAL_CARDS, singular: "additional card" }, + { resource: ApiResources.ROLES, singular: "role" }, + { resource: ApiResources.HEALTH, singular: "health" }, ])("should return $singular when called with $resource [#$#].", ({ resource, singular }) => { expect(getResourceSingularForm(resource)).toBe(singular); }); diff --git a/tests/unit/specs/shared/exception/types/bad-game-play-payload-exception.type.spec.ts b/tests/unit/specs/shared/exception/types/bad-game-play-payload-exception.type.spec.ts index b1ba53522..929b7f7ea 100644 --- a/tests/unit/specs/shared/exception/types/bad-game-play-payload-exception.type.spec.ts +++ b/tests/unit/specs/shared/exception/types/bad-game-play-payload-exception.type.spec.ts @@ -1,4 +1,4 @@ -import { BAD_GAME_PLAY_PAYLOAD_REASONS } from "@/shared/exception/enums/bad-game-play-payload-error.enum"; +import { BadGamePlayPayloadReasons } from "@/shared/exception/enums/bad-game-play-payload-error.enum"; import { BadGamePlayPayloadException } from "@/shared/exception/types/bad-game-play-payload-exception.type"; import type { ExceptionResponse } from "@tests/types/exception/exception.types"; @@ -6,7 +6,7 @@ import type { ExceptionResponse } from "@tests/types/exception/exception.types"; describe("Bad game play payload exception type", () => { describe("getResponse", () => { it("should get response when called.", () => { - const exception = new BadGamePlayPayloadException(BAD_GAME_PLAY_PAYLOAD_REASONS.TOO_MUCH_TARGETS); + const exception = new BadGamePlayPayloadException(BadGamePlayPayloadReasons.TOO_MUCH_TARGETS); expect(exception.getResponse()).toStrictEqual({ statusCode: 400, diff --git a/tests/unit/specs/shared/exception/types/bad-resource-mutation-exception.type.spec.ts b/tests/unit/specs/shared/exception/types/bad-resource-mutation-exception.type.spec.ts index e06b2bb62..3b8360986 100644 --- a/tests/unit/specs/shared/exception/types/bad-resource-mutation-exception.type.spec.ts +++ b/tests/unit/specs/shared/exception/types/bad-resource-mutation-exception.type.spec.ts @@ -1,5 +1,5 @@ -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import { BAD_RESOURCE_MUTATION_REASONS } from "@/shared/exception/enums/bad-resource-mutation-error.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; +import { BadResourceMutationReasons } from "@/shared/exception/enums/bad-resource-mutation-error.enum"; import { BadResourceMutationException } from "@/shared/exception/types/bad-resource-mutation-exception.type"; import type { ExceptionResponse } from "@tests/types/exception/exception.types"; @@ -8,7 +8,7 @@ describe("Resource not found mutation exception type", () => { describe("getResponse", () => { it("should get response without description when called without reason.", () => { const id = "123"; - const exception = new BadResourceMutationException(API_RESOURCES.GAMES, id); + const exception = new BadResourceMutationException(ApiResources.GAMES, id); expect(exception.getResponse()).toStrictEqual({ statusCode: 400, @@ -19,7 +19,7 @@ describe("Resource not found mutation exception type", () => { it("should get response with description when called with reason.", () => { const id = "123"; - const exception = new BadResourceMutationException(API_RESOURCES.GAMES, id, BAD_RESOURCE_MUTATION_REASONS.GAME_NOT_PLAYING); + const exception = new BadResourceMutationException(ApiResources.GAMES, id, BadResourceMutationReasons.GAME_NOT_PLAYING); expect(exception.getResponse()).toStrictEqual({ statusCode: 400, diff --git a/tests/unit/specs/shared/exception/types/resource-not-found-exception.type.spec.ts b/tests/unit/specs/shared/exception/types/resource-not-found-exception.type.spec.ts index 6a6d0e86d..51947705d 100644 --- a/tests/unit/specs/shared/exception/types/resource-not-found-exception.type.spec.ts +++ b/tests/unit/specs/shared/exception/types/resource-not-found-exception.type.spec.ts @@ -1,5 +1,5 @@ -import { API_RESOURCES } from "@/shared/api/enums/api.enum"; -import { RESOURCE_NOT_FOUND_REASONS } from "@/shared/exception/enums/resource-not-found-error.enum"; +import { ApiResources } from "@/shared/api/enums/api.enum"; +import { ResourceNotFoundReasons } from "@/shared/exception/enums/resource-not-found-error.enum"; import { ResourceNotFoundException } from "@/shared/exception/types/resource-not-found-exception.type"; import type { ExceptionResponse } from "@tests/types/exception/exception.types"; @@ -8,7 +8,7 @@ describe("Resource not found exception type", () => { describe("getResponse", () => { it("should get response without description when called without reason.", () => { const id = "123"; - const exception = new ResourceNotFoundException(API_RESOURCES.PLAYERS, id); + const exception = new ResourceNotFoundException(ApiResources.PLAYERS, id); expect(exception.getResponse()).toStrictEqual({ statusCode: 404, @@ -19,7 +19,7 @@ describe("Resource not found exception type", () => { it("should get response with description when called with reason.", () => { const id = "123"; - const exception = new ResourceNotFoundException(API_RESOURCES.PLAYERS, id, RESOURCE_NOT_FOUND_REASONS.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE); + const exception = new ResourceNotFoundException(ApiResources.PLAYERS, id, ResourceNotFoundReasons.UNMATCHED_GAME_PLAY_PLAYER_VOTE_SOURCE); expect(exception.getResponse()).toStrictEqual({ statusCode: 404, diff --git a/tests/unit/specs/shared/exception/types/unexpected-exception.type.spec.ts b/tests/unit/specs/shared/exception/types/unexpected-exception.type.spec.ts index 1d8835d2a..89060ed4f 100644 --- a/tests/unit/specs/shared/exception/types/unexpected-exception.type.spec.ts +++ b/tests/unit/specs/shared/exception/types/unexpected-exception.type.spec.ts @@ -1,4 +1,4 @@ -import { UNEXPECTED_EXCEPTION_REASONS } from "@/shared/exception/enums/unexpected-exception.enum"; +import { UnexpectedExceptionReasons } from "@/shared/exception/enums/unexpected-exception.enum"; import { UnexpectedException } from "@/shared/exception/types/unexpected-exception.type"; import type { ExceptionResponse } from "@tests/types/exception/exception.types"; @@ -6,7 +6,7 @@ import type { ExceptionResponse } from "@tests/types/exception/exception.types"; describe("Unexpected exception type", () => { describe("getResponse", () => { it("should get response with description without interpolations when interpolations are not necessary.", () => { - const exception = new UnexpectedException("werewolvesEat", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME); + const exception = new UnexpectedException("werewolvesEat", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME); expect(exception.getResponse()).toStrictEqual({ statusCode: 500, @@ -16,7 +16,7 @@ describe("Unexpected exception type", () => { }); it("should get response with description with interpolations when interpolations necessary.", () => { - const exception = new UnexpectedException("werewolvesEat", UNEXPECTED_EXCEPTION_REASONS.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: "123", playerId: "456" }); + const exception = new UnexpectedException("werewolvesEat", UnexpectedExceptionReasons.CANT_FIND_PLAYER_WITH_ID_IN_GAME, { gameId: "123", playerId: "456" }); expect(exception.getResponse()).toStrictEqual({ statusCode: 500,