-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added first qunit test, ran by karma
- Loading branch information
Showing
4 changed files
with
79 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,69 @@ | ||
// Karma configuration | ||
// Generated on Tue Mar 18 2014 03:46:20 GMT+0100 (CET) | ||
// Generated on Sun Mar 23 2014 15:19:50 GMT+0100 (CET) | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
config.set({ | ||
|
||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '', | ||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '', | ||
|
||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['qunit'], | ||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['qunit'], | ||
|
||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
|
||
], | ||
// list of files / patterns to load in the browser | ||
files: [ | ||
'*.js', | ||
'test/*.js' | ||
], | ||
|
||
|
||
// list of files to exclude | ||
exclude: [ | ||
|
||
], | ||
// list of files to exclude | ||
exclude: [ | ||
'*.min.js', | ||
'Gruntfile.js' | ||
], | ||
|
||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
|
||
}, | ||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
|
||
}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['progress'], | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['progress'], | ||
|
||
// web server port | ||
port: 9876, | ||
|
||
// web server port | ||
port: 9876, | ||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
// 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, | ||
|
||
// 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: false, | ||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['Chrome', 'IE'], | ||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['Chrome', 'Firefox', 'Safari'], | ||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: false | ||
}); | ||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: false | ||
}); | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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,29 @@ | ||
module( "hello", { | ||
setup: function() { | ||
$('body').append('<picture data-alt="A beautiful responsive image" data-default-src="img/960x960.gif">\ | ||
<source srcset="img/480x480.gif, img/480x480x2.gif 2x"/>\ | ||
<source srcset="img/512x512.gif, img/512x512x2.gif 2x" media="(min-width: 481px)"/>\ | ||
<source srcset="img/720x720.gif, img/720x720x2.gif 2x" media="(min-width: 1025px)"/>\ | ||
<source srcset="img/960x960.gif, img/960x960x2.gif 2x" media="(min-width: 1441px)"/>\ | ||
<noscript>\ | ||
<img src="img/960x960.gif" alt="A beautiful responsive image"/>\ | ||
</noscript>\ | ||
</picture>\ | ||
<picture data-alt="A beautiful responsive image" data-default-src="img/960x960.gif">\ | ||
<source src="img/480x480.gif"/>\ | ||
<source src="img/512x512.gif" media="(min-width: 481px)"/>\ | ||
<source src="img/720x720.gif" media="(min-width: 1025px)"/>\ | ||
<source src="img/960x960.gif" media="(min-width: 1441px)"/>\ | ||
<noscript>\ | ||
<img src="img/960x960.gif" alt="A beautiful responsive image"/>\ | ||
</noscript>\ | ||
</picture>'); | ||
}, | ||
teardown: function() { | ||
$('picture').remove(); | ||
} | ||
}); | ||
|
||
test( "Script initialization", function() { | ||
strictEqual( typeof window.picturePolyfill, 'function'); | ||
}); |