gstroup / apimocker

node.js module to run a simple http server for mock service responses.
MIT License
280 stars 81 forks source link

in support of issue #84 with support for valid JSON in templates and handling quotes. #85

Closed ferrerod closed 6 years ago

ferrerod commented 6 years ago
gstroup commented 6 years ago

I like this change, thanks! Could you please add a test or two? If not, let me know, I’ll try to add some.

ferrerod commented 6 years ago

I modified the original template and templateSwitch tests to include both regular "@key" and new "@@key" RegEx substitutions. Ran tests to pass. Is that sufficient?

MarqueIV commented 6 years ago

Copying from the issues tab... Did you see my suggestion about using "@#tag" instead of "@@tag"? I think it better separates intent. With such a change, '@' simply, and only means 'a replacement tag' whereas '#' means 'use the number-format rules'.

Thoughts?

gstroup commented 6 years ago

@ferrerod Modifying existing tests is fine. But I don't see any modifications to test files. Did you check them in? Thanks!