diff --git a/ui/package-lock.json b/ui/package-lock.json index 4edc33211..422bb8e36 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -9714,7 +9714,16 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/experimental-utils": { + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/experimental-utils": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", @@ -9738,135 +9747,6 @@ "eslint": "*" } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/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==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/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" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -9916,7 +9796,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/scope-manager": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", @@ -9933,7 +9813,7 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "node_modules/@typescript-eslint/types": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", @@ -9946,7 +9826,7 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "node_modules/@typescript-eslint/typescript-estree": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", @@ -9973,7 +9853,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "node_modules/@typescript-eslint/visitor-keys": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", @@ -9990,89 +9870,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", - "dev": true, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -15848,104 +15645,6 @@ "eslint": "^8.0.0" } }, - "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/experimental-utils": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", - "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/eslint-config-react-app/node_modules/eslint-plugin-jest": { "version": "25.3.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.3.0.tgz", @@ -15970,28 +15669,6 @@ } } }, - "node_modules/eslint-config-react-app/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==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-config-react-app/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" - } - }, "node_modules/eslint-import-resolver-node": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", @@ -16206,6 +15883,135 @@ } } }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "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==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-plugin-jest/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "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" + } + }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", @@ -16343,126 +16149,6 @@ "eslint": "^7.5.0 || ^8.0.0" } }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/experimental-utils": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", - "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.7.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-testing-library/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==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-plugin-testing-library/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" - } - }, "node_modules/eslint-scope": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", @@ -40848,77 +40534,6 @@ "tsutils": "^3.21.0" }, "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", - "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" - } - }, - "@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "eslint-visitor-keys": "^3.0.0" - } - }, - "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==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, "ignore": { "version": "5.1.9", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", @@ -40928,15 +40543,15 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", + "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", "dev": true, "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/typescript-estree": "5.7.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -40969,98 +40584,47 @@ "@typescript-eslint/types": "5.7.0", "@typescript-eslint/typescript-estree": "5.7.0", "debug": "^4.3.2" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" - } - }, - "@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", + "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/visitor-keys": "5.7.0" } }, "@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", + "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", + "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/visitor-keys": "5.7.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", "semver": "^7.3.5", "tsutils": "^3.21.0" } }, "@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", + "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } + "@typescript-eslint/types": "5.7.0", + "eslint-visitor-keys": "^3.0.0" } }, "@webassemblyjs/ast": { @@ -45719,61 +45283,6 @@ "eslint-plugin-testing-library": "^5.0.1" }, "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", - "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" - } - }, - "@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "eslint-visitor-keys": "^3.0.0" - } - }, "eslint-plugin-jest": { "version": "25.3.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.3.0.tgz", @@ -45782,22 +45291,6 @@ "requires": { "@typescript-eslint/experimental-utils": "^5.0.0" } - }, - "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==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true } } }, @@ -45966,6 +45459,85 @@ "dev": true, "requires": { "@typescript-eslint/experimental-utils": "^4.0.1" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + } + }, + "@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "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==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } } }, "eslint-plugin-jsx-a11y": { @@ -46060,79 +45632,6 @@ "dev": true, "requires": { "@typescript-eslint/experimental-utils": "^5.5.0" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", - "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" - } - }, - "@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.7.0", - "eslint-visitor-keys": "^3.0.0" - } - }, - "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==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } } }, "eslint-scope": { diff --git a/ui/package.json b/ui/package.json index 52c2d8b2f..b68bc3b07 100644 --- a/ui/package.json +++ b/ui/package.json @@ -85,7 +85,6 @@ "eslint-plugin-prettier": "4.0.0", "fetch-mock": "9.11.0", "jest-canvas-mock": "2.3.1", - "jest-date-mock": "1.0.8", "prettier": "2.5.1", "purgecss": "4.1.3", "react-scripts": "5.0.0", diff --git a/ui/src/Components/AlertAck/index.test.tsx b/ui/src/Components/AlertAck/index.test.tsx index e49ab36cc..59a7769d1 100644 --- a/ui/src/Components/AlertAck/index.test.tsx +++ b/ui/src/Components/AlertAck/index.test.tsx @@ -4,8 +4,6 @@ import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; -import { advanceTo, clear } from "jest-date-mock"; - import fetchMock from "fetch-mock"; import { MockAlertGroup, MockAlert } from "__fixtures__/Alerts"; @@ -20,8 +18,8 @@ let alerts: APIAlertT[]; let group: APIAlertGroupT; beforeEach(() => { - jest.useFakeTimers(); - advanceTo(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); @@ -92,7 +90,7 @@ afterEach(() => { jest.clearAllTimers(); jest.clearAllMocks(); jest.restoreAllMocks(); - clear(); + jest.useRealTimers(); }); const MountedAlertAck = () => { diff --git a/ui/src/Components/AlertHistory/index.test.tsx b/ui/src/Components/AlertHistory/index.test.tsx index f71c7046b..04bdc9330 100644 --- a/ui/src/Components/AlertHistory/index.test.tsx +++ b/ui/src/Components/AlertHistory/index.test.tsx @@ -4,8 +4,6 @@ import { mount } from "enzyme"; import fetchMock from "fetch-mock"; -import { advanceTo, advanceBy, clear } from "jest-date-mock"; - import { useInView } from "react-intersection-observer"; import toDiffableHtml from "diffable-html"; @@ -59,8 +57,9 @@ const MockAlerts = (alertCount: number) => { }; beforeEach(() => { - jest.useFakeTimers(); - advanceTo(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); + group = MockGroup("fakeGroup"); grid = { labelName: "foo", @@ -78,7 +77,7 @@ beforeEach(() => { afterEach(() => { fetchMock.resetHistory(); fetchMock.reset(); - clear(); + jest.useRealTimers(); }); describe("", () => { @@ -321,14 +320,12 @@ describe("", () => { expect(fetchMock.calls()).toHaveLength(1); await act(async () => { - advanceBy(1000 * 299); jest.advanceTimersByTime(1000 * 299); await fetchMock.flush(true); }); expect(fetchMock.calls()).toHaveLength(1); await act(async () => { - advanceBy(1000 * 2); jest.advanceTimersByTime(1000 * 2); await fetchMock.flush(true); }); diff --git a/ui/src/Components/Fetcher/index.test.tsx b/ui/src/Components/Fetcher/index.test.tsx index 38567f3e5..73991bee8 100644 --- a/ui/src/Components/Fetcher/index.test.tsx +++ b/ui/src/Components/Fetcher/index.test.tsx @@ -6,8 +6,6 @@ import fetchMock from "fetch-mock"; import toDiffableHtml from "diffable-html"; -import { advanceTo, advanceBy, clear } from "jest-date-mock"; - import { EmptyAPIResponse } from "__fixtures__/Fetch"; import { AlertStore } from "Stores/AlertStore"; @@ -21,8 +19,8 @@ let fetchSpy: any; let requestAnimationFrameSpy: any; beforeEach(() => { - jest.useFakeTimers(); - advanceTo(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); alertStore = new AlertStore(["label=value"]); fetchSpy = jest @@ -51,7 +49,7 @@ afterEach(() => { jest.clearAllTimers(); jest.clearAllMocks(); jest.restoreAllMocks(); - clear(); + jest.useRealTimers(); fetchMock.reset(); }); @@ -71,7 +69,9 @@ describe("", () => { mount(); expect(fetchSpy).toHaveBeenCalledTimes(1); - advanceBy(3 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 3 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); @@ -79,25 +79,33 @@ describe("", () => { settingsStore.fetchConfig.setInterval(600); - advanceBy(3 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 6 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); expect(fetchSpy).toHaveBeenCalledTimes(2); - advanceBy(32 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 38 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); expect(fetchSpy).toHaveBeenCalledTimes(2); - advanceBy(62 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 100 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); expect(fetchSpy).toHaveBeenCalledTimes(2); - advanceBy(602 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 702 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); @@ -125,19 +133,25 @@ describe("", () => { mount(); expect(fetchSpy).toHaveBeenCalledTimes(1); - advanceBy(62 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 62 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); expect(fetchSpy).toHaveBeenCalledTimes(2); - advanceBy(62 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 124 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); expect(fetchSpy).toHaveBeenCalledTimes(3); - advanceBy(62 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 186 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); @@ -405,7 +419,9 @@ describe("", () => { alertStore.status.pause(); mount(); alertStore.status.resume(); - advanceBy(2 * 1000); + jest.setSystemTime( + new Date(Date.UTC(2000, 1, 1, 0, 0, 0)).getTime() + 2 * 1000 + ); act(() => { jest.runOnlyPendingTimers(); }); diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx index 4acb31f17..5c18ce90f 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/index.test.tsx @@ -2,8 +2,6 @@ import { act } from "react-dom/test-utils"; import { mount } from "enzyme"; -import { advanceTo, clear } from "jest-date-mock"; - import toDiffableHtml from "diffable-html"; import { @@ -25,7 +23,8 @@ let silenceFormStore: SilenceFormStore; let grid: APIGridT; beforeEach(() => { - advanceTo(new Date(Date.UTC(2018, 7, 15, 20, 40, 0))); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2018, 7, 15, 20, 40, 0))); alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); @@ -43,8 +42,7 @@ beforeEach(() => { }); afterEach(() => { - // reset Date() to current time - clear(); + jest.useRealTimers(); jest.restoreAllMocks(); }); @@ -380,7 +378,7 @@ describe("", () => { it("alert timestamp is updated every minute", () => { jest.useFakeTimers(); - advanceTo(new Date(Date.UTC(2018, 7, 14, 17, 36, 41))); + jest.setSystemTime(new Date(Date.UTC(2018, 7, 14, 17, 36, 41))); const alert = MockedAlert(); const group = MockAlertGroup([], [alert], [], [], {}); @@ -392,7 +390,7 @@ describe("", () => { .text() ).toBe("just now"); - advanceTo(new Date(Date.UTC(2018, 7, 14, 17, 36, 42))); + jest.setSystemTime(new Date(Date.UTC(2018, 7, 14, 17, 36, 42))); act(() => { jest.advanceTimersByTime(31 * 1000); }); @@ -403,7 +401,7 @@ describe("", () => { .text() ).toBe("a few seconds ago"); - advanceTo(new Date(Date.UTC(2018, 7, 14, 17, 37, 41))); + jest.setSystemTime(new Date(Date.UTC(2018, 7, 14, 17, 37, 41))); act(() => { jest.advanceTimersByTime(31 * 1000); }); @@ -414,7 +412,7 @@ describe("", () => { .text() ).toBe("1 minute ago"); - advanceTo(new Date(Date.UTC(2018, 7, 14, 18, 36, 41))); + jest.setSystemTime(new Date(Date.UTC(2018, 7, 14, 18, 36, 41))); act(() => { jest.advanceTimersByTime(31 * 1000); }); @@ -425,7 +423,7 @@ describe("", () => { .text() ).toBe("1 hour ago"); - advanceTo(new Date(Date.UTC(2018, 7, 14, 19, 36, 41))); + jest.setSystemTime(new Date(Date.UTC(2018, 7, 14, 19, 36, 41))); act(() => { jest.advanceTimersByTime(31 * 1000); }); @@ -436,7 +434,7 @@ describe("", () => { .text() ).toBe("2 hours ago"); - advanceTo(new Date(Date.UTC(2018, 7, 16, 19, 36, 41))); + jest.setSystemTime(new Date(Date.UTC(2018, 7, 16, 19, 36, 41))); act(() => { jest.advanceTimersByTime(31 * 1000); }); diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx index 3444c8995..82a8b34b9 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/index.test.tsx @@ -2,8 +2,6 @@ import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; -import { advanceTo, clear } from "jest-date-mock"; - import { MockAlertGroup, MockAnnotation, @@ -55,15 +53,16 @@ beforeEach(() => { alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); group = MockGroup(); - advanceTo(new Date(Date.UTC(2000, 0, 1, 15, 0, 0))); + + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 15, 0, 0))); alertStore.data.setReceivers(["by-cluster-service", "by-name"]); }); afterEach(() => { jest.restoreAllMocks(); - // reset Date() to current time - clear(); + jest.useRealTimers(); }); const MountedGroupFooter = () => { diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx index 0f4dcb393..146427c07 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silences.test.tsx @@ -2,8 +2,6 @@ import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; -import { advanceTo, clear } from "jest-date-mock"; - import { MockSilence } from "__fixtures__/Alerts"; import { AlertStore } from "Stores/AlertStore"; import { SilenceFormStore } from "Stores/SilenceFormStore"; @@ -17,11 +15,12 @@ describe("", () => { alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); - advanceTo(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); }); afterEach(() => { - clear(); + jest.useRealTimers(); }); it("renders fallback text if silence is not present in AlertStore", () => { diff --git a/ui/src/Components/Grid/AlertGrid/index.test.tsx b/ui/src/Components/Grid/AlertGrid/index.test.tsx index 8da045951..e84fd49cb 100644 --- a/ui/src/Components/Grid/AlertGrid/index.test.tsx +++ b/ui/src/Components/Grid/AlertGrid/index.test.tsx @@ -3,8 +3,6 @@ import { act } from "react-dom/test-utils"; import { shallow, mount } from "enzyme"; -import { advanceBy, clear } from "jest-date-mock"; - import { MockAlert, MockAlertGroup } from "__fixtures__/Alerts"; import { mockMatchMedia } from "__fixtures__/matchMedia"; import { @@ -61,7 +59,7 @@ afterEach(() => { jest.clearAllTimers(); jest.clearAllMocks(); jest.restoreAllMocks(); - clear(); + jest.useRealTimers(); }); const MountedAlertGrid = () => { @@ -451,11 +449,13 @@ describe("", () => { }); it("doesn't throw errors after FontFaceObserver timeout", () => { - jest.useFakeTimers(); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 0, 0))); + MockGroupList(1, 1); MountedGrid(); // skip a minute to trigger FontFaceObserver timeout handler - advanceBy(60 * 1000); + jest.setSystemTime(new Date(Date.UTC(2000, 1, 1, 0, 1, 0))); act(() => { jest.runOnlyPendingTimers(); }); diff --git a/ui/src/Components/Labels/FilteringCounterBadge/index.test.tsx b/ui/src/Components/Labels/FilteringCounterBadge/index.test.tsx index 70fe8c9fd..05c26241b 100644 --- a/ui/src/Components/Labels/FilteringCounterBadge/index.test.tsx +++ b/ui/src/Components/Labels/FilteringCounterBadge/index.test.tsx @@ -1,4 +1,4 @@ -import { mount, render } from "enzyme"; +import { mount } from "enzyme"; import { AlertStore, NewUnappliedFilter } from "Stores/AlertStore"; import { QueryOperators } from "Common/Query"; @@ -100,7 +100,7 @@ describe("", () => { }); it("counter badge should have correct children based on the counter prop value", () => { - const tree = render( + const tree = mount( ({ }); beforeEach(() => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); - jest.useFakeTimers(); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); @@ -54,7 +52,7 @@ afterEach(() => { (useFetchDelete as jest.MockedFunction).mockClear(); jest.restoreAllMocks(); - clear(); + jest.useRealTimers(); document.body.className = ""; }); @@ -329,7 +327,7 @@ describe("", () => { tree.find(".btn-danger").simulate("click"); expect(useFetchDelete).toHaveBeenCalledTimes(1); - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 1))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 1))); tree.find(".btn-danger").simulate("click"); expect(useFetchDelete).toHaveBeenCalledTimes(2); }); diff --git a/ui/src/Components/ManagedSilence/SilenceComment.test.tsx b/ui/src/Components/ManagedSilence/SilenceComment.test.tsx index e1e656570..5340257ad 100644 --- a/ui/src/Components/ManagedSilence/SilenceComment.test.tsx +++ b/ui/src/Components/ManagedSilence/SilenceComment.test.tsx @@ -1,7 +1,5 @@ import { mount } from "enzyme"; -import { advanceTo, clear } from "jest-date-mock"; - import toDiffableHtml from "diffable-html"; import { MockSilence } from "__fixtures__/Alerts"; @@ -13,7 +11,8 @@ let silence: APISilenceT; let alertStore: AlertStore; beforeEach(() => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); silence = MockSilence(); alertStore = new AlertStore([]); @@ -21,7 +20,7 @@ beforeEach(() => { afterEach(() => { jest.restoreAllMocks(); - clear(); + jest.useRealTimers(); }); const CollapseMock = jest.fn(); diff --git a/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx b/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx index 2e105c96e..d715ff923 100644 --- a/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx +++ b/ui/src/Components/ManagedSilence/SilenceDetails.test.tsx @@ -4,8 +4,6 @@ import toDiffableHtml from "diffable-html"; import copy from "copy-to-clipboard"; -import { advanceTo, clear } from "jest-date-mock"; - import { MockSilence } from "__fixtures__/Alerts"; import type { APIAlertsResponseUpstreamsT, APISilenceT } from "Models/APITypes"; import { AlertStore } from "Stores/AlertStore"; @@ -47,12 +45,12 @@ beforeEach(() => { alertStore.data.setUpstreams(generateUpstreams()); jest.restoreAllMocks(); + jest.useFakeTimers("modern"); }); afterEach(() => { jest.restoreAllMocks(); - // reset Date() to current time - clear(); + jest.useRealTimers(); }); const MountedSilenceDetails = () => { @@ -69,14 +67,14 @@ const MountedSilenceDetails = () => { describe("", () => { it("unexpired silence endsAt label doesn't use 'danger' class", () => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); const tree = MountedSilenceDetails(); const endsAt = tree.find("span.badge").at(1); expect(toDiffableHtml(endsAt.html())).not.toMatch(/text-danger/); }); it("expired silence endsAt label uses 'danger' class", () => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 23, 0, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 23, 0, 0))); const tree = MountedSilenceDetails(); const endsAt = tree.find("span.badge").at(1); expect(toDiffableHtml(endsAt.html())).toMatch(/text-danger/); diff --git a/ui/src/Components/ManagedSilence/SilenceProgress.test.tsx b/ui/src/Components/ManagedSilence/SilenceProgress.test.tsx index f0be80821..7231bd9e2 100644 --- a/ui/src/Components/ManagedSilence/SilenceProgress.test.tsx +++ b/ui/src/Components/ManagedSilence/SilenceProgress.test.tsx @@ -4,8 +4,6 @@ import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; -import { advanceTo, clear } from "jest-date-mock"; - import { MockSilence } from "__fixtures__/Alerts"; import type { APISilenceT } from "Models/APITypes"; import { SilenceProgress } from "./SilenceProgress"; @@ -16,13 +14,13 @@ beforeEach(() => { silence = MockSilence(); jest.restoreAllMocks(); - jest.useFakeTimers(); + jest.useFakeTimers("modern"); }); afterEach(() => { jest.restoreAllMocks(); // reset Date() to current time - clear(); + jest.useRealTimers(); }); const MountedSilenceProgress = () => { @@ -31,42 +29,42 @@ const MountedSilenceProgress = () => { describe("", () => { it("renders with class 'danger' and no progressbar when expired", () => { - advanceTo(new Date(Date.UTC(2001, 0, 1, 23, 0, 0))); + jest.setSystemTime(new Date(Date.UTC(2001, 0, 1, 23, 0, 0))); const tree = MountedSilenceProgress(); expect(toDiffableHtml(tree.html())).toMatch(/bg-danger/); expect(tree.text()).toMatch(/Expired 1 year ago/); }); it("progressbar uses class 'danger' when > 90%", () => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 55, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 55, 0))); const tree = MountedSilenceProgress(); expect(toDiffableHtml(tree.html())).toMatch(/progress-bar bg-danger/); }); it("progressbar uses class 'danger' when > 75%", () => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 50, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 50, 0))); const tree = MountedSilenceProgress(); expect(toDiffableHtml(tree.html())).toMatch(/progress-bar bg-warning/); }); it("progressbar uses class 'success' when <= 75%", () => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); const tree = MountedSilenceProgress(); expect(toDiffableHtml(tree.html())).toMatch(/progress-bar bg-success/); }); it("progressbar is updated every 30 seconds", () => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); const tree = MountedSilenceProgress(); expect(toDiffableHtml(tree.html())).toMatch(/progress-bar bg-success/); - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 50, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 50, 0))); act(() => { jest.runOnlyPendingTimers(); }); expect(toDiffableHtml(tree.html())).toMatch(/progress-bar bg-warning/); - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 55, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 55, 0))); act(() => { jest.runOnlyPendingTimers(); }); diff --git a/ui/src/Components/ManagedSilence/index.test.tsx b/ui/src/Components/ManagedSilence/index.test.tsx index 0ef142a01..6355a67b7 100644 --- a/ui/src/Components/ManagedSilence/index.test.tsx +++ b/ui/src/Components/ManagedSilence/index.test.tsx @@ -2,8 +2,6 @@ import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; -import { advanceTo, clear } from "jest-date-mock"; - import { MockSilence } from "__fixtures__/Alerts"; import { MockThemeContext } from "__fixtures__/Theme"; import type { APISilenceT } from "Models/APITypes"; @@ -18,7 +16,8 @@ let cluster: string; let silence: APISilenceT; beforeEach(() => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); @@ -49,7 +48,7 @@ beforeEach(() => { afterEach(() => { jest.restoreAllMocks(); - clear(); + jest.useRealTimers(); }); const MountedManagedSilence = (onDidUpdate?: () => void) => { @@ -169,7 +168,7 @@ describe("", () => { }); it("shows Recreate button on expired silence", () => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 23, 30, 0))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 23, 30, 0))); const tree = MountedManagedSilence(); tree.find("svg.text-muted.cursor-pointer").simulate("click"); diff --git a/ui/src/Components/NavBar/FilterInput/__snapshots__/index.test.tsx.snap b/ui/src/Components/NavBar/FilterInput/__snapshots__/index.test.tsx.snap index d7119d467..3eebf087e 100644 --- a/ui/src/Components/NavBar/FilterInput/__snapshots__/index.test.tsx.snap +++ b/ui/src/Components/NavBar/FilterInput/__snapshots__/index.test.tsx.snap @@ -2,228 +2,238 @@ exports[` matches snapshot with no filters 1`] = ` " -
-
-
- +
+
+
+
+ + + + + + + +
+ + +
+ + + +
+
+" +`; + +exports[` matches snapshot with some filters 1`] = ` +" +
+
+
+ + +
+ +
+ -
- + +
- - - -
-" -`; - -exports[` matches snapshot with some filters 1`] = ` -" -
-
- - -
- -
- - -
- - - -
+ " `; diff --git a/ui/src/Components/NavBar/FilterInput/index.test.tsx b/ui/src/Components/NavBar/FilterInput/index.test.tsx index 9e9a7615d..1ecf0128c 100644 --- a/ui/src/Components/NavBar/FilterInput/index.test.tsx +++ b/ui/src/Components/NavBar/FilterInput/index.test.tsx @@ -1,6 +1,6 @@ import { act } from "react-dom/test-utils"; -import { mount, render } from "enzyme"; +import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; @@ -39,7 +39,7 @@ const MountedInput = () => { describe("", () => { it("matches snapshot with no filters", () => { - const tree = render( + const tree = mount( ); expect(toDiffableHtml(tree.html())).toMatchSnapshot(); @@ -51,7 +51,7 @@ describe("", () => { NewUnappliedFilter("foo=bar"), NewUnappliedFilter("baz!=bar"), ]); - const tree = render( + const tree = mount( ); expect(toDiffableHtml(tree.html())).toMatchSnapshot(); diff --git a/ui/src/Components/PaginatedAlertList/index.test.tsx b/ui/src/Components/PaginatedAlertList/index.test.tsx index 8c4ddb64d..cdd01baf5 100644 --- a/ui/src/Components/PaginatedAlertList/index.test.tsx +++ b/ui/src/Components/PaginatedAlertList/index.test.tsx @@ -1,7 +1,5 @@ import { mount } from "enzyme"; -import { advanceTo, clear } from "jest-date-mock"; - import { useFetchGetMock } from "__fixtures__/useFetchGet"; import { AlertStore } from "Stores/AlertStore"; import { useFetchGet } from "Hooks/useFetchGet"; @@ -10,8 +8,8 @@ import { PaginatedAlertList } from "."; let alertStore: AlertStore; beforeEach(() => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); - jest.useFakeTimers(); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); @@ -37,7 +35,7 @@ beforeEach(() => { afterEach(() => { jest.restoreAllMocks(); - clear(); + jest.useRealTimers(); document.body.className = ""; }); diff --git a/ui/src/Components/SilenceModal/Browser/index.test.tsx b/ui/src/Components/SilenceModal/Browser/index.test.tsx index 17177faee..1efe32d67 100644 --- a/ui/src/Components/SilenceModal/Browser/index.test.tsx +++ b/ui/src/Components/SilenceModal/Browser/index.test.tsx @@ -4,8 +4,6 @@ import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; -import { advanceTo, clear } from "jest-date-mock"; - import { useFetchGetMock } from "__fixtures__/useFetchGet"; import { MockSilence } from "__fixtures__/Alerts"; import { PressKey } from "__fixtures__/PressKey"; @@ -26,8 +24,8 @@ let silence: APISilenceT; declare let global: any; beforeEach(() => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); - jest.useFakeTimers(); + jest.useFakeTimers("modern"); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 0))); alertStore = new AlertStore([]); silenceFormStore = new SilenceFormStore(); @@ -60,7 +58,7 @@ beforeEach(() => { afterEach(() => { jest.restoreAllMocks(); jest.clearAllTimers(); - clear(); + jest.useRealTimers(); localStorage.setItem("fetchConfig.interval", ""); global.window.innerWidth = 1024; @@ -107,17 +105,17 @@ describe("", () => { settingsStore.fetchConfig.setInterval(1); MountedBrowser(); - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 2))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 2))); act(() => { jest.runOnlyPendingTimers(); }); - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 4))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 4))); act(() => { jest.runOnlyPendingTimers(); }); - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 6))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 6))); act(() => { jest.runOnlyPendingTimers(); }); @@ -408,7 +406,7 @@ describe("", () => { tree.unmount(); act(() => { - advanceTo(new Date(Date.UTC(2000, 0, 1, 0, 30, 59))); + jest.setSystemTime(new Date(Date.UTC(2000, 0, 1, 0, 30, 59))); jest.runOnlyPendingTimers(); }); diff --git a/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx b/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx index 907d6b9d8..c17c5d15d 100644 --- a/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx +++ b/ui/src/Components/SilenceModal/DateTimeSelect/index.test.tsx @@ -2,8 +2,6 @@ import { act } from "react-dom/test-utils"; import { mount, shallow } from "enzyme"; -import { advanceTo, clear } from "jest-date-mock"; - import toDiffableHtml from "diffable-html"; import addMinutes from "date-fns/addMinutes"; @@ -21,13 +19,15 @@ import { let silenceFormStore: SilenceFormStore; beforeEach(() => { + jest.useFakeTimers("modern"); + silenceFormStore = new SilenceFormStore(); silenceFormStore.data.setStart(new Date(2060, 1, 1, 0, 0, 0)); silenceFormStore.data.setEnd(new Date(2061, 1, 1, 0, 0, 0)); }); afterEach(() => { - clear(); + jest.useRealTimers(); }); const ShallowDateTimeSelect = () => { @@ -56,7 +56,7 @@ describe("", () => { }); it("'Duration' tab matches snapshot", () => { - advanceTo(new Date(2060, 1, 1, 0, 0, 0)); + jest.setSystemTime(new Date(2060, 1, 1, 0, 0, 0)); const tree = MountedDateTimeSelect(); expect(toDiffableHtml(tree.html())).toMatchSnapshot(); }); @@ -75,7 +75,7 @@ describe("", () => { }); it("'Starts' tab matches snapshot", () => { - advanceTo(new Date(2060, 1, 1, 0, 0, 0)); + jest.setSystemTime(new Date(2060, 1, 1, 0, 0, 0)); const tree = MountedDateTimeSelect(); tree.find(".nav-link").at(0).simulate("click"); expect(toDiffableHtml(tree.html())).toMatchSnapshot(); @@ -96,7 +96,7 @@ describe("", () => { }); it("'Ends' tab matches snapshot", () => { - advanceTo(new Date(2060, 1, 1, 0, 0, 0)); + jest.setSystemTime(new Date(2060, 1, 1, 0, 0, 0)); const tree = MountedDateTimeSelect(); tree.find(".nav-link").at(1).simulate("click"); expect(toDiffableHtml(tree.html())).toMatchSnapshot(); @@ -121,14 +121,14 @@ describe("", () => { it("'Ends' tab offset badge is updated after 1 minute", () => { jest.useFakeTimers(); - advanceTo(new Date(2060, 1, 1, 12, 0, 0)); + jest.setSystemTime(new Date(2060, 1, 1, 12, 0, 0)); silenceFormStore.data.setStart(new Date(2060, 1, 1, 12, 0, 0)); silenceFormStore.data.setEnd(new Date(2060, 1, 1, 13, 0, 0)); const tree = MountedDateTimeSelect(); expect(tree.find(".nav-link").at(1).text()).toBe("Endsin 1h "); - advanceTo(new Date(2060, 1, 1, 12, 1, 0)); + jest.setSystemTime(new Date(2060, 1, 1, 12, 1, 0)); act(() => { jest.runOnlyPendingTimers(); }); diff --git a/ui/src/Components/SilenceModal/PayloadPreview/__snapshots__/index.test.tsx.snap b/ui/src/Components/SilenceModal/PayloadPreview/__snapshots__/index.test.tsx.snap index 2463da741..3a5be942f 100644 --- a/ui/src/Components/SilenceModal/PayloadPreview/__snapshots__/index.test.tsx.snap +++ b/ui/src/Components/SilenceModal/PayloadPreview/__snapshots__/index.test.tsx.snap @@ -2,79 +2,81 @@ exports[` matches snapshot 1`] = ` " -
-  {
+
+
+    {
   \\"
-  
-    matchers
-  
-  \\": [],
+    
+      matchers
+    
+    \\": [],
   \\"
-  
-    startsAt
-  
-  \\":
-  
-    \\"2000-02-01T00:00:00.000Z\\"
-  
-  ,
+    
+      startsAt
+    
+    \\":
+    
+      \\"2000-02-01T00:00:00.000Z\\"
+    
+    ,
   \\"
-  
-    endsAt
-  
-  \\":
-  
-    \\"2000-02-01T01:00:00.000Z\\"
-  
-  ,
+    
+      endsAt
+    
+    \\":
+    
+      \\"2000-02-01T01:00:00.000Z\\"
+    
+    ,
   \\"
-  
-    createdBy
-  
-  \\":
-  
-    \\"me@example.com\\"
-  
-  ,
+    
+      createdBy
+    
+    \\":
+    
+      \\"me@example.com\\"
+    
+    ,
   \\"
-  
-    comment
-  
-  \\":
-  
-    \\"PayloadPreview test\\"
-  
-  }
-
+ + comment + + \\": + + \\"PayloadPreview test\\" + + } +
+
" `; diff --git a/ui/src/Components/SilenceModal/PayloadPreview/index.test.tsx b/ui/src/Components/SilenceModal/PayloadPreview/index.test.tsx index 70c4fe94a..3b8f5d9bc 100644 --- a/ui/src/Components/SilenceModal/PayloadPreview/index.test.tsx +++ b/ui/src/Components/SilenceModal/PayloadPreview/index.test.tsx @@ -1,4 +1,4 @@ -import { render } from "enzyme"; +import { mount } from "enzyme"; import toDiffableHtml from "diffable-html"; @@ -13,7 +13,7 @@ describe("", () => { silenceFormStore.data.setAuthor("me@example.com"); silenceFormStore.data.setComment("PayloadPreview test"); - const tree = render(); + const tree = mount(); expect(toDiffableHtml(tree.html())).toMatchSnapshot(); }); }); diff --git a/ui/src/Components/SilenceModal/SilenceSubmit/SilenceSubmitProgress.test.tsx b/ui/src/Components/SilenceModal/SilenceSubmit/SilenceSubmitProgress.test.tsx index 2e751dad2..6b9c17e56 100644 --- a/ui/src/Components/SilenceModal/SilenceSubmit/SilenceSubmitProgress.test.tsx +++ b/ui/src/Components/SilenceModal/SilenceSubmit/SilenceSubmitProgress.test.tsx @@ -259,9 +259,7 @@ describe("", () => { /> ); await act(async () => { - await act(async () => { - await fetchMock.flush(true); - }); + await fetchMock.flush(true); }); tree.update(); expect(fetchMock.calls()).toHaveLength(2); @@ -313,9 +311,7 @@ describe("", () => { /> ); await act(async () => { - await act(async () => { - await fetchMock.flush(true); - }); + await fetchMock.flush(true); }); expect(fetchMock.calls()[0][0]).toBe( "http://am1.example.com/api/v2/silences" @@ -352,9 +348,7 @@ describe("", () => { /> ); await act(async () => { - await act(async () => { - await fetchMock.flush(true); - }); + await fetchMock.flush(true); }); expect(fetchMock.calls()).toHaveLength(0); expect(consoleSpy).toHaveBeenCalledTimes(2); @@ -418,9 +412,7 @@ describe("", () => { /> ); await act(async () => { - await act(async () => { - await fetchMock.flush(true); - }); + await fetchMock.flush(true); }); expect(fetchMock.calls()).toHaveLength(1); expect(fetchMock.calls()[0][0]).toBe( @@ -498,9 +490,7 @@ describe("", () => { it("renders silence link on successful fetch", async () => { const tree = MountedSilenceSubmitProgress(); await act(async () => { - await act(async () => { - await fetchMock.flush(true); - }); + await fetchMock.flush(true); }); tree.update(); expect( @@ -521,9 +511,7 @@ describe("", () => { }); const tree = MountedSilenceSubmitProgress(); await act(async () => { - await act(async () => { - await fetchMock.flush(true); - }); + await fetchMock.flush(true); }); tree.update(); expect( diff --git a/ui/src/setupTests.ts b/ui/src/setupTests.ts index ec1203a11..2eced79ee 100644 --- a/ui/src/setupTests.ts +++ b/ui/src/setupTests.ts @@ -32,9 +32,6 @@ Enzyme.configure({ adapter: new Adapter() }); // favico.js needs canvas require("jest-canvas-mock"); -// used to mock current time since we render moment.fromNow() in some places -require("jest-date-mock"); - // https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#new-deprecations const reactDeprecationWarning = /.*has been renamed, and is not recommended for use.*/;