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

[Request] - Update the mock-nodecg to work with NodeCG 2.x #3

Open
RiQuY opened this issue Nov 18, 2024 · 0 comments
Open

[Request] - Update the mock-nodecg to work with NodeCG 2.x #3

RiQuY opened this issue Nov 18, 2024 · 0 comments

Comments

@RiQuY
Copy link

RiQuY commented Nov 18, 2024

Description

I don't know how much compatible are the mocks with NodeCG 2.x, I tried a simple .spy() on nodecg.log.info() and it worked fine but I guess for more complicated mocks this library will not work, so if the project is still alive I suggest updating it.

EDIT: A non working example will be using nodecg.Router() because that is not present on the mock.

 FAIL  tests/extension/index.test.js > index suite > should execute
TypeError: nodecg.Router is not a function
 ❯ Module.setOAuthRoute src/extension/webserver.js:22:25
     20|  */
     21| export function setOAuthRoute(nodecg) {
     22|   const router = nodecg.Router();
       |                         ^
     23| 
     24|   /**
 ❯ Module.__vite_ssr_exports__.default src/extension/index.js:32:3
 ❯ tests/extension/index.test.js:18:10
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

1 participant