Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky scroll "outlineModel" does not work on a MochaJS test with tags #236084

Open
thom-nic opened this issue Dec 13, 2024 · 0 comments
Open

Sticky scroll "outlineModel" does not work on a MochaJS test with tags #236084

thom-nic opened this issue Dec 13, 2024 · 0 comments
Assignees

Comments

@thom-nic
Copy link

thom-nic commented Dec 13, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: Version: 1.97.0-insider
    Commit: 21a129e
    Date: 2024-12-13T12:38:52.505Z (4 hrs ago)
    Electron: 32.2.6
    ElectronBuildId: 10629634
    Chromium: 128.0.6613.186
    Node.js: 20.18.1
    V8: 12.8.374.38-electron.0
    OS: Darwin x64 23.6.0
  • OS Version: MacOS 23.6.0

Steps to Reproduce:

  1. Enable sticky scroll, if not already.
  2. Use the following code:
describe('some test suite', { tags: ['some tag', 'another tag'] }, () => {
  describe('some feature', () => {
    it('test 1', () => {
      expect(true).to.equal(true);
    });

    it('test 2', () => {
      expect(true).to.equal(false);
      console.log('this is a console log');
    });
  });
});
  1. Scroll down so the top describes are off the top of the editor
  2. Expect sticky scroll to work; it does not:
Image
  1. Remove the object literal from the top describe, so the first line looks like:
describe('some test suite', () => {
  1. Sticky scroll starts working as expected:
Image

My colleague just clued me into the editor.stickyScroll.defaultModel setting: switching from outlineModel to either foldingProviderModel or indentModel makes the stick scroll work in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants