UNPKG

react-native-integrate

Version:

Automate integration of additional code into React Native projects

29 lines (28 loc) 898 B
"use strict"; /* eslint-disable @typescript-eslint/no-unsafe-call */ Object.defineProperty(exports, "__esModule", { value: true }); const topologicalSort_1 = require("../../../utils/topologicalSort"); describe('topologicalSort', () => { it('should sort by deps', () => { const packages = [ { packageName: 'y', configPath: 'path/to/config', config: { steps: [], dependencies: ['x'], }, version: '1.2.3', }, { packageName: 'x', configPath: 'path/to/config', config: { steps: [], }, version: '1.2.3', }, ]; expect((0, topologicalSort_1.topologicalSort)(packages)[0].packageName).toEqual('x'); }); });