import { tap, expect } from '@git.zone/tstest/tapbundle'; import * as fs from 'node:fs/promises'; import * as path from 'node:path'; const gitZoneWorkspacePreferenceFolder = '.git.zone/ide/workspace'; tap.test('should keep Theia backend config under Git.Zone IDE home path', async () => { const packageJsonPath = path.join(process.cwd(), 'applications', 'remote-theia', 'package.json'); const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8')); expect(packageJson.theia.backend.config.configurationFolder).toEqual('.git.zone/ide/theia'); }); tap.test('should avoid legacy .theia workspace preference folders', async () => { const sourcePath = path.join( process.cwd(), 'theia-extensions', 'gitzone-remote', 'src', 'common', 'gitzone-preference-configurations.ts', ); const sourceText = await fs.readFile(sourcePath, 'utf8'); expect(sourceText).toInclude(gitZoneWorkspacePreferenceFolder); expect(sourceText).toInclude("return [gitZoneWorkspacePreferenceFolder, '.vscode']"); expect(sourceText).not.toInclude("'.theia'"); }); export default tap.start();