Skip to content

Commit

Permalink
test: setup tests environment
Browse files Browse the repository at this point in the history
  • Loading branch information
d3m1d0v committed Nov 13, 2024
1 parent bd0c67e commit 0cc22ed
Show file tree
Hide file tree
Showing 9 changed files with 8,700 additions and 4 deletions.
2 changes: 1 addition & 1 deletion esbuild/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const common = {
bundle: true,
sourcemap: true,
target: tsConfig.compilerOptions.target,
tsconfig: './tsconfig.json',
tsconfig: './tsconfig.publish.json',
};

build({
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"scripts": {
"build": "run-p build:*",
"build:js": "./esbuild/build.mjs",
"build:declarations": "tsc --emitDeclarationOnly --outDir ./build",
"test": "exit 0",
"build:declarations": "tsc -p tsconfig.publish.json --emitDeclarationOnly --outDir ./build",
"test": "cd tests && npm ci && npm test -- --ci",
"lint": "lint update && lint",
"lint:fix": "lint update && lint fix",
"pre-commit": "lint update && lint-staged",
Expand Down
9 changes: 9 additions & 0 deletions tests/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('jest').Config} */
module.exports = {
testEnvironment: 'jsdom',
transformIgnorePatterns: [],
snapshotSerializers: ['jest-serializer-html'],
transform: {
'^.+\\.(j|t)s?$': ['esbuild-jest', {tsconfig: './tsconfig.json'}],
},
};
Loading

0 comments on commit 0cc22ed

Please sign in to comment.