Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Apr 1, 2017
0 parents commit 833ff65
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
node_modules
.yo-rc.json
18 changes: 18 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "attach",
"name": "Attach Karma Chrome",
"address": "localhost",
"port": 9333,
"trace": true,
"pathMapping": {
"/": "${workspaceRoot}",
"/base": "${workspaceRoot}/test"
},
"disableNetworkCache": true
}
]
}
13 changes: 13 additions & 0 deletions package.json
@@ -0,0 +1,13 @@
{
"scripts": {
"test": "karma start test\\karma.conf.js"
},
"dependencies": {},
"devDependencies": {
"jasmine-core": "^2.5.2",
"karma": "^1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-jasmine": "^1.1.0",
"phantomjs-prebuilt": "^2.1.14"
}
}
7 changes: 7 additions & 0 deletions test/example.js
@@ -0,0 +1,7 @@
describe( "A suite is just a function", function() {
it( "and so is a spec", function() {
let a = true;

expect( a ).toBe( true );
} );
} );
74 changes: 74 additions & 0 deletions test/karma.conf.js
@@ -0,0 +1,74 @@
// Karma configuration
// Generated on 2017-03-31

module.exports = function( config ) {
'use strict';

config.set( {
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,

// base path, that will be used to resolve files and exclude
basePath: '',

// testing framework to use (jasmine/mocha/qunit/...)
// as well as any additional frameworks (requirejs/chai/sinon/...)
frameworks: [
'jasmine'
],

// list of files / patterns to load in the browser
files: [
'**/*.js'
],

// list of files / patterns to exclude
exclude: [
],

// web server port
port: 8080,

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [
'ChromeDebugging'
],

customLaunchers: {
ChromeDebugging: {
base: 'Chrome',
flags: [ '--remote-debugging-port=9333' ]
}
},

// Which plugins to enable
plugins: [
'karma-chrome-launcher',
'karma-jasmine'
],

// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,

colors: true,

// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,

// Uncomment the following lines if you are using grunt's server to run the tests
// proxies: {
// '/': 'http://localhost:9000/'
// },
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
} );
};

0 comments on commit 833ff65

Please sign in to comment.