I'm not sure if this is expected behavior and if I can fully rely on this however. I have one Azure Function, containing multiple Javascript functions.
And it appears that I'm able to call these Javascript functions from other Azure functions. Is this expected, and can I depend on this?
I'll illustrate this with an example below
// Azure Function 1 :
testFunctionA = () => {
console.log("This is the 1st function in another azure function");
};
testFunctionB = () => {
console.log("This is the 2nd function in another azure function");
};
testFunctionC = () => {
console.log("This is the 3d function in another azure function");
};
module.exports = {
testFunctionA
};
// Azure function 2:
module.exports = async function (context, req) {
context.log("JavaScript HTTP trigger function processed a request.");
testFunctionA();
testFunctionB();
testFunctionC();
};
When invoking the HTTP Trigger Azure Function 2 the output is as following Eventhough both functions are seperate Azure functions:
This is the 1st function in another azure function
index.js:6
This is the 2nd function in another azure function
index.js:10
This is the 3d function in another azure function