mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: use vitest instead of jest for more speed
This commit is contained in:
@@ -3,6 +3,7 @@ import { REST } from '@discordjs/rest';
|
||||
import supertest from 'supertest';
|
||||
import { MockAgent, Interceptable, setGlobalDispatcher } from 'undici';
|
||||
import type { MockInterceptor } from 'undici/types/mock-interceptor';
|
||||
import { beforeEach, afterAll, afterEach, test, expect } from 'vitest';
|
||||
import { proxyRequests } from '../src';
|
||||
|
||||
let mockAgent: MockAgent;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* @type {import('@babel/core').TransformOptions}
|
||||
*/
|
||||
module.exports = {
|
||||
parserOpts: { strictMode: true },
|
||||
sourceMaps: 'inline',
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: { node: 'current' },
|
||||
modules: 'commonjs',
|
||||
},
|
||||
],
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* @type {import('@jest/types').Config.InitialOptions}
|
||||
*/
|
||||
module.exports = {
|
||||
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
|
||||
testEnvironment: 'node',
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.ts'],
|
||||
coverageDirectory: 'coverage',
|
||||
coverageReporters: ['text', 'lcov', 'clover'],
|
||||
};
|
||||
@@ -4,7 +4,6 @@
|
||||
"description": "Tools for running an HTTP proxy for Discord's API",
|
||||
"scripts": {
|
||||
"build": "tsup && tsc --emitDeclarationOnly --incremental",
|
||||
"test": "jest --pass-with-no-tests --collect-coverage",
|
||||
"lint": "prettier --check . && eslint src __tests__ --ext mjs,js,ts",
|
||||
"format": "prettier --write . && eslint src __tests__ --ext mjs,js,ts --fix",
|
||||
"docs": "typedoc --json docs/typedoc-out.json src/index.ts && ts-docgen -i docs/typedoc-out.json -c docs/index.yml -o docs/docs.json",
|
||||
@@ -57,23 +56,15 @@
|
||||
"undici": "^5.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.2",
|
||||
"@babel/plugin-proposal-decorators": "^7.18.2",
|
||||
"@babel/preset-env": "^7.18.2",
|
||||
"@babel/preset-typescript": "^7.17.12",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@types/jest": "^28.1.0",
|
||||
"@types/node": "^16.11.38",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
||||
"@typescript-eslint/parser": "^5.27.0",
|
||||
"babel-plugin-const-enum": "^1.2.0",
|
||||
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
||||
"eslint": "^8.17.0",
|
||||
"eslint-config-marine": "^9.4.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"jest": "^28.1.0",
|
||||
"prettier": "^2.6.2",
|
||||
"supertest": "^6.2.3",
|
||||
"tsup": "^6.0.1",
|
||||
|
||||
Reference in New Issue
Block a user