Browse Source

Remove unused files which just pollute the project.

master
Paul Miller 10 years ago
parent
commit
fe95bb616f
  1. 4
      README.md
  2. 37
      config/karma-e2e.conf.js
  3. 37
      config/karma.conf.js
  4. 11
      scripts/e2e-test.bat
  5. 10
      scripts/e2e-test.sh
  6. 11
      scripts/test.bat
  7. 10
      scripts/test.sh
  8. 19
      scripts/watchr.rb
  9. 0
      server.js
  10. 11
      test/e2e/runner.html
  11. 45
      test/e2e/scenarios.js
  12. 2165
      test/lib/angular/angular-mocks.js
  13. 32566
      test/lib/angular/angular-scenario.js
  14. 1
      test/lib/angular/version.txt
  15. 16
      test/unit/controllersSpec.js
  16. 19
      test/unit/directivesSpec.js
  17. 19
      test/unit/filtersSpec.js
  18. 14
      test/unit/servicesSpec.js
  19. 6
      update-angular.sh

4
README.md

@ -57,7 +57,7 @@ The app is based on AngularJS JavaScript framework, written in pure JavaScript ( @@ -57,7 +57,7 @@ The app is based on AngularJS JavaScript framework, written in pure JavaScript (
#### Running web-server
Project repository is based on angularjs-seed and includes a simple web-server, so it's easy to launch the app locally on your desktop.
Install [node.js](http://nodejs.org/) and run `scripts/web-server.js`. Open page http://localhost:8000/app/index.html in your browser.
Install [node.js](http://nodejs.org/) and run `node server.js`. Open page http://localhost:8000/app/index.html in your browser.
#### Running as Chrome Packaged App
@ -82,4 +82,4 @@ Many thanks to all these libraries' authors and contributors. Detailed list with @@ -82,4 +82,4 @@ Many thanks to all these libraries' authors and contributors. Detailed list with
### Licensing
The source code is licensed under GPL v3. License is available [here](/LICENSE).
The source code is licensed under GPL v3. License is available [here](/LICENSE).

37
config/karma-e2e.conf.js

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
module.exports = function(config){
config.set({
basePath : '../',
files : [
'test/e2e/**/*.js'
],
autoWatch : false,
browsers : ['Chrome'],
frameworks: ['ng-scenario'],
singleRun : true,
proxies : {
'/': 'http://localhost:8000/'
},
plugins : [
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-ng-scenario'
],
junitReporter : {
outputFile: 'test_out/e2e.xml',
suite: 'e2e'
}
})}

37
config/karma.conf.js

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
module.exports = function(config){
config.set({
basePath : '../',
files : [
'app/lib/angular/angular.js',
'app/lib/angular/angular-*.js',
'test/lib/angular/angular-mocks.js',
'app/js/**/*.js',
'test/unit/**/*.js'
],
exclude : [
'app/lib/angular/angular-loader.js',
'app/lib/angular/*.min.js',
'app/lib/angular/angular-scenario.js'
],
autoWatch : true,
frameworks: ['jasmine'],
browsers : ['Chrome'],
plugins : [
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine'
],
junitReporter : {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
})}

11
scripts/e2e-test.bat

@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
@echo off
REM Windows script for running e2e tests
REM You have to run server and capture some browser first
REM
REM Requirements:
REM - NodeJS (http://nodejs.org/)
REM - Karma (npm install -g karma)
set BASE_DIR=%~dp0
karma start "%BASE_DIR%\..\config\karma-e2e.conf.js" %*

10
scripts/e2e-test.sh

@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
#!/bin/bash
BASE_DIR=`dirname $0`
echo ""
echo "Starting Karma Server (http://karma-runner.github.io)"
echo $BASE_DIR
echo "-------------------------------------------------------------------"
$BASE_DIR/../node_modules/karma/bin/karma start $BASE_DIR/../config/karma-e2e.conf.js $*

11
scripts/test.bat

@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
@echo off
REM Windows script for running unit tests
REM You have to run server and capture some browser first
REM
REM Requirements:
REM - NodeJS (http://nodejs.org/)
REM - Karma (npm install -g karma)
set BASE_DIR=%~dp0
karma start "%BASE_DIR%\..\config\karma.conf.js" %*

10
scripts/test.sh

@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
#!/bin/bash
BASE_DIR=`dirname $0`
echo ""
echo "Starting Karma Server (http://karma-runner.github.io)"
echo "-------------------------------------------------------------------"
#$BASE_DIR/../node_modules/karma/bin/karma start $BASE_DIR/../config/karma.conf.js $*
karma start $BASE_DIR/../config/karma.conf.js $*

19
scripts/watchr.rb

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
#!/usr/bin/env watchr
# config file for watchr http://github.com/mynyml/watchr
# install: gem install watchr
# run: watch watchr.rb
# note: make sure that you have jstd server running (server.sh) and a browser captured
log_file = File.expand_path(File.dirname(__FILE__) + '/../logs/jstd.log')
`cd ..`
`touch #{log_file}`
puts "String watchr... log file: #{log_file}"
watch( '(app/js|test/unit)' ) do
`echo "\n\ntest run started @ \`date\`" > #{log_file}`
`scripts/test.sh &> #{log_file}`
end

0
scripts/web-server.js → server.js

11
test/e2e/runner.html

@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>End2end Test Runner</title>
<meta charset="utf-8">
<script src="../lib/angular/angular-scenario.js" ng-autotest></script>
<script src="scenarios.js"></script>
</head>
<body>
</body>
</html>

45
test/e2e/scenarios.js

@ -1,45 +0,0 @@ @@ -1,45 +0,0 @@
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('my app', function() {
beforeEach(function() {
browser().navigateTo('app/index.html');
});
it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
expect(browser().location().url()).toBe("/view1");
});
describe('view1', function() {
beforeEach(function() {
browser().navigateTo('#/view1');
});
it('should render view1 when user navigates to /view1', function() {
expect(element('[ng-view] p:first').text()).
toMatch(/partial for view 1/);
});
});
describe('view2', function() {
beforeEach(function() {
browser().navigateTo('#/view2');
});
it('should render view2 when user navigates to /view2', function() {
expect(element('[ng-view] p:first').text()).
toMatch(/partial for view 2/);
});
});
});

2165
test/lib/angular/angular-mocks.js vendored

File diff suppressed because it is too large Load Diff

32566
test/lib/angular/angular-scenario.js vendored

File diff suppressed because it is too large Load Diff

1
test/lib/angular/version.txt

@ -1 +0,0 @@ @@ -1 +0,0 @@
1.2.9

16
test/unit/controllersSpec.js

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
'use strict';
/* jasmine specs for controllers go here */
describe('controllers', function(){
beforeEach(module('myApp.controllers'));
it('should ....', inject(function() {
//spec body
}));
it('should ....', inject(function() {
//spec body
}));
});

19
test/unit/directivesSpec.js

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
'use strict';
/* jasmine specs for directives go here */
describe('directives', function() {
beforeEach(module('myApp.directives'));
describe('app-version', function() {
it('should print current version', function() {
module(function($provide) {
$provide.value('version', 'TEST_VER');
});
inject(function($compile, $rootScope) {
var element = $compile('<span app-version></span>')($rootScope);
expect(element.text()).toEqual('TEST_VER');
});
});
});
});

19
test/unit/filtersSpec.js

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
'use strict';
/* jasmine specs for filters go here */
describe('filter', function() {
beforeEach(module('myApp.filters'));
describe('interpolate', function() {
beforeEach(module(function($provide) {
$provide.value('version', 'TEST_VER');
}));
it('should replace VERSION', inject(function(interpolateFilter) {
expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after');
}));
});
});

14
test/unit/servicesSpec.js

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
'use strict';
/* jasmine specs for services go here */
describe('service', function() {
beforeEach(module('myApp.services'));
describe('version', function() {
it('should return current version', inject(function(version) {
expect(version).toEqual('0.1');
}));
});
});

6
update-angular.sh

@ -6,10 +6,6 @@ if [ -n "$1" ]; then @@ -6,10 +6,6 @@ if [ -n "$1" ]; then
unzip tmp/angular.zip -d app/vendor
mv app/vendor/angular-$1 app/vendor/angular
rm -fr app/vendor/angular/docs
mv app/vendor/angular/angular-mocks.js test/lib/angular
mv app/vendor/angular/angular-scenario.js test/lib/angular
cp app/vendor/angular/version.txt test/lib/angular
else
echo "Usage: update-angular <version>"
fi
fi

Loading…
Cancel
Save