Skip to content

Commit

Permalink
More work on karma tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed Jul 26, 2013
1 parent 0da5f27 commit bd06b67
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -8,7 +8,7 @@ let us know. Issues are how the project moves forward; by letting us know
what's bothering you.

* Search the [issues
list](https://github.com/tbranyen/backbone-boilerplate/issues)
list](https://github.com/backbone-boilerplate/backbone-boilerplate/issues)
for existing similar issues. Consider adding to an existing issue if you
find one.
* Choose an applicable title. This will be used for a corresponding unit test.
Expand Down Expand Up @@ -56,8 +56,8 @@ is outdated or incorrect, please file an issue, pull request, or make the
change yourself in the Wiki.

* Add documentation to the
[Wiki](https://github.com/tbranyen/backbone-boilerplate/wiki) if
[Wiki](https://github.com/backbone-boilerplate/backbone-boilerplate/wiki) if
applicable.
* Release notes are added to the
[readme.md](https://github.com/tbranyen/backbone-boilerplate/blob/master/readme.md)
[README.md](https://github.com/backbone-boilerplate/backbone-boilerplate/blob/master/readme.md)
if applicable.
5 changes: 1 addition & 4 deletions Gruntfile.js
Expand Up @@ -15,9 +15,6 @@ module.exports = function(grunt) {
requirejs: {
release: {
options: {
// Include the main ration file.
mainConfigFile: "app/config.js",

// Setting the base url to the distribution directory allows the
// Uglify minification process to correctly map paths for Source
// Maps.
Expand Down Expand Up @@ -147,7 +144,7 @@ module.exports = function(grunt) {
},

jasmine: {
configFile: "test/jasmine/karma.conf.js",
configFile: "test/jasmine/karma.conf.js"
},

mocha: {
Expand Down
1 change: 1 addition & 0 deletions bower.json
@@ -1,5 +1,6 @@
{
"name": "backbone-boilerplate",

"dependencies": {
"html5-boilerplate": "~4.2.0",
"almond": "~0.2.5",
Expand Down
9 changes: 9 additions & 0 deletions test/jasmine/specs.js
@@ -0,0 +1,9 @@
define({
specs: [
// Load the example spec, replace this and add your own spec.
"spec/example.spec",

// Ensure the boilerplate functions correctly.
"spec/boilerplate/router.spec"
]
});
26 changes: 12 additions & 14 deletions test/jasmine/test-runner.js
@@ -1,13 +1,3 @@
var specs = [

// Load the example spec, replace this and add your own spec.
"spec/example.spec",

// Ensure the boilerplate functions correctly.
"spec/boilerplate/router.spec"

];

// Make async.
if (window.__karma__) {
window.__karma__.loaded = function() {};
Expand All @@ -21,21 +11,29 @@ require.config({
"jasmine-html": "../vendor/bower/jasmine/lib/jasmine-core/jasmine-html",

// Location of tests.
spec: "../test/jasmine/spec"
spec: "../test/jasmine/spec",
specs: "../test/jasmine/specs"
},

shim: {
"jasmine": { exports: "jasmine" },
"jasmine-html": ["jasmine"]
},

// Determine the baseUrl if we are in Karma or not.
baseUrl: window.__karma__ ? "base/app" : "../../app"
});

// Load the configuration and testing libraries first.
require(["config", "jasmine", "jasmine-html"], function() {
require([
"config",
"specs",
"jasmine",
"jasmine-html"
],

function(config, specs, jasmine) {
// Load all specs.
require(specs, function() {
require(specs.specs, function() {

if (window.__karma__) {
// This will start Karma if it exists.
Expand Down

0 comments on commit bd06b67

Please sign in to comment.