blob: e90e6d789eecbfb6e6ac8c7979b259c31cc333f2 [file] [log] [blame]
Kean Mariotti0610eb82022-06-08 16:39:43 +00001/*
2 * Copyright (C) 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Kean Mariotti73be9782022-12-30 11:12:27 +000016const webpackConfig = require('./webpack.config.common');
Kean Mariotti0610eb82022-06-08 16:39:43 +000017delete webpackConfig.entry;
18delete webpackConfig.output;
19
20module.exports = (config) => {
21 config.set({
Kean Mariotti73be9782022-12-30 11:12:27 +000022 frameworks: ['jasmine', 'webpack'],
Priyanka82919e42024-02-16 18:20:32 +000023 plugins: [
24 'karma-webpack',
25 'karma-chrome-launcher',
26 'karma-jasmine',
27 'karma-sourcemap-loader',
28 ],
Kean Mariottidfb25d92023-07-06 12:31:37 +000029 files: [
Kean Mariotti09739302023-09-14 18:34:43 +000030 {pattern: 'src/main_unit_test.ts', watched: false},
Kean Mariottidfb25d92023-07-06 12:31:37 +000031 {pattern: 'src/test/fixtures/**/*', included: false, served: true},
32 {
33 pattern: 'deps_build/trace_processor/to_be_served/engine_bundle.js',
34 included: false,
35 served: true,
36 },
37 {
38 pattern: 'deps_build/trace_processor/to_be_served/trace_processor.wasm',
39 included: false,
40 served: true,
41 },
42 ],
Kean Mariotti0610eb82022-06-08 16:39:43 +000043 preprocessors: {
Kean Mariotti09739302023-09-14 18:34:43 +000044 'src/main_unit_test.ts': ['webpack', 'sourcemap'],
Kean Mariotti0610eb82022-06-08 16:39:43 +000045 },
Kean Mariotti73be9782022-12-30 11:12:27 +000046 webpack: webpackConfig,
Kean Mariotti0610eb82022-06-08 16:39:43 +000047 });
Kean Mariotti73be9782022-12-30 11:12:27 +000048};