Skip to content

Commit 8aed44b

Browse files
authored
test(platform): ensure PLATFORM_HOST_TYPES is in sync with getPlatformList (renovatebot#42110)
As part of future changes we want to rely on the `PLATFORM_HOST_TYPES` constant in our config options, so should make sure this stays in sync.
1 parent 7e879ff commit 8aed44b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/modules/platform/index.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as httpMock from '~test/http-mock.ts';
22
import { PLATFORM_NOT_FOUND } from '../../constants/error-messages.ts';
3-
import type { PlatformId } from '../../constants/index.ts';
3+
import { PLATFORM_HOST_TYPES, type PlatformId } from '../../constants/index.ts';
44
import { loadModules } from '../../util/modules.ts';
55
import api from './api.ts';
66
import * as platform from './index.ts';
@@ -247,4 +247,12 @@ describe('modules/platform/index', () => {
247247
});
248248
});
249249
});
250+
251+
describe('getPlatformList', () => {
252+
it('has the same values as PLATFORM_HOST_TYPES', () => {
253+
expect(new Set(platform.getPlatformList())).toEqual(
254+
new Set(PLATFORM_HOST_TYPES),
255+
);
256+
});
257+
});
250258
});

0 commit comments

Comments
 (0)