From 717915304a8e97738f48ad6878bbde55546c3420 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 16:09:30 -0800 Subject: [PATCH 1/4] test: modernize mocha config --- .mocharc.json | 5 +++++ package.json | 4 +--- typescript/test/mocha.opts | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .mocharc.json diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/package.json b/package.json index e6bc7f106..a0642ec9c 100644 --- a/package.json +++ b/package.json @@ -61,11 +61,9 @@ "codecov": "^3.6.1", "espower-typescript": "^9.0.0", "gts": "^1.0.0", - "intelli-espower-loader": "^1.0.1", "mocha": "^7.0.0", "ncp": "^2.0.0", - "power-assert": "^1.6.0", - "rimraf": "^3.0.0", + "rimraf": "^3.0.0", "typescript": "~3.7.0" }, "engines": { diff --git a/typescript/test/mocha.opts b/typescript/test/mocha.opts index d9499021d..124f8f1d6 100644 --- a/typescript/test/mocha.opts +++ b/typescript/test/mocha.opts @@ -1,4 +1,3 @@ ---require intelli-espower-loader --timeout 10000 ---require source-map-support/register +--enable-source-maps --throw-deprecation From bdd2e9ec5008e5c7d0454da0d4ad04170a998f16 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 17:48:29 -0800 Subject: [PATCH 2/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a0642ec9c..e8959448c 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "gts": "^1.0.0", "mocha": "^7.0.0", "ncp": "^2.0.0", - "rimraf": "^3.0.0", + "rimraf": "^3.0.0", "typescript": "~3.7.0" }, "engines": { From b172b41b8aaa5a602776270846d60f558cffcb73 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 19:09:47 -0800 Subject: [PATCH 3/4] addy --- templates/typescript_gapic/.mocharc.json.njk | 5 +++++ typescript/test/mocha.opts | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 templates/typescript_gapic/.mocharc.json.njk delete mode 100644 typescript/test/mocha.opts diff --git a/templates/typescript_gapic/.mocharc.json.njk b/templates/typescript_gapic/.mocharc.json.njk new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/templates/typescript_gapic/.mocharc.json.njk @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/typescript/test/mocha.opts b/typescript/test/mocha.opts deleted file mode 100644 index 124f8f1d6..000000000 --- a/typescript/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---timeout 10000 ---enable-source-maps ---throw-deprecation From 804f5ca42cd7e44f8b85870dbfbff8b6129c48fd Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 3 Feb 2020 12:22:12 -0800 Subject: [PATCH 4/4] test: updated baselines --- typescript/test/testdata/dlp/.mocharc.json.baseline | 5 +++++ typescript/test/testdata/keymanager/.mocharc.json.baseline | 5 +++++ typescript/test/testdata/redis/.mocharc.json.baseline | 5 +++++ typescript/test/testdata/showcase/.mocharc.json.baseline | 5 +++++ typescript/test/testdata/texttospeech/.mocharc.json.baseline | 5 +++++ typescript/test/testdata/translate/.mocharc.json.baseline | 5 +++++ 6 files changed, 30 insertions(+) create mode 100644 typescript/test/testdata/dlp/.mocharc.json.baseline create mode 100644 typescript/test/testdata/keymanager/.mocharc.json.baseline create mode 100644 typescript/test/testdata/redis/.mocharc.json.baseline create mode 100644 typescript/test/testdata/showcase/.mocharc.json.baseline create mode 100644 typescript/test/testdata/texttospeech/.mocharc.json.baseline create mode 100644 typescript/test/testdata/translate/.mocharc.json.baseline diff --git a/typescript/test/testdata/dlp/.mocharc.json.baseline b/typescript/test/testdata/dlp/.mocharc.json.baseline new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/typescript/test/testdata/dlp/.mocharc.json.baseline @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/typescript/test/testdata/keymanager/.mocharc.json.baseline b/typescript/test/testdata/keymanager/.mocharc.json.baseline new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/typescript/test/testdata/keymanager/.mocharc.json.baseline @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/typescript/test/testdata/redis/.mocharc.json.baseline b/typescript/test/testdata/redis/.mocharc.json.baseline new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/typescript/test/testdata/redis/.mocharc.json.baseline @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/typescript/test/testdata/showcase/.mocharc.json.baseline b/typescript/test/testdata/showcase/.mocharc.json.baseline new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/typescript/test/testdata/showcase/.mocharc.json.baseline @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/typescript/test/testdata/texttospeech/.mocharc.json.baseline b/typescript/test/testdata/texttospeech/.mocharc.json.baseline new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/typescript/test/testdata/texttospeech/.mocharc.json.baseline @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/typescript/test/testdata/translate/.mocharc.json.baseline b/typescript/test/testdata/translate/.mocharc.json.baseline new file mode 100644 index 000000000..670c5e2c2 --- /dev/null +++ b/typescript/test/testdata/translate/.mocharc.json.baseline @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +}