-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use aliases instead of meta (#19566)
* refactor: use aliases instead of meta + use fs/promise instead of promisify * refactor: move function "start" from resolveConfig * fix: finish refactor * refactor: better name for hasSupportPath file * test: add project vite-ct * test: add system test for vite * test: update test name
- Loading branch information
1 parent
5035155
commit 5cdf2ee
Showing
13 changed files
with
1,604 additions
and
56 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 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 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,3 @@ | ||
{ | ||
"retries": null | ||
} |
14 changes: 14 additions & 0 deletions
14
system-tests/projects/vite-ct/cypress/component/support.spec.ts
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,14 @@ | ||
describe('Support files', () => { | ||
it('can load a support file', () => { | ||
const $body = Cypress.$('body') | ||
|
||
// Visual cue to help debug | ||
const $supportNode = Cypress.$(`<h1>Support file hasn't been loaded 😿</h1>`) | ||
|
||
$body.append($supportNode) | ||
|
||
// @ts-ignore | ||
expect(window.supportFileWasLoaded).to.be.true | ||
$supportNode.text('Support file was loaded! ⚡️') | ||
}) | ||
}) |
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,9 @@ | ||
const { startDevServer } = require('@cypress/vite-dev-server') | ||
|
||
module.exports = (on) => { | ||
on('dev-server:start', async (options) => { | ||
return startDevServer({ | ||
options, | ||
}) | ||
}) | ||
} |
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,3 @@ | ||
body{ | ||
color:aquamarine | ||
} |
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,6 @@ | ||
import '@testing-library/cypress/add-commands' | ||
import './styles.css' | ||
|
||
before(() => { | ||
window.supportFileWasLoaded = true | ||
}) |
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,12 @@ | ||
{ | ||
"name": "@test-project/vite-ct", | ||
"version": "0.0.0-test", | ||
"private": true, | ||
"dependencies": { | ||
"@cypress/vite-dev-server": "file:../../../npm/vite-dev-server", | ||
"@testing-library/cypress": "8.0.2", | ||
"cypress": "file:../../../cli/build", | ||
"typescript": "4.2.3", | ||
"vite": "2.7.10" | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "./", | ||
"target": "esnext", | ||
"useDefineForClassFields": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"isolatedModules": true, | ||
"strict": true, | ||
"jsx": "preserve", | ||
"sourceMap": true, | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"paths": { | ||
"@/*": ["src/*"] | ||
}, | ||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"], | ||
"skipLibCheck": true | ||
}, | ||
"include": ["vite.config.*", "env.d.ts", "src/**/*", "cypress/**/*"] | ||
} |
Oops, something went wrong.