Socket
Socket
Sign inDemoInstall

darvin-testing-framework

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

darvin-testing-framework - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

18

index.js

@@ -10,3 +10,5 @@ 'use strict';

constructor(config) {
config = config || { apiUrl: 'https://api.darvin.ai/' };
config = config || {
apiUrl: 'https://api.darvin.ai/'
};
this._apiUrl = config.apiUrl;

@@ -40,3 +42,5 @@ }

if (spec.dynamic && typeof spec.dynamic === 'function') {
const sender = { id: 'tempuser-' + uuid() };
const sender = {
id: 'tempuser-' + uuid()
};
const context = {

@@ -81,3 +85,5 @@ send: message => this._send(spec, sender, message)

_executeStep(spec, scenario, step, sender) {
const message = Object.assign({}, step.user, { mocks: Object.assign({}, scenario.mocks, step.mocks) });
const message = Object.assign({}, step.user, {
mocks: Object.assign({}, scenario.mocks, step.mocks)
});
return this._send(spec, sender, message)

@@ -115,2 +121,8 @@ .then(response => this._verifyStep(step, response));

if (step.bot) {
let index = response.findIndex(m => m.type === 'event');
while (index >= 0) {
response.splice(index, 1);
index = response.findIndex(m => m.type === 'event');
}
expect(step.bot.map(JSON.stringify)).toContain(JSON.stringify(response));

@@ -117,0 +129,0 @@ }

2

package.json
{
"name": "darvin-testing-framework",
"version": "1.2.0",
"version": "1.3.0",
"description": "A framework for testing Darvin.ai bots.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc