提交 c84be640 编写于 作者: R Rob Lourens

Add test for #31953

上级 57da808a
......@@ -100,6 +100,14 @@ suite('History Navigator', () => {
assert.equal(null, testObject.next());
});
test('adding an existing item changes the order', function () {
let testObject = new HistoryNavigator(['1', '2', '3']);
testObject.add('1');
assert.deepEqual(['2', '3', '1'], toArray(testObject));
});
function toArray(historyNavigator: HistoryNavigator<string>): string[] {
let result = [];
historyNavigator.first();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册