Skip to content

Commit d7187e9

Browse files
committed
style: run format script
1 parent 03b6f71 commit d7187e9

File tree

2 files changed

+44
-50
lines changed

2 files changed

+44
-50
lines changed

src/cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ export class ListWatch<T extends KubernetesObject> implements ObjectCache<T>, In
131131
const queryParams = {
132132
resourceVersion: list.metadata!.resourceVersion,
133133
} as {
134-
resourceVersion: string | undefined,
135-
labelSelector: string | undefined,
134+
resourceVersion: string | undefined;
135+
labelSelector: string | undefined;
136136
};
137137
if (this.labelSelector !== undefined) {
138138
queryParams.labelSelector = ObjectSerializer.serialize(this.labelSelector, 'string');

src/cache_test.ts

Lines changed: 42 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,13 +1099,7 @@ describe('ListWatchCache', () => {
10991099
const fakeRequest = new FakeRequest();
11001100
mock.when(fakeRequestor.webRequest(mock.anything())).thenReturn(fakeRequest);
11011101

1102-
const informer = new ListWatch(
1103-
'/some/path',
1104-
watch,
1105-
listFn,
1106-
false,
1107-
APP_LABEL_SELECTOR,
1108-
);
1102+
const informer = new ListWatch('/some/path', watch, listFn, false, APP_LABEL_SELECTOR);
11091103

11101104
await informer.start();
11111105

@@ -1155,48 +1149,48 @@ describe('delete items', () => {
11551149
} as V1Pod,
11561150
];
11571151

1158-
const output = deleteItems(listA, listB);
1159-
expect(output).to.deep.equal(expected);
1160-
});
1152+
const output = deleteItems(listA, listB);
1153+
expect(output).to.deep.equal(expected);
1154+
});
11611155

1162-
it('should callback correctly', () => {
1163-
const listA: V1Pod[] = [
1164-
{
1165-
metadata: {
1166-
name: 'name1',
1167-
namespace: 'ns1',
1168-
} as V1ObjectMeta,
1169-
} as V1Pod,
1170-
{
1171-
metadata: {
1172-
name: 'name2',
1173-
namespace: 'ns2',
1174-
} as V1ObjectMeta,
1175-
} as V1Pod,
1176-
];
1177-
const listB: V1Pod[] = [
1178-
{
1179-
metadata: {
1180-
name: 'name1',
1181-
namespace: 'ns1',
1182-
} as V1ObjectMeta,
1183-
} as V1Pod,
1184-
{
1185-
metadata: {
1186-
name: 'name3',
1187-
namespace: 'ns3',
1188-
} as V1ObjectMeta,
1189-
} as V1Pod,
1190-
];
1191-
const expected: V1Pod[] = [
1192-
{
1193-
metadata: {
1194-
name: 'name2',
1195-
namespace: 'ns2',
1196-
} as V1ObjectMeta,
1197-
} as V1Pod,
1198-
];
1199-
const pods: V1Pod[] = [];
1156+
it('should callback correctly', () => {
1157+
const listA: V1Pod[] = [
1158+
{
1159+
metadata: {
1160+
name: 'name1',
1161+
namespace: 'ns1',
1162+
} as V1ObjectMeta,
1163+
} as V1Pod,
1164+
{
1165+
metadata: {
1166+
name: 'name2',
1167+
namespace: 'ns2',
1168+
} as V1ObjectMeta,
1169+
} as V1Pod,
1170+
];
1171+
const listB: V1Pod[] = [
1172+
{
1173+
metadata: {
1174+
name: 'name1',
1175+
namespace: 'ns1',
1176+
} as V1ObjectMeta,
1177+
} as V1Pod,
1178+
{
1179+
metadata: {
1180+
name: 'name3',
1181+
namespace: 'ns3',
1182+
} as V1ObjectMeta,
1183+
} as V1Pod,
1184+
];
1185+
const expected: V1Pod[] = [
1186+
{
1187+
metadata: {
1188+
name: 'name2',
1189+
namespace: 'ns2',
1190+
} as V1ObjectMeta,
1191+
} as V1Pod,
1192+
];
1193+
const pods: V1Pod[] = [];
12001194

12011195
deleteItems(listA, listB, [(obj: V1Pod) => pods.push(obj)]);
12021196
expect(pods).to.deep.equal(expected);

0 commit comments

Comments
 (0)