Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non json, customized response #94

Open
E-Fil opened this issue Sep 18, 2020 · 1 comment
Open

non json, customized response #94

E-Fil opened this issue Sep 18, 2020 · 1 comment

Comments

@E-Fil
Copy link

E-Fil commented Sep 18, 2020

I have the need to mock some xml responses, but make some changes to the content on the fly.
I can easily have the .mock file import a .js file that will, in turn, load and modify the xml.
the thing is, the importHandler.js file clearly states that

          if (importThisFile.endsWith('.js')) {
              return JSON.stringify(eval(content.toString()));

so my xml comes out as a json stringified string...

is there another way to go about this?

@E-Fil
Copy link
Author

E-Fil commented May 13, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant