diff --git a/locust/webui/package.json b/locust/webui/package.json index 9fdfc7d052..6f30428177 100644 --- a/locust/webui/package.json +++ b/locust/webui/package.json @@ -46,7 +46,7 @@ "prettier": "^3.0.3", "typescript": "^5.2.2", "vitest": "^0.34.6", - "vitest-canvas-mock": "^0.3.3" + "vitest-webgl-canvas-mock": "^1.1.0" }, "engines": { "node": ">=18.0.0" diff --git a/locust/webui/src/test/setup.ts b/locust/webui/src/test/setup.ts index 6de29482a4..eafc918156 100644 --- a/locust/webui/src/test/setup.ts +++ b/locust/webui/src/test/setup.ts @@ -3,7 +3,7 @@ import { afterEach, vi } from 'vitest'; import { TEST_BASE_API } from 'test/constants'; import { swarmStateMock } from 'test/mocks/swarmState.mock'; -import 'vitest-canvas-mock'; +import 'vitest-webgl-canvas-mock'; global.window.templateArgs = swarmStateMock; window.matchMedia = vi.fn().mockImplementation(() => ({ diff --git a/locust/webui/yarn.lock b/locust/webui/yarn.lock index 785855bd9d..a71744baad 100644 --- a/locust/webui/yarn.lock +++ b/locust/webui/yarn.lock @@ -1381,12 +1381,17 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" +color-convert@~0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" + integrity sha512-RwBeO/B/vZR3dfKL1ye/vx8MHZ40ugzpyfeVG5GsiuGnrlMWe2o8wxBbLCpw9CsxV+wHuzYlCiWnybrIA0ling== + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== -color-name@^1.1.4, color-name@~1.1.4: +color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== @@ -2805,14 +2810,6 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" -jest-canvas-mock@~2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jest-canvas-mock/-/jest-canvas-mock-2.5.2.tgz#7e21ebd75e05ab41c890497f6ba8a77f915d2ad6" - integrity sha512-vgnpPupjOL6+L5oJXzxTxFrlGEIbHdZqFU+LFNdtLxZ3lRDCl17FlTMM7IatoRQkrcyOTMlDinjUguqmQ6bR2A== - dependencies: - cssfontparser "^1.2.1" - moo-color "^1.0.2" - js-levenshtein@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" @@ -3298,13 +3295,6 @@ mlly@^1.2.0, mlly@^1.4.0: pkg-types "^1.0.3" ufo "^1.3.0" -moo-color@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/moo-color/-/moo-color-1.0.3.tgz#d56435f8359c8284d83ac58016df7427febece74" - integrity sha512-i/+ZKXMDf6aqYtBhuOcej71YSlbjT3wCO/4H1j8rPvxDJEifdwgg5MaFyu6iYAT8GBZJg2z0dkgK4YMzvURALQ== - dependencies: - color-name "^1.1.4" - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -3555,6 +3545,13 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-color@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-color/-/parse-color-1.0.0.tgz#7b748b95a83f03f16a94f535e52d7f3d94658619" + integrity sha512-fuDHYgFHJGbpGMgw9skY/bj3HL/Jrn4l/5rSspy00DoT4RyLnDcRvPxdZ+r6OFwIsgAuhDh4I09tAId4mI12bw== + dependencies: + color-convert "~0.5.0" + parse-json@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -4623,12 +4620,13 @@ vite@^4.4.9: optionalDependencies: fsevents "~2.3.2" -vitest-canvas-mock@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/vitest-canvas-mock/-/vitest-canvas-mock-0.3.3.tgz#97e3b5f53003c5cbb9540204ff3122cd25be4dcd" - integrity sha512-3P968tYBpqYyzzOaVtqnmYjqbe13576/fkjbDEJSfQAkHtC5/UjuRHOhFEN/ZV5HVZIkaROBUWgazDKJ+Ibw+Q== +vitest-webgl-canvas-mock@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vitest-webgl-canvas-mock/-/vitest-webgl-canvas-mock-1.1.0.tgz#17d79f8b2601e7cd77903c59ed744d4d86324e25" + integrity sha512-F/5+XvBs7cSZPe41IGQTbSjNimB4NntPnRqv4eWb42voFKQINH8y2xZkibNUxYJCGIuDFsYp1lDQgTvWLahSzA== dependencies: - jest-canvas-mock "~2.5.2" + cssfontparser "^1.2.1" + parse-color "^1.0.0" vitest@^0.34.6: version "0.34.6"