"Fossies" - the Fresh Open Source Software Archive

Member "vscode-1.49.1/src/vs/base/test/browser/actionbar.test.ts" (16 Sep 2020, 1023 Bytes) of package /linux/misc/vscode-1.49.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "actionbar.test.ts": 1.47.3_vs_1.48.0.

    1 /*---------------------------------------------------------------------------------------------
    2  *  Copyright (c) Microsoft Corporation. All rights reserved.
    3  *  Licensed under the MIT License. See License.txt in the project root for license information.
    4  *--------------------------------------------------------------------------------------------*/
    5 
    6 import * as assert from 'assert';
    7 import { prepareActions } from 'vs/base/browser/ui/actionbar/actionbar';
    8 import { Action, Separator } from 'vs/base/common/actions';
    9 
   10 suite('Actionbar', () => {
   11 
   12     test('prepareActions()', function () {
   13         let a1 = new Separator();
   14         let a2 = new Separator();
   15         let a3 = new Action('a3');
   16         let a4 = new Separator();
   17         let a5 = new Separator();
   18         let a6 = new Action('a6');
   19         let a7 = new Separator();
   20 
   21         let actions = prepareActions([a1, a2, a3, a4, a5, a6, a7]);
   22         assert.strictEqual(actions.length, 3); // duplicate separators get removed
   23         assert(actions[0] === a3);
   24         assert(actions[1] === a5);
   25         assert(actions[2] === a6);
   26     });
   27 });