Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/test/sanity/src/main.ts
4772 views
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 minimist from 'minimist';
7
import { setup as setupCliTests } from './cli.test';
8
import { TestContext } from './context';
9
import { setup as setupDesktopTests } from './desktop.test';
10
import { setup as setupServerTests } from './server.test';
11
import { setup as setupServerWebTests } from './serverWeb.test';
12
13
const options = minimist(process.argv.slice(2), {
14
string: ['commit', 'quality'],
15
boolean: ['cleanup', 'verbose'],
16
alias: { commit: 'c', quality: 'q', verbose: 'v' },
17
default: { cleanup: true, verbose: false },
18
});
19
20
if (!options.commit) {
21
throw new Error('--commit is required');
22
}
23
24
if (!options.quality) {
25
throw new Error('--quality is required');
26
}
27
28
const context = new TestContext(options.quality, options.commit, options.verbose);
29
30
describe('VS Code Sanity Tests', () => {
31
beforeEach(() => {
32
const cwd = context.createTempDir();
33
process.chdir(cwd);
34
context.log(`Changed working directory to: ${cwd}`);
35
});
36
37
if (options.cleanup) {
38
afterEach(() => {
39
context.cleanup();
40
});
41
}
42
43
setupCliTests(context);
44
setupDesktopTests(context);
45
setupServerTests(context);
46
setupServerWebTests(context);
47
});
48
49