Files
grafana/public/app/features/apiserver/discovery.test.ts
2025-03-21 16:45:25 +02:00

13 lines
439 B
TypeScript

import { discoveryResources } from './discovery';
const discoverySnapshot = require('./snapshots/discovery-snapshot.json');
describe('simple typescript tests', () => {
it('simple', async () => {
const watchable = discoveryResources(discoverySnapshot)
.filter((v) => v.verbs.includes('watch'))
.map((v) => v.resource);
expect(watchable).toEqual(['user-storage', 'dashboards', 'dashboards', 'dashboards']);
});
});