2020-04-22 13:11:48 +02:00
|
|
|
/* global module */
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = function(config) {
|
|
|
|
config.set({
|
2021-09-23 13:57:46 +02:00
|
|
|
|
2020-04-22 13:11:48 +02:00
|
|
|
// base path that will be used to resolve all patterns (eg. files, exclude)
|
|
|
|
basePath: '',
|
|
|
|
frameworks: ['jasmine'],
|
|
|
|
files: [
|
|
|
|
{ pattern: 'dist/*.js.map', included: false },
|
|
|
|
{ pattern: 'dist/*.css.map', included: false },
|
|
|
|
{ pattern: "dist/emojis.js", served: true },
|
2022-05-11 10:01:18 +02:00
|
|
|
"src/shared/tests/tests.css",
|
2020-12-29 12:52:53 +01:00
|
|
|
"node_modules/lodash/lodash.min.js",
|
2020-04-22 13:11:48 +02:00
|
|
|
"dist/converse.js",
|
|
|
|
"dist/converse.css",
|
2020-06-22 14:41:38 +02:00
|
|
|
{ pattern: "dist/images/**/*.*", included: false },
|
2020-04-22 13:11:48 +02:00
|
|
|
{ pattern: "dist/webfonts/**/*.*", included: false },
|
2020-05-15 14:33:31 +02:00
|
|
|
{ pattern: "dist/\@fortawesome/fontawesome-free/sprites/solid.svg",
|
|
|
|
watched: false,
|
|
|
|
included: false,
|
|
|
|
served: true,
|
|
|
|
nocache: false
|
|
|
|
},
|
2021-07-29 21:19:48 +02:00
|
|
|
{ pattern: "src/shared/tests/mock.js", type: 'module' },
|
2020-04-22 13:11:48 +02:00
|
|
|
|
2021-05-11 15:46:57 +02:00
|
|
|
{ pattern: "src/headless/plugins/caps/tests/caps.js", type: 'module' },
|
2021-04-21 12:25:28 +02:00
|
|
|
{ pattern: "src/headless/plugins/chat/tests/api.js", type: 'module' },
|
2021-04-21 11:12:49 +02:00
|
|
|
{ pattern: "src/headless/plugins/disco/tests/disco.js", type: 'module' },
|
2021-04-13 15:28:00 +02:00
|
|
|
{ pattern: "src/headless/plugins/muc/tests/affiliations.js", type: 'module' },
|
2021-11-03 21:33:23 +01:00
|
|
|
{ pattern: "src/headless/plugins/muc/tests/messages.js", type: 'module' },
|
2021-07-29 21:19:48 +02:00
|
|
|
{ pattern: "src/headless/plugins/muc/tests/muc.js", type: 'module' },
|
2021-11-03 21:33:23 +01:00
|
|
|
{ pattern: "src/headless/plugins/muc/tests/occupants.js", type: 'module' },
|
2021-06-16 19:25:52 +02:00
|
|
|
{ pattern: "src/headless/plugins/muc/tests/pruning.js", type: 'module' },
|
2021-06-02 18:34:11 +02:00
|
|
|
{ pattern: "src/headless/plugins/muc/tests/registration.js", type: 'module' },
|
2021-04-21 11:12:49 +02:00
|
|
|
{ pattern: "src/headless/plugins/ping/tests/ping.js", type: 'module' },
|
2021-05-11 15:46:57 +02:00
|
|
|
{ pattern: "src/headless/plugins/roster/tests/presence.js", type: 'module' },
|
2021-04-28 18:50:54 +02:00
|
|
|
{ pattern: "src/headless/plugins/smacks/tests/smacks.js", type: 'module' },
|
2021-05-11 16:09:36 +02:00
|
|
|
{ pattern: "src/headless/plugins/status/tests/status.js", type: 'module' },
|
2021-09-15 17:12:07 +02:00
|
|
|
{ pattern: "src/headless/shared/settings/tests/settings.js", type: 'module' },
|
2021-05-11 15:46:57 +02:00
|
|
|
{ pattern: "src/headless/tests/converse.js", type: 'module' },
|
|
|
|
{ pattern: "src/headless/tests/eventemitter.js", type: 'module' },
|
2021-07-19 16:29:44 +02:00
|
|
|
{ pattern: "src/modals/tests/user-details-modal.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/bookmark-views/tests/bookmarks.js", type: 'module' },
|
2022-05-14 15:50:26 +02:00
|
|
|
{ pattern: "src/plugins/bookmark-views/tests/bookmarks-list.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/chatbox.js", type: 'module' },
|
2021-04-22 12:33:43 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/corrections.js", type: 'module' },
|
2021-06-03 19:11:32 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/emojis.js", type: 'module' },
|
2021-05-12 12:31:55 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/http-file-upload.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/chatview/tests/markers.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/me-messages.js", type: 'module' },
|
2021-06-17 14:37:43 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/message-audio.js", type: 'module' },
|
2021-07-07 14:59:29 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/message-gifs.js", type: 'module' },
|
2021-04-21 12:05:15 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/message-images.js", type: 'module' },
|
2021-06-17 12:31:38 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/message-videos.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/messages.js", type: 'module' },
|
2021-06-17 14:37:43 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/oob.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/receipts.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/chatview/tests/spoilers.js", type: 'module' },
|
2021-06-22 16:52:50 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/styling.js", type: 'module' },
|
2021-06-29 13:13:15 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/unreads.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/chatview/tests/xss.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/controlbox/tests/controlbox.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/controlbox/tests/login.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/headlines-view/tests/headline.js", type: 'module' },
|
2021-04-11 21:10:21 +02:00
|
|
|
{ pattern: "src/plugins/mam-views/tests/mam.js", type: 'module' },
|
2021-06-15 12:17:02 +02:00
|
|
|
{ pattern: "src/plugins/mam-views/tests/placeholder.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/minimize/tests/minchats.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/muc-views/tests/autocomplete.js", type: 'module' },
|
2021-04-29 15:10:00 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/component.js", type: 'module' },
|
2021-04-15 16:42:10 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/corrections.js", type: 'module' },
|
2022-04-09 09:27:48 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/disco.js", type: 'module' },
|
2021-06-04 10:53:50 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/emojis.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/hats.js", type: 'module' },
|
2021-05-12 12:31:55 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/http-file-upload.js", type: 'module' },
|
2021-09-22 16:45:49 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/info-messages.js", type: 'module' },
|
2021-10-13 20:01:09 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/mam.js", type: 'module' },
|
2021-06-14 15:44:50 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/markers.js", type: 'module' },
|
2021-06-29 13:13:15 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/me-messages.js", type: 'module' },
|
2022-02-06 16:21:21 +01:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/member-lists.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/mentions.js", type: 'module' },
|
2021-09-15 17:12:07 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/mep.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/modtools.js", type: 'module' },
|
2022-03-30 09:48:23 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/muc-add-modal.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/muc-api.js", type: 'module' },
|
2022-05-14 16:38:44 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/muc-list-modal.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/muc-mentions.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/muc-views/tests/muc-messages.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/muc-views/tests/muc-registration.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/muc-views/tests/muc.js", type: 'module' },
|
2022-02-06 16:21:21 +01:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/nickname.js", type: 'module' },
|
2021-09-14 22:03:10 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/occupants.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/rai.js", type: 'module' },
|
2021-05-12 12:31:55 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/retractions.js", type: 'module' },
|
2021-04-16 09:33:01 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/styling.js", type: 'module' },
|
2021-06-22 12:35:51 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/toolbar.js", type: 'module' },
|
2021-05-11 15:46:57 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/unfurls.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/muc-views/tests/xss.js", type: 'module' },
|
|
|
|
{ pattern: "src/plugins/notifications/tests/notification.js", type: 'module' },
|
2022-02-19 11:45:04 +01:00
|
|
|
{ pattern: "src/plugins/omemo/tests/corrections.js", type: 'module' },
|
2021-07-02 20:29:54 +02:00
|
|
|
{ pattern: "src/plugins/omemo/tests/media-sharing.js", type: 'module' },
|
2021-10-30 20:53:26 +02:00
|
|
|
{ pattern: "src/plugins/omemo/tests/muc.js", type: 'module' },
|
2022-02-19 11:45:04 +01:00
|
|
|
{ pattern: "src/plugins/omemo/tests/omemo.js", type: 'module' },
|
2021-07-19 16:25:37 +02:00
|
|
|
{ pattern: "src/plugins/push/tests/push.js", type: 'module' },
|
2021-04-11 19:09:11 +02:00
|
|
|
{ pattern: "src/plugins/register/tests/register.js", type: 'module' },
|
2022-05-14 16:38:44 +02:00
|
|
|
{ pattern: "src/plugins/roomslist/tests/roomslist.js", type: 'module' },
|
2021-05-11 15:46:57 +02:00
|
|
|
{ pattern: "src/plugins/rootview/tests/root.js", type: 'module' },
|
2022-08-21 13:03:32 +02:00
|
|
|
{ pattern: "src/plugins/rosterview/tests/add-contact-modal.js", type: 'module' },
|
2021-05-11 15:46:57 +02:00
|
|
|
{ pattern: "src/plugins/rosterview/tests/presence.js", type: 'module' },
|
2021-06-04 12:52:02 +02:00
|
|
|
{ pattern: "src/plugins/rosterview/tests/protocol.js", type: 'module' },
|
2021-05-11 15:46:57 +02:00
|
|
|
{ pattern: "src/plugins/rosterview/tests/roster.js", type: 'module' },
|
2021-06-22 17:16:23 +02:00
|
|
|
|
|
|
|
// For some reason this test causes issues when its run earlier
|
|
|
|
{ pattern: "src/headless/tests/persistence.js", type: 'module' },
|
2020-04-22 13:11:48 +02:00
|
|
|
],
|
2020-05-15 14:33:31 +02:00
|
|
|
|
|
|
|
proxies: {
|
2020-06-22 14:41:38 +02:00
|
|
|
"/dist/images/custom_emojis/": "/base/dist/images/custom_emojis/"
|
2020-05-15 14:33:31 +02:00
|
|
|
},
|
|
|
|
|
2020-06-04 14:47:33 +02:00
|
|
|
client: {
|
|
|
|
jasmine: {
|
|
|
|
random: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-04-22 13:11:48 +02:00
|
|
|
exclude: ['**/*.sw?'],
|
|
|
|
|
|
|
|
// 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', 'kjhtml'],
|
|
|
|
|
|
|
|
webpack: {
|
|
|
|
mode: 'development',
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
module: {
|
|
|
|
rules: [{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /(node_modules|test)/
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve('test'),
|
|
|
|
filename: '[name].out.js',
|
|
|
|
chunkFilename: '[id].[chunkHash].js'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
port: 9876,
|
|
|
|
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
|
|
|
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
|
|
|
browsers: ['Chrome'],
|
|
|
|
|
|
|
|
// 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
|
|
|
|
})
|
|
|
|
}
|