/*---------------------------------------------------------------------------------------------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 assert from 'assert';6import { LanguagesRegistry } from '../../../editor/common/services/languagesRegistry.js';78/**9* This function is called before test running and also again at the end of test running10* and can be used to add assertions. e.g. that registries are empty, etc.11*12* !! This is called directly by the testing framework.13*14* @skipMangle15*/16export function assertCleanState(): void {17// If this test fails, it is a clear indication that18// your test or suite is leaking services (e.g. via leaking text models)19// assert.strictEqual(LanguageService.instanceCount, 0, 'No leaking ILanguageService');20assert.strictEqual(LanguagesRegistry.instanceCount, 0, 'Error: Test run should not leak in LanguagesRegistry.');21}222324