Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move visual tests to src/test/renderer #1717

Merged
merged 4 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
3 changes: 0 additions & 3 deletions examples/basic/run

This file was deleted.

7 changes: 0 additions & 7 deletions examples/basic/run.bat

This file was deleted.

15 changes: 0 additions & 15 deletions examples/basic/src/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions examples/self/run

This file was deleted.

7 changes: 0 additions & 7 deletions examples/self/run.bat

This file was deleted.

5 changes: 5 additions & 0 deletions internal-docs/visual-regression-tests.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion src/test/capture-screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/test/renderer/testProject/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cd ${0%/*}
node ../../../../bin/typedoc --includes inc/ --media media/ --json json.json --out doc/ --entryPointStrategy expand src/
7 changes: 7 additions & 0 deletions src/test/renderer/testProject/run.bat
Original file line number Diff line number Diff line change
@@ -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%"
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}