Remove client-side isLoggedIn value
[ProtonMail-WebClient.git] / packages / key-transparency / test / karma.conf.js
blobeab420446a5860decd1ae64b56508d71ee117f6c
1 const karmaJasmine = require('karma-jasmine');
2 const karmaWebpack = require('karma-webpack');
3 const karmaChromeLauncher = require('karma-chrome-launcher');
4 const { chromium } = require('playwright');
5 process.env.CHROME_BIN = chromium.executablePath();
7 module.exports = (config) => {
8     config.set({
9         basePath: '..',
10         frameworks: ['jasmine', 'webpack'],
11         plugins: [karmaJasmine, karmaWebpack, karmaChromeLauncher],
12         files: ['test/index.spec.js'],
13         preprocessors: {
14             'test/index.spec.js': ['webpack'],
15         },
16         webpack: {
17             mode: 'development',
18             resolve: {
19                 extensions: ['.js', '.ts', '.tsx'],
20                 fallback: {
21                     crypto: false,
22                     buffer: false,
23                     stream: false,
24                 },
25             },
26             module: {
27                 rules: [
28                     {
29                         test: /\.tsx?$/,
30                         use: [
31                             {
32                                 loader: 'ts-loader',
33                                 options: { transpileOnly: true },
34                             },
35                         ],
36                         exclude: /node_modules\/(?!.*(bip39|pmcrypto))/,
37                     },
38                 ],
39             },
40             devtool: 'inline-source-map',
41         },
42         mime: {
43             'text/x-typescript': ['ts', 'tsx'],
44         },
45         reporters: ['progress'],
46         port: 9876,
47         colors: true,
48         logLevel: config.LOG_INFO,
49         autoWatch: false,
50         customLaunchers: {
51             ChromeHeadlessCI: {
52                 base: 'ChromeHeadless',
53                 flags: ['--no-sandbox'],
54             },
55         },
56         browsers: ['ChromeHeadlessCI'],
57         singleRun: true,
58         concurrency: Infinity,
59     });