forked from outsideris/angular-summernote
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
adc7b1d
commit 9471b4e
Showing
8 changed files
with
230 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Karma configuration | ||
// Generated on Wed Jan 15 2014 20:50:47 GMT+0900 (KST) | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
|
||
// base path, that will be used to resolve files and exclude | ||
basePath: '', | ||
|
||
|
||
// frameworks to use | ||
frameworks: ['mocha'], | ||
|
||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
'"test/**/*.test.js"' | ||
], | ||
|
||
|
||
// list of files to exclude | ||
exclude: [ | ||
|
||
], | ||
|
||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' | ||
reporters: ['progress'], | ||
|
||
|
||
// web server port | ||
port: 9876, | ||
|
||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
|
||
// Start these browsers, currently available: | ||
// - Chrome | ||
// - ChromeCanary | ||
// - Firefox | ||
// - Opera (has to be installed with `npm install karma-opera-launcher`) | ||
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) | ||
// - PhantomJS | ||
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) | ||
browsers: ['Chrome'], | ||
|
||
|
||
// If browser does not capture in given timeout [ms], kill it | ||
captureTimeout: 60000, | ||
|
||
|
||
// Continuous Integration mode | ||
// if true, it capture browsers, run tests and exit | ||
singleRun: false | ||
}); | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> | ||
* Licensed under the MIT license. | ||
* <http://outsider.mit-license.org/> | ||
*/ | ||
describe('Summernote directive', function() { | ||
'use strict'; | ||
|
||
var $rootScope, $compile, element; | ||
|
||
beforeEach(module('summernote')); | ||
beforeEach(inject(function(_$compile_, _$rootScope_) { | ||
$compile = _$compile_; | ||
$rootScope = _$rootScope_; | ||
})); | ||
|
||
describe('initialization', function() { | ||
|
||
it('has "summernote" class', function () { | ||
element = $compile('<summernote></summernote>')($rootScope); | ||
$rootScope.$digest(); | ||
|
||
expect($(element.get(0)).hasClass('summernote')).to.be.true; | ||
}); | ||
|
||
it('works with "summernote" element', function () { | ||
element = $compile('<summernote></summernote>')($rootScope); | ||
$rootScope.$digest(); | ||
|
||
expect(element.next().hasClass('note-editor')).to.be.true; | ||
}); | ||
|
||
it('works with "summernote" attribute', function () { | ||
element = $compile('<div summernote></div>')($rootScope); | ||
$rootScope.$digest(); | ||
|
||
expect(element.next().hasClass('note-editor')).to.be.true; | ||
}); | ||
|
||
}); | ||
|
||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> | ||
* Licensed under the MIT license. | ||
* <http://outsider.mit-license.org/> | ||
*/ | ||
var expect = chai.expect; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// Karma configuration | ||
// Generated on Sat Jan 04 2014 16:46:43 GMT+0900 (KST) | ||
|
||
module.exports = function(config) { | ||
'use strict'; | ||
|
||
config.set({ | ||
|
||
// base path, that will be used to resolve files and exclude | ||
basePath: '', | ||
|
||
|
||
// frameworks to use | ||
frameworks: ['mocha'], | ||
|
||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
// dependencies | ||
'../examples/components/jquery/jquery.js', | ||
'../examples/components/angular/angular.js', | ||
'../examples/components/bootstrap/dist/js/bootstrap.min.js', | ||
'../examples/components/summernote/dist/summernote.min.js', | ||
|
||
// application code | ||
'../src/**/*.js', | ||
|
||
// test dependencies | ||
'../examples/components/angular-mocks/angular-mocks.js', | ||
'../examples/components/chai/chai.js', | ||
'mocha.conf.js', | ||
'chai.conf.js', | ||
|
||
// test code | ||
'*.test.js' | ||
], | ||
|
||
|
||
// list of files to exclude | ||
exclude: [ | ||
|
||
], | ||
|
||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' | ||
reporters: ['progress'], | ||
|
||
|
||
// web server port | ||
port: 9876, | ||
|
||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
|
||
// Start these browsers, currently available: | ||
// - Chrome | ||
// - ChromeCanary | ||
// - Firefox | ||
// - Opera (has to be installed with `npm install karma-opera-launcher`) | ||
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) | ||
// - PhantomJS | ||
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) | ||
browsers: ['Chrome'], | ||
|
||
|
||
// If browser does not capture in given timeout [ms], kill it | ||
captureTimeout: 60000, | ||
|
||
|
||
// Continuous Integration mode | ||
// if true, it capture browsers, run tests and exit | ||
singleRun: false | ||
}); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
window.mocha.setup({ | ||
timeout: 5000 | ||
}); |