2016-04-15 53 views

回答

1

它包括在茉莉花SpecRunner.html文件,然後運行該文件在瀏覽器中運行測試。您可以添加bootstrap.js或其他任何您需要運行測試的內容。

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title>Jasmine Spec Runner v2.4.1</title> 

    <link rel="shortcut icon" type="image/png" href="lib/jasmine-2.4.1/jasmine_favicon.png"> 
    <link rel="stylesheet" href="lib/jasmine-2.4.1/jasmine.css"> 

    <script src="lib/jasmine-2.4.1/jasmine.js"></script> 
    <script src="lib/jasmine-2.4.1/jasmine-html.js"></script> 
    <script src="lib/jasmine-2.4.1/boot.js"></script> 

    <!-- include source files here... --> 
    <script src="src/Player.js"></script> 
    <script src="src/Song.js"></script> 

    <!-- include spec files here... --> 
    <script src="spec/SpecHelper.js"></script> 
    <script src="spec/PlayerSpec.js"></script> 

</head> 

<body> 
</body> 
</html>