久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

我怎樣才能在 Jasmine 中有一個(gè) beforeAll 函數(shù)?(不是

How can I have a beforeAll function in Jasmine ? (Not coffeeScript)(我怎樣才能在 Jasmine 中有一個(gè) beforeAll 函數(shù)?(不是咖啡腳本))
本文介紹了我怎樣才能在 Jasmine 中有一個(gè) beforeAll 函數(shù)?(不是咖啡腳本)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

我需要知道是否有辦法包含或使用 beforeAll 函數(shù)或類似函數(shù),以便我可以登錄到我的應(yīng)用程序然后開始測(cè)試.

I need to know if there is a way to include or use a beforeAll function, or something similar, so I can login to my application and then start testing.

現(xiàn)在我將登錄操作放在第一個(gè)測(cè)試用例 ( it ) 中.這不是一個(gè)好習(xí)慣.

Right now I'm putting my login operations in the first test case ( it ). Which is not a good practice.

如果有更好的方法來(lái)存儲(chǔ)我的登錄代碼而不是使用 beforeAll 函數(shù),請(qǐng)告訴我.

If there is a better way to store my login code other then using a beforeAll function please tell me about it.

我正在使用與咖啡腳本或其他任何其他框架無(wú)關(guān)的純 Jasmine.

I'm using pure Jasmine not related to any other framework like coffee-script or others.

謝謝

推薦答案

現(xiàn)在這更容易了.從 Jasmine 2.1(2014 年 11 月 14 日發(fā)布)開始,框架中內(nèi)置了一個(gè) beforeAll 函數(shù).

This is now much easier. As of Jasmine 2.1 (released 14 Nov 2014), there is a beforeAll function built into the framework.

這里是發(fā)行說(shuō)明在 2.1 中添加.這里是文檔 解釋 beforeAll畢竟

Here are the release notes with everything that was added in 2.1. And here is the documentation explaining beforeAll and afterAll

這篇關(guān)于我怎樣才能在 Jasmine 中有一個(gè) beforeAll 函數(shù)?(不是咖啡腳本)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How can I get my jasmine tests fixtures to load before the javascript considers the document to be quot;readyquot;?(在 javascript 認(rèn)為文檔“準(zhǔn)備好之前,如何讓我的 jasmine 測(cè)試裝置加載?) - IT屋-程序員軟件開發(fā)技術(shù)
What do jasmine runs and waitsFor actually do?(jasmine 運(yùn)行和等待實(shí)際上是做什么的?)
How to provide mock files to change event of lt;input type=#39;file#39;gt; for unit testing(如何提供模擬文件來(lái)更改 lt;input type=filegt; 的事件用于單元測(cè)試)
How to unit test a chained method using Jasmine(如何使用 Jasmine 對(duì)鏈?zhǔn)椒椒ㄟM(jìn)行單元測(cè)試)
How do I inject $rootScope into an AngularJS unit test?(如何將 $rootScope 注入 AngularJS 單元測(cè)試?)
Jasmine - How to spy on a function call within a function?(Jasmine - 如何監(jiān)視函數(shù)中的函數(shù)調(diào)用?)
主站蜘蛛池模板: 97人人澡人人爽91综合色 | 色久电影 | 精品国产1区2区3区 在线国产视频 | 欧美亚洲激情 | 天天干天天操天天射 | 免费亚洲视频 | 欧美综合国产精品久久丁香 | 成人深夜福利网站 | 欧美日韩国产一区二区 | 久久激情视频 | 午夜久久久久久久久久一区二区 | 久久久久9999亚洲精品 | 国产一卡二卡三卡 | 成人在线一区二区 | 欧美精选一区二区 | 精品视频免费 | 日韩精品在线看 | 亚洲国产精品久久久 | 成年人在线观看视频 | 亚洲视频三 | 久久蜜桃资源一区二区老牛 | 欧美日本一区 | 成人精品一区二区户外勾搭野战 | 亚洲欧美日韩电影 | 成人综合伊人 | 91一区二区 | 国产色99 | 亚洲国产精品久久久久 | 一级a爱片久久毛片 | 亚洲精品乱码久久久久久蜜桃91 | 日韩在线中文字幕 | 国产亚洲精品美女久久久久久久久久 | 日韩在线免费视频 | 最新日韩av| 亚洲欧美视频 | 男女爱爱网站 | 欧美精品一区二区在线观看 | 一区二区免费在线 | 欧洲一区二区三区 | 羞羞视频网 | 在线观看免费高清av |