pinpoint-bot 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ const test = require("node:test");
2
+ const assert = require("node:assert/strict");
3
+ const path = require("path");
4
+
5
+ function loadSkillsWithEnv(env) {
6
+ const modulePath = path.resolve(__dirname, "..", "src", "skills.js");
7
+ const oldEnv = { ...process.env };
8
+ Object.assign(process.env, env);
9
+ delete require.cache[modulePath];
10
+ const mod = require(modulePath);
11
+ process.env = oldEnv;
12
+ delete require.cache[modulePath];
13
+ return mod;
14
+ }
15
+
16
+ test("skills loader respects explicit PINPOINT_SKILLS_DIR", () => {
17
+ const mod = loadSkillsWithEnv({ PINPOINT_SKILLS_DIR: "/tmp/pinpoint-skills" });
18
+ assert.equal(mod.SKILLS_DIR, "/tmp/pinpoint-skills");
19
+ });
20
+
21
+ test("skills loader respects explicit PINPOINT_USER_DIR", () => {
22
+ const mod = loadSkillsWithEnv({ PINPOINT_USER_DIR: "/tmp/pinpoint-user" });
23
+ assert.equal(mod.USER_DATA_DIR, "/tmp/pinpoint-user");
24
+ });