Last active
February 4, 2021 17:41
-
-
Save alvinslee/acdfacb5a51ee9a07bd7b00b3f9ddd06 to your computer and use it in GitHub Desktop.
A module for preparing test data - loading result object via a for loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const KEYS = [ | |
'userData', | |
'deviceTypes', | |
'nutritionPlans', | |
'exerciseRoutine', | |
'goals', | |
'miniChallenges', | |
'rewards' | |
] | |
const result = {} | |
for (const key of KEYS) { | |
result[key] = require(`./testData/${key}.json`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment