Skip to content

Commit 24978f6

Browse files
authored
Use separate Babel configuration for Jest (#4594)
1 parent b05535c commit 24978f6

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed

babel.config.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
{
2-
"presets": [
3-
[
4-
"@babel/preset-env",
5-
{
6-
"targets": {
7-
"node": "current"
8-
}
9-
}
10-
]
11-
],
122
"plugins": [
133
[
144
"babel-plugin-styled-components",

babel.config.testing.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"node": "current"
8+
}
9+
}
10+
]
11+
],
12+
"plugins": [
13+
[
14+
"babel-plugin-styled-components",
15+
{
16+
"displayName": true
17+
}
18+
]
19+
]
20+
}

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const config = {
3434
"\\.jsx?$": [
3535
"babel-jest",
3636
{
37-
configFile: "./babel.config.json",
37+
configFile: "./babel.config.testing.json",
3838
},
3939
],
4040
},

ui/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AlertListErrors } from "./components/AlertListErrors";
2-
import { ReconciledObjectsAutomation } from "./components/AutomationDetail";
2+
import type { ReconciledObjectsAutomation } from "./components/AutomationDetail";
33
import AutomationsTable from "./components/AutomationsTable";
44
import BucketDetail from "./components/BucketDetail";
55
import Button from "./components/Button";
@@ -33,8 +33,8 @@ import ImageAutomationRepoDetails from "./components/ImageAutomation/repositorie
3333
import ImageRepositoriesTable from "./components/ImageAutomation/repositories/ImageRepositoriesTable";
3434
import ImageAutomationUpdatesDetails from "./components/ImageAutomation/updates/ImageAutomationUpdatesDetails";
3535
import ImageAutomationUpdatesTable from "./components/ImageAutomation/updates/ImageAutomationUpdatesTable";
36-
import InfoList, { InfoField } from "./components/InfoList";
37-
import Input, { InputProps } from "./components/Input";
36+
import InfoList, { type InfoField } from "./components/InfoList";
37+
import Input, { type InputProps } from "./components/Input";
3838
import Interval from "./components/Interval";
3939
import KubeStatusIndicator, {
4040
computeReady,
@@ -48,7 +48,7 @@ import Logo from "./components/Logo";
4848
import MessageBox from "./components/MessageBox";
4949
import Metadata from "./components/Metadata";
5050
import Modal from "./components/Modal";
51-
import Nav, { NavItem } from "./components/Nav";
51+
import Nav, { type NavItem } from "./components/Nav";
5252
import ImageAutomationIcon from "./components/NavIcons/ImageAutomationIcon";
5353
import SourcesIcon from "./components/NavIcons/SourcesIcon";
5454
import NotificationsTable from "./components/NotificationsTable";
@@ -112,7 +112,7 @@ import { PARENT_CHILD_LOOKUP } from "./lib/graph";
112112
import { formatURL, getParentNavRouteValue } from "./lib/nav";
113113
import {
114114
Alert,
115-
Automation,
115+
type Automation,
116116
Bucket,
117117
FluxObject,
118118
GitRepository,

0 commit comments

Comments
 (0)