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

Init the socket:test/context automatically on import { test } from 'socket:test' #555

Closed
chicoxyzzy opened this issue Sep 6, 2023 · 1 comment · Fixed by #559
Closed
Assignees
Labels
enhancement New feature or request

Comments

@chicoxyzzy
Copy link
Member

This way we don't have to remember to import the context. This will also allow us to do --test=./test/module.js to run only one test at time instead of commenting all the other module imports in the ./test/index.js

...or even group modules like this

/test
  /dom
    dom-test1.js
    dom-test2.js
  /something-else
    module1.js
    module2.js
  dom.js
  something-else.js
  index.js

where index.js is:

import './dom.js'
import './something-else.js'

There should be a check that context is only initialized once

@chicoxyzzy chicoxyzzy added the enhancement New feature or request label Sep 6, 2023
@chicoxyzzy chicoxyzzy changed the title Init the socket:test/context automatically on import { test } from 'socket:test Init the socket:test/context automatically on import { test } from 'socket:test' Sep 6, 2023
@chicoxyzzy
Copy link
Member Author

chicoxyzzy commented Sep 6, 2023

When it's done, we need to update tests in the socket-examples (if there're any) and templates in the create-socket-app (TODO: think how it can work with vite templates)

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

Successfully merging a pull request may close this issue.

1 participant