diff --git a/.mocharc.json b/.mocharc.json deleted file mode 100644 index fbf679e0..00000000 --- a/.mocharc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ui": "tdd", - "color": true, - "spec": "./lib/umd/test/**/*.test.js", - "recursive": true -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index a45fb872..6810190e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,17 +5,12 @@ "name": "Unit Tests", "type": "node", "request": "launch", - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "stopOnEntry": false, - "args": [ - "--timeout", - "999999", - "--colors" + "runtimeArgs": [ + "--enable-source-maps", + "--test", + "lib/umd/test/**/*.test.js" ], "cwd": "${workspaceRoot}", - "runtimeExecutable": null, - "runtimeArgs": [], - "env": {}, "sourceMaps": true, "outFiles": [ "${workspaceRoot}/lib/umd/**" diff --git a/package-lock.json b/package-lock.json index bfcd02ec..ea77cf01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,16 +15,13 @@ "vscode-uri": "^3.1.0" }, "devDependencies": { - "@types/mocha": "^10.0.10", "@types/node": "22.x", "@typescript-eslint/eslint-plugin": "^8.56.0", "@typescript-eslint/parser": "^8.56.0", "@vscode/web-custom-data": "^0.6.3", "eslint": "^9.39.3", "js-beautify": "^1.15.4", - "mocha": "^11.7.5", "rimraf": "^6.1.3", - "source-map-support": "^0.5.21", "typescript": "^5.9.3" } }, @@ -410,13 +407,6 @@ "dev": true, "license": "MIT" }, - "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/node": { "version": "22.19.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.1.tgz", @@ -811,20 +801,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -835,19 +811,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -865,37 +828,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -976,19 +908,6 @@ } } }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -996,16 +915,6 @@ "dev": true, "license": "MIT" }, - "node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1053,16 +962,6 @@ "dev": true, "license": "MIT" }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -1359,16 +1258,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -1407,16 +1296,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/glob": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", @@ -1474,16 +1353,6 @@ "node": ">=8" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, "node_modules/ignore": { "version": "7.0.5", "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", @@ -1561,39 +1430,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1729,23 +1565,6 @@ "dev": true, "license": "MIT" }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lru-cache": { "version": "11.2.6", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", @@ -1782,59 +1601,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mocha": { - "version": "11.7.5", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz", - "integrity": "sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig==", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-stdout": "^1.3.1", - "chokidar": "^4.0.1", - "debug": "^4.3.5", - "diff": "^7.0.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^9.0.5", - "ms": "^2.1.3", - "picocolors": "^1.1.1", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^9.2.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1988,13 +1754,6 @@ "dev": true, "license": "ISC" }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, "node_modules/picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", @@ -2035,39 +1794,6 @@ "node": ">=6" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2172,26 +1898,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/semver": { "version": "7.7.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", @@ -2205,15 +1911,6 @@ "node": ">=10" } }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2250,27 +1947,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -2472,31 +2148,6 @@ "node": ">=0.10.0" } }, - "node_modules/workerpool": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.3.tgz", - "integrity": "sha512-slxCaKbYjEdFT/o2rH9xS1hf4uRDch1w7Uo+apxhZ+sf/1d9e0ZVkn42kPNGP2dgjIx6YFvSevj0zHvbWe2jdw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", @@ -2531,61 +2182,6 @@ "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } } } } diff --git a/package.json b/package.json index 4d099fce..f55681c6 100644 --- a/package.json +++ b/package.json @@ -15,16 +15,13 @@ "url": "https://github.com/Microsoft/vscode-css-languageservice" }, "devDependencies": { - "@types/mocha": "^10.0.10", "@types/node": "22.x", "@typescript-eslint/eslint-plugin": "^8.56.0", "@typescript-eslint/parser": "^8.56.0", "@vscode/web-custom-data": "^0.6.3", "eslint": "^9.39.3", "js-beautify": "^1.15.4", - "mocha": "^11.7.5", "rimraf": "^6.1.3", - "source-map-support": "^0.5.21", "typescript": "^5.9.3" }, "dependencies": { @@ -40,9 +37,9 @@ "clean": "rimraf lib", "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", "watch": "npm run copy-jsbeautify && tsc -w -p ./src", - "test": "npm run compile && npm run mocha", - "mocha": "mocha --require source-map-support/register", - "coverage": "npm run compile && npx nyc --reporter=html --reporter=text mocha", + "test": "npm run compile && npm run node-test", + "node-test": "node --enable-source-maps --test lib/umd/test/**/*.test.js", + "coverage": "npm run compile && npx nyc --reporter=html --reporter=text node --test lib/umd/test/**/*.test.js", "lint": "eslint src/**/*.ts", "update-data": "npm install @vscode/web-custom-data -D && node ./build/generateData.js", "install-types-next": "npm install vscode-languageserver-types@next -f -S && npm install vscode-languageserver-textdocument@next -f -S", diff --git a/src/test/css/codeActions.test.ts b/src/test/css/codeActions.test.ts index aaeb5d7d..37360caf 100644 --- a/src/test/css/codeActions.test.ts +++ b/src/test/css/codeActions.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { getCSSLanguageService, TextDocument, TextEdit, Range, Command, CodeAction, TextDocumentEdit } from '../../cssLanguageService'; diff --git a/src/test/css/completion.test.ts b/src/test/css/completion.test.ts index 3436abbe..bd422754 100644 --- a/src/test/css/completion.test.ts +++ b/src/test/css/completion.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import * as path from 'path'; import { getCSSLanguageService, diff --git a/src/test/css/customData.test.ts b/src/test/css/customData.test.ts index a4fd9efe..a1892b4a 100644 --- a/src/test/css/customData.test.ts +++ b/src/test/css/customData.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { testCompletionFor } from './completion.test'; import { getCSSLanguageService, TextDocument, newCSSDataProvider, LanguageSettings } from '../../cssLanguageService'; diff --git a/src/test/css/folding.test.ts b/src/test/css/folding.test.ts index 4d93c6f6..e328dcbe 100644 --- a/src/test/css/folding.test.ts +++ b/src/test/css/folding.test.ts @@ -5,7 +5,8 @@ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { TextDocument, FoldingRange, FoldingRangeKind, getCSSLanguageService } from '../../cssLanguageService'; function assertRanges(lines: string[], expected: FoldingRange[], languageId = 'css', rangeLimit: number | null = null): void { diff --git a/src/test/css/formatter.test.ts b/src/test/css/formatter.test.ts index 8a34715d..153af05a 100644 --- a/src/test/css/formatter.test.ts +++ b/src/test/css/formatter.test.ts @@ -3,7 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { getCSSLanguageService, TextDocument, Range, getLESSLanguageService, LanguageService } from '../../cssLanguageService'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { CSSFormatConfiguration } from '../../cssLanguageTypes'; diff --git a/src/test/css/hover.test.ts b/src/test/css/hover.test.ts index 1b393a15..96a2e6be 100644 --- a/src/test/css/hover.test.ts +++ b/src/test/css/hover.test.ts @@ -5,7 +5,8 @@ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { Hover, TextDocument, getCSSLanguageService, getLESSLanguageService, getSCSSLanguageService } from '../../cssLanguageService'; import { HoverSettings } from '../../cssLanguageTypes'; import { BaselineImages } from '../../languageFacts/facts'; diff --git a/src/test/css/languageFacts.test.ts b/src/test/css/languageFacts.test.ts index 992299fa..a139d1cf 100644 --- a/src/test/css/languageFacts.test.ts +++ b/src/test/css/languageFacts.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { colorFrom256RGB, colorFromHex, diff --git a/src/test/css/lint.test.ts b/src/test/css/lint.test.ts index e483aa3f..cc0fa2ed 100644 --- a/src/test/css/lint.test.ts +++ b/src/test/css/lint.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { Node, IRule, Level } from '../../parser/cssNodes'; import { Parser } from '../../parser/cssParser'; import { LintVisitor } from '../../services/lint'; diff --git a/src/test/css/navigation.test.ts b/src/test/css/navigation.test.ts index 3189a125..9fb8da1b 100644 --- a/src/test/css/navigation.test.ts +++ b/src/test/css/navigation.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { join } from 'path'; import { Scope, GlobalScope, ScopeBuilder } from '../../parser/cssSymbolScope'; import * as nodes from '../../parser/cssNodes'; diff --git a/src/test/css/nodes.test.ts b/src/test/css/nodes.test.ts index 85504e42..bd176c9a 100644 --- a/src/test/css/nodes.test.ts +++ b/src/test/css/nodes.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import * as nodes from '../../parser/cssNodes'; import { Parser } from '../../parser/cssParser'; diff --git a/src/test/css/parser.test.ts b/src/test/css/parser.test.ts index 935907c7..fd8a9352 100644 --- a/src/test/css/parser.test.ts +++ b/src/test/css/parser.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { Parser } from '../../parser/cssParser'; import { TokenType } from '../../parser/cssScanner'; import * as nodes from '../../parser/cssNodes'; diff --git a/src/test/css/scanner.test.ts b/src/test/css/scanner.test.ts index dfd7e203..7780136e 100644 --- a/src/test/css/scanner.test.ts +++ b/src/test/css/scanner.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { Scanner, TokenType } from '../../parser/cssScanner'; suite('CSS - Scanner', () => { diff --git a/src/test/css/selectionRange.test.ts b/src/test/css/selectionRange.test.ts index b3106dce..ad09447b 100644 --- a/src/test/css/selectionRange.test.ts +++ b/src/test/css/selectionRange.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import 'mocha'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { getCSSLanguageService, TextDocument, SelectionRange } from '../../cssLanguageService'; function assertRanges(content: string, expected: (number | string)[][]): void { diff --git a/src/test/css/selectorPrinting.test.ts b/src/test/css/selectorPrinting.test.ts index e9b7c6c3..1cb413fb 100644 --- a/src/test/css/selectorPrinting.test.ts +++ b/src/test/css/selectorPrinting.test.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { Parser } from '../../parser/cssParser'; import * as nodes from '../../parser/cssNodes'; import * as selectorPrinting from '../../services/selectorPrinting'; diff --git a/src/test/less/formatter.test.ts b/src/test/less/formatter.test.ts index dabbae1e..c7afb7e5 100644 --- a/src/test/less/formatter.test.ts +++ b/src/test/less/formatter.test.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { suite, test } from 'node:test'; import { getLESSLanguageService } from '../../cssLanguageService'; import { assertFormat } from '../css/formatter.test'; diff --git a/src/test/less/lessCompletion.test.ts b/src/test/less/lessCompletion.test.ts index 357987df..a0b8b252 100644 --- a/src/test/less/lessCompletion.test.ts +++ b/src/test/less/lessCompletion.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import { testCompletionFor as testCSSCompletionFor, ExpectedCompetions } from '../css/completion.test'; import { LanguageSettings } from '../../cssLanguageService'; import { newRange } from '../css/navigation.test'; diff --git a/src/test/less/lessNavigation.test.ts b/src/test/less/lessNavigation.test.ts index e39b997c..e7fff379 100644 --- a/src/test/less/lessNavigation.test.ts +++ b/src/test/less/lessNavigation.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import * as nodes from '../../parser/cssNodes'; import { assertScopeBuilding, assertSymbolsInScope, assertScopesAndSymbols, assertHighlights, assertSymbolInfos, newRange, assertColorSymbols, assertDocumentSymbols } from '../css/navigation.test'; import { getLESSLanguageService, SymbolKind, Location } from '../../cssLanguageService'; diff --git a/src/test/less/lint.test.ts b/src/test/less/lint.test.ts index e73d981c..fcbe71ea 100644 --- a/src/test/less/lint.test.ts +++ b/src/test/less/lint.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import { Rule } from '../../services/lintRules'; import { assertEntries } from '../css/lint.test'; import { SCSSParser } from '../../parser/scssParser'; diff --git a/src/test/less/nodes.test.ts b/src/test/less/nodes.test.ts index 2554fb18..02e3f865 100644 --- a/src/test/less/nodes.test.ts +++ b/src/test/less/nodes.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import { assertNodes } from '../css/nodes.test'; import * as nodes from '../../parser/cssNodes'; import { LESSParser } from '../../parser/lessParser'; diff --git a/src/test/less/parser.test.ts b/src/test/less/parser.test.ts index 30ab4e75..34d28364 100644 --- a/src/test/less/parser.test.ts +++ b/src/test/less/parser.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import { ParseError } from '../../parser/cssErrors'; import { LESSParser } from '../../parser/lessParser'; diff --git a/src/test/less/scanner.test.ts b/src/test/less/scanner.test.ts index c7572c47..a742b4d5 100644 --- a/src/test/less/scanner.test.ts +++ b/src/test/less/scanner.test.ts @@ -5,7 +5,8 @@ 'use strict'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { TokenType } from '../../parser/cssScanner'; import { LESSScanner } from '../../parser/lessScanner'; diff --git a/src/test/scss/formatter.test.ts b/src/test/scss/formatter.test.ts index a6f8c152..4f424391 100644 --- a/src/test/scss/formatter.test.ts +++ b/src/test/scss/formatter.test.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { suite, test } from 'node:test'; import { getSCSSLanguageService } from '../../cssLanguageService'; import { assertFormat } from '../css/formatter.test'; diff --git a/src/test/scss/languageFacts.test.ts b/src/test/scss/languageFacts.test.ts index 5183c6ff..40ad94ea 100644 --- a/src/test/scss/languageFacts.test.ts +++ b/src/test/scss/languageFacts.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import { SCSSParser } from '../../parser/scssParser'; import { assertColor } from '../css/languageFacts.test'; import { colorFrom256RGB as newColor } from '../../languageFacts/facts'; diff --git a/src/test/scss/lint.test.ts b/src/test/scss/lint.test.ts index 18da315b..e6edb2e1 100644 --- a/src/test/scss/lint.test.ts +++ b/src/test/scss/lint.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import { TextDocument } from '../../cssLanguageTypes'; import { SCSSParser } from '../../parser/scssParser'; import { Rule, Rules } from '../../services/lintRules'; diff --git a/src/test/scss/parser.test.ts b/src/test/scss/parser.test.ts index c453e317..669547f0 100644 --- a/src/test/scss/parser.test.ts +++ b/src/test/scss/parser.test.ts @@ -5,6 +5,7 @@ 'use strict'; +import { suite, test } from 'node:test'; import { SCSSParser } from '../../parser/scssParser'; import { ParseError } from '../../parser/cssErrors'; import { SCSSParseError } from '../../parser/scssErrors'; diff --git a/src/test/scss/scssCompletion.test.ts b/src/test/scss/scssCompletion.test.ts index b7bc532d..9def2dfb 100644 --- a/src/test/scss/scssCompletion.test.ts +++ b/src/test/scss/scssCompletion.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import { suite, test } from 'node:test'; import * as path from 'path'; import { Position, InsertTextFormat, CompletionItemKind, LanguageSettings } from '../../cssLanguageService'; diff --git a/src/test/scss/scssNavigation.test.ts b/src/test/scss/scssNavigation.test.ts index f667e6d7..aff95a3a 100644 --- a/src/test/scss/scssNavigation.test.ts +++ b/src/test/scss/scssNavigation.test.ts @@ -7,7 +7,8 @@ import * as nodes from '../../parser/cssNodes'; import { assertSymbolsInScope, assertScopesAndSymbols, assertHighlights, assertColorSymbols, assertLinks, newRange, getTestResource, assertDocumentSymbols } from '../css/navigation.test'; import { getSCSSLanguageService, DocumentLink, TextDocument, SymbolKind, LanguageSettings } from '../../cssLanguageService'; -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import * as path from 'path'; import { URI } from 'vscode-uri'; import { getFsProvider } from '../testUtil/fsProvider'; diff --git a/src/test/scss/selectorPrinting.test.ts b/src/test/scss/selectorPrinting.test.ts index 18347624..8abeb415 100644 --- a/src/test/scss/selectorPrinting.test.ts +++ b/src/test/scss/selectorPrinting.test.ts @@ -5,6 +5,7 @@ 'use strict'; +import { suite, test } from 'node:test'; import { SCSSParser } from '../../parser/scssParser'; import { assertSelector } from '../css/selectorPrinting.test'; diff --git a/src/test/util.test.ts b/src/test/util.test.ts index 6f06cd0b..565b5f59 100644 --- a/src/test/util.test.ts +++ b/src/test/util.test.ts @@ -2,7 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as assert from 'assert'; +import { suite, test } from 'node:test'; +import * as assert from 'node:assert'; import { trim } from '../utils/strings'; suite('Util', () => {