We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1ae388 commit d3f1c3fCopy full SHA for d3f1c3f
1 file changed
lib/importer/src/usage.js
@@ -27,6 +27,11 @@ exports.UsageCollection = class {
27
}
28
29
updateDUDKPermission(dudkPermission) {
30
+ if (process.env.NODE_ENV == "test") {
31
+ return
32
+ }
33
+
34
35
const projectDir = path.resolve(projectDirectory() || process.cwd());
36
const usage_config = path.join(projectDir, "usage-data-config.json")
37
@@ -56,6 +61,9 @@ exports.UsageCollection = class {
56
61
recordEvent(eventName) {
57
62
if (!this.enabled) return false;
58
63
64
+ // If we are testing, then pretend this worked without making the request
65
+ if (process.env.NODE_ENV == "test") return true;
66
59
67
// Make the request in a block that will allow us to return
60
68
// immediately whilst the event is recorded
69
(async () => {
0 commit comments