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

ng-apimock use global variables in mocks without double quotes #57

Open
pulla2908 opened this issue Jul 24, 2018 · 1 comment
Open

ng-apimock use global variables in mocks without double quotes #57

pulla2908 opened this issue Jul 24, 2018 · 1 comment

Comments

@pulla2908
Copy link

I have added ng-apimock to our Angular project. We have successfully created first mock definitions and wrote tests with protractor.

Now we want to start using global variables in mock definitions. As it seems I always have to use double quotes for variables. But in my case I need a number and not a string.

I have created a question on stackoverflow with a sample already, you can find it here

Any ideas how to get this working?

@ckrul
Copy link

ckrul commented Jul 27, 2023

I had the same issue, however, it was caused by the variable within the preset file that was accidentally a string. By removing the quotes here, the apimock response field turned into a number even mock field containing the variable is a quoted string.

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

2 participants