@sprucelabs/spruce-agent-utils 0.1.1 → 0.2.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.
- package/build/agentAssert.d.ts +1 -0
- package/build/agentAssert.js +10 -0
- package/build/esm/agentAssert.d.ts +1 -0
- package/build/esm/agentAssert.js +10 -0
- package/package.json +1 -1
package/build/agentAssert.d.ts
CHANGED
package/build/agentAssert.js
CHANGED
|
@@ -26,5 +26,15 @@ const agentAssert = {
|
|
|
26
26
|
(0, schema_1.assertOptions)({ text }, ['text']);
|
|
27
27
|
test_utils_1.assert.doesInclude(text, name, `The text must include agent name!`);
|
|
28
28
|
},
|
|
29
|
+
actionCallsSetup: async (action) => {
|
|
30
|
+
SpruceAgent_1.default.reset();
|
|
31
|
+
await action();
|
|
32
|
+
try {
|
|
33
|
+
SpruceAgent_1.default.getInstance();
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
test_utils_1.assert.fail('SpruceAgent.setup was not called during action!');
|
|
37
|
+
}
|
|
38
|
+
},
|
|
29
39
|
};
|
|
30
40
|
exports.default = agentAssert;
|
package/build/esm/agentAssert.js
CHANGED
|
@@ -21,5 +21,15 @@ const agentAssert = {
|
|
|
21
21
|
assertOptions({ text }, ['text']);
|
|
22
22
|
assert.doesInclude(text, name, `The text must include agent name!`);
|
|
23
23
|
},
|
|
24
|
+
actionCallsSetup: async (action) => {
|
|
25
|
+
SpruceAgent.reset();
|
|
26
|
+
await action();
|
|
27
|
+
try {
|
|
28
|
+
SpruceAgent.getInstance();
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
assert.fail('SpruceAgent.setup was not called during action!');
|
|
32
|
+
}
|
|
33
|
+
},
|
|
24
34
|
};
|
|
25
35
|
export default agentAssert;
|