You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-37Lines changed: 16 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This project is an application skeleton for a typical [AngularJS](http://angular
4
4
You can use it to quickly bootstrap your angular webapp projects and dev environment for these
5
5
projects.
6
6
7
-
The seed contains angular libraries, test libraries and a bunch of scripts all preconfigured for
7
+
The seed contains AngularJS libraries, test libraries and a bunch of scripts all preconfigured for
8
8
instant web development gratification. Just clone the repo (or download the zip/tarball), start up
9
9
our (or yours) webserver and you are ready to develop and test your application.
10
10
@@ -41,10 +41,10 @@ This really depends on how complex is your app and the overall infrastructure of
41
41
the general rule is that all you need in production are all the files under the `app/` directory.
42
42
Everything else should be omitted.
43
43
44
-
angular apps are really just a bunch of static html, css and js files that just need to be hosted
44
+
Angular apps are really just a bunch of static html, css and js files that just need to be hosted
45
45
somewhere, where they can be accessed by browsers.
46
46
47
-
If your angular app is talking to the backend server via xhr or other means, you need to figure
47
+
If your Angular app is talking to the backend server via xhr or other means, you need to figure
48
48
out what is the best way to host the static files to comply with the same origin policy if
49
49
applicable. Usually this is done by hosting the files by the backend server or through
50
50
reverse-proxying the backend server(s) and a webserver(s).
@@ -53,37 +53,23 @@ reverse-proxying the backend server(s) and a webserver(s).
53
53
### Running unit tests
54
54
55
55
We recommend using [jasmine](http://pivotal.github.com/jasmine/) and
56
-
[JsTestDriver](http://code.google.com/p/js-test-driver/) for your unit tests/specs, but you are free
56
+
[Testacular](http://vojtajina.github.com/testacular/) for your unit tests/specs, but you are free
57
57
to use whatever works for you.
58
58
59
-
Requires java and a local or remote browser.
59
+
Requires [node.js](http://nodejs.org/), Testacular (`sudo npm install -g testacular`) and a local
60
+
or remote browser.
60
61
61
-
* start `scripts/test-server.sh` (on windows: `scripts\test-server.bat`)
62
-
* navigate your browser to `http://localhost:9876/`
63
-
* click on one of the capture links (preferably the "strict" one)
64
-
* run `scripts/test.sh` (on windows: `scripts\test.bat`)
65
-
66
-
67
-
### Continuous unit testing
68
-
69
-
Requires ruby and [watchr](https://github.com/mynyml/watchr) gem.
70
-
71
-
* start JSTD server and capture a browser as described above
72
-
* start watchr with `watchr scripts/watchr.rb`
73
-
* in a different window/tab/editor `tail -f logs/jstd.log`
74
-
* edit files in `app/` or `src/` and save them
75
-
* watch the log to see updates
76
-
77
-
There are many other ways to achieve the same effect. Feel free to use them if you prefer them over
78
-
watchr.
62
+
* start `scripts/test.sh` (on windows: `scripts\test.bat`)
63
+
* a browser will start and connect to the Testacular server (Chrome is default browser, others can be captured by loading the same url as the one in Chrome or by changing the `config/testacular.conf.js` file)
64
+
* to run or re-run tests just change any of your source or test javascript files
79
65
80
66
81
67
### End to end testing
82
68
83
-
angular ships with a baked-in end-to-end test runner that understands angular, your app and allows
69
+
Angular ships with a baked-in end-to-end test runner that understands angular, your app and allows
84
70
you to write your tests with jasmine-like BDD syntax.
85
71
86
-
Requires a webserver, node.js or your backend server that hosts the angular static files.
72
+
Requires a webserver, node.js + `./scripts/web-server.js`or your backend server that hosts the angular static files.
87
73
88
74
Check out the
89
75
[end-to-end runner's documentation](http://docs.angularjs.org/guide/dev_guide.e2e-testing) for more
@@ -125,18 +111,14 @@ fetch the changes and merge them into your project with git.
125
111
partial1.html
126
112
partial2.html
127
113
128
-
config/jsTestDriver.conf --> config file for JsTestDriver
129
-
130
-
logs/ --> JSTD and other logs go here (git-ignored)
114
+
config/testacular.conf.js --> config file for running unit tests with Testacular
115
+
config/testacular-e2e.conf.js --> config file for running e2e tests with Testacular
131
116
132
117
scripts/ --> handy shell/js/ruby scripts
133
118
e2e-test.sh --> runs end-to-end tests with Testacular (*nix)
134
119
e2e-test.bat --> runs end-to-end tests with Testacular (windows)
135
-
test-server.bat --> starts JSTD server (windows)
136
-
test-server.sh --> starts JSTD server (*nix)
137
-
test.bat --> runs all unit tests (windows)
138
-
test.sh --> runs all unit tests (*nix)
139
-
watchr.rb --> config script for continuous testing with watchr
120
+
test.bat --> autotests unit tests with Testacular (windows)
121
+
test.sh --> autotests unit tests with Testacular (*nix)
140
122
web-server.js --> simple development webserver based on node.js
141
123
142
124
test/ --> test source files and libraries
@@ -148,12 +130,9 @@ fetch the changes and merge them into your project with git.
148
130
angular-mocks.js --> mocks that replace certain angular services in tests
149
131
angular-scenario.js --> angular's scenario (end-to-end) test runner library
150
132
version.txt --> version file
151
-
jasmine/ --> Pivotal's Jasmine - an elegant BDD-style testing framework
152
-
jasmine-jstd-adapter/ --> bridge between JSTD and Jasmine
153
-
jstestdriver/ --> JSTD - JavaScript test runner
154
133
unit/ --> unit level specs/tests
155
134
controllersSpec.js --> specs for controllers
156
135
157
136
## Contact
158
137
159
-
For more information on angular please check out http://angularjs.org/
138
+
For more information on AngularJS please check out http://angularjs.org/
0 commit comments