Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
input_file: crates/vite_task_bin/tests/e2e_snapshots/fixtures/exec-api
---
> FOO=bar vp lint # cache miss
bar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/a
---
> vp run build # populate summary file
~/packages/a$ print built-a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/a
---
> vp run build # first run, cache miss
~/packages/a$ print built-a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/a
---
> vp run build
~/packages/a$ print built-a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/a
---
> vp run -v build
~/packages/a$ print built-a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> echo '' | vp run
build: echo build app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/lib
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/lib
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run -r
@ expect-milestone: task-select::0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run -t buid
@ expect-milestone: task-select:buid:0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run buid
@ expect-milestone: task-select:buid:0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/lib
---
> echo '' | vp run
build: echo build lib
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/app
---
> vp run -t build # core -> lib -> app
~/packages/core$ echo 'Building core' ⊘ cache disabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
expression: e2e_outputs
info:
cwd: packages/lib
---
> vp run -t build # core -> lib
~/packages/core$ echo 'Building core' ⊘ cache disabled
Expand Down
8 changes: 8 additions & 0 deletions crates/vite_task_bin/tests/e2e_snapshots/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ fn run_case_inner(tmpdir: &AbsolutePath, fixture_path: &std::path::Path, fixture
}
}

let _info_guard = if e2e.cwd.as_str().is_empty() {
None
} else {
let mut case_settings = insta::Settings::clone_current();
case_settings.set_info(&serde_json::json!({ "cwd": e2e.cwd.as_str() }));
Some(case_settings.bind_to_scope())
};

let e2e_stage_path = tmpdir.join(vite_str::format!("{fixture_name}_e2e_stage_{e2e_count}"));
e2e_count += 1;
CopyOptions::new().copy_tree(fixture_path, e2e_stage_path.as_path()).unwrap();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- env-test
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-envs
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- echo-and-lint
- "--fix"
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- lint-and-echo
- Linting complete
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- hello
- a.txt
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- lint
cwd: subdir
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- lint
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- lint
- "--fix"
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: err_str
expression: err_str.as_ref()
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-error-non-root
---
`cacheScripts` can only be set in the workspace root config, but found in <workspace>/packages/pkg-a
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- clean-cache
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- cd-lint
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: "&plan_json"
info:
args:
- run
- cd-build
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/vite_task_bin/tests/test_snapshots/main.rs
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: task_graph_json
input_file: crates/vite_task_bin/tests/test_snapshots/fixtures/conflict-test
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: err_str.as_ref()
info:
args:
- run
- task-a
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency
---
Cycle dependency detected: cycle-dependency-test#task-a -> cycle-dependency-test#task-b -> cycle-dependency-test#task-a
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/vite_task_bin/tests/test_snapshots/main.rs
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: task_graph_json
input_file: crates/vite_task_bin/tests/test_snapshots/fixtures/dependency-both-topo-and-explicit
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/vite_task_bin/tests/test_snapshots/main.rs
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: task_graph_json
input_file: crates/vite_task_bin/tests/test_snapshots/fixtures/empty-package-test
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/vite_task_bin/tests/test_snapshots/main.rs
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: task_graph_json
input_file: crates/vite_task_bin/tests/test_snapshots/fixtures/explicit-deps-workspace
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/vite_task_bin/tests/test_snapshots/main.rs
source: crates/vite_task_plan/tests/plan_snapshots/main.rs
expression: task_graph_json
input_file: crates/vite_task_bin/tests/test_snapshots/fixtures/fingerprint-ignore-test
input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/fingerprint-ignore-test
---
[
{
Expand Down
Loading