Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,105 changes: 2,024 additions & 4,081 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"scripts": {
"watch": "tsc --watch",
"compile": "tsc",
"test": "mocha --ui=tdd ./out/tests/all.test.js",
"test": "vitest run",
"benchmark": "node benchmark/benchmark.js",
"inspect": "node out/tests/inspect.js",
"tmconvert": "node scripts/tmconvert.js",
Expand All @@ -35,14 +35,17 @@
},
"devDependencies": {
"@microsoft/api-extractor": "^7.48.0",
"@types/mocha": "^9.1.0",
"@types/node": "^16.6.1",
"@types/node": "^20.0.0",
"copy-webpack-plugin": "^9.1.0",
"mkdirp": "^3.0.1",
"mocha": "^11.1.0",
"typescript": "^4.3.5",
"typescript": "^5.5.0",
"vitest": "^4.0.18",
"vscode-oniguruma": "^1.5.1",
"webpack": "^5.50.0",
"webpack-cli": "^4.8.0"
},
"overrides": {
"serialize-javascript": ">=7.0.3",
"minimatch@>=10.0.0 <10.2.3": "10.2.3"
}
}
}
9 changes: 0 additions & 9 deletions src/tests/all.test.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/tests/grammar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/

import { test } from 'vitest';
import * as assert from 'assert';
import { EncodedTokenAttributes, OptionalStandardTokenType, StandardTokenType } from '../encodedTokenAttributes';
import { Registry } from '../main';
Expand Down
1 change: 1 addition & 0 deletions src/tests/json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/

import { test } from 'vitest';
import * as assert from 'assert';
import { parseJSON } from '../json';

Expand Down
1 change: 1 addition & 0 deletions src/tests/matcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/

import { test } from 'vitest';
import * as assert from 'assert';
import { createMatchers } from '../matcher';

Expand Down
9 changes: 4 additions & 5 deletions src/tests/themes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/

import { test, describe } from 'vitest';
import * as fs from 'fs';
import * as path from 'path';
import * as assert from 'assert';
Expand Down Expand Up @@ -108,8 +109,7 @@ class ThemeInfo {

for (let testFile of testFiles) {
let tst = new ThemeTest(THEMES_TEST_PATH, testFile, _themeData, _resolver);
test(tst.testName, async function () {
this.timeout(20000);
test(tst.testName, { timeout: 20000 }, async () => {
try {
await tst.evaluate();
assert.deepStrictEqual(tst.actual, tst.expected);
Expand All @@ -126,8 +126,7 @@ test('Tokenize test1.ts with TypeScript grammar and dark_vs theme', async () =>
await testTokenizationTime('test1.ts');
});

test('Tokenize test2.ts with TypeScript grammar and dark_vs theme', async function () {
this.timeout(0);
test('Tokenize test2.ts with TypeScript grammar and dark_vs theme', { timeout: 0 }, async () => {
await testTokenizationTime('test2.ts');
});

Expand Down Expand Up @@ -236,7 +235,7 @@ test('Theme matching gives higher priority to parent matches 2', () => {
assert.strictEqual(colorMap[result!.foregroundId], '#300000');
});

suite('Theme matching can match', () => {
describe('Theme matching can match', () => {
const theme = Theme.createFromRawTheme({
settings: [
{ settings: { foreground: '#F8F8F2', background: '#272822' } },
Expand Down
1 change: 1 addition & 0 deletions src/tests/tokenization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/

import { test } from 'vitest';
import * as fs from 'fs';
import * as path from 'path';
import * as assert from 'assert';
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"sourceMap": true,
"declaration": true,
"strict": true,
"skipLibCheck": true,
"newLine": "lf",
"lib": [
"es5",
Expand Down
7 changes: 7 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
include: ['src/tests/**/*.test.ts'],
},
});