当前位置:网站首页>Is it possible to use Jasmine's toHaveBeenCalledWith matcher with a regular expression?
Is it possible to use Jasmine's toHaveBeenCalledWith matcher with a regular expression?
2022-06-25 07:11:00 【French red wine sweet】
problem :
I have reviewed Jasmine's documentation of the toHaveBeenCalledWith matcher in order to understand whether it's possible to pass in a regular expression for an argument, if that argument is expected to be a string. I have reviewed Jasmine Of toHaveBeenCalledWith Matcher documentation , To see if you can pass regular expressions for parameters , If the parameter should be a string .Unfortunately, this is unsupported functionality. Unfortunately , This is an unsupported feature .There's also an issue open on github requesting this functionality. stay github There's another one on problem , Request this feature .
I've dug a bit into the codebase, and I see how it might be possible to implement this inside the existing matcher . I've dug up some code bases , I see how Existing matchers To achieve it .I think it would be more appropriate to implement it as a separate matcher though, so that the abstraction is captured individually. I think it is more appropriate to implement it as a separate matcher , This allows the abstraction to be captured separately .
In the meantime, what might be a good workaround? meanwhile , What might be a good solution ?
Solution :
Reference resources : https://stackoom.com/en/question/10Gqp边栏推荐
- The significance and proof of weak large number theorem
- Wow, it's so rich.
- ES can finally find brother Wukong!
- [learn FPGA programming from scratch -43]: vision chapter - technology evolution of chip design in the post Moore era -2- evolution direction
- Hongmeng learning notes: creating layouts using XML
- Query JSON data in MySQL table
- MSG_ OOB MSG_ PEEK
- 哇哦,好丰富呀。
- Design of PWM breathing lamp based on FPGA
- joda. Time get date summary
猜你喜欢
Derivation of sin (a-b) =sina*cosb-sinb*cosa
Esp8266 & sg90 steering gear & Lighting Technology & Arduino
[tool sharing] a software that pays equal attention to appearance and skills
有能力的人从不抱怨大环境!
基于 KubeSphere 的分级管理实践
1W字|40 图|硬核 ES 实战
直接选择排序和快速排序
Following the last minor upgrade of nodemcu (esp8266)
Ctfhub web information disclosure directory traversal
Why use NoSQL with MySQL?
随机推荐
Kubernetes 集群中流量暴露的几种方案
Navicat prevent new query from being deleted by mistake
Report on development status and investment strategy recommendations of global and Chinese graphite polystyrene board industry 2022-2028
Event registration | Apache pulsar x kubesphere online meetup is coming
Design of PWM breathing lamp based on FPGA
Flask 的入门级使用
Hongmeng learning notes: creating layouts using XML
How do I know if mysqlnd is an active driver- How to know if MySQLnd is the active driver?
破万,我用了六年!
mysql 表查询json数据
[ACNOI2022]王校长的构造
ACWING/2004. 錯字
Love Terminator
MSG_ OOB MSG_ PEEK
[2022 dark horse programmer] SQL optimization
Practice of hierarchical management based on kubesphere
[he doesn't mention love, but every word is love]
Want to self-study SCM, do you have any books and boards worth recommending?
Unity get resource path
Finally, when you open source the applet ~