JS equivalent of Python's “with” keyword that automatic cleans up after usage

后端 未结 0 1946
夕颜
夕颜 2020-12-24 07:38

We have lots of JS code with teardown after usage. For instance, in our Jest tests, we setup mocks and spys, which we clear after usage:

    const spyApig = j         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题