![](/img/trans.png)
[英]How to communicate port from grunt connect to grunt jasmine task
我正在使用 grunt connect ( "grunt-contrib-connect": "0.11.2" ) 和 grunt jasmine ( "grunt-contrib-jasmine": "^1.1.0" )。 連接配置以前對端口號進行了硬編碼,並且 jasmine 配置也被配置為在h ...
[英]How to communicate port from grunt connect to grunt jasmine task
我正在使用 grunt connect ( "grunt-contrib-connect": "0.11.2" ) 和 grunt jasmine ( "grunt-contrib-jasmine": "^1.1.0" )。 連接配置以前對端口號進行了硬編碼,並且 jasmine 配置也被配置為在h ...
[英]How can I configure the jasmine's random on gruntfile?
如何使用 grunt-contrib-jasmine 配置隨機選項? 我可以直接用 jasmine 的命令行來完成,但是通過 grunt-cli 運行 jasmine 的任務我沒有找到隨機選項。 然后命令行的輸出總是顯示規范的隨機輸出。 ...
[英]before- and afterEach leaking in to other tests
我正在使用grunt-contrib-jasmine來測試我的AMD模塊。 開箱即用似乎測試正在影響彼此。 輸出不會按文件分隔測試。 這可以通過在beforeEach中的測試中記錄某些內容來驗證。 在所有測試中,對所有測試文件執行相同的回調。 如何將測試與彼此隔離,即由測試規范 ...
[英]Malformed Specrunner file - grunt-template-jasmine-requirejs
我將grunt-contrib-jasmine與grunt-template-jasmine-requirejs來生成模板。 在Node v0.12.14上一切正常,但是當我升級到Node v4.5.0時,specrunner文件輸出格式錯誤。 它在輸出以及HTML中都有很多JavaScri ...
[英]Jasmine 2 Spec has no expectations
我有以下測試: 當我運行Jasmine 2.2.0時,出現以下錯誤: Spec 'SpecLabel function when invoked return value should check something' has no expectations. 我想念什么嗎? ...
[英]Jasmine spy document.execCommand is not called
我寫了這樣的測試 但它失敗了Expected spy execCommand to have been called with [ 'foreColor', false, 'red' ] but it was never called. 我不知道為什么? 請幫忙。 注意:我 ...
[英]Why does Jasmine complain about 'Attempted to assign to readonly property' when I set selectedIndex?
當我通過grunt-contrib-jasmine運行此Jasmine規范時,出現錯誤TypeError:嘗試分配給readonly屬性。 指向我設置selectedIndex屬性的行: 有人知道我在這里想念的嗎? 我使用phantomjs v1.9.8 , grunt-cli v0 ...
[英]PhantomJS exited unexpectedly with exit code 3221225477
我使用結合了grunt和茉莉花的Phantomjs來運行AngularJs應用程序的單元測試。 當單元測試變得太多時,我正在經歷奇怪的行為。 就我而言,是754/755單元測試。 單元測試運行失敗,並顯示以下消息 運行PhantomJS ...錯誤 0 []]警告: ...
[英]Error running jasmine-jquery in grunt-contrib-jasmine task
我正在嘗試在單元測試中使用jasmine-jquery來測試BackboneJS視圖,但是在嘗試運行測試時出現以下錯誤: 運行“ jasmine:src”(茉莉花)任務 通過PhantomJS測試茉莉花規格 TypeError:“未定義”不是對象(評估“ ja ...
[英]grunt template jasmine istanbul is not generating coverage report
我使用grunt-template-jasmine-istanbul和grunt-template-jasmine-requirejs。 當我運行測試覆蓋模塊時,我的所有測試用例都成功運行但沒有生成覆蓋。 ...
[英]Unit Test case in Jasmine
我正在嘗試為循環中的條件編寫測試用例,但是我沒有將其作為過濾器的一部分。 有什么辦法可以測試循環中的條件條件。 我的測試用例根本不執行這一行代碼。 下面是我的控制器代碼 以下是我的測試用例 當我運行業力時,我的測試用例失敗,預期為”為text3。 ...
[英]Karma Jasmine AngularJS testing with real HTTP requests
我想用真實的API調用測試我的代碼(因此我也可以測試API,並且當我更改API時,我也不必更改JS測試,還有很多好處。) $httpBackend.expectPOST('http://api.com/login').response(200) 。 本質上,我想測試一個預期通過AuthSe ...
[英].grunt folder created in the project after run grunt jasmine
我今天才注意到,當我跑步時: grunt jasmine 那在我的主項目文件夾中使用:grunt-contrib-jasmine創建一個文件夾.grunt,這是正常的嗎? 我不這么認為。 我正在使用Phantomjs通過終端進行測試 我的node_modules中已經有該文件 ...
[英]Local Npm module “grunt-template-jasmine-istanbul” not found
這是我的咕unt配置文件-https: //github.com/mdarif/JavaScript-Boilerplate/blob/1.3/GruntFile.js 它未加載模塊grunt-template-jasmine-istanbul ,未找到Local Npm module " ...
[英]Testing an Angular directive with isolate scope data
我有一個AngularJS指令,該指令從其屬性讀取輸入數據,如下所示: 我的指令: 現在,我通常在我的作用域中定義一個嵌套的對象數組,該指令從我的作用域中讀取該數據,但是現在我正嘗試使茉莉花,咕unt聲和有角度的聲音與我的指令很好地配合,以便可以測試它,我收到此錯誤: 這 ...
[英]grunt-contrib-jasmine angularjs module-not-available error
我有一個腳本,看起來像這樣: 當我運行grunt jasmine ,出現經典錯誤, Module 'Game' is not available! You either misspelled... Module 'Game' is not available! You either m ...
[英]Reduce size of grunt with packages on linux. File paths too long for Jenkins
我最近在Linux機器上下載了帶有2個軟件包的grunt。 Grunt-contrib-jasmine用於命令行茉莉單元測試。 我遵循的指南: https : //github.com/gruntjs/grunt-contrib-jasmine Grunt-templ ...
[英]PhantomJS catching error in Jasmine
問題 我有一個針對大型應用程序構建的大型測試套件。 該套件包括多達二十個不同的JS規范文件,這些文件針對該應用程序進行了數百次測試。 到目前為止,Jasmine(通過Grunt手表運行)無法在不拋出“警告:未定義,請使用--force繼續”消息的情況下進行所有測試。 如果我運 ...
[英]PhantomJS failed to load your page. Use --force to continue
我正在嘗試使用grunt-contrib-jasmine槽命令行“ grunt jasmine”運行測試,但是它未能給出警告:“ PhantomJS無法加載您的頁面。請使用--force繼續。” ... base.spec.js: gruntfile.js包括以下內容: 不 ...
[英]grunt-contrib-jasmine ReferenceError: Can't find variable: jQuery
這是我的Gruntfile茉莉花配置任務。 我通過供應商選項添加了jquery和jasmine-jquery。 運行咕unt聲后出現錯誤。 看起來茉莉花茉莉花不包括在任務中設置的供應商。 ...