diff --git a/.gitignore b/.gitignore index 2df4b554f..84ce6e1fc 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ yarn.lock .nyc_output yarn-error.log -/examples/*/doc -/examples/basic/json.json +/src/test/renderer/*/doc +/src/test/renderer/testProject/json.json /node_modules/ /coverage/ /dist/ diff --git a/examples/basic/run b/examples/basic/run deleted file mode 100755 index 8db2af596..000000000 --- a/examples/basic/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd ${0%/*} -node ../../bin/typedoc --includes inc/ --media media/ --json json.json --out doc/ src/ diff --git a/examples/basic/run.bat b/examples/basic/run.bat deleted file mode 100644 index 240569837..000000000 --- a/examples/basic/run.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -set curr_dir=%cd% -chdir /D "%~dp0" - -node ..\..\bin\typedoc --includes inc\ --media media\ --json json.json --out doc\ src\ - -chdir /D "%curr_dir%" \ No newline at end of file diff --git a/examples/basic/src/index.ts b/examples/basic/src/index.ts deleted file mode 100644 index 984455985..000000000 --- a/examples/basic/src/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from "./access"; -export * from "./classes"; -export * from "./default-export"; -export * from "./enumerations"; -export * from "./flattened"; -export * from "./functions"; -export * from "./generics"; -export * from "./hidden"; -export * from "./markdown"; -export * from "./mixin"; -export * from "./mod"; -export * from "./mod2"; -export * from "./modules"; -export { default as SingleExportedClass } from "./single-export"; -export * from "./weird-names"; diff --git a/examples/self/run b/examples/self/run deleted file mode 100755 index 17e47d93d..000000000 --- a/examples/self/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd ${0%/*} -node ../../bin/typedoc --name "TypeDoc Documentation" --tsconfig ../../tsconfig.json --readme ../../README.md --out doc/ --entryPointStrategy expand ../../src/lib/ diff --git a/examples/self/run.bat b/examples/self/run.bat deleted file mode 100644 index 5f084ae11..000000000 --- a/examples/self/run.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -set curr_dir=%cd% -chdir /D "%~dp0" - -node ..\..\bin\typedoc --name "TypeDoc Documentation" --tsconfig ../../tsconfig.json --readme ../../README.md --out doc\ --entryPointStrategy expand ..\..\src\lib\ - -chdir /D "%curr_dir%" diff --git a/internal-docs/visual-regression-tests.md b/internal-docs/visual-regression-tests.md new file mode 100644 index 000000000..7015e2dac --- /dev/null +++ b/internal-docs/visual-regression-tests.md @@ -0,0 +1,5 @@ +# Running the Visual Regression Tests + +1. Build screenshots: `npm run test:visual`. All items should be considered new. +2. Accept the screenshots: `npm run test:visual:accept` +3. Run `npm run test:visual` again. All items should pass. diff --git a/src/test/capture-screenshots.ts b/src/test/capture-screenshots.ts index f19486b32..14d6e6e3d 100644 --- a/src/test/capture-screenshots.ts +++ b/src/test/capture-screenshots.ts @@ -7,7 +7,7 @@ import { Application, TSConfigReader, EntryPointStrategy } from ".."; import { remove } from "../lib/utils"; const concurrency = 10; -const src = join(__dirname, "../../examples/basic/src"); +const src = join(__dirname, "../../src/test/renderer/testProject/src"); const baseDirectory = join(__dirname, "../../dist/tmp/capture"); const outputDirectory = join(__dirname, "../../dist/tmp/__screenshots__"); const globPattern = "**/*.html"; diff --git a/examples/basic/.gitignore b/src/test/renderer/testProject/.gitignore similarity index 100% rename from examples/basic/.gitignore rename to src/test/renderer/testProject/.gitignore diff --git a/examples/basic/README.md b/src/test/renderer/testProject/README.md similarity index 100% rename from examples/basic/README.md rename to src/test/renderer/testProject/README.md diff --git a/examples/basic/inc/class-example.md b/src/test/renderer/testProject/inc/class-example.md similarity index 100% rename from examples/basic/inc/class-example.md rename to src/test/renderer/testProject/inc/class-example.md diff --git a/examples/basic/media/logo-128.png b/src/test/renderer/testProject/media/logo-128.png similarity index 100% rename from examples/basic/media/logo-128.png rename to src/test/renderer/testProject/media/logo-128.png diff --git a/src/test/renderer/testProject/run b/src/test/renderer/testProject/run new file mode 100644 index 000000000..e7f9f1194 --- /dev/null +++ b/src/test/renderer/testProject/run @@ -0,0 +1,3 @@ +#!/bin/sh +cd ${0%/*} +node ../../../../bin/typedoc --includes inc/ --media media/ --json json.json --out doc/ --entryPointStrategy expand src/ diff --git a/src/test/renderer/testProject/run.bat b/src/test/renderer/testProject/run.bat new file mode 100644 index 000000000..ca2b01cd7 --- /dev/null +++ b/src/test/renderer/testProject/run.bat @@ -0,0 +1,7 @@ +@echo off +set curr_dir=%cd% +chdir /D "%~dp0" + +node ..\..\..\..\bin\typedoc --includes inc\ --media media\ --json json.json --out doc\ --entryPointStrategy expand src\ + +chdir /D "%curr_dir%" \ No newline at end of file diff --git a/examples/basic/src/access.ts b/src/test/renderer/testProject/src/access.ts similarity index 100% rename from examples/basic/src/access.ts rename to src/test/renderer/testProject/src/access.ts diff --git a/examples/basic/src/classes.ts b/src/test/renderer/testProject/src/classes.ts similarity index 100% rename from examples/basic/src/classes.ts rename to src/test/renderer/testProject/src/classes.ts diff --git a/examples/basic/src/default-export.ts b/src/test/renderer/testProject/src/default-export.ts similarity index 100% rename from examples/basic/src/default-export.ts rename to src/test/renderer/testProject/src/default-export.ts diff --git a/examples/basic/src/enumerations.ts b/src/test/renderer/testProject/src/enumerations.ts similarity index 100% rename from examples/basic/src/enumerations.ts rename to src/test/renderer/testProject/src/enumerations.ts diff --git a/examples/basic/src/flattened.ts b/src/test/renderer/testProject/src/flattened.ts similarity index 100% rename from examples/basic/src/flattened.ts rename to src/test/renderer/testProject/src/flattened.ts diff --git a/examples/basic/src/functions.ts b/src/test/renderer/testProject/src/functions.ts similarity index 100% rename from examples/basic/src/functions.ts rename to src/test/renderer/testProject/src/functions.ts diff --git a/examples/basic/src/generics.ts b/src/test/renderer/testProject/src/generics.ts similarity index 100% rename from examples/basic/src/generics.ts rename to src/test/renderer/testProject/src/generics.ts diff --git a/examples/basic/src/hidden.ts b/src/test/renderer/testProject/src/hidden.ts similarity index 100% rename from examples/basic/src/hidden.ts rename to src/test/renderer/testProject/src/hidden.ts diff --git a/examples/basic/src/markdown.ts b/src/test/renderer/testProject/src/markdown.ts similarity index 100% rename from examples/basic/src/markdown.ts rename to src/test/renderer/testProject/src/markdown.ts diff --git a/examples/basic/src/mixin.ts b/src/test/renderer/testProject/src/mixin.ts similarity index 100% rename from examples/basic/src/mixin.ts rename to src/test/renderer/testProject/src/mixin.ts diff --git a/examples/basic/src/mod.ts b/src/test/renderer/testProject/src/mod.ts similarity index 100% rename from examples/basic/src/mod.ts rename to src/test/renderer/testProject/src/mod.ts diff --git a/examples/basic/src/mod2.ts b/src/test/renderer/testProject/src/mod2.ts similarity index 100% rename from examples/basic/src/mod2.ts rename to src/test/renderer/testProject/src/mod2.ts diff --git a/examples/basic/src/modules.ts b/src/test/renderer/testProject/src/modules.ts similarity index 100% rename from examples/basic/src/modules.ts rename to src/test/renderer/testProject/src/modules.ts diff --git a/examples/basic/src/single-export.ts b/src/test/renderer/testProject/src/single-export.ts similarity index 100% rename from examples/basic/src/single-export.ts rename to src/test/renderer/testProject/src/single-export.ts diff --git a/examples/basic/src/weird-names.ts b/src/test/renderer/testProject/src/weird-names.ts similarity index 100% rename from examples/basic/src/weird-names.ts rename to src/test/renderer/testProject/src/weird-names.ts diff --git a/examples/basic/tsconfig.json b/src/test/renderer/testProject/tsconfig.json similarity index 100% rename from examples/basic/tsconfig.json rename to src/test/renderer/testProject/tsconfig.json diff --git a/tsconfig.json b/tsconfig.json index 407322a9c..47572867f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -44,6 +44,7 @@ "src/test/.dot", "src/test/module", "src/test/packages", - "src/test/slow/entry-points" + "src/test/slow/entry-points", + "src/test/renderer/testProject" ] }