@sap/swa-for-sapbas-vsx
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "@sap/swa-for-sapbas-vsx", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"author": "SAP SE", | ||
@@ -5,0 +5,0 @@ "description": "Javascript module for SWA tracking to be consumed by VsCode extensions", |
@@ -124,4 +124,8 @@ 'use strict'; | ||
_isAnalyticsEnabled() { | ||
// Should consider if this is the correct way or if we can check this without accessing vscode each time | ||
let enabled = require('vscode').workspace.getConfiguration().get(this.vsxPackageName + "." + ANALYTICS_ENABLED_SETTING_NAME); | ||
let enabled = undefined; | ||
try { | ||
enabled = require('vscode').workspace.getConfiguration().get(this.vsxPackageName + "." + ANALYTICS_ENABLED_SETTING_NAME); | ||
} catch { | ||
// Ignore and continue with flow. | ||
} | ||
if (enabled === undefined) { | ||
@@ -128,0 +132,0 @@ if (this._getProcessEnv("SWA_USER_ANON") === "literalFalse") |
const swa = require("../src/index.js"); | ||
const assert = require("assert"); | ||
const swaObj = new swa.SWATracker("testId"); | ||
const swaObj = new swa.SWATracker("testPublisher","testPackageName"); | ||
describe("Check _prepareCustomEvents", () => { | ||
@@ -27,2 +27,5 @@ it("validate custom_params", () => { | ||
}); | ||
it("validate tracking disabled on nodejs run", () => { | ||
return assert(!swaObj._isAnalyticsEnabled(), "Analytics not disabled") | ||
}) | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36462
14
214