Skip to content

Commit

Permalink
refactor: Use Vitest globals (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode authored Nov 11, 2023
1 parent 2bba0c1 commit 6b273c3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "@tstv/eslint-config"
"extends": "@tstv/eslint-config",
"ignorePatterns": ["vitest.config.ts"]
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bin": {
"ts-node-starter": "dist/src/cli.js"
"ts-node-starter": "dist/cli.js"
},
"bugs": {
"url": "https://github.com/bennycode/ts-node-starter/issues"
Expand All @@ -22,13 +22,13 @@
"vitest": "^0.34.6"
},
"files": [
"dist/src",
"dist",
"!dist/**/*.test.*"
],
"homepage": "https://www.npmjs.com/package/ts-node-starter",
"keywords": [],
"license": "UNLICENSED",
"main": "dist/src/index.js",
"main": "dist/index.js",
"name": "@bennycode/ts-node-starter",
"private": false,
"repository": {
Expand Down
1 change: 0 additions & 1 deletion src/MyClass.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, it, expect} from 'vitest';
import {MyClass} from './MyClass.js';

describe('MyClass', () => {
Expand Down
1 change: 0 additions & 1 deletion src/sayHello.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {describe, expect, it} from 'vitest';
import {sayHello} from './sayHello.js';

describe('sayHello', () => {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"outDir": "dist",
"skipLibCheck": true
"types": ["vitest/globals"]
},
"exclude": ["vitest.config.ts"],
"extends": "@tstv/tsconfig-common/tsconfig.json"
}
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export default defineConfig({
statements: 0,
},
environment: 'node',
globals: true,
},
});

0 comments on commit 6b273c3

Please sign in to comment.