AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
237 stars 20 forks source link

Giving a httpregion the name 'test', results in the test failing #144

Closed BramManuel closed 2 years ago

BramManuel commented 2 years ago

In the example below, if I give a working test the name 'test' the test fails. ChangeTestTitle

AnWeber commented 2 years ago

fixed with https://github.com/AnWeber/httpyac/commit/64337d48a467f48920814ff02a18f32a324d6bf1

Since the HttpRegion is called test the response is provided as a variable test. This overrides my helper function for testing. I now prevent the variable test from being set. But I think I still have a loophole if it is set via a .env file.

AnWeber commented 2 years ago

Error was in there for a long time. It was possible to override httpYac script variables. I even had a unit test that used this. Now I prevent overwriting using a keyword list.