1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Add test directory

This commit is contained in:
gconsidine 2017-04-25 11:54:56 -04:00
parent 69b19cc06c
commit 90b3378725
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,18 @@
module.exports = config => {
config.set({
basePath: '..',
singleRun: true,
autoWatch: true,
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
reporters: ['mocha'],
files: [
'components/**/*.js',
'test/*.spec.js'
],
plugins: [
'karma-jasmine'
'karma-mocha-reporter'
],
});
};

View File

@ -0,0 +1,20 @@
describe('Components | panel', () => {
var $compile,
$rootScope;
beforeEach(module('at.components'));
beforeEach(inject((_$compile_, _$rootScope_) => {
$compile = _$compile_;
$rootScope = _$rootScope_;
}));
it('should load the navigation partial', function() {
var element = $compile('<at-panel></at-panel>')($rootScope);
$rootScope.$digest();
console.log(element.html());
//expect(element.html()).toContain('<nav class="navbar navbar-default" role="navigation">');
});
});