Commit 4522b029 by Torkel Ödegaard

tech(systemjs): almost all tests are passing

parent f7888886
......@@ -9,14 +9,13 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'vendor/npm/es5-shim/es5-shim.js',
'vendor/npm/es5-shim/es5-sham.js',
'vendor/npm/es6-shim/es6-shim.js',
'vendor/npm/es6-promise/dist/es6-promise.js',
'vendor/npm/systemjs/dist/system.src.js',
'test/test-main.js',
{pattern: 'app/**/*.js', included: false},
{pattern: 'vendor/**/*.js', included: false},
{pattern: 'test/**/*.js', included: false}
{pattern: '**/*.js', included: false},
],
// list of files to exclude
......@@ -28,7 +27,7 @@ module.exports = function(config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['PhantomJS'],
captureTimeout: 60000,
captureTimeout: 2000,
singleRun: true,
autoWatchBatchDelay: 1000,
......
......@@ -18,43 +18,36 @@
"grunt": "~0.4.0",
"grunt-angular-templates": "^0.5.5",
"grunt-cli": "~0.1.13",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-compress": "~0.13.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-contrib-clean": "~0.7.0",
"grunt-contrib-compress": "~0.14.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-copy": "~0.8.2",
"grunt-contrib-cssmin": "~0.14.0",
"grunt-contrib-htmlmin": "~0.6.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-requirejs": "~0.4.4",
"grunt-contrib-uglify": "~0.8.0",
"grunt-contrib-uglify": "~0.11.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-filerev": "^0.2.1",
"grunt-git-describe": "~2.3.2",
"grunt-karma": "~0.8.3",
"grunt-ng-annotate": "^0.9.2",
"grunt-string-replace": "~0.2.4",
"grunt-karma": "~0.12.1",
"grunt-ng-annotate": "^1.0.1",
"grunt-string-replace": "~1.2.1",
"grunt-systemjs-builder": "^0.2.5",
"grunt-tslint": "^2.5.0",
"grunt-typescript": "^0.8.0",
"grunt-usemin": "3.0.0",
"jshint-stylish": "~0.1.5",
"karma": "~0.12.31",
"karma-chrome-launcher": "~0.1.4",
"karma-coffee-preprocessor": "~0.1.2",
"karma-coverage": "0.3.1",
"karma-coveralls": "0.1.5",
"karma": "~0.13.15",
"karma-chrome-launcher": "~0.2.2",
"karma-coverage": "0.5.3",
"karma-coveralls": "1.1.2",
"karma-expect": "~1.1.0",
"karma-mocha": "~0.1.10",
"karma-phantomjs-launcher": "0.1.4",
"karma-requirejs": "0.2.2",
"karma-script-launcher": "0.1.0",
"load-grunt-tasks": "0.2.0",
"mocha": "2.2.4",
"karma-mocha": "~0.2.1",
"karma-phantomjs-launcher": "0.2.1",
"load-grunt-tasks": "3.4.0",
"mocha": "2.3.4",
"reflect-metadata": "0.1.2",
"requirejs": "2.1.17",
"rjs-build-analysis": "0.0.3",
"rxjs": "5.0.0-beta.0",
"systemjs": "0.19.6",
"zone.js": "0.5.10"
......
......@@ -3,6 +3,5 @@ define([
], function(app) {
'use strict';
// backward compatability hack;
console.log(app);
return app.default;
});
......@@ -25,6 +25,12 @@ export class GrafanaApp {
ngModuleDependencies: any[];
preBootModules: any[];
constructor() {
this.preBootModules = [];
this.registerFunctions = {};
this.ngModuleDependencies = [];
}
useModule(module) {
if (this.preBootModules) {
this.preBootModules.push(module);
......@@ -36,9 +42,6 @@ export class GrafanaApp {
}
init() {
this.registerFunctions = {};
this.preBootModules = [];
var app = angular.module('grafana', []);
app.constant('grafanaVersion', "@grafanaVersion@");
......
///<amd-dependency path="app/plugins/datasource/cloudwatch/datasource" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import "../datasource";
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
import moment = require('moment');
declare var helpers: any;
import moment from 'moment';
import helpers from 'test/specs/helpers';
describe('CloudWatchDatasource', function() {
var ctx = new helpers.ServiceTestContext();
......
declare var test: any;
export default test;
declare var test: any;
export default test;
declare var test: any;
export default test;
///<amd-dependency path="../datasource" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import "../datasource";
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
import moment = require('moment');
import angular = require('angular');
declare var helpers: any;
import moment from 'moment';
import angular from 'angular';
import helpers from 'test/specs/helpers';
describe('ElasticDatasource', function() {
var ctx = new helpers.ServiceTestContext();
......
///<amd-dependency path="../elastic_response" name="ElasticResponse"/>
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
declare var ElasticResponse: any;
import ElasticResponse from '../elastic_response';
describe('ElasticResponse', function() {
var targets;
......
///<amd-dependency path="../index_pattern" name="IndexPattern"/>
///<amd-dependency path="test/specs/helpers" name="helpers" />
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
import moment = require('moment');
declare var IndexPattern: any;
import moment from 'moment';
import IndexPattern from '../index_pattern';
describe('IndexPattern', function() {
......
///<amd-dependency path="../query_builder" name="ElasticQueryBuilder"/>
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
declare var ElasticQueryBuilder: any;
import ElasticQueryBuilder from '../query_builder';
describe('ElasticQueryBuilder', function() {
var builder;
......
......@@ -3,8 +3,7 @@
///<amd-dependency path="test/specs/helpers" name="helpers" />
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
declare var helpers: any;
import helpers from 'test/specs/helpers';
describe('ElasticQueryCtrl', function() {
var ctx = new helpers.ControllerTestContext();
......
///<amd-dependency path="../query_def" name="QueryDef" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
declare var helpers: any;
declare var QueryDef: any;
import * as queryDef from '../query_def';
describe('ElasticQueryDef', function() {
describe('getPipelineAggOptions', function() {
describe('with zero targets', function() {
var response = QueryDef.getPipelineAggOptions([]);
var response = queryDef.getPipelineAggOptions([]);
it('should return zero', function() {
expect(response.length).to.be(0);
......@@ -25,7 +22,7 @@ describe('ElasticQueryDef', function() {
]
};
var response = QueryDef.getPipelineAggOptions(targets);
var response = queryDef.getPipelineAggOptions(targets);
it('should return zero', function() {
expect(response.length).to.be(2);
......@@ -40,7 +37,7 @@ describe('ElasticQueryDef', function() {
]
};
var response = QueryDef.getPipelineAggOptions(targets);
var response = queryDef.getPipelineAggOptions(targets);
it('should return one', function() {
expect(response.length).to.be(1);
......@@ -54,7 +51,7 @@ describe('ElasticQueryDef', function() {
]
};
var response = QueryDef.getPipelineAggOptions(targets);
var response = queryDef.getPipelineAggOptions(targets);
it('should return zero', function() {
expect(response.length).to.be(0);
......@@ -64,7 +61,7 @@ describe('ElasticQueryDef', function() {
describe('isPipelineMetric', function() {
describe('moving_avg', function() {
var result = QueryDef.isPipelineAgg('moving_avg');
var result = queryDef.isPipelineAgg('moving_avg');
it('is pipe line metric', function() {
expect(result).to.be(true);
......@@ -72,7 +69,7 @@ describe('ElasticQueryDef', function() {
});
describe('count', function() {
var result = QueryDef.isPipelineAgg('count');
var result = queryDef.isPipelineAgg('count');
it('is not pipe line metric', function() {
expect(result).to.be(false);
......@@ -83,19 +80,19 @@ describe('ElasticQueryDef', function() {
describe('pipeline aggs depending on esverison', function() {
describe('using esversion undefined', function() {
it('should not get pipeline aggs', function() {
expect(QueryDef.getMetricAggTypes(undefined).length).to.be(9);
expect(queryDef.getMetricAggTypes(undefined).length).to.be(9);
});
});
describe('using esversion 1', function() {
it('should not get pipeline aggs', function() {
expect(QueryDef.getMetricAggTypes(1).length).to.be(9);
expect(queryDef.getMetricAggTypes(1).length).to.be(9);
});
});
describe('using esversion 2', function() {
it('should get pipeline aggs', function() {
expect(QueryDef.getMetricAggTypes(2).length).to.be(11);
expect(queryDef.getMetricAggTypes(2).length).to.be(11);
});
});
});
......
declare var test: any;
export default test;
///<amd-dependency path="app/plugins/datasource/graphite/datasource" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import "../datasource";
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
declare var helpers: any;
import helpers from 'test/specs/helpers';
describe('graphiteDatasource', function() {
var ctx = new helpers.ServiceTestContext();
......
///<amd-dependency path="app/plugins/datasource/graphite/gfunc" name="gfunc" />
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
declare var gfunc: any;
import gfunc from '../gfunc';
describe('when creating func instance from func names', function() {
it('should return func instance', function() {
......
///<amd-dependency path="app/plugins/datasource/graphite/gfunc" name="gfunc"/>
///<amd-dependency path="app/plugins/datasource/graphite/query_ctrl" />
///<amd-dependency path="app/core/services/segment_srv" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import '../query_ctrl';
import 'app/core/services/segment_srv';
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
declare var gfunc: any;
declare var helpers: any;
import * as gfunc from '../gfunc';
import helpers from 'test/specs/helpers';
describe('GraphiteQueryCtrl', function() {
var ctx = new helpers.ControllerTestContext();
......
declare var test: any;
export default test;
declare var test: any;
export default test;
......@@ -11,6 +11,9 @@ function (angular, _, InfluxQueryBuilder, InfluxQuery, queryPart) {
var module = angular.module('grafana.controllers');
InfluxQuery = InfluxQuery.default;
queryPart = queryPart.default;
module.controller('InfluxQueryCtrl', function($scope, templateSrv, $q, uiSegmentSrv) {
$scope.init = function() {
......
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
import InfluxQuery = require('../influx_query');
import InfluxQuery from '../influx_query';
describe('InfluxQuery', function() {
......
///<amd-dependency path="app/plugins/datasource/influxdb/influx_series" name="InfluxSeries"/>
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
declare var InfluxSeries: any;
import InfluxSeries from '../influx_series';
describe('when generating timeseries from influxdb response', function() {
......
///<amd-dependency path="app/plugins/datasource/influxdb/query_builder" name="InfluxQueryBuilder"/>
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
declare var InfluxQueryBuilder: any;
import InfluxQueryBuilder from '../query_builder';
describe('InfluxQueryBuilder', function() {
......
///<amd-dependency path="app/plugins/datasource/influxdb/query_ctrl"/>
///<amd-dependency path="app/core/services/segment_srv" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import '../query_ctrl';
import 'app/core/services/segment_srv';
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
declare var helpers: any;
import helpers from 'test/specs/helpers';
describe('InfluxDBQueryCtrl', function() {
var ctx = new helpers.ControllerTestContext();
......
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
import queryPart = require('../query_part');
import queryPart from '../query_part';
describe('InfluxQueryPart', () => {
......
///<amd-dependency path="app/plugins/datasource/prometheus/datasource" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import '../datasource';
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
import moment = require('moment');
declare var helpers: any;
import moment from 'moment';
import helpers from 'test/specs/helpers';
describe('PrometheusDatasource', function() {
......
import {describe, beforeEach, it, sinon, expect} from 'test/lib/common';
import TableModel = require('app/core/table_model');
import TableModel from 'app/core/table_model';
import {TableRenderer} from '../renderer';
describe('when rendering table', () => {
......
......@@ -46,5 +46,4 @@ System.config({
exports: 'angular',
},
}
});
declare module "test/specs/helpers" {
let helpers: any;
export default helpers;
}
define([
'./helpers',
'app/features/dashboard/rowCtrl'
], function(helpers) {
'use strict';
describe('RowCtrl', function() {
var ctx = new helpers.ControllerTestContext();
beforeEach(module('grafana.controllers'));
beforeEach(ctx.providePhase());
beforeEach(ctx.createControllerPhase('RowCtrl'));
});
});
(function() {
"use strict";
// Tun on full stack traces in errors to help debugging
Error.stackTraceLimit=Infinity;
window.__karma__.loaded = function() {};
System.config({
baseURL: '/base/',
defaultJSExtensions: true,
......@@ -49,7 +54,7 @@
deps: ['jquery'],
exports: 'angular',
},
'vendor/angular/angular-mocks.js': {
'vendor/angular-mocks/angular-mocks.js': {
format: 'global',
deps: ['angular'],
}
......@@ -63,23 +68,24 @@
}
function onlySpecFiles(path) {
return /_specs\.js$/.test(path);
return /specs.*/.test(path);
}
window.grafanaBootData = {settings: {}};
var modules = ['lodash', 'angular', 'angular-mocks', 'app/app'];
var modules = ['angular', 'angular-mocks', 'app/app'];
var promises = modules.map(function(name) {
return System.import(name);
});
Promise.all(
modules.map(function(moduleName) {
return System.import(moduleName);
})
).then(function(deps) {
var angular = deps[1];
Promise.all(promises).then(function(deps) {
var angular = deps[0];
angular.module('grafana', ['ngRoute']);
angular.module('grafana.services', ['ngRoute', '$strap.directives']);
angular.module('grafana.panels', []);
angular.module('grafana.controllers', []);
angular.module('grafana.directives', []);
angular.module('grafana.filters', []);
angular.module('grafana.routes', ['ngRoute']);
......@@ -89,12 +95,15 @@
.filter(onlySpecFiles)
.map(file2moduleName)
.map(function(path) {
console.log(path);
return System.import(path);
}));
}).then(function() {
window.__karma__.start();
}, function(error) {
window.__karma__.error(error.stack || error);
}).catch(function(error) {
window.__karma__.error(error.stack || error);
});
})();
/**
* Declarations angular depends on for compilation to ES6.
* This file is also used to propagate our transitive typings
* to users.
*/
/// <reference path="../typings/zone/zone.d.ts"/>
/// <reference path="../typings/hammerjs/hammerjs.d.ts"/>
/// <reference path="../typings/jasmine/jasmine.d.ts"/>
/// <reference path="../typings/angular-protractor/angular-protractor.d.ts"/>
// TODO: ideally the node.d.ts reference should be scoped only for files that need and not to all
// the code including client code
/// <reference path="../typings/node/node.d.ts" />
declare var assert: any;
interface BrowserNodeGlobal {
Object: typeof Object;
Array: typeof Array;
Map: typeof Map;
Set: typeof Set;
Date: typeof Date;
RegExp: typeof RegExp;
JSON: typeof JSON;
Math: typeof Math;
assert(condition: any): void;
Reflect: any;
zone: Zone;
getAngularTestability: Function;
getAllAngularTestabilities: Function;
setTimeout: Function;
clearTimeout: Function;
setInterval: Function;
clearInterval: Function;
}
/**
* Declarations angular depends on for compilation to ES6.
* This file is also used to propagate our transitive typings
* to users.
*/
/// <reference path="../typings/es6-shim/es6-shim.d.ts"/>
/// <reference path="./globals-es6.d.ts"/>
// Type definitions for Hammer.js 2.0.4
// Project: http://hammerjs.github.io/
// Definitions by: Philip Bulley <https://github.com/milkisevil/>, Han Lin Yap <https://github.com/codler>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var Hammer:HammerStatic;
declare module "Hammer" {
export = Hammer;
}
interface HammerStatic
{
new( element:HTMLElement, options?:any ): HammerManager;
defaults:HammerDefaults;
VERSION: number;
INPUT_START: number;
INPUT_MOVE: number;
INPUT_END: number;
INPUT_CANCEL: number;
STATE_POSSIBLE: number;
STATE_BEGAN: number;
STATE_CHANGED: number;
STATE_ENDED: number;
STATE_RECOGNIZED: number;
STATE_CANCELLED: number;
STATE_FAILED: number;
DIRECTION_NONE: number;
DIRECTION_LEFT: number;
DIRECTION_RIGHT: number;
DIRECTION_UP: number;
DIRECTION_DOWN: number;
DIRECTION_HORIZONTAL: number;
DIRECTION_VERTICAL: number;
DIRECTION_ALL: number;
Manager: HammerManager;
Input: HammerInput;
TouchAction: TouchAction;
TouchInput: TouchInput;
MouseInput: MouseInput;
PointerEventInput: PointerEventInput;
TouchMouseInput: TouchMouseInput;
SingleTouchInput: SingleTouchInput;
Recognizer: RecognizerStatic;
AttrRecognizer: AttrRecognizerStatic;
Tap: TapRecognizerStatic;
Pan: PanRecognizerStatic;
Swipe: SwipeRecognizerStatic;
Pinch: PinchRecognizerStatic;
Rotate: RotateRecognizerStatic;
Press: PressRecognizerStatic;
on( target:EventTarget, types:string, handler:Function ):void;
off( target:EventTarget, types:string, handler:Function ):void;
each( obj:any, iterator:Function, context:any ): void;
merge( dest:any, src:any ): any;
extend( dest:any, src:any, merge:boolean ): any;
inherit( child:Function, base:Function, properties:any ):any;
bindFn( fn:Function, context:any ):Function;
prefixed( obj:any, property:string ):string;
}
interface HammerDefaults
{
domEvents:boolean;
enable:boolean;
preset:any[];
touchAction:string;
cssProps:CssProps;
inputClass():void;
inputTarget():void;
}
interface CssProps
{
contentZooming:string;
tapHighlightColor:string;
touchCallout:string;
touchSelect:string;
userDrag:string;
userSelect:string;
}
interface HammerOptions extends HammerDefaults
{
}
interface HammerManager
{
new( element:HTMLElement, options?:any ):HammerManager;
add( recogniser:Recognizer ):Recognizer;
add( recogniser:Recognizer ):HammerManager;
add( recogniser:Recognizer[] ):Recognizer;
add( recogniser:Recognizer[] ):HammerManager;
destroy():void;
emit( event:string, data:any ):void;
get( recogniser:Recognizer ):Recognizer;
get( recogniser:string ):Recognizer;
off( events:string, handler:( event:HammerInput ) => void ):void;
on( events:string, handler:( event:HammerInput ) => void ):void;
recognize( inputData:any ):void;
remove( recogniser:Recognizer ):HammerManager;
remove( recogniser:string ):HammerManager;
set( options:HammerOptions ):HammerManager;
stop( force:boolean ):void;
}
declare class HammerInput
{
constructor( manager:HammerManager, callback:Function );
destroy():void;
handler():void;
init():void;
/** Name of the event. Like panstart. */
type:string;
/** Movement of the X axis. */
deltaX:number;
/** Movement of the Y axis. */
deltaY:number;
/** Total time in ms since the first input. */
deltaTime:number;
/** Distance moved. */
distance:number;
/** Angle moved. */
angle:number;
/** Velocity on the X axis, in px/ms. */
velocityX:number;
/** Velocity on the Y axis, in px/ms */
velocityY:number;
/** Highest velocityX/Y value. */
velocity:number;
/** Direction moved. Matches the DIRECTION constants. */
direction:number;
/** Direction moved from it's starting point. Matches the DIRECTION constants. */
offsetDirection:string;
/** Scaling that has been done when multi-touch. 1 on a single touch. */
scale:number;
/** Rotation that has been done when multi-touch. 0 on a single touch. */
rotation:number;
/** Center position for multi-touch, or just the single pointer. */
center:HammerPoint;
/** Source event object, type TouchEvent, MouseEvent or PointerEvent. */
srcEvent:TouchEvent | MouseEvent | PointerEvent;
/** Target that received the event. */
target:HTMLElement;
/** Primary pointer type, could be touch, mouse, pen or kinect. */
pointerType:string;
/** Event type, matches the INPUT constants. */
eventType:string;
/** true when the first input. */
isFirst:boolean;
/** true when the final (last) input. */
isFinal:boolean;
/** Array with all pointers, including the ended pointers (touchend, mouseup). */
pointers:any[];
/** Array with all new/moved/lost pointers. */
changedPointers:any[];
/** Reference to the srcEvent.preventDefault() method. Only for experts! */
preventDefault:Function;
}
declare class MouseInput extends HammerInput
{
constructor( manager:HammerManager, callback:Function );
}
declare class PointerEventInput extends HammerInput
{
constructor( manager:HammerManager, callback:Function );
}
declare class SingleTouchInput extends HammerInput
{
constructor( manager:HammerManager, callback:Function );
}
declare class TouchInput extends HammerInput
{
constructor( manager:HammerManager, callback:Function );
}
declare class TouchMouseInput extends HammerInput
{
constructor( manager:HammerManager, callback:Function );
}
interface RecognizerStatic
{
new( options?:any ):Recognizer;
}
interface Recognizer
{
defaults:any;
canEmit():boolean;
canRecognizeWith( otherRecognizer:Recognizer ):boolean;
dropRecognizeWith( otherRecognizer:Recognizer ):Recognizer;
dropRecognizeWith( otherRecognizer:string ):Recognizer;
dropRequireFailure( otherRecognizer:Recognizer ):Recognizer;
dropRequireFailure( otherRecognizer:string ):Recognizer;
emit( input:HammerInput ):void;
getTouchAction():any[];
hasRequireFailures():boolean;
process( inputData:HammerInput ):string;
recognize( inputData:HammerInput ):void;
recognizeWith( otherRecognizer:Recognizer ):Recognizer;
recognizeWith( otherRecognizer:string ):Recognizer;
requireFailure( otherRecognizer:Recognizer ):Recognizer;
requireFailure( otherRecognizer:string ):Recognizer;
reset():void;
set( options?:any ):Recognizer;
tryEmit( input:HammerInput ):void;
}
interface AttrRecognizerStatic
{
attrTest( input:HammerInput ):boolean;
process( input:HammerInput ):any;
}
interface AttrRecognizer extends Recognizer
{
new( options?:any ):AttrRecognizer;
}
interface PanRecognizerStatic
{
new( options?:any ):PanRecognizer;
}
interface PanRecognizer extends AttrRecognizer
{
}
interface PinchRecognizerStatic
{
new( options?:any ):PinchRecognizer;
}
interface PinchRecognizer extends AttrRecognizer
{
}
interface PressRecognizerStatic
{
new( options?:any ):PressRecognizer;
}
interface PressRecognizer extends AttrRecognizer
{
}
interface RotateRecognizerStatic
{
new( options?:any ):RotateRecognizer;
}
interface RotateRecognizer extends AttrRecognizer
{
}
interface SwipeRecognizerStatic
{
new( options?:any ):SwipeRecognizer;
}
interface SwipeRecognizer
{
}
interface TapRecognizerStatic
{
new( options?:any ):TapRecognizer;
}
interface TapRecognizer extends AttrRecognizer
{
}
declare class TouchAction
{
constructor( manager:HammerManager, value:string );
compute():string;
preventDefaults( input:HammerInput ):void;
preventSrc( srcEvent:any ):void;
set( value:string ):void;
update():void;
}
interface HammerPoint
{
x: number;
y: number;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/// <reference path="angular-protractor/angular-protractor.d.ts" />
/// <reference path="es6-shim/es6-shim.d.ts" />
/// <reference path="hammerjs/hammerjs.d.ts" />
/// <reference path="jasmine/jasmine.d.ts" />
/// <reference path="node/node.d.ts" />
/// <reference path="selenium-webdriver/selenium-webdriver.d.ts" />
/// <reference path="zone/zone.d.ts" />
/// <reference path="../es6-shim/es6-shim.d.ts" />
declare class Zone {
constructor(parentZone: Zone, data: any);
fork(locals: {[key: string]: any}): Zone;
bind(fn: Function, skipEnqueue?: boolean): void;
bindOnce(fn: Function): any;
run(fn: Function, applyTo?: any, applyWith?: any): void;
isRootZone(): boolean;
static bindPromiseFn<T extends () => Promise<any>>(fn: T): T;
static longStackTraceZone: {[key: string]: any};
}
......@@ -21,6 +21,8 @@ module.exports = function(config) {
src: [
'angular2/bundles/*.js',
'angular2/*.d.ts',
'angular2/typings/**/*',
'angular2/manual_typings/**/*',
'systemjs/dist/*.js',
'es6-promise/**/*',
'es5-shim/*.js',
......
......@@ -6,14 +6,17 @@ module.exports = function(config) {
configFile: 'karma.conf.js',
singleRun: false,
},
debug: {
configFile: 'karma.conf.js',
singleRun: false,
browsers: ['Chrome']
},
test: {
configFile: 'karma.conf.js',
},
coveralls: {
configFile: 'karma.conf.js',
reporters: ['dots','coverage','coveralls'],
......
......@@ -3,7 +3,7 @@ module.exports = function() {
return {
build: {
src: ['public/app/**/*.ts', "!public/vendor/**/*", "!**/*_specs.ts", "!**/*.d.ts"],
src: ['public/app/**/*.ts', "!public/vendor/**/*", "!**/*.d.ts"],
dest: 'public_gen/',
options: {
module: 'system', //or commonjs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment