Skip to content

Commit f3ba1e3

Browse files
author
andre.tito
committed
Adding automated tests with mocha-sinon-chai
1 parent 0be6eb4 commit f3ba1e3

11 files changed

+3029
-85
lines changed

dist/aframe-keyboard.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

karma.conf.js

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
module.exports = function(config) {
2+
config.set({
3+
basePath: '',
4+
browserify: {
5+
debug: true,
6+
paths: ['src'],
7+
transform: ['browserify-istanbul'],
8+
},
9+
client: {
10+
captureConsole: true,
11+
mocha: {ui: 'tdd', timeout: 3000},
12+
},
13+
envPreprocessor: [
14+
'TEST_ENV',
15+
],
16+
browserNoActivityTimeout: 1000000,
17+
frameworks: ['mocha', 'sinon-chai', 'chai-shallow-deep-equal', 'browserify'],
18+
files: [
19+
{pattern: './tests/i18n.test.js'},
20+
{pattern: './tests/keyboardTemplate.test.js'},
21+
{pattern: './tests/**/*.test.js', included: false},
22+
],
23+
// list of files / patterns to exclude
24+
exclude: [
25+
],
26+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
27+
preprocessors: {
28+
'tests/**/*.js': ['browserify', 'env'],
29+
'tests/*.js': ['browserify', 'env'],
30+
'src/**/*.js': 'coverage',
31+
},
32+
reporters: ['mocha'],
33+
port: 9876,
34+
colors: true,
35+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
36+
logLevel: config.LOG_INFO,
37+
autoWatch: true,
38+
browsers: ['Firefox', 'Chrome'],
39+
singleRun: false,
40+
concurrency: Infinity,
41+
});
42+
};

0 commit comments

Comments
 (0)