New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stub-azure-function-context

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stub-azure-function-context - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

1

dist/bindings/http-binding.js

@@ -93,2 +93,3 @@ "use strict";

},
...data.params,
};

@@ -95,0 +96,0 @@ }

6

dist/bindings/queue-binding.d.ts

@@ -5,3 +5,3 @@ import { Binding } from '../types';

id: string;
queueTrigger: string;
queueTrigger: string | object;
dequeueCount: number;

@@ -23,3 +23,3 @@ expirationTime: string;

export declare class QueueBinding implements Binding {
static createFromMessageText(queueTrigger: string): QueueBinding;
static createFromMessageText(queueTrigger: string | object): QueueBinding;
static createFromDequeuedMessageItem(messageItem: DequeuedMessageItem): QueueBinding;

@@ -29,3 +29,3 @@ private readonly data;

toContextBinding(): ContextBindings;
toTrigger(): string;
toTrigger(): string | object;
toBindingData(): ContextBindings;

@@ -32,0 +32,0 @@ }

{
"name": "stub-azure-function-context",
"version": "2.1.1",
"version": "2.2.0",
"description": "Provides an object similar to Function Runtime's context for use in unit testing",

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

@@ -61,3 +61,3 @@ # stub-azure-function-context

The `toTrigger()` method returns the object/value that is passed to the Azure Function as the second parameter.
For example, queue triggers are just the message text.
For example, queue triggers are the message text or objects (in servicebus queue).

@@ -166,3 +166,3 @@ The `toContextBinding()` method should return the object shape that is bound to the `bindingData` property of the context

})));
const context = await runStubFunctionFromBindings(functionToTest, [
const context = await functionRunner(functionToTest, [
{ name: 'myInput', direction: 'in', type: 'queueTrigger' }

@@ -174,3 +174,3 @@ ], { myInput: QueueBinding.createFromDequeuedMessageItem(message) });

const messageText = 'my-other-message';
const context = await runStubFunctionFromBindings(functionToTest, [
const context = await functionRunner(functionToTest, [
{ name: 'myInput', direction: 'in', type: 'queueTrigger' }

@@ -177,0 +177,0 @@ ], { myInput: QueueBinding.createFromMessageText('my-other-message') });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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