diff options
| author | Jamal Carvalho <jamal@golang.org> | 2021-03-03 15:00:43 -0500 |
|---|---|---|
| committer | Jamal Carvalho <jamal@golang.org> | 2021-03-04 16:19:56 +0000 |
| commit | 47a1c56065eceedf9d62531950a042f8e3d976bd (patch) | |
| tree | c80a1efd5107f925db9d346ca42d88851646997c /devtools | |
| parent | fffde5845a3ecfb1e78ca2e650aa1ac6ce8068d9 (diff) | |
| download | go-x-pkgsite-47a1c56065eceedf9d62531950a042f8e3d976bd.tar.xz | |
devtools,e2e: create page and browser globals for e2e tests
Refactors e2e tests to consolidate common setup steps
into setup.ts simplifying test maintenance and creation.
Change-Id: I886cd2f4fafc99308da2455942a6809d4eb1fe5a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/298371
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'devtools')
| -rw-r--r-- | devtools/config/e2e-test-setup.ts | 3 | ||||
| -rw-r--r-- | devtools/config/jest.config.js | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/devtools/config/e2e-test-setup.ts b/devtools/config/e2e-test-setup.ts deleted file mode 100644 index 579dbe11..00000000 --- a/devtools/config/e2e-test-setup.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { toMatchImageSnapshot } from 'jest-image-snapshot'; - -expect.extend({ toMatchImageSnapshot }); diff --git a/devtools/config/jest.config.js b/devtools/config/jest.config.js index 34c90f59..e8d5c135 100644 --- a/devtools/config/jest.config.js +++ b/devtools/config/jest.config.js @@ -14,7 +14,7 @@ const e2e = process.argv.includes('e2e'); if (e2e) { config = { ...config, - setupFilesAfterEnv: ['<rootDir>/devtools/config/e2e-test-setup.ts'], + setupFilesAfterEnv: ['<rootDir>/e2e/setup.ts'], testEnvironment: 'node', }; } |
