Skip to content

Commit 051528e

Browse files
authored
Fix integration tests (#170)
1 parent 72f1981 commit 051528e

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

integration-tests/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@
88
Create a new file with the `.test.ts` extension in the `tests/` folder. Use `tests/smoke.test.ts` as a reference on how to set up a temporary folder for the project and execute Steiger.
99

1010
Store your output snapshots in `__snapshots__` with the `-posix.txt` extension. After you wrote your test, run `pnpm update-windows-snapshots` to copy over the changes in snapshots.
11+
12+
## Updating both snapshots
13+
14+
To update snapshots on POSIX and Windows, run the following commands:
15+
16+
```
17+
pnpm run test --update
18+
pnpm update-windows-snapshots
19+
```

integration-tests/tests/__snapshots__/smoke-stderr-posix.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,43 @@
22
┌ src/entities/user/api/getUser.ts
33
✘ Forbidden import from higher layer "app".
44
5-
└ fsd/forbidden-imports (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/forbidden-imports​)
5+
└ fsd/forbidden-imports: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/forbidden-imports
66

77
┌ src/entities
88
✘ Inconsistent pluralization of slice names. Prefer all plural names
99
✔ Auto-fixable
1010
11-
└ fsd/inconsistent-naming (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/inconsistent-naming​)
11+
└ fsd/inconsistent-naming: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/inconsistent-naming
1212

1313
┌ src/entities/user
1414
✘ This slice has no references. Consider removing it.
1515
16-
└ fsd/insignificant-slice (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice​)
16+
└ fsd/insignificant-slice: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice
1717

1818
┌ src/entities/users
1919
✘ This slice has no references. Consider removing it.
2020
21-
└ fsd/insignificant-slice (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice​)
21+
└ fsd/insignificant-slice: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice
2222

2323
┌ src/entities/user/api/getUser.ts
2424
✘ Forbidden sidestep of public API when importing from "@/app/ui/App".
2525
26-
└ fsd/no-public-api-sidestep (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-public-api-sidestep​)
26+
└ fsd/no-public-api-sidestep: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-public-api-sidestep
2727

2828
┌ src/entities/user/ui/api
2929
✘ Having a folder with the name "api" inside a segment could be confusing because that name is commonly used for segments. Consider renaming it.
3030
31-
└ fsd/no-reserved-folder-names (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-reserved-folder-names​)
31+
└ fsd/no-reserved-folder-names: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-reserved-folder-names
3232

3333
┌ src/app/ui
3434
✘ Layer "app" should not have "ui" segment.
3535
36-
└ fsd/no-ui-in-app (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-ui-in-app​)
36+
└ fsd/no-ui-in-app: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-ui-in-app
3737

3838
┌ src/processes
3939
✘ Layer "processes" is deprecated, avoid using it
4040
41-
└ fsd/no-processes (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-processes​)
41+
└ fsd/no-processes: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-processes
4242

4343
────────────────────────────────────────────────────────
4444
Found 8 errors (1 can be fixed automatically with --fix)

integration-tests/tests/__snapshots__/smoke-stderr-windows.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,43 @@
22
┌ src\entities\user\api\getUser.ts
33
× Forbidden import from higher layer "app".
44
5-
└ fsd/forbidden-imports (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/forbidden-imports​)
5+
└ fsd/forbidden-imports: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/forbidden-imports
66

77
┌ src\entities
88
× Inconsistent pluralization of slice names. Prefer all plural names
99
√ Auto-fixable
1010
11-
└ fsd/inconsistent-naming (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/inconsistent-naming​)
11+
└ fsd/inconsistent-naming: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/inconsistent-naming
1212

1313
┌ src\entities\user
1414
× This slice has no references. Consider removing it.
1515
16-
└ fsd/insignificant-slice (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice​)
16+
└ fsd/insignificant-slice: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice
1717

1818
┌ src\entities\users
1919
× This slice has no references. Consider removing it.
2020
21-
└ fsd/insignificant-slice (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice​)
21+
└ fsd/insignificant-slice: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice
2222

2323
┌ src\entities\user\api\getUser.ts
2424
× Forbidden sidestep of public API when importing from "@/app/ui/App".
2525
26-
└ fsd/no-public-api-sidestep (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-public-api-sidestep​)
26+
└ fsd/no-public-api-sidestep: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-public-api-sidestep
2727

2828
┌ src\entities\user\ui\api
2929
× Having a folder with the name "api" inside a segment could be confusing because that name is commonly used for segments. Consider renaming it.
3030
31-
└ fsd/no-reserved-folder-names (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-reserved-folder-names​)
31+
└ fsd/no-reserved-folder-names: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-reserved-folder-names
3232

3333
┌ src\app\ui
3434
× Layer "app" should not have "ui" segment.
3535
36-
└ fsd/no-ui-in-app (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-ui-in-app​)
36+
└ fsd/no-ui-in-app: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-ui-in-app
3737

3838
┌ src\processes
3939
× Layer "processes" is deprecated, avoid using it
4040
41-
└ fsd/no-processes (​https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-processes​)
41+
└ fsd/no-processes: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/no-processes
4242

4343
────────────────────────────────────────────────────────
4444
Found 8 errors (1 can be fixed automatically with --fix)

0 commit comments

Comments
 (0)