Skip to content

Azure function(javascript) - read local.settings.json property during testing #471

@jason-mwnz

Description

@jason-mwnz
  • nodejs 14

  • JavaScript

During the development time, i can use "process.env[propertyName]" to access the property value inside the local.settings.json file fine. Then i install Jest framework to do the unit testing, i just realised my function app failed to read any values from local.setting.json, or it actually running different environment during development and unit test(i print out the all the value from process.env object during unit testing and development and compared, they are quite different.)

Q1
How to correct load the local.setting.json during unit testing phrase ?

Cheers

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions