From 8953553ba818125d9fbae43ad6512022de7684d1 Mon Sep 17 00:00:00 2001 From: Adam Horodyski Date: Fri, 13 Oct 2023 11:02:21 +0200 Subject: [PATCH 1/4] chore: bump reassure to 0.10.1 --- package-lock.json | 177 ++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 95 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90a5779cea94..ba2bc878e599 100644 --- a/package-lock.json +++ b/package-lock.json @@ -222,7 +222,7 @@ "react-native-performance-flipper-reporter": "^2.0.0", "react-native-svg-transformer": "^1.0.0", "react-test-renderer": "18.2.0", - "reassure": "^0.9.0", + "reassure": "^0.10.1", "setimmediate": "^1.0.5", "shellcheck": "^1.1.0", "style-loader": "^2.0.0", @@ -2539,16 +2539,21 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.3.tgz", - "integrity": "sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/runtime/node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + }, "node_modules/@babel/template": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", @@ -2623,13 +2628,13 @@ "license": "Apache-2.0" }, "node_modules/@callstack/reassure-cli": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-cli/-/reassure-cli-0.9.0.tgz", - "integrity": "sha512-auoxqyilxkT5mDdEPJqRRY+ZGlrihJjFQpopcFd/15ng76OPVka3L48RMEY2wXkFXLaOOs6enNGb596jYPuEtQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@callstack/reassure-cli/-/reassure-cli-0.10.0.tgz", + "integrity": "sha512-CYgOGOAWcFgA2GrJw6RJAvImCpHCpPbtPoYMDol7esjlRCX2QwIKG7/9byq47hML57w94fhFAa76KD84YlgMBg==", "dev": true, "dependencies": { - "@callstack/reassure-compare": "0.5.0", - "@callstack/reassure-logger": "0.3.0", + "@callstack/reassure-compare": "0.6.0", + "@callstack/reassure-logger": "0.3.1", "chalk": "4.1.2", "simple-git": "^3.16.0", "yargs": "^17.6.2" @@ -2759,12 +2764,12 @@ } }, "node_modules/@callstack/reassure-compare": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-compare/-/reassure-compare-0.5.0.tgz", - "integrity": "sha512-3sBeJ/+Hxjdb01KVb8LszO1kcJ8TXcrVnerUj+LYn2dkBOohAMqGYaOvCeoWsVEHJ+MIOzmvAGBJQRu69RoJdQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@callstack/reassure-compare/-/reassure-compare-0.6.0.tgz", + "integrity": "sha512-P3nmv36CJrQSXg0+z6EuEV/0xAbvxWbAZ7diQHnkbvqk2z8PKRXpkcthrRUpe02wLewa0MLxBUJwLenFnhxIRg==", "dev": true, "dependencies": { - "@callstack/reassure-logger": "0.3.0", + "@callstack/reassure-logger": "0.3.1", "markdown-builder": "^0.9.0", "markdown-table": "^2.0.0", "zod": "^3.20.2" @@ -2777,9 +2782,9 @@ "dev": true }, "node_modules/@callstack/reassure-logger": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-logger/-/reassure-logger-0.3.0.tgz", - "integrity": "sha512-JX5o+8qkIbIRL+cQn9XlQYdv9p/3L6J70zZX6NYi9j0VrSS9PZIRfo8ujMdLSqUNV6HZN1ay59RzuncLjVu0aQ==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@callstack/reassure-logger/-/reassure-logger-0.3.1.tgz", + "integrity": "sha512-IUsNrxVMdt0zgD2IN2snGVGUG8Yc6F3SWaPF8RXUn8qi7XZuYC6WevEL+mIKmlbTTa7qlX9brkn0pJoXAjfcPQ==", "dev": true, "dependencies": { "chalk": "4.1.2" @@ -2856,12 +2861,12 @@ } }, "node_modules/@callstack/reassure-measure": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-measure/-/reassure-measure-0.5.0.tgz", - "integrity": "sha512-KwlmNYcspBOp7FIw6XOz5O9mnKB4cWCCyM6vG4nFUPHSWQ6yVdRkawVvoPIV5qJ2hw7zCzdtqRrLWQSTF4eKlg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@callstack/reassure-measure/-/reassure-measure-0.6.0.tgz", + "integrity": "sha512-phXY5DAtKhnu8dA2pmnl+pqFOfrVEFFDJOi4AnObwIcpDSn3IUXgNSe7rSi+JP/mXNWMLoUS8rnH4iIFDyf7qQ==", "dev": true, "dependencies": { - "@callstack/reassure-logger": "0.3.0", + "@callstack/reassure-logger": "0.3.1", "mathjs": "^11.5.0" }, "peerDependencies": { @@ -31381,16 +31386,16 @@ } }, "node_modules/fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", + "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==", "dev": true, "engines": { "node": "*" }, "funding": { "type": "patreon", - "url": "https://www.patreon.com/infusion" + "url": "https://github.com/sponsors/rawify" } }, "node_modules/fragment-cache": { @@ -38284,20 +38289,20 @@ } }, "node_modules/mathjs": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-11.8.0.tgz", - "integrity": "sha512-I7r8HCoqUGyEiHQdeOCF2m2k9N+tcOHO3cZQ3tyJkMMBQMFqMR7dMQEboBMJAiFW2Um3PEItGPwcOc4P6KRqwg==", + "version": "11.11.2", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-11.11.2.tgz", + "integrity": "sha512-SL4/0Fxm9X4sgovUpJTeyVeZ2Ifnk4tzLPTYWDyR3AIx9SabnXYqtCkyJtmoF3vZrDPKGkLvrhbIL4YN2YbXLQ==", "dev": true, "dependencies": { - "@babel/runtime": "^7.21.0", + "@babel/runtime": "^7.23.1", "complex.js": "^2.1.1", "decimal.js": "^10.4.3", "escape-latex": "^1.2.0", - "fraction.js": "^4.2.0", + "fraction.js": "4.3.4", "javascript-natural-sort": "^0.7.1", "seedrandom": "^3.0.5", "tiny-emitter": "^2.1.0", - "typed-function": "^4.1.0" + "typed-function": "^4.1.1" }, "bin": { "mathjs": "bin/cli.js" @@ -46190,14 +46195,14 @@ "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==" }, "node_modules/reassure": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/reassure/-/reassure-0.9.0.tgz", - "integrity": "sha512-FIf0GPchyPGItsrW5Wwff/NWVrfOcCUuJJSs4Nur6iRdQt8yvmCpcba4UyemdZ1KaFTIW1gKbAV3u2tuA7zmtQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/reassure/-/reassure-0.10.1.tgz", + "integrity": "sha512-+GANr5ojh32NZu1YGfa6W8vIJm3iOIZJUvXT5Gc9fQyre7okYsCzyBq9WsHbnAQDjNq1g9SsM/4bwcVET9OIqA==", "dev": true, "dependencies": { - "@callstack/reassure-cli": "0.9.0", + "@callstack/reassure-cli": "0.10.0", "@callstack/reassure-danger": "0.1.1", - "@callstack/reassure-measure": "0.5.0" + "@callstack/reassure-measure": "0.6.0" } }, "node_modules/recast": { @@ -49132,7 +49137,6 @@ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -50392,9 +50396,9 @@ } }, "node_modules/typed-function": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.1.0.tgz", - "integrity": "sha512-DGwUl6cioBW5gw2L+6SMupGwH/kZOqivy17E4nsh1JI9fKF87orMmlQx3KISQPmg3sfnOUGlwVkroosvgddrlg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.1.1.tgz", + "integrity": "sha512-Pq1DVubcvibmm8bYcMowjVnnMwPVMeh0DIdA8ad8NZY2sJgapANJmiigSUwlt+EgXxpfIv8MWrQXTIzkfYZLYQ==", "dev": true, "engines": { "node": ">= 14" @@ -53267,9 +53271,9 @@ } }, "node_modules/zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", "dev": true, "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -54804,11 +54808,18 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "@babel/runtime": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.3.tgz", - "integrity": "sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "requires": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + } } }, "@babel/template": { @@ -54872,13 +54883,13 @@ "dev": true }, "@callstack/reassure-cli": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-cli/-/reassure-cli-0.9.0.tgz", - "integrity": "sha512-auoxqyilxkT5mDdEPJqRRY+ZGlrihJjFQpopcFd/15ng76OPVka3L48RMEY2wXkFXLaOOs6enNGb596jYPuEtQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@callstack/reassure-cli/-/reassure-cli-0.10.0.tgz", + "integrity": "sha512-CYgOGOAWcFgA2GrJw6RJAvImCpHCpPbtPoYMDol7esjlRCX2QwIKG7/9byq47hML57w94fhFAa76KD84YlgMBg==", "dev": true, "requires": { - "@callstack/reassure-compare": "0.5.0", - "@callstack/reassure-logger": "0.3.0", + "@callstack/reassure-compare": "0.6.0", + "@callstack/reassure-logger": "0.3.1", "chalk": "4.1.2", "simple-git": "^3.16.0", "yargs": "^17.6.2" @@ -54974,12 +54985,12 @@ } }, "@callstack/reassure-compare": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-compare/-/reassure-compare-0.5.0.tgz", - "integrity": "sha512-3sBeJ/+Hxjdb01KVb8LszO1kcJ8TXcrVnerUj+LYn2dkBOohAMqGYaOvCeoWsVEHJ+MIOzmvAGBJQRu69RoJdQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@callstack/reassure-compare/-/reassure-compare-0.6.0.tgz", + "integrity": "sha512-P3nmv36CJrQSXg0+z6EuEV/0xAbvxWbAZ7diQHnkbvqk2z8PKRXpkcthrRUpe02wLewa0MLxBUJwLenFnhxIRg==", "dev": true, "requires": { - "@callstack/reassure-logger": "0.3.0", + "@callstack/reassure-logger": "0.3.1", "markdown-builder": "^0.9.0", "markdown-table": "^2.0.0", "zod": "^3.20.2" @@ -54992,9 +55003,9 @@ "dev": true }, "@callstack/reassure-logger": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-logger/-/reassure-logger-0.3.0.tgz", - "integrity": "sha512-JX5o+8qkIbIRL+cQn9XlQYdv9p/3L6J70zZX6NYi9j0VrSS9PZIRfo8ujMdLSqUNV6HZN1ay59RzuncLjVu0aQ==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@callstack/reassure-logger/-/reassure-logger-0.3.1.tgz", + "integrity": "sha512-IUsNrxVMdt0zgD2IN2snGVGUG8Yc6F3SWaPF8RXUn8qi7XZuYC6WevEL+mIKmlbTTa7qlX9brkn0pJoXAjfcPQ==", "dev": true, "requires": { "chalk": "4.1.2" @@ -55052,12 +55063,12 @@ } }, "@callstack/reassure-measure": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@callstack/reassure-measure/-/reassure-measure-0.5.0.tgz", - "integrity": "sha512-KwlmNYcspBOp7FIw6XOz5O9mnKB4cWCCyM6vG4nFUPHSWQ6yVdRkawVvoPIV5qJ2hw7zCzdtqRrLWQSTF4eKlg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@callstack/reassure-measure/-/reassure-measure-0.6.0.tgz", + "integrity": "sha512-phXY5DAtKhnu8dA2pmnl+pqFOfrVEFFDJOi4AnObwIcpDSn3IUXgNSe7rSi+JP/mXNWMLoUS8rnH4iIFDyf7qQ==", "dev": true, "requires": { - "@callstack/reassure-logger": "0.3.0", + "@callstack/reassure-logger": "0.3.1", "mathjs": "^11.5.0" } }, @@ -75709,9 +75720,9 @@ "dev": true }, "fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", + "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==", "dev": true }, "fragment-cache": { @@ -80555,20 +80566,20 @@ } }, "mathjs": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-11.8.0.tgz", - "integrity": "sha512-I7r8HCoqUGyEiHQdeOCF2m2k9N+tcOHO3cZQ3tyJkMMBQMFqMR7dMQEboBMJAiFW2Um3PEItGPwcOc4P6KRqwg==", + "version": "11.11.2", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-11.11.2.tgz", + "integrity": "sha512-SL4/0Fxm9X4sgovUpJTeyVeZ2Ifnk4tzLPTYWDyR3AIx9SabnXYqtCkyJtmoF3vZrDPKGkLvrhbIL4YN2YbXLQ==", "dev": true, "requires": { - "@babel/runtime": "^7.21.0", + "@babel/runtime": "^7.23.1", "complex.js": "^2.1.1", "decimal.js": "^10.4.3", "escape-latex": "^1.2.0", - "fraction.js": "^4.2.0", + "fraction.js": "4.3.4", "javascript-natural-sort": "^0.7.1", "seedrandom": "^3.0.5", "tiny-emitter": "^2.1.0", - "typed-function": "^4.1.0" + "typed-function": "^4.1.1" } }, "md5.js": { @@ -86181,14 +86192,14 @@ "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==" }, "reassure": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/reassure/-/reassure-0.9.0.tgz", - "integrity": "sha512-FIf0GPchyPGItsrW5Wwff/NWVrfOcCUuJJSs4Nur6iRdQt8yvmCpcba4UyemdZ1KaFTIW1gKbAV3u2tuA7zmtQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/reassure/-/reassure-0.10.1.tgz", + "integrity": "sha512-+GANr5ojh32NZu1YGfa6W8vIJm3iOIZJUvXT5Gc9fQyre7okYsCzyBq9WsHbnAQDjNq1g9SsM/4bwcVET9OIqA==", "dev": true, "requires": { - "@callstack/reassure-cli": "0.9.0", + "@callstack/reassure-cli": "0.10.0", "@callstack/reassure-danger": "0.1.1", - "@callstack/reassure-measure": "0.5.0" + "@callstack/reassure-measure": "0.6.0" } }, "recast": { @@ -89274,9 +89285,9 @@ } }, "typed-function": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.1.0.tgz", - "integrity": "sha512-DGwUl6cioBW5gw2L+6SMupGwH/kZOqivy17E4nsh1JI9fKF87orMmlQx3KISQPmg3sfnOUGlwVkroosvgddrlg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.1.1.tgz", + "integrity": "sha512-Pq1DVubcvibmm8bYcMowjVnnMwPVMeh0DIdA8ad8NZY2sJgapANJmiigSUwlt+EgXxpfIv8MWrQXTIzkfYZLYQ==", "dev": true }, "typedarray": { @@ -91302,9 +91313,9 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" }, "zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", "dev": true }, "zwitch": { diff --git a/package.json b/package.json index 9a1eab37bdc7..c7310a684f50 100644 --- a/package.json +++ b/package.json @@ -267,7 +267,7 @@ "react-native-performance-flipper-reporter": "^2.0.0", "react-native-svg-transformer": "^1.0.0", "react-test-renderer": "18.2.0", - "reassure": "^0.9.0", + "reassure": "^0.10.1", "setimmediate": "^1.0.5", "shellcheck": "^1.1.0", "style-loader": "^2.0.0", From f677aa790bb40cc4ed3eb0abe91bd8079b1ad898 Mon Sep 17 00:00:00 2001 From: Adam Horodyski Date: Fri, 13 Oct 2023 11:13:00 +0200 Subject: [PATCH 2/4] chore: remove unit tests measuring performance of function calls --- tests/unit/GooglePlacesUtilsTest.js | 116 ---------------------------- 1 file changed, 116 deletions(-) diff --git a/tests/unit/GooglePlacesUtilsTest.js b/tests/unit/GooglePlacesUtilsTest.js index 4805e180eedc..b94068f521ff 100644 --- a/tests/unit/GooglePlacesUtilsTest.js +++ b/tests/unit/GooglePlacesUtilsTest.js @@ -15,93 +15,6 @@ const objectWithCountryToFind = { country: 'long_name', }; -const bigObjectToFind = { - sublocality: 'long_name', - administrative_area_level_1: 'short_name', - postal_code: 'long_name', - 'doesnt-exist': 'long_name', - s1ublocality: 'long_name', - a1dministrative_area_level_1: 'short_name', - p1ostal_code: 'long_name', - '1doesnt-exist': 'long_name', - s2ublocality: 'long_name', - a2dministrative_area_level_1: 'short_name', - p2ostal_code: 'long_name', - '2doesnt-exist': 'long_name', - s3ublocality: 'long_name', - a3dministrative_area_level_1: 'short_name', - p3ostal_code: 'long_name', - '3doesnt-exist': 'long_name', - s4ublocality: 'long_name', - a4dministrative_area_level_1: 'short_name', - p4ostal_code: 'long_name', - '4doesnt-exist': 'long_name', - s5ublocality: 'long_name', - a5dministrative_area_level_1: 'short_name', - p5ostal_code: 'long_name', - '5doesnt-exist': 'long_name', - s6ublocality: 'long_name', - a6dministrative_area_level_1: 'short_name', - p6ostal_code: 'long_name', - '6doesnt-exist': 'long_name', - s7ublocality: 'long_name', - a7dministrative_area_level_1: 'short_name', - p7ostal_code: 'long_name', - '7doesnt-exist': 'long_name', - s8ublocality: 'long_name', - a8dministrative_area_level_1: 'short_name', - p8ostal_code: 'long_name', - '8doesnt-exist': 'long_name', - s9ublocality: 'long_name', - a9dministrative_area_level_1: 'short_name', - p9ostal_code: 'long_name', - '9doesnt-exist': 'long_name', - s10ublocality: 'long_name', - a10dministrative_area_level_1: 'short_name', - p10ostal_code: 'long_name', - '10doesnt-exist': 'long_name', - s11ublocality: 'long_name', - a11dministrative_area_level_1: 'short_name', - p11ostal_code: 'long_name', - '11doesnt-exist': 'long_name', - s12ublocality: 'long_name', - a12dministrative_area_level_1: 'short_name', - p12ostal_code: 'long_name', - '12doesnt-exist': 'long_name', - s13ublocality: 'long_name', - a13dministrative_area_level_1: 'short_name', - p13ostal_code: 'long_name', - '13doesnt-exist': 'long_name', - s14ublocality: 'long_name', - a14dministrative_area_level_1: 'short_name', - p14ostal_code: 'long_name', - '14doesnt-exist': 'long_name', - s15ublocality: 'long_name', - a15dministrative_area_level_1: 'short_name', - p15ostal_code: 'long_name', - '15doesnt-exist': 'long_name', - s16ublocality: 'long_name', - a16dministrative_area_level_1: 'short_name', - p16ostal_code: 'long_name', - '16doesnt-exist': 'long_name', - s17ublocality: 'long_name', - a17dministrative_area_level_1: 'short_name', - p17ostal_code: 'long_name', - '17doesnt-exist': 'long_name', - s18ublocality: 'long_name', - a18dministrative_area_level_1: 'short_name', - p18ostal_code: 'long_name', - '18doesnt-exist': 'long_name', - s19ublocality: 'long_name', - a19dministrative_area_level_1: 'short_name', - p19ostal_code: 'long_name', - '19doesnt-exist': 'long_name', - s20ublocality: 'long_name', - a20dministrative_area_level_1: 'short_name', - p20ostal_code: 'long_name', - '20doesnt-exist': 'long_name', -}; - const addressComponents = [ { long_name: 'Bushwick', @@ -166,35 +79,6 @@ describe('GooglePlacesUtilsTest', () => { }); }); }); - describe.skip('getAddressComponents small data set timing', () => { - it('should not be slow when executing', () => { - const startTime = performance.now(); - for (let i = 100; i > 0; i--) { - GooglePlacesUtils.getAddressComponents(addressComponents, standardObjectToFind); - } - const endTime = performance.now(); - const executionTime = endTime - startTime; - - // When timing this method it was roughly 0.45087499999999636ms so this would be almost twice as slow - // which I think is a meaningful regression we should avoid - expect(executionTime).toBeLessThan(1.0); - }); - }); - describe.skip('getAddressComponents big data set timing', () => { - it('should not be slow when executing', () => { - const startTime = performance.now(); - for (let i = 100; i > 0; i--) { - GooglePlacesUtils.getAddressComponents(addressComponents, bigObjectToFind); - } - const endTime = performance.now(); - const executionTime = endTime - startTime; - - // When timing this method it was roughly 1.211708999999928ms locally - // but 3.2214480000000094ms on github actions so using 5ms arbitrarily here for now - // and we can change if needed later. - expect(executionTime).toBeLessThan(5.0); - }); - }); describe('getPlaceAutocompleteTerms', () => { it('should find auto complete terms', () => { expect(GooglePlacesUtils.getPlaceAutocompleteTerms(autoCompleteTerms)).toStrictEqual({ From 655d915cf124eaddb4d620a0c8250675986af27b Mon Sep 17 00:00:00 2001 From: Adam Horodyski Date: Fri, 13 Oct 2023 13:02:10 +0200 Subject: [PATCH 3/4] chore: add perf test for GooglePlacesUtils.getAddressComponents --- .../perf-test/GooglePlacesUtils.perf-test.js | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 tests/perf-test/GooglePlacesUtils.perf-test.js diff --git a/tests/perf-test/GooglePlacesUtils.perf-test.js b/tests/perf-test/GooglePlacesUtils.perf-test.js new file mode 100644 index 000000000000..151dbbb8eb5e --- /dev/null +++ b/tests/perf-test/GooglePlacesUtils.perf-test.js @@ -0,0 +1,153 @@ +import {measureFunction} from 'reassure'; +import * as GooglePlacesUtils from '../../src/libs/GooglePlacesUtils'; + +jest.setTimeout(60000); + +const addressComponents = [ + { + long_name: 'Bushwick', + short_name: 'Bushwick', + types: ['neighborhood', 'political'], + }, + { + long_name: 'Brooklyn', + short_name: 'Brooklyn', + types: ['sublocality_level_1', 'sublocality', 'political'], + }, + { + long_name: 'New York', + short_name: 'NY', + types: ['administrative_area_level_1', 'political'], + }, + { + long_name: 'United States', + short_name: 'US', + types: ['country', 'political'], + }, + { + long_name: '11206', + short_name: '11206', + types: ['postal_code'], + }, + { + long_name: 'United Kingdom', + short_name: 'UK', + types: ['country', 'political'], + }, +]; + +const bigObjectToFind = { + sublocality: 'long_name', + administrative_area_level_1: 'short_name', + postal_code: 'long_name', + 'doesnt-exist': 'long_name', + s1ublocality: 'long_name', + a1dministrative_area_level_1: 'short_name', + p1ostal_code: 'long_name', + '1doesnt-exist': 'long_name', + s2ublocality: 'long_name', + a2dministrative_area_level_1: 'short_name', + p2ostal_code: 'long_name', + '2doesnt-exist': 'long_name', + s3ublocality: 'long_name', + a3dministrative_area_level_1: 'short_name', + p3ostal_code: 'long_name', + '3doesnt-exist': 'long_name', + s4ublocality: 'long_name', + a4dministrative_area_level_1: 'short_name', + p4ostal_code: 'long_name', + '4doesnt-exist': 'long_name', + s5ublocality: 'long_name', + a5dministrative_area_level_1: 'short_name', + p5ostal_code: 'long_name', + '5doesnt-exist': 'long_name', + s6ublocality: 'long_name', + a6dministrative_area_level_1: 'short_name', + p6ostal_code: 'long_name', + '6doesnt-exist': 'long_name', + s7ublocality: 'long_name', + a7dministrative_area_level_1: 'short_name', + p7ostal_code: 'long_name', + '7doesnt-exist': 'long_name', + s8ublocality: 'long_name', + a8dministrative_area_level_1: 'short_name', + p8ostal_code: 'long_name', + '8doesnt-exist': 'long_name', + s9ublocality: 'long_name', + a9dministrative_area_level_1: 'short_name', + p9ostal_code: 'long_name', + '9doesnt-exist': 'long_name', + s10ublocality: 'long_name', + a10dministrative_area_level_1: 'short_name', + p10ostal_code: 'long_name', + '10doesnt-exist': 'long_name', + s11ublocality: 'long_name', + a11dministrative_area_level_1: 'short_name', + p11ostal_code: 'long_name', + '11doesnt-exist': 'long_name', + s12ublocality: 'long_name', + a12dministrative_area_level_1: 'short_name', + p12ostal_code: 'long_name', + '12doesnt-exist': 'long_name', + s13ublocality: 'long_name', + a13dministrative_area_level_1: 'short_name', + p13ostal_code: 'long_name', + '13doesnt-exist': 'long_name', + s14ublocality: 'long_name', + a14dministrative_area_level_1: 'short_name', + p14ostal_code: 'long_name', + '14doesnt-exist': 'long_name', + s15ublocality: 'long_name', + a15dministrative_area_level_1: 'short_name', + p15ostal_code: 'long_name', + '15doesnt-exist': 'long_name', + s16ublocality: 'long_name', + a16dministrative_area_level_1: 'short_name', + p16ostal_code: 'long_name', + '16doesnt-exist': 'long_name', + s17ublocality: 'long_name', + a17dministrative_area_level_1: 'short_name', + p17ostal_code: 'long_name', + '17doesnt-exist': 'long_name', + s18ublocality: 'long_name', + a18dministrative_area_level_1: 'short_name', + p18ostal_code: 'long_name', + '18doesnt-exist': 'long_name', + s19ublocality: 'long_name', + a19dministrative_area_level_1: 'short_name', + p19ostal_code: 'long_name', + '19doesnt-exist': 'long_name', + s20ublocality: 'long_name', + a20dministrative_area_level_1: 'short_name', + p20ostal_code: 'long_name', + '20doesnt-exist': 'long_name', + s21ublocality: 'long_name', + a21dministrative_area_level_1: 'short_name', + p21ostal_code: 'long_name', + '21doesnt-exist': 'long_name', + s22ublocality: 'long_name', + a22dministrative_area_level_1: 'short_name', + p22ostal_code: 'long_name', + '22doesnt-exist': 'long_name', + s23ublocality: 'long_name', + a23dministrative_area_level_1: 'short_name', + p23ostal_code: 'long_name', + '23doesnt-exist': 'long_name', + s24ublocality: 'long_name', + a24dministrative_area_level_1: 'short_name', + p24ostal_code: 'long_name', + '24doesnt-exist': 'long_name', + s25ublocality: 'long_name', + a25dministrative_area_level_1: 'short_name', + p25ostal_code: 'long_name', + '25doesnt-exist': 'long_name', +}; + +test('getAddressComponents on a big dataset', async () => { + await measureFunction( + () => { + GooglePlacesUtils.getAddressComponents(addressComponents, bigObjectToFind); + }, + {runs: 20}, + ); +}); From 4b2896b291bd9be2cd9a9eb3cb69d2c71b0a3b58 Mon Sep 17 00:00:00 2001 From: Adam Horodyski Date: Mon, 16 Oct 2023 16:58:38 +0200 Subject: [PATCH 4/4] docs: add a test description linking back to reassure docs --- tests/perf-test/GooglePlacesUtils.perf-test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/perf-test/GooglePlacesUtils.perf-test.js b/tests/perf-test/GooglePlacesUtils.perf-test.js index 151dbbb8eb5e..92c3e0eb87b7 100644 --- a/tests/perf-test/GooglePlacesUtils.perf-test.js +++ b/tests/perf-test/GooglePlacesUtils.perf-test.js @@ -143,6 +143,16 @@ const bigObjectToFind = { '25doesnt-exist': 'long_name', }; +/** + * This function will be executed 20 times and the average time will be used on the comparison. + * It will fail based on the CI configuration around Reassure: + * @see /.github/workflows/reassurePerformanceTests.yml + * + * Max deviation on the duration is set to 20% at the time of writing. + * + * More on the measureFunction API: + * @see https://callstack.github.io/reassure/docs/api#measurefunction-function + */ test('getAddressComponents on a big dataset', async () => { await measureFunction( () => {