From 2655ca98a1aec6bd88cdc20dd702f29735e0e62f Mon Sep 17 00:00:00 2001 From: nev21 <82737406+nev21@users.noreply.github.com> Date: Sun, 28 Jan 2024 01:58:29 -0800 Subject: [PATCH] [Release3.0] Update Tests to support upcoming change in nevware21/tsutils dumpObj to better support JSON stringify and handle PURE mcomments (#2254) --- .../Tests/Unit/src/AnalyticsPlugin.tests.ts | 6 ++++-- rollup.base.config.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/applicationinsights-analytics-js/Tests/Unit/src/AnalyticsPlugin.tests.ts b/extensions/applicationinsights-analytics-js/Tests/Unit/src/AnalyticsPlugin.tests.ts index d6a96963f..e2042abdb 100644 --- a/extensions/applicationinsights-analytics-js/Tests/Unit/src/AnalyticsPlugin.tests.ts +++ b/extensions/applicationinsights-analytics-js/Tests/Unit/src/AnalyticsPlugin.tests.ts @@ -663,8 +663,10 @@ export class AnalyticsPluginTests extends AITestClass { // Test const dumpExMsg = throwSpy.args[0][3].exception; Assert.ok(dumpExMsg.indexOf("stack: ") != -1); - Assert.ok(dumpExMsg.indexOf(`message: '${unexpectedError.message}'`) !== -1); - Assert.ok(dumpExMsg.indexOf("name: 'Error'") !== -1); + Assert.ok(dumpExMsg.indexOf(`message: \"${unexpectedError.message}\"`) !== -1 || + dumpExMsg.indexOf(`message: '${unexpectedError.message}'`) !== -1); + Assert.ok(dumpExMsg.indexOf("name: \"Error\"") !== -1 || + dumpExMsg.indexOf("name: 'Error'") !== -1); } }); diff --git a/rollup.base.config.js b/rollup.base.config.js index acb599814..0d509ffca 100644 --- a/rollup.base.config.js +++ b/rollup.base.config.js @@ -19,7 +19,8 @@ function doCleanup() { comments: [ 'some', /^.\s*@DynamicProtoStub/i, - /^\*\*\s*@class\s*$/ + /^\*\*\s*@class\s*$/, + /[#@]__/ ] }) }