Skip to content

Commit

Permalink
Added testing infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Jun 25, 2023
1 parent eb948ed commit 346da7f
Show file tree
Hide file tree
Showing 5 changed files with 4,407 additions and 1,439 deletions.
6 changes: 6 additions & 0 deletions __tests__/syntax-extensions/HorizontalRuleExtension.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { HorizontalRuleExtension } from "../../src/syntax-extensions/HorizontalRuleExtension";

test("HorizontalRuleExtension handles the correct unist node", () => {
const extension = new HorizontalRuleExtension();
expect(extension.unistNodeName()).toBe("thematicBreak");
});
25 changes: 25 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*",
"!src/index.ts"
],
"coverageDirectory": "coverage",
"coverageProvider": "babel",
"testMatch": ["<rootDir>/__tests__/**/*.test.ts"],
"transform": {
"^.+\\.(j|t)s$": [
"ts-jest",
{
"tsconfig": "test.tsconfig.json"
}
]
},
"transformIgnorePatterns": [
"node_modules/(?!prosemirror-unified)/"
],
"moduleNameMapper": {
"prosemirror-unified": "<rootDir>/node_modules/prosemirror-unified/dist/prosemirror-unified.js"
},
"resetMocks": true
}
Loading

0 comments on commit 346da7f

Please sign in to comment.