Skip to content

Commit a7e575e

Browse files
committed
docs: tips for tests [skip ci]
1 parent f896f67 commit a7e575e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

docs/contributing/adding-new-features.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ A summary of what you need:
1818
- Look at existing features for some common patterns, such as how to parse a `TextDocument` to get the AST.
1919
- You may want to know what AST node is at a given `Position`. See `node_at_offset_visitor.dart`.
2020
- Use `findInWorkspace` to run a callback on each linked document, recursively (with a `lazy` option).
21+
- Write [tests](../../pkgs/sass_language_services/test/features/) using the [memory file system](../../pkgs/sass_language_services/test/memory_file_system.dart).
2122
7. Add the feature to the public API in [language_services.dart](../../pkgs/sass_language_services/lib/src/language_services.dart).
2223
8. Use the feature in the request handler in `language_server.dart`.
24+
9. Add a VS Code test as an an end-to-end "smoketest" in the [extension](../../extension/test/README.md).

extension/test/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Each subdirectory in `electron/` will run in a separate instance of VS Code.
88

99
By convention subdirectories in `electron/` should have:
1010

11-
- `index.js` as the entrypoint that finds test files and passes them to Mocha
12-
- at least one `*.test.js` file with some tests
13-
- a `fixtures/` subdirectory with:
14-
- `.vscode/settings.json`
15-
- `styles.scss` or `styles.sass`
11+
- `index.js` as the entrypoint that finds test files and passes them to Mocha.
12+
- At least one `*.test.js` file with some tests.
13+
- A `fixtures/` subdirectory with:
14+
- `.vscode/settings.json` with any non-default settings you want to test.
15+
- `styles.scss` or `styles.sass`.

0 commit comments

Comments
 (0)