Bryan Clark
Bryan Clark
I was wondering about this as well recently. I built out a container for use here https://github.com/users/clarkbw/packages/container/package/distribution-spec%2Fconformance and was considering creating a PR against this repo to auto-build this container...
Can you add a related test? https://github.com/clarkbw/jest-webextension-mock/blob/main/__tests__/tabs.test.js#L106-L113 You can follow similar examples in there https://github.com/clarkbw/jest-webextension-mock/blob/main/__tests__/tabs.test.js#L36-L39
> If it is just a case of missing support, I think we can add it. If you want I can make a PR to add these mocks, I looked...
> If the code being tested actually passes in a callback it will expect a Tab object with certain properties but from what I can tell it will always get...
Sorry, I'm not sure what you're asking about. If you could point to some code that might help.
Chrome and browser are both set here: https://github.com/clarkbw/jest-webextension-mock/blob/6e6c9083305070ec10ed41318201d45e500e29f2/src/setup.js#L9 I’m not sure why browser isn’t available when global.browser is set but I would suspect using `jest-environment-jsdom-global` might have that effect.
Looks like we check that we call the callback https://github.com/clarkbw/jest-webextension-mock/blob/f66b8b83db2dcf12f06d7158ded6180c60a08047/__tests__/tabs.test.js#L120 And yes, looks like you're right that we don't pass it along https://github.com/clarkbw/jest-webextension-mock/blob/f66b8b83db2dcf12f06d7158ded6180c60a08047/src/runtime.js#L18 Can you check that this is the...
We handle promises but we probably don't do it correctly https://github.com/clarkbw/jest-webextension-mock/blob/f66b8b83db2dcf12f06d7158ded6180c60a08047/src/runtime.js#L23
> Outside of a rebase, is there anything blocking this that I can help with? I think its missing some simple tests
Perhaps @wuz has plans? @Flo-G take a look at some of the other PRs, shouldn't be too bad to add support https://github.com/clarkbw/jest-webextension-mock/pull/92