[pool-cache] Setup jest [LIT-903] (#237)

This commit is contained in:
Kyu
2023-03-20 14:57:57 -07:00
committed by GitHub
parent e85031be32
commit d6c30e78ca
5 changed files with 27 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '\\.test\\.ts$',
};

View File

@@ -5,15 +5,20 @@
"scripts": {
"build": "tsc",
"examples:client": "tsx examples/client.ts",
"dev:server": "nodemon src/main.ts"
"dev:server": "nodemon src/main.ts",
"test": "jest",
"test:ci": "jest"
},
"dependencies": {
"pool-cache-interface": "*",
"@trpc/server": "^10.14.1",
"pool-cache-interface": "*",
"zod": "^3.20.6"
},
"devDependencies": {
"@types/jest": "^29.5.0",
"jest": "^29.5.0",
"nodemon": "^2.0.21",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tsconfig": "*",
"tsx": "^3.12.3",

View File

@@ -0,0 +1,5 @@
describe('jest test ', () => {
test('1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
});

View File

@@ -1,7 +1,6 @@
{
"compilerOptions": {
"outDir": "__build__",
"rootDir": "src"
"outDir": "__build__"
},
"extends": "tsconfig/tsconfig.common.json",
"include": ["src/**/*"]

View File

@@ -6014,6 +6014,14 @@
jest-matcher-utils "^27.0.0"
pretty-format "^27.0.0"
"@types/jest@^29.5.0":
version "29.5.0"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.0.tgz#337b90bbcfe42158f39c2fb5619ad044bbb518ac"
integrity sha512-3Emr5VOl/aoBwnWcH/EFQvlSAmjV+XtV9GGu5mwdYew5vhQh0IUZx/60x0TzHDu09Bi7HMx10t/namdJw5QIcg==
dependencies:
expect "^29.0.0"
pretty-format "^29.0.0"
"@types/js-combinatorics@^0.5.29":
version "0.5.32"
resolved "https://registry.yarnpkg.com/@types/js-combinatorics/-/js-combinatorics-0.5.32.tgz#befa3c2b6ea10c45fd8d672f7aa477a79a2601ed"