What is document.body in Jasmine tests?

橙三吉。 提交于 2019-12-12 12:16:56

问题


Where does document.querySelector('body') point to in Jasmine tests?

Is it blank, or how does it look like? Is new page is loaded in "default" state for each test case or it is shared accross tests?


回答1:


The document.body is that of the test runner HTML file which has each of your source and test files loaded into it. It is globally available and constantly there, so is the same and shared across all tests.



来源:https://stackoverflow.com/questions/39139570/what-is-document-body-in-jasmine-tests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!