Skip to content

Commit 02abae1

Browse files
committed
Adding post-build tests, stripping out some lingering goog
1 parent ca6a7af commit 02abae1

File tree

7 files changed

+70
-8
lines changed

7 files changed

+70
-8
lines changed

karma-built.conf.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = function(config){
2+
var coverage = process.env["COVERAGE"]
3+
var conf = {};
4+
conf.files = [
5+
'spec_support/jquery-1.6.1.js',
6+
'spec_support/fixtures/*.js',
7+
'spec_support/**/*.html',
8+
'generated/javascript/ninjascript.js',
9+
'spec/**/*.js'
10+
];
11+
12+
conf.autoWatch = true;
13+
14+
conf.browsers = ['Chrome'];
15+
conf.frameworks = ['jasmine', 'sinon', 'closure'];
16+
//conf.plugins = ['karma-closure'];
17+
18+
conf.preprocessors = {
19+
"spec_support/fixtures/**/*.html": ['html2js'],
20+
"spec_support/fixtures/**/*.js": ['html2js'],
21+
'generated/javascript/**/*.js': ['coverage']
22+
};
23+
24+
conf.singleRun = true;
25+
conf.reporters = ['coverage', 'progress'];
26+
27+
conf.junitReporter = {
28+
outputFile: 'test_out/unit.xml',
29+
suite: 'unit'
30+
};
31+
32+
config.set(conf);
33+
}

karma-min.conf.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = function(config){
2+
var coverage = process.env["COVERAGE"]
3+
var conf = {};
4+
conf.files = [
5+
'spec_support/jquery-1.6.1.js',
6+
'spec_support/fixtures/*.js',
7+
'spec_support/**/*.html',
8+
'generated/javascript/ns.min.js',
9+
'spec/**/*.js'
10+
];
11+
12+
conf.autoWatch = true;
13+
14+
conf.browsers = ['Chrome'];
15+
conf.frameworks = ['jasmine', 'sinon', 'closure'];
16+
//conf.plugins = ['karma-closure'];
17+
18+
conf.preprocessors = {
19+
"spec_support/fixtures/**/*.html": ['html2js'],
20+
"spec_support/fixtures/**/*.js": ['html2js'],
21+
'generated/javascript/**/*.js': ['coverage']
22+
};
23+
24+
conf.singleRun = true;
25+
conf.reporters = ['coverage', 'progress'];
26+
27+
conf.junitReporter = {
28+
outputFile: 'test_out/unit.xml',
29+
suite: 'unit'
30+
};
31+
32+
config.set(conf);
33+
}

karma.conf.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ module.exports = function(config){
44
conf.files = [
55
//Library
66
'node_modules/closure-library/closure/goog/base.js',
7-
'spec_support/**/*.js',
7+
'spec_support/jquery-1.6.1.js',
8+
'spec_support/fixtures/*.js',
89
'spec_support/**/*.html',
910
{pattern: 'node_modules/closure-library/closure/goog/deps.js', included: false },
1011
'src/deps.js',
@@ -13,6 +14,7 @@ module.exports = function(config){
1314
{pattern: 'src/javascript/**/*.js', included: false},
1415

1516
//Tests
17+
'spec_support/loaded.js',
1618
'spec/**/*.js'
1719
];
1820

spec/packaged_behaviors.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
goog.require('ninjascript.loaded');
2-
31
describe("Packaged Behaviors:", function() {
42
var Ninja
53
var sandbox

spec/priority.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
goog.require('ninjascript.loaded');
2-
31
describe("Priorities:", function() {
42
var Ninja
53

spec_support/loaded.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
goog.require('ninjascript.loaded');

src/javascript/ninja-school.js

-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,3 @@ Ninja = ninjascript.build();
3838
Ninja.orders = function(funk) {
3939
funk(window.Ninja);
4040
}
41-
42-
goog.exportSymbol('Ninja', Ninja);
43-
goog.exportSymbol('ninjascript.build', ninjascript.build);

0 commit comments

Comments
 (0)