Path: blob/main/extensions/copilot/src/platform/parser/test/node/getStructure.csharp.spec.ts
13405 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { afterAll, describe, expect, test } from 'vitest';6import { _dispose } from '../../node/parserImpl';7import { WASMLanguage } from '../../node/treeSitterLanguages';8import { fromFixture, srcWithAnnotatedStructure } from './getStructure.util';910describe('getStructure - csharp', () => {11afterAll(() => _dispose());1213function csharpStruct(source: string) {14return srcWithAnnotatedStructure(WASMLanguage.Csharp, source);15}1617test('source with different syntax constructs', async () => {1819const source = await fromFixture('test.cs');2021expect(await csharpStruct(source)).toMatchSnapshot();22});23});242526