mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Merge pull request #460 from javascript-obfuscator/node-transformers-topological-sort
Added circular relations test for LevelledTopologicalSorter
This commit is contained in:
@@ -119,5 +119,20 @@ describe('EscapeSequenceEncoder', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Circular relations', () => {
|
||||
let testFunc: () => void;
|
||||
|
||||
beforeEach(() => {
|
||||
levelledTopologicalSorter.add('A', 'B');
|
||||
levelledTopologicalSorter.add('B', 'A');
|
||||
|
||||
testFunc = () => levelledTopologicalSorter.sort();
|
||||
});
|
||||
|
||||
it('should topologically linear sort items', () => {
|
||||
assert.throws(testFunc, Error);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user