Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | /** |
| 6 | * @fileoverview Root file for running our frontend tests. Finds all files |
| 7 | * in the static_src folder that have the ".test.js" or ".test.ts" extension. |
| 8 | */ |
| 9 | |
| 10 | import chai from 'chai'; |
| 11 | import chaiDom from 'chai-dom'; |
| 12 | import chaiString from 'chai-string'; |
| 13 | |
| 14 | chai.use(chaiDom); |
| 15 | chai.use(chaiString); |
| 16 | |
| 17 | const testsContext = require.context('../', true, /\.test\.(js|ts|tsx)$/); |
| 18 | testsContext.keys().forEach(testsContext); |