-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: large refactor of testing framework and related aspects
fix #221
- Loading branch information
1 parent
4d73f84
commit f0e6407
Showing
78 changed files
with
137 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../../test/jest-preset.cjs")("@postdfm/ast"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
module.exports = require("../../../typedoc.config.cjs")({ | ||
entryPoints: ["src/index.ts"], | ||
out: "@postdfm/ast" | ||
}); | ||
module.exports = require("../../../typedoc.config.cjs")("@postdfm/ast"); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../../test/jest-preset.cjs")("@postdfm/ast2dfm"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { readdirSync, readFileSync } from "fs"; | ||
|
||
import { Root } from "@postdfm/ast"; | ||
import { stringify } from "@postdfm/ast2dfm"; | ||
|
||
const parseFixturesPath = new URL( | ||
"../../../../../test/fixtures/parse/", | ||
import.meta.url | ||
); | ||
|
||
describe("dfm2ast", () => { | ||
describe("parse fixtures", () => { | ||
const fixtures = readdirSync(parseFixturesPath); | ||
fixtures.forEach((fixture) => { | ||
const fixturePath = new URL(`./${fixture}/`, parseFixturesPath); | ||
|
||
test(`${fixture}`, () => { | ||
expect( | ||
stringify( | ||
JSON.parse( | ||
readFileSync(new URL("./ast.json", fixturePath), "utf8") | ||
) as Root | ||
) | ||
).toEqual(readFileSync(new URL("./form.dfm", fixturePath), "ascii")); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
module.exports = require("../../../typedoc.config.cjs")({ | ||
entryPoints: ["src/index.ts"], | ||
out: "@postdfm/ast2dfm" | ||
}); | ||
module.exports = require("../../../typedoc.config.cjs")("@postdfm/ast2dfm"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../../test/jest-preset.cjs")("@postdfm/dfm2ast"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
module.exports = require("../../../typedoc.config.cjs")({ | ||
entryPoints: ["src/index.ts"], | ||
out: "@postdfm/dfm2ast" | ||
}); | ||
module.exports = require("../../../typedoc.config.cjs")("@postdfm/dfm2ast"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../../test/jest-preset.cjs")("@postdfm/plugin"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
module.exports = require("../../../typedoc.config.cjs")({ | ||
entryPoints: ["src/index.ts"], | ||
out: "@postdfm/plugin", | ||
}); | ||
module.exports = require("../../../typedoc.config.cjs")("@postdfm/plugin"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../../test/jest-preset.cjs")("@postdfm/transform"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
module.exports = require("../../../typedoc.config.cjs")({ | ||
entryPoints: ["src/index.ts"], | ||
out: "@postdfm/transform", | ||
}); | ||
module.exports = require("../../../typedoc.config.cjs")("@postdfm/transform"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../test/jest-preset.cjs")("postdfm"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
module.exports = require("../../typedoc.config.cjs")({ | ||
entryPoints: ["src/index.ts"], | ||
out: "postdfm" | ||
}); | ||
module.exports = require("../../typedoc.config.cjs")("postdfm"); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const path = require("path"); | ||
|
||
module.exports = (projectName) => ({ | ||
extensionsToTreatAsEsm: [".ts"], | ||
globals: { | ||
"ts-jest": { | ||
useESM: true | ||
} | ||
}, | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest" | ||
}, | ||
resolver: path.resolve(__dirname, "resolver.cjs"), | ||
collectCoverage: true, | ||
collectCoverageFrom: ["**/dist/**/*.js", "!**/node_modules/**"], | ||
coverageReporters: [["lcovonly", { file: "coverage.info" }], "text"], | ||
coverageDirectory: "results/lcov", | ||
reporters: [ | ||
"default", | ||
[ | ||
"jest-junit", | ||
{ | ||
usePathForSuiteName: "true", | ||
classNameTemplate: "[{classname}]", | ||
titleTemplate: "{title}", | ||
outputName: "./report.xml", | ||
outputDirectory: "results/jest" | ||
} | ||
] | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
const path = require("path"); | ||
|
||
module.exports = (options) => | ||
Object.assign( | ||
{ | ||
excludePrivate: true, | ||
theme: "minimal", | ||
}, | ||
options, | ||
{ | ||
out: path.resolve(__dirname, "docs", options.out), | ||
} | ||
); | ||
module.exports = (projectName) => | ||
Object.assign({ | ||
excludePrivate: true, | ||
theme: "minimal", | ||
entryPoints: ["src/index.ts"], | ||
out: path.resolve(__dirname, "docs", projectName) | ||
}); |