Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit 7b4d6f0

Browse files
author
Dean Sofer
committed
fix(tests): Corrected structure and travis file
1 parent b07d8f1 commit 7b4d6f0

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
node_modules
12
components

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
before_install:
66
- export DISPLAY=:99.0
77
- sh -e /etc/init.d/xvfb start
8-
- npm install -g [email protected]
9-
- npm install -g bower
8+
- npm install -g bower karma
109
- bower install
1110

12-
script: "testacular start components/angular-module/test.conf.js --browsers=Firefox,PhantomJS"
11+
script: "karma start test/test.conf.js --browsers=Firefox,PhantomJS"

component.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
{
22
"author": "AngularUI",
33
"name": "angular-ui-map",
4-
"version": "0.4.0",
4+
"version": "0.0.1",
55
"homepage": "http://angular-ui.github.com",
66
"keywords": [
77
"angular",
88
"angularui",
99
"map"
1010
],
11-
"main": "./ui-map.js",
11+
"main": "./src/map.js",
1212
"dependencies": {
1313
"angular": ">= 1.0.2",
14-
"angular-module": "latest",
15-
"angular-mocks": "~1.0.5",
1614
"angular-ui-utils": "latest"
1715
},
1816
"devDependencies": {
19-
"angular-module": "latest",
2017
"angular-mocks": ">= 1.0.2"
2118
}
2219
}

ui-map.js renamed to src/map.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function () {
2-
var app = angular.module('ui.directives');
2+
var app = angular.module('ui.map', []);
33

44
//Setup map events from a google map object to trigger on a given element too,
55
//then we just use ui-event to catch events from an element
@@ -19,13 +19,13 @@
1919
}
2020

2121
app.directive('uiMap',
22-
['ui.config', '$parse', function (uiConfig, $parse) {
22+
['uiMapConfig', '$parse', function (uiMapConfig, $parse) {
2323

2424
var mapEvents = 'bounds_changed center_changed click dblclick drag dragend ' +
2525
'dragstart heading_changed idle maptypeid_changed mousemove mouseout ' +
2626
'mouseover projection_changed resize rightclick tilesloaded tilt_changed ' +
2727
'zoom_changed';
28-
var options = uiConfig.map || {};
28+
var options = uiMapConfig || {};
2929

3030
return {
3131
restrict: 'A',
@@ -43,12 +43,12 @@
4343
};
4444
}]);
4545

46-
app.directive('uiMapInfoWindow',
47-
['ui.config', '$parse', '$compile', function (uiConfig, $parse, $compile) {
46+
app.value('uiMapInfoWindowConfig', {}).directive('uiMapInfoWindow',
47+
['uiMapInfoWindowConfig', '$parse', '$compile', function (uiMapInfoWindowConfig, $parse, $compile) {
4848

4949
var infoWindowEvents = 'closeclick content_change domready ' +
5050
'position_changed zindex_changed';
51-
var options = uiConfig.mapInfoWindow || {};
51+
var options = uiMapInfoWindowConfig || {};
5252

5353
return {
5454
link: function (scope, elm, attrs) {

test/test.conf.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
basePath = '..';
2+
3+
files = [
4+
JASMINE,
5+
JASMINE_ADAPTER,
6+
'components/angular/angular.js',
7+
'components/angular-mocks/angular-mocks.js',
8+
'src/*.js',
9+
'test/*Spec.js'
10+
];
11+
12+
// Avoid including minified version of angular and other libs again
13+
exclude = [
14+
'components/*/*.min.js'
15+
];
16+
17+
singleRun = true;
18+
19+
reporters = [
20+
'dots'
21+
];

0 commit comments

Comments
 (0)