运行 Jasmine 如何在浏览器中进行测试?
How do you run Jasmine tests in the browser?
我正在使用 jasmine-npm。 jasmine-init
将其设置为您可以 运行 jasmine
在终端中测试您的代码。
我记得以前在浏览器中看到过这些测试,并希望在那里看到它们。我将如何 运行 在浏览器中进行测试? (这看起来应该是个很容易研究的东西,但是我发誓我研究了2个多小时都搞不明白)
选项 1:
JASMINE STANDALONE
Included is a sample app and sample tests. Open SpecRunner.html and run the included specs. Both the source files and their respective specs are linked in the of the SpecRunner.html.
To start using Jasmine, replace the source/spec files with your own.
Load the SpecRunner.html in your favorite browser
我正在使用 jasmine-npm。 jasmine-init
将其设置为您可以 运行 jasmine
在终端中测试您的代码。
我记得以前在浏览器中看到过这些测试,并希望在那里看到它们。我将如何 运行 在浏览器中进行测试? (这看起来应该是个很容易研究的东西,但是我发誓我研究了2个多小时都搞不明白)
选项 1:
JASMINE STANDALONE
Included is a sample app and sample tests. Open SpecRunner.html and run the included specs. Both the source files and their respective specs are linked in the of the SpecRunner.html.
To start using Jasmine, replace the source/spec files with your own.
Load the SpecRunner.html in your favorite browser