mirror of
https://github.com/hansputera/tiktok-dl.git
synced 2026-04-06 04:01:57 +02:00
feat(testing): add testing module [wip]
This commit is contained in:
10
babel.config.js
Normal file
10
babel.config.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
'presets': [
|
||||
['@babel/preset-env', {
|
||||
'targets': {
|
||||
'node': 'current',
|
||||
},
|
||||
}],
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
};
|
||||
22
jest.config.ts
Normal file
22
jest.config.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import type {Config} from '@jest/types';
|
||||
|
||||
export default async (): Promise<Config.InitialOptions> => {
|
||||
return {
|
||||
'verbose': true,
|
||||
'clearMocks': true,
|
||||
'collectCoverage': true,
|
||||
'coverageDirectory': 'tests__coverages',
|
||||
'maxConcurrency': 2,
|
||||
'watchPathIgnorePatterns': [
|
||||
'./node_modules/',
|
||||
'./lib/',
|
||||
],
|
||||
'testEnvironment': 'node',
|
||||
'testMatch': [
|
||||
'**/tests/**/*.+(ts)',
|
||||
],
|
||||
'transform': {
|
||||
'^.+\\.(ts)$': 'ts-jest',
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -9,12 +9,19 @@
|
||||
"ow": "^0.28.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@babel/preset-typescript": "^7.16.0",
|
||||
"@types/ioredis": "^4.28.1",
|
||||
"@types/jest": "^27.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
||||
"@typescript-eslint/parser": "^5.3.0",
|
||||
"@vercel/node": "^1.12.1",
|
||||
"babel-jest": "^27.3.1",
|
||||
"eslint": "^8.2.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"jest": "^27.3.1",
|
||||
"ts-node": "^10.4.0",
|
||||
"typescript": "^4.4.4"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user