我想测试一些使用 TypeScript 5.0 中新添加的装饰器(不是实验装饰器)的代码,如何让 Jest 解释该代码?
SyntaxError: Invalid or unexpected token当它遇到一个时我得到@
我的jest.config.js样子是这样的
module.exports = {
preset: 'ts-jest',
transform: {
'^.+\\.(ts|tsx)?$': ['ts-jest', {
tsConfig: 'tsconfig.esm.json'
}],
"^.+\\.(js|jsx)$": "babel-jest",
}
};
Run Code Online (Sandbox Code Playgroud)
tsconfig.esm.json
{
"compilerOptions": {
"module": "esnext",
"target": "esnext",
"outDir": "dist/esm",
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"sourceMap": true,
"strict": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "nodenext",
"baseUrl": ".",
"paths": {
"*": ["src/*"]
}
},
"include": ["src/*.ts","src/**/*.ts", "test/*.ts"],
"exclude": ["node_modules"]
}
Run Code Online (Sandbox Code Playgroud)
和babel.config.js
module.exports = {presets: ['@babel/preset-env']}
Run Code Online (Sandbox Code Playgroud) 尝试保存触发器时出现此错误
Connecting to the database XE.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '192.168.56.1', '59537' )
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database XE.
Run Code Online (Sandbox Code Playgroud)
我只是使用 DB 的初学者,我该如何解决这个问题?
我使用 helm 安装了 cert-manager (v1.8.0)。
\n应用了我的 ClusterIssuerkubectl apply -f issuer.yaml
apiVersion: cert-manager.io/v1\nkind: ClusterIssuer\nmetadata:\n name: letsencrypt-nginx\nspec:\n # ACME issuer configuration\n # `email` - the email address to be associated with the ACME account (make sure it\'s a valid one)\n # `server` - the URL used to access the ACME server\xe2\x80\x99s directory endpoint\n # `privateKeySecretRef` - Kubernetes Secret to store the automatically generated ACME account private key\n acme:\n email: \'myemail\'\n server: https://acme-staging-v02.api.letsencrypt.org/directory\n …Run Code Online (Sandbox Code Playgroud) acl ×1
azure ×1
babel-jest ×1
cert-manager ×1
jestjs ×1
lets-encrypt ×1
oracle ×1
oracle18c ×1
ts-jest ×1
typescript ×1