test(): add initial test suite (#523)

This commit is contained in:
Matt Lewis
2016-09-07 02:42:29 +01:00
committed by Ibrahim Hadeed
parent d5513db9bb
commit 1facde3966
11 changed files with 735 additions and 8 deletions
+3 -2
View File
@@ -7,14 +7,15 @@ declare var window;
*/
export function initAngular1(plugins) {
if (window.angular) {
window.angular.module('ionic.native', []);
const ngModule = window.angular.module('ionic.native', []);
for (var name in plugins) {
let serviceName = '$cordova' + name;
let cls = plugins[name];
(function(serviceName, cls, name) {
window.angular.module('ionic.native').service(serviceName, [function() {
ngModule.service(serviceName, [function() {
var funcs = window.angular.copy(cls);
funcs.prototype['name'] = name;
return funcs;
-2
View File
@@ -3,8 +3,6 @@ import { Observable } from 'rxjs/Observable';
declare var window;
declare var Promise;
declare var $q;
/**
* @private