mirror of https://github.com/BTCPrivate/copay.git
added angularjs test configs
This commit is contained in:
parent
e08acbd863
commit
178dfec1a8
|
@ -15,18 +15,33 @@ module.exports = function(config) {
|
||||||
|
|
||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files: [
|
files: [
|
||||||
|
//3rd Party Code
|
||||||
'lib/angular/angular.min.js',
|
'lib/angular/angular.min.js',
|
||||||
|
'lib/angular-route/angular-route.js',
|
||||||
'lib/angular-mocks/angular-mocks.js',
|
'lib/angular-mocks/angular-mocks.js',
|
||||||
'lib/chai/chai.js',
|
|
||||||
|
//App-specific Code
|
||||||
'js/*.js',
|
'js/*.js',
|
||||||
'js/**/*.js',
|
'js/**/*.js',
|
||||||
'test/test*.js',
|
|
||||||
|
//Test-Specific Code
|
||||||
|
'lib/chai/chai.js',
|
||||||
|
'test/lib/chai-should.js',
|
||||||
|
'test/lib/chai-expect.js',
|
||||||
|
|
||||||
|
//Mocha stuff
|
||||||
|
'test/mocha.conf.js',
|
||||||
|
|
||||||
|
//test files
|
||||||
|
'test/unit/**/*.js'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
// list of files to exclude
|
// list of files to exclude
|
||||||
exclude: [
|
exclude: [
|
||||||
|
'js/copayBundle.js',
|
||||||
|
'js/models/**/*.js',
|
||||||
|
'js/init.js'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,11 +77,14 @@ module.exports = function(config) {
|
||||||
|
|
||||||
// start these browsers
|
// start these browsers
|
||||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||||
browsers: [],
|
browsers: ['Chrome'],
|
||||||
|
|
||||||
|
|
||||||
// Continuous Integration mode
|
// Continuous Integration mode
|
||||||
// if true, Karma captures browsers, runs the tests and exits
|
// if true, Karma captures browsers, runs the tests and exits
|
||||||
singleRun: false
|
singleRun: false,
|
||||||
|
|
||||||
|
// if browser doesn't capture output in given timeout (ms), kill it
|
||||||
|
captureTimeout: 60000
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
var expect = chai.expect;
|
|
@ -0,0 +1 @@
|
||||||
|
var should = chai.should();
|
|
@ -0,0 +1 @@
|
||||||
|
window.mocha.setup({ timeout: 5000 });
|
|
@ -0,0 +1,36 @@
|
||||||
|
//
|
||||||
|
// test/unit/controllers/controllersSpec.js
|
||||||
|
//
|
||||||
|
describe("Unit: Testing Controllers", function() {
|
||||||
|
|
||||||
|
beforeEach(angular.mock.module('copay'));
|
||||||
|
|
||||||
|
it('should have a AddressesController controller', function() {
|
||||||
|
expect(copay.AddressesController).not.to.equal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a BackupController controller', function() {
|
||||||
|
expect(copay.Backupcontroller).not.to.equal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a HeaderController controller', function() {
|
||||||
|
expect(copay.HeaderController).not.to.equal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a SendController controller', function() {
|
||||||
|
expect(copay.SendController).not.to.equal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a SetupController controller', function() {
|
||||||
|
expect(copay.SetupController).not.to.equal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a SigninController controller', function() {
|
||||||
|
expect(copay.SigninController).not.to.equal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a TransactionsController controller', function() {
|
||||||
|
expect(copay.TransactionsController).not.to.equal(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
//
|
||||||
|
// test/unit/directives/directivesSpec.js
|
||||||
|
//
|
||||||
|
describe("Unit: Testing Directives", function() {
|
||||||
|
|
||||||
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
//
|
||||||
|
// test/unit/filters/filtersSpec.js
|
||||||
|
//
|
||||||
|
describe("Unit: Testing Filters", function() {
|
||||||
|
|
||||||
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
//
|
||||||
|
// test/unit/services/servicesSpec.js
|
||||||
|
//
|
||||||
|
describe("Unit: Testing Services", function() {
|
||||||
|
|
||||||
|
});
|
Loading…
Reference in New Issue