Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: move reporters off mocha (#3577)
Pavel Feldmane5dae0daf73c
diff --git a/package-lock.json b/package-lock.jsonindex cc818e8de7..f5d66d291b 100644--- a/package-lock.json+++ b/package-lock.json@@ -1624,12 +1624,6 @@"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==","dev": true},- "ansi-colors": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",- "dev": true- },"ansi-escapes": {"version": "4.3.1","resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",@@ -1667,6 +1661,7 @@"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz","integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==","dev": true,+ "optional": true,"requires": {"normalize-path": "^3.0.0","picomatch": "^2.0.4"@@ -1725,18 +1720,6 @@"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=","dev": true},- "array.prototype.map": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz",- "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==",- "dev": true,- "requires": {- "define-properties": "^1.1.3",- "es-abstract": "^1.17.0-next.1",- "es-array-method-boxes-properly": "^1.0.0",- "is-string": "^1.0.4"- }- },"asn1": {"version": "0.2.4","resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",@@ -1947,7 +1930,8 @@"version": "2.1.0","resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz","integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",- "dev": true+ "dev": true,+ "optional": true},"bindings": {"version": "1.5.0",@@ -2002,12 +1986,6 @@"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=","dev": true},- "browser-stdout": {- "version": "1.3.1",- "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",- "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",- "dev": true- },"browserify-aes": {"version": "1.2.0","resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",@@ -2275,22 +2253,6 @@"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==","dev": true},- "chokidar": {- "version": "3.3.1",- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz",- "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==",- "dev": true,- "requires": {- "anymatch": "~3.1.1",- "braces": "~3.0.2",- "fsevents": "~2.1.2",- "glob-parent": "~5.1.0",- "is-binary-path": "~2.1.0",- "is-glob": "~4.0.1",- "normalize-path": "~3.0.0",- "readdirp": "~3.3.0"- }- },"chownr": {"version": "1.1.4","resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",@@ -2835,12 +2797,6 @@"dev": true,"optional": true},- "diff": {- "version": "4.0.2",- "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",- "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",- "dev": true- },"diff-sequences": {"version": "26.3.0","resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.3.0.tgz",@@ -3052,65 +3008,6 @@"prr": "~1.0.1"}},- "es-abstract": {- "version": "1.17.6",- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz",- "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==",- "dev": true,- "requires": {- "es-to-primitive": "^1.2.1",- "function-bind": "^1.1.1",- "has": "^1.0.3",- "has-symbols": "^1.0.1",- "is-callable": "^1.2.0",- "is-regex": "^1.1.0",- "object-inspect": "^1.7.0",- "object-keys": "^1.1.1",- "object.assign": "^4.1.0",- "string.prototype.trimend": "^1.0.1",- "string.prototype.trimstart": "^1.0.1"- }- },- "es-array-method-boxes-properly": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",- "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",- "dev": true- },- "es-get-iterator": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz",- "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==",- "dev": true,- "requires": {- "es-abstract": "^1.17.4",- "has-symbols": "^1.0.1",- "is-arguments": "^1.0.4",- "is-map": "^2.0.1",- "is-set": "^2.0.1",- "is-string": "^1.0.5",- "isarray": "^2.0.5"- },- "dependencies": {- "isarray": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",- "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",- "dev": true- }- }- },- "es-to-primitive": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",- "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",- "dev": true,- "requires": {- "is-callable": "^1.1.4",- "is-date-object": "^1.0.1",- "is-symbol": "^1.0.2"- }- },"es6-error": {"version": "4.1.1","resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",@@ -3680,16 +3577,6 @@"integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==","dev": true},- "find-up": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",- "dev": true,- "requires": {- "locate-path": "^5.0.0",- "path-exists": "^4.0.0"- }- },"findup-sync": {"version": "3.0.0","resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",@@ -3813,15 +3700,6 @@}}},- "flat": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",- "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",- "dev": true,- "requires": {- "is-buffer": "~2.0.3"- }- },"flat-cache": {"version": "2.0.1","resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",@@ -4159,12 +4037,6 @@"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==","dev": true},- "growl": {- "version": "1.10.5",- "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",- "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",- "dev": true- },"har-schema": {"version": "2.0.0","resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",@@ -4181,15 +4053,6 @@"har-schema": "^2.0.0"}},- "has": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",- "dev": true,- "requires": {- "function-bind": "^1.1.1"- }- },"has-flag": {"version": "3.0.0","resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",@@ -4300,12 +4163,6 @@"minimalistic-assert": "^1.0.1"}},- "he": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",- "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",- "dev": true- },"hmac-drbg": {"version": "1.0.1","resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",@@ -4570,33 +4427,16 @@}}},- "is-arguments": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz",- "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==",- "dev": true- },"is-binary-path": {"version": "2.1.0","resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz","integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==","dev": true,+ "optional": true,"requires": {"binary-extensions": "^2.0.0"}},- "is-buffer": {- "version": "2.0.4",- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",- "dev": true- },- "is-callable": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz",- "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==",- "dev": true- },"is-data-descriptor": {"version": "0.1.4","resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",@@ -4623,12 +4463,6 @@}}},- "is-date-object": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",- "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",- "dev": true- },"is-descriptor": {"version": "0.1.6","resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",@@ -4675,24 +4509,12 @@"is-extglob": "^2.1.1"}},- "is-map": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz",- "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==",- "dev": true- },"is-number": {"version": "7.0.0","resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz","integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==","dev": true},- "is-plain-obj": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",- "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",- "dev": true- },"is-plain-object": {"version": "2.0.4","resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",@@ -4702,36 +4524,6 @@"isobject": "^3.0.1"}},- "is-regex": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",- "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",- "dev": true,- "requires": {- "has-symbols": "^1.0.1"- }- },- "is-set": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz",- "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==",- "dev": true- },- "is-string": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",- "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",- "dev": true- },- "is-symbol": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",- "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",- "dev": true,- "requires": {- "has-symbols": "^1.0.1"- }- },"is-typedarray": {"version": "1.0.0","resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",@@ -4774,22 +4566,6 @@"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=","dev": true},- "iterate-iterator": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz",- "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==",- "dev": true- },- "iterate-value": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz",- "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==",- "dev": true,- "requires": {- "es-get-iterator": "^1.0.2",- "iterate-iterator": "^1.0.1"- }- },"jest-diff": {"version": "26.3.0","resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.3.0.tgz",@@ -5165,30 +4941,12 @@}}},- "locate-path": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",- "dev": true,- "requires": {- "p-locate": "^4.1.0"- }- },"lodash": {"version": "4.17.19","resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz","integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==","dev": true},- "log-symbols": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",- "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",- "dev": true,- "requires": {- "chalk": "^2.4.2"- }- },"loose-envify": {"version": "1.4.0","resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",@@ -5438,90 +5196,6 @@"minimist": "^1.2.5"}},- "mocha": {- "version": "8.1.1",- "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.1.tgz",- "integrity": "sha512-p7FuGlYH8t7gaiodlFreseLxEmxTgvyG9RgPHODFPySNhwUehu8NIb0vdSt3WFckSneswZ0Un5typYcWElk7HQ==",- "dev": true,- "requires": {- "ansi-colors": "4.1.1",- "browser-stdout": "1.3.1",- "chokidar": "3.3.1",- "debug": "3.2.6",- "diff": "4.0.2",- "escape-string-regexp": "1.0.5",- "find-up": "4.1.0",- "glob": "7.1.6",- "growl": "1.10.5",- "he": "1.2.0",- "js-yaml": "3.13.1",- "log-symbols": "3.0.0",- "minimatch": "3.0.4",- "ms": "2.1.2",- "object.assign": "4.1.0",- "promise.allsettled": "1.0.2",- "serialize-javascript": "4.0.0",- "strip-json-comments": "3.0.1",- "supports-color": "7.1.0",- "which": "2.0.2",- "wide-align": "1.1.3",- "workerpool": "6.0.0",- "yargs": "13.3.2",- "yargs-parser": "13.1.2",- "yargs-unparser": "1.6.1"- },- "dependencies": {- "debug": {- "version": "3.2.6",- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",- "dev": true,- "requires": {- "ms": "^2.1.1"- }- },- "has-flag": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",- "dev": true- },- "js-yaml": {- "version": "3.13.1",- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",- "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",- "dev": true,- "requires": {- "argparse": "^1.0.7",- "esprima": "^4.0.0"- }- },- "strip-json-comments": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",- "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",- "dev": true- },- "supports-color": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",- "dev": true,- "requires": {- "has-flag": "^4.0.0"- }- },- "which": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",- "dev": true,- "requires": {- "isexe": "^2.0.0"- }- }- }- },"move-concurrently": {"version": "1.0.1","resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",@@ -5679,7 +5353,8 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz","integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",- "dev": true+ "dev": true,+ "optional": true},"normalize-url": {"version": "4.5.0",@@ -5747,12 +5422,6 @@}}},- "object-inspect": {- "version": "1.8.0",- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz",- "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==",- "dev": true- },"object-keys": {"version": "1.1.1","resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",@@ -5853,15 +5522,6 @@"p-try": "^2.0.0"}},- "p-locate": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",- "dev": true,- "requires": {- "p-limit": "^2.2.0"- }- },"p-try": {"version": "2.2.0","resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",@@ -5932,12 +5592,6 @@"dev": true,"optional": true},- "path-exists": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",- "dev": true- },"path-is-absolute": {"version": "1.0.1","resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",@@ -6310,19 +5964,6 @@"integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=","dev": true},- "promise.allsettled": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz",- "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==",- "dev": true,- "requires": {- "array.prototype.map": "^1.0.1",- "define-properties": "^1.1.3",- "es-abstract": "^1.17.0-next.1",- "function-bind": "^1.1.1",- "iterate-value": "^1.0.0"- }- },"proto-list": {"version": "1.2.4","resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",@@ -6465,15 +6106,6 @@"util-deprecate": "~1.0.1"}},- "readdirp": {- "version": "3.3.0",- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",- "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",- "dev": true,- "requires": {- "picomatch": "^2.0.7"- }- },"regenerate": {"version": "1.4.1","resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz",@@ -6844,15 +6476,6 @@"type-fest": "^0.13.1"}},- "serialize-javascript": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",- "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",- "dev": true,- "requires": {- "randombytes": "^2.1.0"- }- },"set-blocking": {"version": "2.0.0","resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",@@ -7311,26 +6934,6 @@"integrity": "sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8=","dev": true},- "string.prototype.trimend": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",- "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",- "dev": true,- "requires": {- "define-properties": "^1.1.3",- "es-abstract": "^1.17.5"- }- },- "string.prototype.trimstart": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",- "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",- "dev": true,- "requires": {- "define-properties": "^1.1.3",- "es-abstract": "^1.17.5"- }- },"string_decoder": {"version": "1.1.1","resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",@@ -8491,48 +8094,6 @@"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=","dev": true},- "wide-align": {- "version": "1.1.3",- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",- "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",- "dev": true,- "requires": {- "string-width": "^1.0.2 || 2"- },- "dependencies": {- "ansi-regex": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",- "dev": true- },- "is-fullwidth-code-point": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",- "dev": true- },- "string-width": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",- "dev": true,- "requires": {- "is-fullwidth-code-point": "^2.0.0",- "strip-ansi": "^4.0.0"- }- },- "strip-ansi": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",- "dev": true,- "requires": {- "ansi-regex": "^3.0.0"- }- }- }- },"winston": {"version": "0.8.3","resolved": "https://registry.npmjs.org/winston/-/winston-0.8.3.tgz",@@ -8571,12 +8132,6 @@"errno": "~0.1.7"}},- "workerpool": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz",- "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==",- "dev": true- },"wrap-ansi": {"version": "5.1.0","resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",@@ -8746,107 +8301,6 @@"decamelize": "^1.2.0"}},- "yargs-unparser": {- "version": "1.6.1",- "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz",- "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==",- "dev": true,- "requires": {- "camelcase": "^5.3.1",- "decamelize": "^1.2.0",- "flat": "^4.1.0",- "is-plain-obj": "^1.1.0",- "yargs": "^14.2.3"- },- "dependencies": {- "emoji-regex": {- "version": "7.0.3",- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",- "dev": true- },- "find-up": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",- "dev": true,- "requires": {- "locate-path": "^3.0.0"- }- },- "is-fullwidth-code-point": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",- "dev": true- },- "locate-path": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",- "dev": true,- "requires": {- "p-locate": "^3.0.0",- "path-exists": "^3.0.0"- }- },- "p-locate": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",- "dev": true,- "requires": {- "p-limit": "^2.0.0"- }- },- "path-exists": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",- "dev": true- },- "string-width": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",- "dev": true,- "requires": {- "emoji-regex": "^7.0.1",- "is-fullwidth-code-point": "^2.0.0",- "strip-ansi": "^5.1.0"- }- },- "yargs": {- "version": "14.2.3",- "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz",- "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==",- "dev": true,- "requires": {- "cliui": "^5.0.0",- "decamelize": "^1.2.0",- "find-up": "^3.0.0",- "get-caller-file": "^2.0.1",- "require-directory": "^2.1.1",- "require-main-filename": "^2.0.0",- "set-blocking": "^2.0.0",- "string-width": "^3.0.0",- "which-module": "^2.0.0",- "y18n": "^4.0.0",- "yargs-parser": "^15.0.1"- }- },- "yargs-parser": {- "version": "15.0.1",- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",- "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",- "dev": true,- "requires": {- "camelcase": "^5.0.0",- "decamelize": "^1.2.0"- }- }- }- },"yauzl": {"version": "2.10.0","resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",diff --git a/package.json b/package.jsonindex 99d7cd5ade..8efd3cd2e2 100644--- a/package.json+++ b/package.json@@ -77,7 +77,6 @@"esprima": "^4.0.0","expect": "^26.3.0","formidable": "^1.2.1",- "mocha": "^8.1.1","ncp": "^2.0.0","node-stream-zip": "^1.8.2","pirates": "^4.0.1",diff --git a/test-runner/src/cli.ts b/test-runner/src/cli.tsindex 23f9a3440e..18d429d754 100644--- a/test-runner/src/cli.ts+++ b/test-runner/src/cli.ts@@ -91,7 +91,6 @@ programjobs,outputDir: command.output,reporter: command.reporter,- retries: command.retries,snapshotDir: path.join(testDir, '__snapshots__'),testDir,timeout: command.timeout,diff --git a/test-runner/src/dotReporter.js b/test-runner/src/dotReporter.jsdeleted file mode 100644index 80a7b7eeb3..0000000000--- a/test-runner/src/dotReporter.js+++ /dev/null@@ -1,125 +0,0 @@-/**- * Copyright (c) Microsoft Corporation.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--const Base = require('mocha/lib/reporters/base');-const constants = require('mocha/lib/runner').constants;-const colors = require('colors/safe');-const milliseconds = require('ms');-const { codeFrameColumns } = require('@babel/code-frame');-const path = require('path');-const fs = require('fs');-const os = require('os');-const terminalLink = require('terminal-link');-const StackUtils = require('stack-utils');-const stackUtils = new StackUtils();-class DotReporter extends Base {- constructor(runner, options) {- super(runner, options);-- process.on('SIGINT', async () => {- this.epilogue();- process.exit(130);- });-- runner.on(constants.EVENT_TEST_PENDING, test => {- process.stdout.write(colors.yellow('∘'))- });-- runner.on(constants.EVENT_TEST_PASS, () => {- process.stdout.write(colors.green('\u00B7'));- });-- runner.on(constants.EVENT_TEST_FAIL, test => {- if (test.duration >= test.timeout)- process.stdout.write(colors.red('T'));- else- process.stdout.write(colors.red('F'));- });-- runner.once(constants.EVENT_RUN_END, () => {- process.stdout.write('\n');- this.epilogue();- });- }-- epilogue() {- console.log('');-- console.log(colors.green(` ${this.stats.passes || 0} passing`) + colors.dim(` (${milliseconds(this.stats.duration)})`));-- if (this.stats.pending)- console.log(colors.yellow(` ${this.stats.pending} skipped`));-- if (this.stats.failures) {- console.log(colors.red(` ${this.stats.failures} failing`));- console.log('');- this.failures.forEach((failure, index) => {- const relativePath = path.relative(process.cwd(), failure.file);- const header = ` ${index +1}. ${terminalLink(relativePath, `file://${os.hostname()}${failure.file}`)} › ${failure.title}`;- console.log(colors.bold(colors.red(header)));- const stack = failure.err.stack;- if (stack) {- console.log('');- const messageLocation = failure.err.stack.indexOf(failure.err.message);- const preamble = failure.err.stack.substring(0, messageLocation + failure.err.message.length);- console.log(indent(preamble, ' '));- const position = positionInFile(stack, failure.file);- if (position) {- const source = fs.readFileSync(failure.file, 'utf8');- console.log('');- console.log(indent(codeFrameColumns(source, {- start: position,- },- { highlightCode: true}- ), ' '));- }- console.log('');- console.log(indent(colors.dim(stack.substring(preamble.length + 1)), ' '));- } else {- console.log('');- console.log(indent(String(failure.err), ' '));- }- console.log('');- });- }- }-}--/**- * @param {string} lines- * @param {string} tab- */-function indent(lines, tab) {- return lines.replace(/^/gm, tab);-}--/**- * @param {string} stack- * @param {string} file- * @return {{column: number, line: number}}- */-function positionInFile(stack, file) {- for (const line of stack.split('\n')) {- const parsed = stackUtils.parseLine(line);- if (!parsed)- continue;- if (path.resolve(process.cwd(), parsed.file) === file)- return {column: parsed.column, line: parsed.line};- }- return null;-}--module.exports = DotReporter;diff --git a/test-runner/src/reporters.ts b/test-runner/src/reporters.tsnew file mode 100644index 0000000000..5bf256701d--- /dev/null+++ b/test-runner/src/reporters.ts@@ -0,0 +1,183 @@+/**+ * Copyright (c) Microsoft Corporation.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++import colors from 'colors/safe';+import milliseconds from 'ms';+import { codeFrameColumns } from '@babel/code-frame';+import path from 'path';+import fs from 'fs';+import os from 'os';+import terminalLink from 'terminal-link';+import StackUtils from 'stack-utils';+import { Test } from './test';+import { EventEmitter } from 'ws';++const stackUtils = new StackUtils();++class BaseReporter {+ pending: Test[] = [];+ passes: Test[] = [];+ failures: Test[] = [];+ duration = 0;+ startTime: number;++ constructor(runner: EventEmitter) {+ process.on('SIGINT', async () => {+ this.epilogue();+ process.exit(130);+ });++ runner.on('pending', (test: Test) => {+ this.pending.push(test);+ });++ runner.on('pass', (test: Test) => {+ this.passes.push(test);+ });++ runner.on('fail', (test: Test) => {+ this.failures.push(test);+ });++ runner.once('begin', () => {+ this.startTime = Date.now();+ });++ runner.once('end', () => {+ this.duration = Date.now() - this.startTime;+ });+ }++ epilogue() {+ console.log('');++ console.log(colors.green(` ${this.passes.length} passing`) + colors.dim(` (${milliseconds(this.duration)})`));++ if (this.pending.length)+ console.log(colors.yellow(` ${this.pending.length} skipped`));++ if (this.failures.length) {+ console.log(colors.red(` ${this.failures.length} failing`));+ console.log('');+ this.failures.forEach((failure, index) => {+ const relativePath = path.relative(process.cwd(), failure.file);+ const header = ` ${index +1}. ${terminalLink(relativePath, `file://${os.hostname()}${failure.file}`)} › ${failure.title}`;+ console.log(colors.bold(colors.red(header)));+ const stack = failure.error.stack;+ if (stack) {+ console.log('');+ const messageLocation = failure.error.stack.indexOf(failure.error.message);+ const preamble = failure.error.stack.substring(0, messageLocation + failure.error.message.length);+ console.log(indent(preamble, ' '));+ const position = positionInFile(stack, failure.file);+ if (position) {+ const source = fs.readFileSync(failure.file, 'utf8');+ console.log('');+ console.log(indent(codeFrameColumns(source, {+ start: position,+ },+ { highlightCode: true}+ ), ' '));+ }+ console.log('');+ console.log(indent(colors.dim(stack.substring(preamble.length + 1)), ' '));+ } else {+ console.log('');+ console.log(indent(String(failure.error), ' '));+ }+ console.log('');+ });+ }+ }+}++export class DotReporter extends BaseReporter {+ constructor(runner: EventEmitter) {+ super(runner);++ runner.on('pending', () => {+ process.stdout.write(colors.yellow('∘'))+ });++ runner.on('pass', () => {+ process.stdout.write(colors.green('\u00B7'));+ });++ runner.on('fail', (test: Test) => {+ if (test.duration >= test.timeout)+ process.stdout.write(colors.red('T'));+ else+ process.stdout.write(colors.red('F'));+ });++ runner.once('end', () => {+ process.stdout.write('\n');+ this.epilogue();+ });+ }+}++export class ListReporter extends BaseReporter {+ constructor(runner: EventEmitter) {+ super(runner);++ runner.on('begin', () => {+ console.log();+ });++ runner.on('test', test => {+ process.stdout.write(' ' + colors.gray(test.fullTitle() + ': '));+ });++ runner.on('pending', test => {+ process.stdout.write(colors.green(' - ') + colors.cyan(test.fullTitle()));+ process.stdout.write('\n');+ });++ runner.on('pass', test => {+ process.stdout.write('\u001b[2K\u001b[0G');+ process.stdout.write(colors.green(' ✓ ') + colors.gray(test.fullTitle()));+ process.stdout.write('\n');+ });++ let failure = 0;+ runner.on('fail', (test: Test) => {+ process.stdout.write('\u001b[2K\u001b[0G');+ process.stdout.write(colors.red(` ${++failure}) ` + test.fullTitle()));+ process.stdout.write('\n');+ });++ runner.once('end', () => {+ process.stdout.write('\n');+ this.epilogue();+ });+ }+}++function indent(lines: string, tab: string) {+ return lines.replace(/^/gm, tab);+}++function positionInFile(stack: string, file: string): { column: number; line: number; } {+ for (const line of stack.split('\n')) {+ const parsed = stackUtils.parseLine(line);+ if (!parsed)+ continue;+ if (path.resolve(process.cwd(), parsed.file) === file)+ return {column: parsed.column, line: parsed.line};+ }+ return null;+}diff --git a/test-runner/src/runner.js b/test-runner/src/runner.tssimilarity index 81%rename from test-runner/src/runner.jsrename to test-runner/src/runner.tsindex 925fae8bdd..e38ea1bbe2 100644--- a/test-runner/src/runner.js+++ b/test-runner/src/runner.ts@@ -14,23 +14,44 @@* limitations under the License.*/-const child_process = require('child_process');-const crypto = require('crypto');-const path = require('path');-const { EventEmitter } = require('events');-const builtinReporters = require('mocha/lib/reporters');-const DotRunner = require('./dotReporter');-const { lookupRegistrations } = require('./fixtures');--class Runner extends EventEmitter {- constructor(suite, total, options) {+import child_process from 'child_process';+import crypto from 'crypto';+import path from 'path';+import { EventEmitter } from 'events';+import { DotReporter, ListReporter} from './reporters';+import { lookupRegistrations, FixturePool } from './fixtures';+import { Suite } from './test';+import { TestRunnerEntry } from './testRunner';++type RunnerOptions = {+ jobs: number;+ reporter: any;+ outputDir: string;+ snapshotDir: string;+ testDir: string;+ timeout: number;+ debug?: boolean;+ quiet?: boolean;+ grep?: string;+ trialRun?: boolean;+ updateSnapshots?: boolean;+};++export class Runner extends EventEmitter {+ readonly _options: RunnerOptions;+ private _workers =new Set<Worker>();+ private _freeWorkers: Worker[] = [];+ private _workerClaimers: (() => void)[] = [];+ stats: { duration: number; failures: number; passes: number; pending: number; tests: number; };++ private _testById = new Map<any, any>();+ private _testsByConfiguredFile = new Map<any, any>();+ private _queue: TestRunnerEntry[] = [];+ private _stopCallback: () => void;++ constructor(suite: Suite, total: number, options: RunnerOptions) {super();- this._suite = suite;this._options = options;- this._workers = new Set();- this._freeWorkers = [];- this._workerClaimers = [];- this._lastWorkerId = 0;this.stats = {duration: 0,failures: 0,@@ -38,8 +59,8 @@ class Runner extends EventEmitter {pending: 0,tests: 0,};- const reporterFactory = builtinReporters[options.reporter] || DotRunner;- this._reporter = new reporterFactory(this, {});+ const reporterFactory = options.reporter === 'list' ? ListReporter : DotReporter;+ new reporterFactory(this);this._testById = new Map();this._testsByConfiguredFile = new Map();@@ -76,7 +97,7 @@ class Runner extends EventEmitter {}async run() {- this.emit('start', {});+ this.emit('begin', {});this._queue = this._filesSortedByWorkerHash();// Loop in case job schedules more jobswhile (this._queue.length)@@ -157,11 +178,11 @@ class Runner extends EventEmitter {++this.stats.failures;const out = worker.takeOut();if (out.length)- params.error.stack += '\n\x1b[33mstdout: ' + out.join('\n') + '\x1b[0m';+ params.test.error.stack += '\n\x1b[33mstdout: ' + out.join('\n') + '\x1b[0m';const err = worker.takeErr();if (err.length)- params.error.stack += '\n\x1b[33mstderr: ' + err.join('\n') + '\x1b[0m';- this.emit('fail', this._updateTest(params.test), params.error);+ params.test.error.stack += '\n\x1b[33mstderr: ' + err.join('\n') + '\x1b[0m';+ this.emit('fail', this._updateTest(params.test));});worker.on('exit', () => {this._workers.delete(worker);@@ -180,6 +201,7 @@ class Runner extends EventEmitter {_updateTest(serialized) {const test = this._testById.get(serialized.id);test.duration = serialized.duration;+ test.error = serialized.error;return test;}@@ -193,10 +215,25 @@ class Runner extends EventEmitter {let lastWorkerId = 0;-class OopWorker extends EventEmitter {+class Worker extends EventEmitter {+ runner: any;+ hash: string;+constructor(runner) {super();this.runner = runner;+ }++ stop() {+ }+}++class OopWorker extends Worker {+ process: child_process.ChildProcess;+ stdout: any[];+ stderr: any[];+ constructor(runner: Runner) {+ super(runner);this.process = child_process.fork(path.join(__dirname, 'worker.js'), {detached: false,@@ -256,10 +293,11 @@ class OopWorker extends EventEmitter {}}-class InProcessWorker extends EventEmitter {- constructor(runner) {- super();- this.runner = runner;+class InProcessWorker extends Worker {+ fixturePool: FixturePool;++ constructor(runner: Runner) {+ super(runner);this.fixturePool = require('./testRunner').fixturePool;}diff --git a/test-runner/src/test.ts b/test-runner/src/test.tsindex 7cc972268f..9999724053 100644--- a/test-runner/src/test.ts+++ b/test-runner/src/test.ts@@ -25,6 +25,7 @@ export class Test {duration = 0;timeout = 0;fn: Function;+ error: any;_ordinal: number;_configurationObject: Configuration;@@ -80,7 +81,7 @@ export class Suite {titlePath(): string[] {if (!this.parent)- return [this.title];+ return [];return [...this.parent.titlePath(), this.title];}diff --git a/test-runner/src/testRunner.ts b/test-runner/src/testRunner.tsindex 8244dfbce3..1dd21bdd7e 100644--- a/test-runner/src/testRunner.ts+++ b/test-runner/src/testRunner.ts@@ -28,12 +28,13 @@ export type TestRunnerEntry = {ordinals: number[];configuredFile: string;configurationObject: any;+ hash: string;};export class TestRunner extends EventEmitter {private _currentOrdinal = -1;- private _failedWithError: Error | undefined;- private _fatalError: Error | undefined;+ private _failedWithError: any | undefined;+ private _fatalError: any | undefined;private _file: any;private _ordinals: Set<number>;private _remaining: Set<number>;@@ -87,7 +88,7 @@ export class TestRunner extends EventEmitter {try {await this._runHooks(suite, 'beforeAll', 'before');} catch (e) {- this._fatalError = e;+ this._fatalError = serializeError(e);this._reportDone();}for (const entry of suite._entries) {@@ -100,7 +101,7 @@ export class TestRunner extends EventEmitter {try {await this._runHooks(suite, 'afterAll', 'after');} catch (e) {- this._fatalError = e;+ this._fatalError = serializeError(e);this._reportDone();}}@@ -126,10 +127,10 @@ export class TestRunner extends EventEmitter {this.emit('pass', { test: this._serializeTest(test) });await this._runHooks(test.suite, 'afterEach', 'after');} catch (error) {- this._failedWithError = error;+ test.error = serializeError(error);+ this._failedWithError = test.error;this.emit('fail', {test: this._serializeTest(test),- error: serializeError(error),});}}@@ -167,12 +168,13 @@ export class TestRunner extends EventEmitter {private _serializeTest(test) {return {id: `${test._ordinal}@${this._configuredFile}`,+ error: test.error,duration: Date.now() - test._startTime,};}}-function trimCycles(obj) {+function trimCycles(obj: any): any {const cache = new Set();return JSON.parse(JSON.stringify(obj, function(key, value) {@@ -186,7 +188,7 @@ function trimCycles(obj) {);}-function serializeError(error) {+function serializeError(error: Error): any {if (error instanceof Error) {return {message: error.message,