diff --git a/package-lock.json b/package-lock.json index 6d911014..37a59bf5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@typescript-eslint/parser": "^7.0.0", "eslint": "^8.51.0", "eslint-config-prettier": "^9.0.0", - "eslint-plugin-jest": "^27.6.0", + "eslint-plugin-jest": "^28.0.0", "eslint-plugin-prettier": "^5.1.2", "jest": "^29.5.0", "prettier": "^3.1.0", @@ -2758,19 +2758,19 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", - "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", + "version": "28.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.2.0.tgz", + "integrity": "sha512-yRDti/a+f+SMSmNTiT9/M/MzXGkitl8CfzUxnpoQcTyfq8gUrXMriVcWU36W1X6BZSUoyUCJrDAWWUA2N4hE5g==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "^5.10.0" + "@typescript-eslint/utils": "^6.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", - "eslint": "^7.0.0 || ^8.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0", + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0", "jest": "*" }, "peerDependenciesMeta": { @@ -2783,16 +2783,16 @@ } }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -2800,12 +2800,12 @@ } }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -2813,21 +2813,22 @@ } }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -2840,68 +2841,54 @@ } }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/eslint-plugin-jest/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/eslint-plugin-jest/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-plugin-jest/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" + "balanced-match": "^1.0.0" } }, "node_modules/eslint-plugin-jest/node_modules/lru-cache": { @@ -2916,6 +2903,21 @@ "node": ">=10" } }, + "node_modules/eslint-plugin-jest/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/eslint-plugin-jest/node_modules/semver": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", @@ -5772,27 +5774,6 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 35b84ca3..da0b3d6e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@typescript-eslint/parser": "^7.0.0", "eslint": "^8.51.0", "eslint-config-prettier": "^9.0.0", - "eslint-plugin-jest": "^27.6.0", + "eslint-plugin-jest": "^28.0.0", "eslint-plugin-prettier": "^5.1.2", "jest": "^29.5.0", "prettier": "^3.1.0", diff --git a/src/hackerrank/implementation/betweenTwoSets.test.ts b/src/hackerrank/implementation/betweenTwoSets.test.ts index 759bf94e..5e81e79e 100644 --- a/src/hackerrank/implementation/betweenTwoSets.test.ts +++ b/src/hackerrank/implementation/betweenTwoSets.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { getTotalX, factorOf, isFactor } from './betweenTwoSets'; diff --git a/src/hackerrank/implementation/birthday.test.ts b/src/hackerrank/implementation/birthday.test.ts index ccf14c90..df86eb62 100644 --- a/src/hackerrank/implementation/birthday.test.ts +++ b/src/hackerrank/implementation/birthday.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { birthday } from './birthday'; diff --git a/src/hackerrank/implementation/bonAppetit.test.ts b/src/hackerrank/implementation/bonAppetit.test.ts index dc474b50..5fb6f841 100644 --- a/src/hackerrank/implementation/bonAppetit.test.ts +++ b/src/hackerrank/implementation/bonAppetit.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { bonAppetit } from './bonAppetit'; diff --git a/src/hackerrank/implementation/breakingRecords.test.ts b/src/hackerrank/implementation/breakingRecords.test.ts index f29f9614..4993ce6d 100644 --- a/src/hackerrank/implementation/breakingRecords.test.ts +++ b/src/hackerrank/implementation/breakingRecords.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { breakingRecords } from './breakingRecords'; diff --git a/src/hackerrank/implementation/countApplesAndOranges.test.ts b/src/hackerrank/implementation/countApplesAndOranges.test.ts index dbcd6f7a..48fb1aea 100644 --- a/src/hackerrank/implementation/countApplesAndOranges.test.ts +++ b/src/hackerrank/implementation/countApplesAndOranges.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { countApplesAndOranges } from './countApplesAndOranges'; diff --git a/src/hackerrank/implementation/countingValleys.test.ts b/src/hackerrank/implementation/countingValleys.test.ts index a68662b3..7a715fd6 100644 --- a/src/hackerrank/implementation/countingValleys.test.ts +++ b/src/hackerrank/implementation/countingValleys.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { countingValleys } from './countingValleys'; diff --git a/src/hackerrank/implementation/dayOfProgrammer.test.ts b/src/hackerrank/implementation/dayOfProgrammer.test.ts index ee7f52e6..23f8978d 100644 --- a/src/hackerrank/implementation/dayOfProgrammer.test.ts +++ b/src/hackerrank/implementation/dayOfProgrammer.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { dayOfProgrammer } from './dayOfProgrammer'; diff --git a/src/hackerrank/implementation/divisibleSumPairs.test.ts b/src/hackerrank/implementation/divisibleSumPairs.test.ts index e17b034a..929e1382 100644 --- a/src/hackerrank/implementation/divisibleSumPairs.test.ts +++ b/src/hackerrank/implementation/divisibleSumPairs.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { divisibleSumPairs } from './divisibleSumPairs'; diff --git a/src/hackerrank/implementation/gradingStudents.test.ts b/src/hackerrank/implementation/gradingStudents.test.ts index 64334891..40c1b2b8 100644 --- a/src/hackerrank/implementation/gradingStudents.test.ts +++ b/src/hackerrank/implementation/gradingStudents.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { gradingStudents } from './gradingStudents'; diff --git a/src/hackerrank/implementation/jumpingOnClouds.test.ts b/src/hackerrank/implementation/jumpingOnClouds.test.ts index c161d369..d59b3c8a 100644 --- a/src/hackerrank/implementation/jumpingOnClouds.test.ts +++ b/src/hackerrank/implementation/jumpingOnClouds.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { jumpingOnClouds } from './jumpingOnClouds'; diff --git a/src/hackerrank/implementation/kangaroo.test.ts b/src/hackerrank/implementation/kangaroo.test.ts index 05b7bb40..7dc8c23a 100644 --- a/src/hackerrank/implementation/kangaroo.test.ts +++ b/src/hackerrank/implementation/kangaroo.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { kangaroo } from './kangaroo'; diff --git a/src/hackerrank/implementation/migratoryBirds.test.ts b/src/hackerrank/implementation/migratoryBirds.test.ts index 8b52414c..ab6e7205 100644 --- a/src/hackerrank/implementation/migratoryBirds.test.ts +++ b/src/hackerrank/implementation/migratoryBirds.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { migratoryBirds } from './migratoryBirds'; diff --git a/src/hackerrank/implementation/minimumAbsoluteDifference.test.ts b/src/hackerrank/implementation/minimumAbsoluteDifference.test.ts index aa541d5a..d2371149 100644 --- a/src/hackerrank/implementation/minimumAbsoluteDifference.test.ts +++ b/src/hackerrank/implementation/minimumAbsoluteDifference.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { minimumAbsoluteDifference } from './minimumAbsoluteDifference'; diff --git a/src/hackerrank/implementation/repeatedString.test.ts b/src/hackerrank/implementation/repeatedString.test.ts index 3076b84f..931cdd31 100644 --- a/src/hackerrank/implementation/repeatedString.test.ts +++ b/src/hackerrank/implementation/repeatedString.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { repeatedString } from './repeatedString'; diff --git a/src/hackerrank/implementation/sockMerchant.test.ts b/src/hackerrank/implementation/sockMerchant.test.ts index a691e2cb..768cbb6f 100644 --- a/src/hackerrank/implementation/sockMerchant.test.ts +++ b/src/hackerrank/implementation/sockMerchant.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { sockMerchant } from './sockMerchant'; diff --git a/src/hackerrank/projecteuler/euler001.test.ts b/src/hackerrank/projecteuler/euler001.test.ts index 34e04b9c..31729c39 100755 --- a/src/hackerrank/projecteuler/euler001.test.ts +++ b/src/hackerrank/projecteuler/euler001.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { euler001 } from './euler001'; diff --git a/src/hackerrank/warmup/aVeryBigSum.test.ts b/src/hackerrank/warmup/aVeryBigSum.test.ts index 4207a5a2..d7e51c81 100644 --- a/src/hackerrank/warmup/aVeryBigSum.test.ts +++ b/src/hackerrank/warmup/aVeryBigSum.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { aVeryBigSum } from './aVeryBigSum'; diff --git a/src/hackerrank/warmup/birthdayCakeCandles.test.ts b/src/hackerrank/warmup/birthdayCakeCandles.test.ts index 32a93af0..0141f456 100644 --- a/src/hackerrank/warmup/birthdayCakeCandles.test.ts +++ b/src/hackerrank/warmup/birthdayCakeCandles.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { birthdayCakeCandles } from './birthdayCakeCandles'; diff --git a/src/hackerrank/warmup/compareTriplets.test.ts b/src/hackerrank/warmup/compareTriplets.test.ts index 1cf1c42a..6f5b30d7 100644 --- a/src/hackerrank/warmup/compareTriplets.test.ts +++ b/src/hackerrank/warmup/compareTriplets.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { compareTriplets } from './compareTriplets'; diff --git a/src/hackerrank/warmup/diagonalDifference.test.ts b/src/hackerrank/warmup/diagonalDifference.test.ts index dd86ecee..4e3c6ca8 100644 --- a/src/hackerrank/warmup/diagonalDifference.test.ts +++ b/src/hackerrank/warmup/diagonalDifference.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { diagonalDifference } from './diagonalDifference'; diff --git a/src/hackerrank/warmup/miniMaxSum.test.ts b/src/hackerrank/warmup/miniMaxSum.test.ts index dca37d1a..7d654c49 100644 --- a/src/hackerrank/warmup/miniMaxSum.test.ts +++ b/src/hackerrank/warmup/miniMaxSum.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { miniMaxSum } from './miniMaxSum'; diff --git a/src/hackerrank/warmup/plusMinus.test.ts b/src/hackerrank/warmup/plusMinus.test.ts index 6c057595..6cbdb556 100644 --- a/src/hackerrank/warmup/plusMinus.test.ts +++ b/src/hackerrank/warmup/plusMinus.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { plusMinus } from './plusMinus'; diff --git a/src/hackerrank/warmup/simpleArraySum.test.ts b/src/hackerrank/warmup/simpleArraySum.test.ts index e262049d..0249bded 100644 --- a/src/hackerrank/warmup/simpleArraySum.test.ts +++ b/src/hackerrank/warmup/simpleArraySum.test.ts @@ -2,6 +2,7 @@ import { logger as console } from '../../logger'; import { simpleArraySum } from './simpleArraySum'; +import { describe, expect, it } from '@jest/globals'; describe('problem simpleArraySum', () => { it('problem simpleArraySum Test case 0', () => { expect.assertions(1); diff --git a/src/hackerrank/warmup/solveMeFirst.test.ts b/src/hackerrank/warmup/solveMeFirst.test.ts index d539da35..ba01b48a 100644 --- a/src/hackerrank/warmup/solveMeFirst.test.ts +++ b/src/hackerrank/warmup/solveMeFirst.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { solveMeFirst } from './solveMeFirst'; diff --git a/src/hackerrank/warmup/staircase.test.ts b/src/hackerrank/warmup/staircase.test.ts index e1594c31..9f204b18 100644 --- a/src/hackerrank/warmup/staircase.test.ts +++ b/src/hackerrank/warmup/staircase.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../../logger'; import { staircase } from './staircase'; diff --git a/src/hackerrank/warmup/timeConversion.test.ts b/src/hackerrank/warmup/timeConversion.test.ts index 76df3081..6fd38c0e 100644 --- a/src/hackerrank/warmup/timeConversion.test.ts +++ b/src/hackerrank/warmup/timeConversion.test.ts @@ -2,6 +2,7 @@ import { logger as console } from '../../logger'; import { timeConversion } from './timeConversion'; +import { describe, expect, it } from '@jest/globals'; describe('timeConversion', () => { it('timeConversion example', () => { expect.assertions(2); diff --git a/src/hello_world.test.ts b/src/hello_world.test.ts index 073ac520..7ad0edbe 100644 --- a/src/hello_world.test.ts +++ b/src/hello_world.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { hello } from '../src/hello_world'; describe('test hello', () => { diff --git a/src/logger.test.ts b/src/logger.test.ts index 98a67118..03e6eb26 100644 --- a/src/logger.test.ts +++ b/src/logger.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from './logger'; describe('logger', () => { diff --git a/src/problem0000.test.ts b/src/problem0000.test.ts index 2fafe84b..1d433c21 100644 --- a/src/problem0000.test.ts +++ b/src/problem0000.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from './logger'; import { problem0000 } from './problem0000'; diff --git a/src/projecteuler/helpers/bigNumbers.test.ts b/src/projecteuler/helpers/bigNumbers.test.ts index c634a151..b38e1a6b 100644 --- a/src/projecteuler/helpers/bigNumbers.test.ts +++ b/src/projecteuler/helpers/bigNumbers.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { bigMultiply, bigMultiplyRowToString, diff --git a/src/projecteuler/helpers/collatz.test.ts b/src/projecteuler/helpers/collatz.test.ts index dc53e5b7..5e01ef7d 100644 --- a/src/projecteuler/helpers/collatz.test.ts +++ b/src/projecteuler/helpers/collatz.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { collatz } from './'; // 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 diff --git a/src/projecteuler/helpers/divisors.test.ts b/src/projecteuler/helpers/divisors.test.ts index afdaaa2e..84132d34 100644 --- a/src/projecteuler/helpers/divisors.test.ts +++ b/src/projecteuler/helpers/divisors.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { abundance, divisors, diff --git a/src/projecteuler/helpers/isPalindrome.test.ts b/src/projecteuler/helpers/isPalindrome.test.ts index 4ae8dc37..1affb7a8 100644 --- a/src/projecteuler/helpers/isPalindrome.test.ts +++ b/src/projecteuler/helpers/isPalindrome.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { isPalindrome } from './'; describe('number is Palindrome', () => { diff --git a/src/projecteuler/helpers/matrix.test.ts b/src/projecteuler/helpers/matrix.test.ts index 7b562398..cedb8cd1 100644 --- a/src/projecteuler/helpers/matrix.test.ts +++ b/src/projecteuler/helpers/matrix.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { matrix } from './'; describe('matrix generator', () => { diff --git a/src/projecteuler/helpers/minmax.test.ts b/src/projecteuler/helpers/minmax.test.ts index 1f80ec85..4503c98c 100644 --- a/src/projecteuler/helpers/minmax.test.ts +++ b/src/projecteuler/helpers/minmax.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { minimum, maximum } from './'; describe('maximum and minimum', () => { diff --git a/src/projecteuler/helpers/numberToWord.test.ts b/src/projecteuler/helpers/numberToWord.test.ts index 5feca96e..44897228 100644 --- a/src/projecteuler/helpers/numberToWord.test.ts +++ b/src/projecteuler/helpers/numberToWord.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { numberToWord } from './'; describe('transform numbers to word representation in british english', () => { diff --git a/src/projecteuler/helpers/product.test.ts b/src/projecteuler/helpers/product.test.ts index f0eced39..f172f43f 100644 --- a/src/projecteuler/helpers/product.test.ts +++ b/src/projecteuler/helpers/product.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { product } from './'; describe('product of all numbers in array', () => { diff --git a/src/projecteuler/helpers/sum.test.ts b/src/projecteuler/helpers/sum.test.ts index 37233d3a..3d719c2f 100644 --- a/src/projecteuler/helpers/sum.test.ts +++ b/src/projecteuler/helpers/sum.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { sum } from './'; describe('sum all numbers in array', () => { diff --git a/src/projecteuler/helpers/wordScore.test.ts b/src/projecteuler/helpers/wordScore.test.ts index bfa2c157..0a072e59 100644 --- a/src/projecteuler/helpers/wordScore.test.ts +++ b/src/projecteuler/helpers/wordScore.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from '@jest/globals'; + import { wordScore } from './'; describe('wordScore', () => { diff --git a/src/projecteuler/lib/BNode.test.ts b/src/projecteuler/lib/BNode.test.ts index 1bcb4c90..368196f2 100644 --- a/src/projecteuler/lib/BNode.test.ts +++ b/src/projecteuler/lib/BNode.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { BNode } from './BNode'; describe('class BNode for binary trees', () => { diff --git a/src/projecteuler/lib/BNodeBuilder.test.ts b/src/projecteuler/lib/BNodeBuilder.test.ts index 36033b34..c49ae8a5 100644 --- a/src/projecteuler/lib/BNodeBuilder.test.ts +++ b/src/projecteuler/lib/BNodeBuilder.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { BNode } from './BNode'; import { BNodeBuilder } from './BNodeBuilder'; @@ -16,10 +17,12 @@ describe('class BNodeBuilder for binary trees', () => { expect.assertions(1); const tree = BNodeBuilder.buildBNodeTree(data, 0, 0); + const treeStringify = JSON.stringify(tree); const comparedTree = new BNode(75, new BNode(95), new BNode(64)); + const comparedTreeStringify = JSON.stringify(comparedTree); - expect(tree).toMatchObject(comparedTree); + expect(treeStringify).toBe(comparedTreeStringify); }); it('tree of BNode: building tree with invalid coordinates', () => { @@ -45,15 +48,19 @@ describe('class BNodeBuilder for binary weight trees', () => { // with default value for rootValue = 0 let tree = BNodeBuilder.buildBNodeTreeWeight(data, 0, 0); + const treeStringify = JSON.stringify(tree); let comparedTree = new BNode(75, new BNode(170), new BNode(139)); + const comparedTreeStringify = JSON.stringify(comparedTree); - expect(tree).toMatchObject(comparedTree); + expect(treeStringify).toBe(comparedTreeStringify); // with rootValue = null tree = BNodeBuilder.buildBNodeTreeWeight(data, 0, 0, null); + const treeStringify2 = JSON.stringify(tree); comparedTree = new BNode(75, new BNode(170), new BNode(139)); + const comparedTreeStringify2 = JSON.stringify(comparedTree); - expect(tree).toMatchObject(comparedTree); + expect(treeStringify2).toBe(comparedTreeStringify2); }); it('tree of BNode: building Weight tree with invalid coordinates', () => { diff --git a/src/projecteuler/problem0001.test.ts b/src/projecteuler/problem0001.test.ts index 85f83b2a..60d7c21b 100644 --- a/src/projecteuler/problem0001.test.ts +++ b/src/projecteuler/problem0001.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0001 } from './problem0001'; diff --git a/src/projecteuler/problem0002.test.ts b/src/projecteuler/problem0002.test.ts index fb6bb370..8625abac 100644 --- a/src/projecteuler/problem0002.test.ts +++ b/src/projecteuler/problem0002.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0002 } from './problem0002'; diff --git a/src/projecteuler/problem0003.test.ts b/src/projecteuler/problem0003.test.ts index e25b363d..3f87f785 100644 --- a/src/projecteuler/problem0003.test.ts +++ b/src/projecteuler/problem0003.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0003 } from './problem0003'; diff --git a/src/projecteuler/problem0004.test.ts b/src/projecteuler/problem0004.test.ts index 30994f77..f7a58259 100644 --- a/src/projecteuler/problem0004.test.ts +++ b/src/projecteuler/problem0004.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0004 } from './problem0004'; diff --git a/src/projecteuler/problem0005-simple.test.ts b/src/projecteuler/problem0005-simple.test.ts index 1c02a9b3..955b41ac 100644 --- a/src/projecteuler/problem0005-simple.test.ts +++ b/src/projecteuler/problem0005-simple.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0005Simple } from './problem0005-simple'; diff --git a/src/projecteuler/problem0005.bruteforce-test.ts b/src/projecteuler/problem0005.bruteforce-test.ts index b7fd77f9..4a9bac11 100644 --- a/src/projecteuler/problem0005.bruteforce-test.ts +++ b/src/projecteuler/problem0005.bruteforce-test.ts @@ -2,6 +2,7 @@ import { logger as console } from '../logger'; import { problem0005Simple } from './problem0005-simple'; +import { describe, expect, it } from '@jest/globals'; describe('problem 0005 simple', () => { it('problem 0005 simple solution found by BRUTE FORCE FULL', async () => { expect.assertions(1); diff --git a/src/projecteuler/problem0005.test.ts b/src/projecteuler/problem0005.test.ts index 7db62de8..a572667c 100644 --- a/src/projecteuler/problem0005.test.ts +++ b/src/projecteuler/problem0005.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0005 } from './problem0005'; diff --git a/src/projecteuler/problem0006.test.ts b/src/projecteuler/problem0006.test.ts index 2eff449e..3c57d954 100644 --- a/src/projecteuler/problem0006.test.ts +++ b/src/projecteuler/problem0006.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0006 } from './problem0006'; diff --git a/src/projecteuler/problem0007.bruteforce-test.ts b/src/projecteuler/problem0007.bruteforce-test.ts index c557c279..732192f0 100644 --- a/src/projecteuler/problem0007.bruteforce-test.ts +++ b/src/projecteuler/problem0007.bruteforce-test.ts @@ -6,6 +6,7 @@ import { logger as console } from '../logger'; import { problem0007 } from './problem0007'; +import { describe, expect, it } from '@jest/globals'; describe('problem 0007 BRUTEFORCE', () => { it('problem 0007 BRUTEFORCE large', () => { expect.assertions(1); diff --git a/src/projecteuler/problem0007.test.ts b/src/projecteuler/problem0007.test.ts index 07bc7db3..b344e968 100644 --- a/src/projecteuler/problem0007.test.ts +++ b/src/projecteuler/problem0007.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0007 } from './problem0007'; diff --git a/src/projecteuler/problem0008.test.ts b/src/projecteuler/problem0008.test.ts index b1596568..fe7c5ef3 100644 --- a/src/projecteuler/problem0008.test.ts +++ b/src/projecteuler/problem0008.test.ts @@ -2,6 +2,7 @@ import { logger as console } from '../logger'; import { problem0008 } from './problem0008'; +import { describe, expect, it } from '@jest/globals'; describe('problem 0008', () => { it('problem 0008 solution found', () => { expect.assertions(1); diff --git a/src/projecteuler/problem0009.test.ts b/src/projecteuler/problem0009.test.ts index 3010ab17..69a07fb4 100644 --- a/src/projecteuler/problem0009.test.ts +++ b/src/projecteuler/problem0009.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0009 } from './problem0009'; diff --git a/src/projecteuler/problem0010.bruteforce-test.ts b/src/projecteuler/problem0010.bruteforce-test.ts index e677e4f6..ef8b423b 100644 --- a/src/projecteuler/problem0010.bruteforce-test.ts +++ b/src/projecteuler/problem0010.bruteforce-test.ts @@ -4,6 +4,7 @@ import { logger as console } from '../logger'; import { problem0010 } from './problem0010'; +import { describe, expect, it } from '@jest/globals'; describe('problem 0010', () => { it('problem 0010 solution found BRUTE FORCE', () => { expect.assertions(1); diff --git a/src/projecteuler/problem0010.test.ts b/src/projecteuler/problem0010.test.ts index b45bc8ad..ce22279e 100644 --- a/src/projecteuler/problem0010.test.ts +++ b/src/projecteuler/problem0010.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0010 } from './problem0010'; diff --git a/src/projecteuler/problem0011.test.ts b/src/projecteuler/problem0011.test.ts index dd4a473d..4981fb89 100644 --- a/src/projecteuler/problem0011.test.ts +++ b/src/projecteuler/problem0011.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0011 } from './problem0011'; diff --git a/src/projecteuler/problem0012.test.ts b/src/projecteuler/problem0012.test.ts index 04d394bc..7d61625f 100644 --- a/src/projecteuler/problem0012.test.ts +++ b/src/projecteuler/problem0012.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0012 } from './problem0012'; diff --git a/src/projecteuler/problem0013.test.ts b/src/projecteuler/problem0013.test.ts index e642ac31..80bde4e3 100644 --- a/src/projecteuler/problem0013.test.ts +++ b/src/projecteuler/problem0013.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0013 } from './problem0013'; diff --git a/src/projecteuler/problem0014.test.ts b/src/projecteuler/problem0014.test.ts index 52115571..6b699775 100644 --- a/src/projecteuler/problem0014.test.ts +++ b/src/projecteuler/problem0014.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0014 } from './problem0014'; diff --git a/src/projecteuler/problem0015.test.ts b/src/projecteuler/problem0015.test.ts index a8c648fa..19d02f18 100644 --- a/src/projecteuler/problem0015.test.ts +++ b/src/projecteuler/problem0015.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0015 } from './problem0015'; diff --git a/src/projecteuler/problem0016.test.ts b/src/projecteuler/problem0016.test.ts index c5831f8d..ced13fd2 100644 --- a/src/projecteuler/problem0016.test.ts +++ b/src/projecteuler/problem0016.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0016 } from './problem0016'; diff --git a/src/projecteuler/problem0017.test.ts b/src/projecteuler/problem0017.test.ts index 222cbf5a..d32f4a6a 100644 --- a/src/projecteuler/problem0017.test.ts +++ b/src/projecteuler/problem0017.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0017 } from './problem0017'; diff --git a/src/projecteuler/problem0018.test.ts b/src/projecteuler/problem0018.test.ts index 451be3c8..cf016aed 100644 --- a/src/projecteuler/problem0018.test.ts +++ b/src/projecteuler/problem0018.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0018 } from './problem0018'; diff --git a/src/projecteuler/problem0019.test.ts b/src/projecteuler/problem0019.test.ts index 97565c84..ff8b3501 100644 --- a/src/projecteuler/problem0019.test.ts +++ b/src/projecteuler/problem0019.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { __SUNDAY__ } from '../constants'; diff --git a/src/projecteuler/problem0020.test.ts b/src/projecteuler/problem0020.test.ts index 25ef8233..b30da844 100644 --- a/src/projecteuler/problem0020.test.ts +++ b/src/projecteuler/problem0020.test.ts @@ -1,4 +1,6 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; + import { problem0020 } from './problem0020'; describe('problem 0020', () => { diff --git a/src/projecteuler/problem0021.test.ts b/src/projecteuler/problem0021.test.ts index d7ab5afd..4a13046f 100644 --- a/src/projecteuler/problem0021.test.ts +++ b/src/projecteuler/problem0021.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0021 } from './problem0021'; diff --git a/src/projecteuler/problem0022.test.ts b/src/projecteuler/problem0022.test.ts index 8f348737..52a099d7 100644 --- a/src/projecteuler/problem0022.test.ts +++ b/src/projecteuler/problem0022.test.ts @@ -4,6 +4,7 @@ // - src/data/p022_names.json // //////////////////////////////////////////////////////////////////////////// +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0022 } from './problem0022'; diff --git a/src/projecteuler/problem0023.test.ts b/src/projecteuler/problem0023.test.ts index 56bbd9e8..152b88db 100644 --- a/src/projecteuler/problem0023.test.ts +++ b/src/projecteuler/problem0023.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0023 } from './problem0023'; diff --git a/src/projecteuler/problem0024.test.ts b/src/projecteuler/problem0024.test.ts index e950cd9d..97ca004a 100644 --- a/src/projecteuler/problem0024.test.ts +++ b/src/projecteuler/problem0024.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0024 } from './problem0024'; diff --git a/src/projecteuler/problem0025.test.ts b/src/projecteuler/problem0025.test.ts index 49e3b0e3..05726911 100644 --- a/src/projecteuler/problem0025.test.ts +++ b/src/projecteuler/problem0025.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals'; import { logger as console } from '../logger'; import { problem0025 } from './problem0025';