mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-28 13:26:52 +08:00
build: migrate tests from mocha to node native test runner
This commit is contained in:
1 parent
c88afdaf77
commit
2c368160e0
14 files changed
+15
-15
No files matched your search
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { BooleanPolicy } from '../policies/booleanPolicy.ts';
|
||||
import { type LanguageTranslations, PolicyType } from '../policies/types.ts';
|
||||
import type { CategoryDto, PolicyDto } from '../policies/policyDto.ts';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test, beforeEach, afterEach } from 'node:test';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
@@ -104,11 +105,11 @@ suite('checkCyclicDependencies', () => {
|
||||
|
||||
let tmpDir: string;
|
||||
|
||||
setup(() => {
|
||||
beforeEach(() => {
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cyclic-test-'));
|
||||
});
|
||||
|
||||
teardown(() => {
|
||||
afterEach(() => {
|
||||
fs.rmSync(tmpDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import * as i18n from '../i18n.ts';
|
||||
|
||||
suite('XLF Parser Tests', () => {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { NumberPolicy } from '../policies/numberPolicy.ts';
|
||||
import { type LanguageTranslations, PolicyType } from '../policies/types.ts';
|
||||
import type { CategoryDto, PolicyDto } from '../policies/policyDto.ts';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { ObjectPolicy } from '../policies/objectPolicy.ts';
|
||||
import { type LanguageTranslations, PolicyType } from '../policies/types.ts';
|
||||
import type { CategoryDto, PolicyDto } from '../policies/policyDto.ts';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { promises as fs } from 'fs';
|
||||
import path from 'path';
|
||||
import type { ExportedPolicyDataDto, CategoryDto } from '../policies/policyDto.ts';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { renderADMLString, renderProfileString, renderADMX, renderADML, renderProfileManifest, renderMacOSPolicy, renderGP, renderJsonPolicies } from '../policies/render.ts';
|
||||
import { type NlsString, type LanguageTranslations, type Category, type Policy, PolicyType } from '../policies/types.ts';
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { StringEnumPolicy } from '../policies/stringEnumPolicy.ts';
|
||||
import { PolicyType, type LanguageTranslations } from '../policies/types.ts';
|
||||
import type { CategoryDto, PolicyDto } from '../policies/policyDto.ts';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { StringPolicy } from '../policies/stringPolicy.ts';
|
||||
import { PolicyType, type LanguageTranslations } from '../policies/types.ts';
|
||||
import type { CategoryDto, PolicyDto } from '../policies/policyDto.ts';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import * as esbuild from 'esbuild';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import assert from 'assert';
|
||||
import { suite, test } from 'node:test';
|
||||
import { convertPrivateFields, adjustSourceMap } from '../private-to-property.ts';
|
||||
import { SourceMapConsumer, SourceMapGenerator, type RawSourceMap } from 'source-map';
|
||||
|
||||
|
||||
Generated
-8
@@ -38,7 +38,6 @@
|
||||
"@types/mime": "0.0.29",
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"@types/minimist": "^1.2.1",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/node": "^22.18.10",
|
||||
"@types/p-all": "^1.0.0",
|
||||
"@types/pump": "^1.0.1",
|
||||
@@ -1772,13 +1771,6 @@
|
||||
"integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/mocha": {
|
||||
"version": "10.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz",
|
||||
"integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/ms": {
|
||||
"version": "0.7.32",
|
||||
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.32.tgz",
|
||||
|
||||
+1
-2
@@ -32,7 +32,6 @@
|
||||
"@types/mime": "0.0.29",
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"@types/minimist": "^1.2.1",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/node": "^22.18.10",
|
||||
"@types/p-all": "^1.0.0",
|
||||
"@types/pump": "^1.0.1",
|
||||
@@ -70,7 +69,7 @@
|
||||
"pretypecheck": "npm run copy-policy-dto",
|
||||
"typecheck": "cd .. && npx tsgo --project build/tsconfig.json",
|
||||
"watch": "npm run typecheck -- --watch",
|
||||
"test": "mocha --ui tdd '{lib,next}/**/*.test.ts'"
|
||||
"test": "node --test '{lib,next}/**/*.test.ts'"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"tree-sitter-typescript": "^0.23.2",
|
||||
|
||||
+1
-3
@@ -4,9 +4,7 @@
|
||||
"lib": [
|
||||
"ES2024"
|
||||
],
|
||||
"types": [
|
||||
"mocha"
|
||||
],
|
||||
"types": [],
|
||||
"module": "nodenext",
|
||||
"noEmit": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
|
||||
Reference in new issue
Block a user