You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: timerVariant option to choose between native and worker timers (#1818)
* feat: option to choose between native and worker timers
* feat: initialize timer once
* fix: pingTimer test check correct timerId prop
---------
Co-authored-by: Daniel Lando <daniel.sorridi@gmail.com>
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,11 @@ npm test
19
19
20
20
This will run both `browser` and `node` tests.
21
21
22
+
23
+
### Running specific tests
24
+
25
+
For example, you can run `node -r esbuild-register --test test/pingTimer.ts`
26
+
22
27
### Browser
23
28
24
29
Browser tests use [`wtr`](https://modern-web.dev/docs/test-runner/overview/) as the test runner. To build browser bundle using [esbuild](https://esbuild.github.io/) and run browser tests, you can use the following command:
- `manualConnect`: prevents the constructor to call `connect`. In this case after the `mqtt.connect` is called you should call `client.connect` manually.
460
+
- `timerVariant`: defaults to `auto`, which tries to determine which timer is most appropriate for you environment, if you're having detection issues, you can set it to `worker` or `native`
460
461
461
462
In case mqtts (mqtt over tls) is required, the `options` object is passed through to [`tls.connect()`](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback). If using a **self-signed certificate**, set `rejectUnauthorized: false`. However, be cautious as this exposes you to potential man in the middle attacks and isn't recommended for production.
0 commit comments