Commit c9b4c740 authored by JC Brand's avatar JC Brand

Exploring using karma

parent 74eed32e
......@@ -9,6 +9,7 @@
"plugins": ["lodash"],
"extends": ["eslint:recommended", "plugin:lodash/canonical"],
"globals": {
"module": true,
"window": true,
"sinon": true,
"define": true,
......
......@@ -11,11 +11,7 @@
<link rel="shortcut icon" type="image/ico" href="css/images/favicon.ico"/>
<link type="text/css" rel="stylesheet" media="screen" href="css/fullpage.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.css" />
<![if gte IE 11]>
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.css" />
<script src="dist/converse.js"></script>
<![endif]>
<script src="dist/converse.js"></script>
</head>
<body class="reset">
......
// Karma configuration
// Generated on Sat Jun 02 2018 22:33:35 GMT+0200 (CEST)
module.exports = function(config) {
config.set({
// 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: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'dist/converse.js',
'tests/utils.js',
'tests/mock.js',
'spec/messages.js'
],
// list of files / patterns to exclude
exclude: ['*.min.js'],
// 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'],
// 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_DEBUG,
// 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: [],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,7 +12,7 @@ if (typeof(require) === 'undefined') {
};
}
require.config({
window.config = {
baseUrl: '.',
paths: {
"IPv6": "node_modules/urijs/src/IPv6",
......
......@@ -11,9 +11,8 @@
<link rel="stylesheet" type="text/css" media="screen" href="../css/jasmine.css">
<link type="text/css" rel="stylesheet" media="screen" href="../css/website.css" />
<link type="text/css" rel="stylesheet" media="screen" href="../css/converse.css" />
<script src="../src/config.js"></script>
<script data-main="runner" src="../node_modules/requirejs/require.js"></script>
<script src="dist/converse.js"></script>
<script src="runner.js"></script>
<style>
.tests-brand-heading {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -75,6 +75,18 @@ const config = {
path.resolve(__dirname, "src"),
],
alias: {
"jquery": path.resolve(__dirname, "node_modules/jquery/dist/jquery"),
"mock": path.resolve(__dirname, "tests/mock"),
"wait-until-promise": path.resolve(__dirname, "node_modules/wait-until-promise/index"),
"test-utils": path.resolve(__dirname, "tests/utils"),
"sinon": path.resolve(__dirname, "node_modules/sinon/pkg/sinon"),
"transcripts": path.resolve(__dirname, "converse-logs/converse-logs"),
"jasmine-core": path.resolve(__dirname, "node_modules/jasmine-core/lib/jasmine-core/jasmine"),
"jasmine": path.resolve(__dirname, "node_modules/jasmine-core/lib/jasmine-core/boot"),
"jasmine-console": path.resolve(__dirname, "node_modules/jasmine-core/lib/console/console"),
"console-reporter": path.resolve(__dirname, "tests/console-reporter"),
"jasmine-html": path.resolve(__dirname, "node_modules/jasmine-core/lib/jasmine-core/jasmine-html"),
"IPv6": path.resolve(__dirname, "node_modules/urijs/src/IPv6"),
"SecondLevelDomains": path.resolve(__dirname, "node_modules/urijs/src/SecondLevelDomains"),
"awesomplete": path.resolve(__dirname, "node_modules/awesomplete-avoid-xss/awesomplete"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment