2
我想讓Jasmine與Visual Studio Test Explorer一起工作。 所以,我的測試文件是這樣的:AngularJS,Jasmine和Visual Studio 2015測試瀏覽器
/// <reference path="../wwwroot/lib/angular/angular.min.js" />
/// <reference path="../wwwroot/lib/angular-mocks/angular-mocks.js" />
/// <reference path="../wwwroot/lib/jasmine/lib/jasmine-core/jasmine.js" />
/// <reference path="../wwwroot/lib/angular-arrays/dist/angular.arrays.js" />
/// <reference path="../wwwroot/lib/angular-simple-cache/dist/simplecache.js" />
/// <reference path="../wwwroot/lib/angular-toastr/dist/angular-toastr.tpls.min.js" />
/// <reference path="../wwwroot/lib/ng-file-upload/ng-file-upload.min.js" />
/// <reference path="../app/common/common.js" />
/// <reference path="../app/common/services.js" />
var _sharedProductHandler,
_pricingProducts,
_availabilityProducts;
beforeEach(module('piiick.common'));
beforeEach(inject(['SharedProductHandler', function (sharedProductHandler) {
_sharedProductHandler = sharedProductHandler;
_pricingProducts = [{
productId: 0
}];
_availabilityProducts = [{
productId: 0
}];
}]));
describe('Service: SharedProductService', function() {
it('We have a list of pricing products', function() {
expect(_pricingProducts.length).toBeGreaterThan(0);
});
it('We have a list of availability products', function() {
expect(_availabilityProducts.length).toBeGreaterThan(0);
});
});
如果我在瀏覽器中打開測試運行正常。但我希望它們出現在測試瀏覽器中。我爲測試瀏覽器安裝了Chutzpah適配器,但我的測試並未出現在那裏。 我read that you can use a chutzpah.json file to add settings,所以我做到了,但我無法讓我的測試出現在測試瀏覽器中。 我認爲值得一提的是我正在使用Visual Studio 2015.
有誰知道我如何讓我的測試顯示在測試資源管理器中?
很高興你知道了! –