mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 20:03:37 +00:00
perf(ui): smooth large lists and graphs
This commit is contained in:
@@ -3,6 +3,8 @@ import {
|
||||
resolveDependencies,
|
||||
areDependenciesSatisfied,
|
||||
getBlockingDependencies,
|
||||
createFeatureMap,
|
||||
getBlockingDependenciesFromMap,
|
||||
wouldCreateCircularDependency,
|
||||
dependencyExists,
|
||||
} from '../src/resolver';
|
||||
@@ -351,6 +353,21 @@ describe('resolver.ts', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getBlockingDependenciesFromMap', () => {
|
||||
it('should match getBlockingDependencies when using a feature map', () => {
|
||||
const dep1 = createFeature('Dep1', { status: 'pending' });
|
||||
const dep2 = createFeature('Dep2', { status: 'completed' });
|
||||
const dep3 = createFeature('Dep3', { status: 'running' });
|
||||
const feature = createFeature('A', { dependencies: ['Dep1', 'Dep2', 'Dep3'] });
|
||||
const allFeatures = [dep1, dep2, dep3, feature];
|
||||
const featureMap = createFeatureMap(allFeatures);
|
||||
|
||||
expect(getBlockingDependenciesFromMap(feature, featureMap)).toEqual(
|
||||
getBlockingDependencies(feature, allFeatures)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('wouldCreateCircularDependency', () => {
|
||||
it('should return false for features with no existing dependencies', () => {
|
||||
const features = [createFeature('A'), createFeature('B')];
|
||||
|
||||
Reference in New Issue
Block a user