Kean Mariotti | 0610eb8 | 2022-06-08 16:39:43 +0000 | [diff] [blame] | 1 | /* |
| 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 Mariotti | 73be978 | 2022-12-30 11:12:27 +0000 | [diff] [blame] | 16 | const webpackConfig = require('./webpack.config.common'); |
Kean Mariotti | 0610eb8 | 2022-06-08 16:39:43 +0000 | [diff] [blame] | 17 | delete webpackConfig.entry; |
| 18 | delete webpackConfig.output; |
| 19 | |
| 20 | module.exports = (config) => { |
| 21 | config.set({ |
Kean Mariotti | 73be978 | 2022-12-30 11:12:27 +0000 | [diff] [blame] | 22 | frameworks: ['jasmine', 'webpack'], |
Priyanka | 82919e4 | 2024-02-16 18:20:32 +0000 | [diff] [blame] | 23 | plugins: [ |
| 24 | 'karma-webpack', |
| 25 | 'karma-chrome-launcher', |
| 26 | 'karma-jasmine', |
| 27 | 'karma-sourcemap-loader', |
| 28 | ], |
Kean Mariotti | dfb25d9 | 2023-07-06 12:31:37 +0000 | [diff] [blame] | 29 | files: [ |
Kean Mariotti | 0973930 | 2023-09-14 18:34:43 +0000 | [diff] [blame] | 30 | {pattern: 'src/main_unit_test.ts', watched: false}, |
Kean Mariotti | dfb25d9 | 2023-07-06 12:31:37 +0000 | [diff] [blame] | 31 | {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 Mariotti | 0610eb8 | 2022-06-08 16:39:43 +0000 | [diff] [blame] | 43 | preprocessors: { |
Kean Mariotti | 0973930 | 2023-09-14 18:34:43 +0000 | [diff] [blame] | 44 | 'src/main_unit_test.ts': ['webpack', 'sourcemap'], |
Kean Mariotti | 0610eb8 | 2022-06-08 16:39:43 +0000 | [diff] [blame] | 45 | }, |
Kean Mariotti | 73be978 | 2022-12-30 11:12:27 +0000 | [diff] [blame] | 46 | webpack: webpackConfig, |
Kean Mariotti | 0610eb8 | 2022-06-08 16:39:43 +0000 | [diff] [blame] | 47 | }); |
Kean Mariotti | 73be978 | 2022-12-30 11:12:27 +0000 | [diff] [blame] | 48 | }; |