如何测试以确保Jasmine中的文件名是SpecRunner.html?
我想构建一个测试,确保Jasmine测试使用一个名为SpecRunner.html的文件如何测试以确保Jasmine中的文件名是SpecRunner.html?,jasmine,Jasmine,我想构建一个测试,确保Jasmine测试使用一个名为SpecRunner.html的文件 如何执行此操作?若要在浏览器中运行测试,至少可以检查window.location 快速POC代码: 描述文件名、函数{ 使用SpecRunner.html函数终止{ var fileName=window.location.pathname.split/.pop; expectwindow.location.pathname.toMatch/SpecRunner.html$/; }; };
如何执行此操作?若要在浏览器中运行测试,至少可以检查window.location 快速POC代码: 描述文件名、函数{ 使用SpecRunner.html函数终止{ var fileName=window.location.pathname.split/.pop; expectwindow.location.pathname.toMatch/SpecRunner.html$/; }; };