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

MRU caching initial implementation #32

Merged
merged 9 commits into from
Feb 14, 2023
Merged

MRU caching initial implementation #32

merged 9 commits into from
Feb 14, 2023

Conversation

Soreloser2
Copy link
Collaborator

@Soreloser2 Soreloser2 commented Feb 11, 2023

Start of #23
Adds MRU caching to keep track of last used tab ids. Tests all passing except for the keyboard shortcut, which is skipped because I'm not sure how to mock command triggers using puppeteer. EDIT: extracted switch tab into a separate method and tested. Could maybe use some more tests in general for larger cases.

Next step is probably to add more info to the cache so preview has something to show, or to make it work with multiple windows.

run tests with node test/integration/test-switch-tab.js

@Soreloser2 Soreloser2 mentioned this pull request Feb 13, 2023
Soreloser2 added a commit that referenced this pull request Feb 13, 2023
src/background.js Show resolved Hide resolved
needs more tests
some race conditions
Copy link
Collaborator

@kashish-ops kashish-ops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@Soreloser2 Soreloser2 merged commit 3a6c0db into main Feb 14, 2023
@Soreloser2 Soreloser2 deleted the Soren-MRU branch February 15, 2023 05:33
Soreloser2 added a commit that referenced this pull request Feb 15, 2023
* Create node.js.yml

WIP still need a test runner

* added test script

* updated to only use node 18

* added files that will be introduced in PR #32

* Merge with main, fixed some test errors
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

Successfully merging this pull request may close these issues.

3 participants