Last active
August 29, 2015 14:16
-
-
Save jrhorn424/de8ff5ccea8e53d777f0 to your computer and use it in GitHub Desktop.
Getting jasmine-jquery to work with karma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[project root] | |
├── app/ | |
│ ├── js/ | |
│ │ └── app.js | |
│ └── index.html | |
├── test/ | |
│ ├── spec/ | |
│ │ ├── fixtures/ | |
│ │ │ ├── todo.html | |
│ │ ├── helper.js | |
│ │ └── todo_spec.js | |
│ └── karma.conf.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var fixtures = jasmine.getFixtures(); | |
fixtures.fixturesPath = '/base/test/spec/fixtures'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(config) { | |
// ... | |
config.set({ | |
// ... from the README | |
frameworks: ['jasmine-jquery', 'jasmine'], | |
files: [ | |
// ... , | |
'test/spec/fixtures/**/*.html' | |
], | |
plugins: [ | |
// ... , | |
'karma-jasmine-jquery' | |
], | |
// ... | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type='text' id='new-todo'> | |
<ul id='todos'> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
describe('todo', function () { | |
beforeEach(function () { | |
loadFixtures('todo.html'); | |
}); | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment