mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
fix: setup Jest with TS
This commit is contained in:
1 parent
557af91d4b
commit
a18e0d9b68
12 files changed
+45
-9
No files matched your search
@@ -1,8 +1,12 @@
|
||||
{
|
||||
"name": "@linux-odyssey/utils",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"license": "MIT"
|
||||
"main": "dist/index.js",
|
||||
"type": "commonjs",
|
||||
"exports": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc"
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
import { isValidEmail, isValidUsername } from './auth.js'
|
||||
import { isValidEmail, isValidUsername } from '../src/auth'
|
||||
|
||||
test('check valid username', () => {
|
||||
const valid = ['alex', 'alex123', 'john_doe', 'john-doe', 'rudeus']
|
||||
@@ -1,4 +1,4 @@
|
||||
import { buildFileCheckCmd } from './commands.js'
|
||||
import { buildFileCheckCmd } from '../src/commands'
|
||||
|
||||
describe('buildFileCheckCmd function', () => {
|
||||
it('builds the file check command correctly', () => {
|
||||
@@ -1,4 +1,4 @@
|
||||
import DAG from './dag.js'
|
||||
import DAG from '../src/dag'
|
||||
|
||||
describe('dag layers', () => {
|
||||
it('two layer', () => {
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"allowJs": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
Reference in new issue
Block a user