Skip to content

Commit

Permalink
Rename from *-test.ts to *-tests.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrotoff committed Oct 23, 2015
1 parent 3191f6e commit d8373f0
Show file tree
Hide file tree
Showing 32 changed files with 99 additions and 99 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions bingmaps/bingmaps-test.ts → bingmaps/bingmaps-tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference path="Microsoft.Maps.d.ts"/>
/// <reference path="Microsoft.Maps.d.ts"/>
/// <reference path="Microsoft.Maps.AdvancedShapes.d.ts"/>
/// <reference path="Microsoft.Maps.Directions.d.ts"/>
/// <reference path="Microsoft.Maps.Search.d.ts"/>
Expand Down Expand Up @@ -55,7 +55,7 @@ module BingMapsTests {
locations.push(location);
}

// Sets the view of the map to the smallest size that contains all of the
// Sets the view of the map to the smallest size that contains all of the
// specified locations (in this case the pusphin locations)
map.setView({ bounds: Microsoft.Maps.LocationRect.fromLocations(locations) });
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference path="bootstrap-notify.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />

//Test for bootstrap-notify v3.1.3
//Copied example directly from Bootstrap-notify site

$.notify({
// options
icon: 'glyphicon glyphicon-warning-sign',
Expand Down Expand Up @@ -48,5 +48,5 @@ $.notify({
'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
'</div>' +
'<a href="{3}" target="{4}" data-notify="url"></a>' +
'</div>'
'</div>'
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,60 @@ import EventEmitter = require('eventemitter3');

class EventEmitterTest {
v: EventEmitter;

constructor() {
this.v = new EventEmitter();
this.v = new EventEmitter.EventEmitter();
this.v = new EventEmitter.EventEmitter2();
this.v = new EventEmitter.EventEmitter3();
}

listeners() {
var v1: Function[] = this.v.listeners('click');
}

emit() {
var v1: boolean = this.v.emit('click');
var v2: boolean = this.v.emit('click', 1);
var v3: boolean = this.v.emit('click', 1, '1');
var v4: boolean = this.v.emit('click', 1, '1', true);
var v5: boolean = this.v.emit('click', 1, '1', true, new Date());
}

on() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.on('click', fn);
var v2: EventEmitter = this.v.on('click', fn, this);
}

once() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.once('click', fn);
var v2: EventEmitter = this.v.once('click', fn, this);
}

removeListener() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.removeListener('click', fn);
var v2: EventEmitter = this.v.removeListener('click', fn, true);
}

removeAllListeners() {
var v1: EventEmitter = this.v.removeAllListeners('click');
}

off() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.off('click', fn);
var v2: EventEmitter = this.v.off('click', fn, true);
}

addListener() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.addListener('click', fn);
var v2: EventEmitter = this.v.addListener('click', fn, this);
}

setMaxListeners() {
var v1: EventEmitter = this.v.setMaxListeners();
}
Expand Down
50 changes: 25 additions & 25 deletions fluxxor/fluxxor-test.ts → fluxxor/fluxxor-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ import Fluxxor = require('fluxxor');

class DispatcherTest {
v: Fluxxor.Dispatcher;

constructor() {
var stores: Fluxxor.Store[];
this.v = new Fluxxor.Dispatcher(stores);
}

addStore() {
var store: Fluxxor.Store;
var v1: void = this.v.addStore('mystore', store);
}

dispatch() {
var fn = () => console.log(1);
var v1: void = this.v.dispatch(fn);
}

doDispatchLoop() {
var fn = () => console.log(1);
var v1: void = this.v.doDispatchLoop(fn);
}

waitForStores() {
var store: Fluxxor.Store;
var fn = () => console.log(1);
Expand All @@ -35,44 +35,44 @@ class DispatcherTest {

class FluxTest {
v: Fluxxor.Flux;

constructor() {
var stores: any;
var actions: any;
this.v = new Fluxxor.Flux(stores, actions);
}

props() {
var stores: any = this.v.stores;
var actions: any = this.v.actions;
}

addActions() {
var actions: any;
var v1: void = this.v.addActions(actions);
}

addAction() {
var fn = () => console.log(1);

// first form
var v1: void = this.v.addAction('action1', fn);
var v2: void = this.v.addAction('action1', 'action2', fn);

// second form
var v3: void = this.v.addAction(['action1'], fn);
var v4: void = this.v.addAction(['action1','action2'], fn);
}

store() {
var store1: any = this.v.store('mystore');
}

addStore() {
var store: Fluxxor.Store;
var v1: void = this.v.addStore('mystore', store);
}

addStores() {
var stores: any;
var v1: void = this.v.addStores(stores);
Expand All @@ -81,24 +81,24 @@ class FluxTest {

class StoreTest {
v: Fluxxor.Store;

bindActions() {
var fn = () => console.log(1);

// first form
var v1: void = this.v.bindActions('action1', fn);
var v2: void = this.v.bindActions(
'action1', fn,
'action2', fn
);

// second form
var v3: void = this.v.bindActions([
'action1', fn,
'action2', fn,
]);
}

waitFor() {
var fn = () => console.log(1);
var v1: void = this.v.waitFor(['mystore1','mystore2'], fn);
Expand All @@ -107,45 +107,45 @@ class StoreTest {

class ContextTest {
v: Fluxxor.Context;

props() {
var v1: Fluxxor.Flux = this.v.flux;
}
}

class FluxMixinTest {
v: Fluxxor.FluxMixin;

constructor() {
this.v = Fluxxor.FluxMixin(React);
}

getFlux() {
var v1: Fluxxor.Flux = this.v.getFlux();
}
}

class FluxChildMixinTest {
v: Fluxxor.FluxChildMixin;

constructor() {
this.v = Fluxxor.FluxChildMixin(React);
}

getFlux() {
var v1: Fluxxor.Flux = this.v.getFlux();
}
}

class StoreWatchMixinTest<StoreState> {
v: Fluxxor.StoreWatchMixin<StoreState>;

constructor() {
this.v = Fluxxor.StoreWatchMixin<StoreState>('store1');
this.v = Fluxxor.StoreWatchMixin<StoreState>('store1','store2');
this.v = Fluxxor.StoreWatchMixin<StoreState>('store1','store2','store3');
}

getStateFromFlux() {
var v1: StoreState = this.v.getStateFromFlux();
}
Expand Down
File renamed without changes.
File renamed without changes.
52 changes: 26 additions & 26 deletions later/later-test.ts → later/later-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module LaterTest_DefineSchedule {
var cronSched = later.parse.cron('0 0/5 14,18 * * ?');
var recurSched = later.parse.recur().last().dayOfMonth();
var manualSched = <Later.IScheduleData>{ schedules: [ <Later.IRecurrence>{ M: [ 3 ], D: [ 21 ] } ] };

// this schedule will fire on the closest weekday to the 15th
// every month at 2:00 am except in March
var complexSched = later.parse.recur()
Expand Down Expand Up @@ -414,34 +414,34 @@ module LaterTest_TimePeriods {
export function custom() {

var customLater = <IPartOfDayLater>later;

customLater.partOfDay = {

name: 'part of day',

range: later.hour.range * 6,

val: function(d: Date): number {
return later.hour.val(d) < 12
? 0
: later.hour.val(d) < 18
? 1
return later.hour.val(d) < 12
? 0
: later.hour.val(d) < 18
? 1
: 2;
},

isValid: function(d: Date, val: any) {
return customLater.partOfDay.val(d) === val;
},

extent: function(date?: Date) {
return [0, 2];
extent: function(date?: Date) {
return [0, 2];
},

start: function(date: Date) {
var hour = customLater.partOfDay.val(date) === 0
? 0
: customLater.partOfDay.val(date) === 1
? 12
var hour = customLater.partOfDay.val(date) === 0
? 0
: customLater.partOfDay.val(date) === 1
? 12
: 18;

return later.date.next(
Expand All @@ -453,10 +453,10 @@ module LaterTest_TimePeriods {
},

end: function(date: Date) {
var hour = customLater.partOfDay.val(date) === 0
? 11
: customLater.partOfDay.val(date) === 1
? 5
var hour = customLater.partOfDay.val(date) === 0
? 11
: customLater.partOfDay.val(date) === 1
? 5
: 23;

return later.date.prev(
Expand All @@ -468,10 +468,10 @@ module LaterTest_TimePeriods {
},

next: function(date: Date, val: any) {
var hour = val === 0
? 0
: val === 1
? 12
var hour = val === 0
? 0
: val === 1
? 12
: 18;

return later.date.next(
Expand All @@ -484,17 +484,17 @@ module LaterTest_TimePeriods {
},

prev: function(date: Date, val: any) {
var hour = val === 0
? 11
: val === 1
? 5
var hour = val === 0
? 11
: val === 1
? 5
: 23;

return later.date.prev(
later.year.val(date),
later.month.val(date),
// decrement the day if we already passed the desired time period
later.day.val(date) + (hour > later.hour.val(date) ? -1 : 0),
later.day.val(date) + (hour > later.hour.val(date) ? -1 : 0),
hour
);
}
Expand All @@ -503,7 +503,7 @@ module LaterTest_TimePeriods {
}

module LaterTest_GenerateRecurences {

export function on_method() {
// fires on the 2nd minute every hour
later.parse.recur().on(2).minute();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d8373f0

Please sign in to comment.