Skip to content

Commit e9a9eac

Browse files
committed
fix tests
1 parent f5e1b75 commit e9a9eac

5 files changed

Lines changed: 15 additions & 282 deletions

File tree

debug-test-extraction.ts

Lines changed: 0 additions & 152 deletions
This file was deleted.

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ module.exports = {
44
testMatch: [
55
'**/?(*.)+(spec|test).ts'
66
],
7+
testPathIgnorePatterns: [
8+
'/node_modules/',
9+
'vitest-example.test.ts'
10+
],
711
collectCoverage: true,
812
coverageDirectory: 'coverage',
913
coverageReporters: [

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"build:lib": "tsc",
2020
"build:action": "tsc src/index.ts --outDir dist --target ES2019 --module CommonJS --esModuleInterop --declaration false",
2121
"bundle": "npx rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
22-
"test": "jest",
22+
"test": "jest --config jest.config.js",
2323
"lint": "eslint . --ext .js,.ts,.cjs",
2424
"lint:fix": "eslint . --ext .js,.ts,.cjs --fix"
2525
},
@@ -56,5 +56,13 @@
5656
},
5757
"optionalDependencies": {
5858
"@rollup/rollup-linux-x64-gnu": "*"
59+
},
60+
"jest": {
61+
"preset": "ts-jest",
62+
"testEnvironment": "node",
63+
"testPathIgnorePatterns": [
64+
"/node_modules/",
65+
"vitest-example.test.ts"
66+
]
5967
}
6068
}

src/test/example.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Example test file to demonstrate documentation generation
33
*/
44

5-
import { MarkdownDocsGenerator } from '../main';
5+
import MarkdownDocsGenerator from '../markdown-docs';
66

77
describe('MarkdownDocsGenerator', () => {
88
/**
@@ -46,7 +46,7 @@ describe('MarkdownDocsGenerator', () => {
4646
sourceDir: './non-existent-directory',
4747
});
4848

49-
await expect(generator.generate()).rejects.toThrow('no such file or directory');
49+
await expect(generator.generate()).rejects.toThrow('Source directory does not exist');
5050
} finally {
5151
// Restore console.error in a `finally` block to ensure it always gets restored
5252
console.error = originalConsoleError;

test-pytest-implementation.js

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)