Skip to content

Commit

Permalink
Testing from src
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaal111 committed Apr 21, 2024
1 parent a650613 commit 0443ff4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
},
overrides: [
{
files: ['./tests/**/*.ts'],
files: ['./src/**/*.test.ts'],
parserOptions: {
project: './tsconfig.tests.json',
},
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const config: Config = {
// rootDir: undefined,

// A list of paths to directories that Jest should use to search for files in
roots: ['tests'],
roots: ['src'],

// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"build": "tsc",
"test": "jest",
"lint": "eslint src/index.ts src/**/*.ts tests/**/*.ts",
"lint": "eslint src/index.ts src/**/*.ts",
"prepare": "husky",
"prepublish": "rm -rf dist && yarn build"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/objects/omit.test.ts → src/objects/omit.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { omit } from '../../src/objects';
import omit from './omit';

describe('omit', () => {
it('omits', () => {
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"include": [
"src"
],
"exclude": [
"src/**/*.test.ts"
],
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.tests.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["tests"]
"include": ["src/**/*.test.ts"],
"exclude": []
}

0 comments on commit 0443ff4

Please sign in to comment.