Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / encrypted-search / test / karma.conf.js
blob06b60ef503fdb4814c66c40fbb7d3dcf206bd067
1 const karmaJasmine = require('karma-jasmine');
2 const karmaWebpack = require('karma-webpack');
3 const karmaSpecReporter = require('karma-spec-reporter');
4 const karmaChromeLauncher = require('karma-chrome-launcher');
5 const { chromium } = require('playwright');
6 process.env.CHROME_BIN = chromium.executablePath();
8 module.exports = (config) => {
9 config.set({
10 basePath: '..',
11 frameworks: ['jasmine', 'webpack'],
12 plugins: [karmaJasmine, karmaWebpack, karmaChromeLauncher, karmaSpecReporter],
13 files: ['test/index.spec.js'],
14 preprocessors: {
15 'test/index.spec.js': ['webpack'],
17 webpack: {
18 mode: 'development',
19 resolve: {
20 extensions: ['.js', '.ts', '.tsx'],
21 fallback: {
22 crypto: false,
23 buffer: false,
24 stream: false,
27 module: {
28 rules: [
30 test: /\.tsx?$/,
31 use: [
33 loader: 'ts-loader',
34 options: {
35 transpileOnly: true,
36 compilerOptions: {
37 jsx: 'react-jsx',
42 exclude: /node_modules\/(?!.*pmcrypto)/,
45 test: /\.(svg|woff|woff2|eot|ttf|otf|mp4|webm|pdf|csv)$/,
46 type: 'asset/resource',
50 devtool: 'inline-source-map',
52 mime: {
53 'text/x-typescript': ['ts', 'tsx'],
55 reporters: ['spec'],
56 port: 9877,
57 colors: true,
58 logLevel: config.LOG_INFO,
59 autoWatch: false,
60 customLaunchers: {
61 ChromeHeadlessCI: {
62 base: 'ChromeHeadless',
63 flags: ['--no-sandbox'],
66 browsers: ['ChromeHeadlessCI'],
67 singleRun: true,
68 concurrency: Infinity,
69 });