Skip to content

Commit 8989355

Browse files
chore('testing'): Fix up the tescacular config to run the unit tests
1 parent 191b89e commit 8989355

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,31 @@ Book Samples
55

66
Each chapter has its own folder, which will correspond to the zip file name for that chapter on submission.
77
Within each chapter folder is a folder for each sample. The folder should contain enough to run the sample independent of the other samples, including tests.
8-
I have put an index (i.e. 01, 02, etc.) in front of each sample so that you can see the order in which they appear in the chapter.
9-
Where the sample has a corresponding Plunk, I have added the Plunk ID in brackets after the name of the sample in the folder name.
8+
There is an index (i.e. 01, 02, etc.) in front of each sample so that you can see the order in which they appear in the chapter.
9+
Where the sample has a corresponding Plunk, the Plunk ID is added in brackets after the name of the sample in the folder name.
1010

11-
We could have a common folder for libraries that we can pull from a CDN.
11+
## Library files
12+
13+
There is a common folder for libraries called lib.
14+
15+
## Testing
16+
17+
There is a basic grunt file that can run all the unit tests.
18+
19+
You need to install the grunt command line globally:
20+
21+
```
22+
npm -g install grunt-cli
23+
```
24+
25+
and grunt itself locally (using the values in the package.json):
26+
27+
```
28+
npm install grunt
29+
```
30+
31+
Run the test task on grunt to execute all the samples' tests.
32+
33+
```
34+
grunt.cmd test
35+
```

testacular.conf.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ basePath = '.';
66
files = [
77
JASMINE,
88
JASMINE_ADAPTER,
9+
'lib/jquery-1.8.3/jquery-1.8.3.js',
10+
'lib/jquery-ui-1.9.2/js/datepicker.js',
911
'lib/angular/1.0.2/angular.js',
1012
'lib/angular/1.0.2/angular-mocks.js',
11-
'chapter*/*/*.js',
12-
'chapter*/*/test/*Spec.js'
13+
'1820EN_*/*/*.js'
1314
];
1415

1516
// list of files to exclude
1617
exclude = [
18+
'1820EN_09_Code/01_directive_test_skeleton/test.js'
1719
];
1820

1921
// Start these browsers, currently available:
@@ -23,7 +25,7 @@ exclude = [
2325
// - Opera
2426
// - Safari
2527
// - PhantomJS
26-
browsers = ['Chrome'];
28+
browsers = [];
2729

2830
// test results reporter to use
2931
// possible values: dots || progress

0 commit comments

Comments
 (0)