Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 612c695

Browse files
committed
update test
1 parent 76c2c25 commit 612c695

File tree

2 files changed

+14
-26
lines changed

2 files changed

+14
-26
lines changed

crates/rome_cli/tests/commands/check.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,7 @@ fn fs_error_unknown() {
860860
//
861861
// Verifies, that ignore patterns to symbolic links are allowed.
862862
//
863+
// ├── rome.json
863864
// ├── hidden_nested
864865
// │   └── test
865866
// │   └── symlink_testcase1_2 -> hidden_testcase1
@@ -870,8 +871,7 @@ fn fs_error_unknown() {
870871
// │   ├── test1.ts // ignored
871872
// │   ├── test2.ts // ignored
872873
// │   └── test.js // ok
873-
// └── project
874-
// ├── rome.json
874+
// └── src
875875
// ├── symlink_testcase1_1 -> hidden_nested
876876
// └── symlink_testcase2 -> hidden_testcase2
877877
#[test]
@@ -880,7 +880,7 @@ fn fs_files_ignore_symlink() {
880880
let mut console = BufferConsole::default();
881881

882882
let root_path = temp_dir().join("rome_test_files_ignore_symlink");
883-
let project_path = root_path.join("project");
883+
let src_path = root_path.join("src");
884884

885885
let testcase1_path = root_path.join("hidden_testcase1");
886886
let testcase1_sub_path = testcase1_path.join("test");
@@ -894,25 +894,25 @@ fn fs_files_ignore_symlink() {
894894
remove_dir_all(root_path.clone());
895895
}
896896
create_dir(root_path.clone()).unwrap();
897-
create_dir(project_path.clone()).unwrap();
897+
create_dir(src_path.clone()).unwrap();
898898
create_dir_all(testcase1_sub_path.clone()).unwrap();
899899
create_dir(testcase2_path.clone()).unwrap();
900900
create_dir_all(nested_sub_path.clone()).unwrap();
901901

902-
// project/symlink_testcase1_1
903-
let symlink_testcase1_1_path = project_path.join("symlink_testcase1_1");
902+
// src/symlink_testcase1_1
903+
let symlink_testcase1_1_path = src_path.join("symlink_testcase1_1");
904904
// hidden_nested/test/symlink_testcase1_2
905905
let symlink_testcase1_2_path = nested_sub_path.join("symlink_testcase1_2");
906-
// project/symlink_testcase2
907-
let symlink_testcase2_path = project_path.join("symlink_testcase2");
906+
// src/symlink_testcase2
907+
let symlink_testcase2_path = src_path.join("symlink_testcase2");
908908

909909
#[cfg(target_family = "unix")]
910910
{
911-
// project/test/symlink_testcase1_1 -> hidden_nested
911+
// src/test/symlink_testcase1_1 -> hidden_nested
912912
symlink(nested_path, symlink_testcase1_1_path).unwrap();
913913
// hidden_nested/test/symlink_testcase1_2 -> hidden_testcase1
914914
symlink(testcase1_path, symlink_testcase1_2_path).unwrap();
915-
// project/symlink_testcase2 -> hidden_testcase2
915+
// src/symlink_testcase2 -> hidden_testcase2
916916
symlink(testcase2_path.clone(), symlink_testcase2_path).unwrap();
917917
}
918918

@@ -926,7 +926,7 @@ fn fs_files_ignore_symlink() {
926926
check_windows_symlink!(symlink_dir(testcase2_path.clone(), symlink_testcase2_path));
927927
}
928928

929-
let config_path = project_path.join("rome.json");
929+
let config_path = root_path.join("rome.json");
930930
let mut config_file = File::create(config_path).unwrap();
931931
config_file
932932
.write_all(CONFIG_IGNORE_SYMLINK.as_bytes())
@@ -950,9 +950,9 @@ fn fs_files_ignore_symlink() {
950950
Arguments::from_vec(vec![
951951
OsString::from("check"),
952952
OsString::from("--config-path"),
953-
OsString::from(project_path.clone()),
953+
OsString::from(root_path.clone()),
954954
OsString::from("--apply"),
955-
OsString::from(project_path),
955+
OsString::from(src_path),
956956
]),
957957
);
958958

crates/rome_cli/tests/snapshots/main_commands_check/fs_files_ignore_symlink.snap

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,14 @@ expression: content
55
---
66
# Emitted Messages
77

8-
```block
9-
<TEMP_DIR>/rome_test_files_ignore_symlink/project/rome.json lint ━━━━━━━━━━━━━━━━━━━━
10-
11-
no diagnostic message provided
12-
13-
14-
```
15-
168
```block
179
Skipped 4 suggested fixes.
1810
If you wish to apply the suggested (unsafe) fixes, use the command rome check --apply-unsafe
1911
2012
```
2113

2214
```block
23-
Fixed 3 file(s) in <TIME>
24-
```
25-
26-
```block
27-
Skipped 1 file(s)
15+
Fixed 2 file(s) in <TIME>
2816
```
2917
3018

0 commit comments

Comments
 (0)