Open sjonniesensei opened 4 days ago
Hello,
I remember that in the original version 3.0.0
I made modifications including renaming methods and constructors. However, by never officially releasing this version, I believe I have not updated the documentation either.
In February, I started a complete rewrite of the library. One of the benefits should be much higher quality testing using Ookla Speedtest. Unfortunately the last few months have been very chaotic for me and I never finished this release. Today I found the time to get started again. At the current stage, I just need to rewrite the upload speed measurement technology and make a few minor improvements. The beta release of the new version 3.0.0
will probably be stripped of the ability to use the Cloudflare test for testing, but I believe most users primarily use the Ookla test anyway, which is why I've given it my full effort.
This release will use different libraries, different technologies and different ways of packaging the resulting code. This should solve the problem you mentioned.
I ask for your patience until the new release comes out. I will try to devote all my spare time to it if possible.
Hi @karelkryda ,
Thanks for the reaction. Alright, looking forward to the new version. Please let me know when it is out.
Have a good day!
Describe the bug Im getting the error TypeError: UniversalSpeedtest is not a constructor.
To Reproduce Steps to reproduce the behavior:
const app = express(); const port = 3000;
app.use(express.static("public"));
app.get("/api/speedtest", async (req, res) => { const universalSpeedtest = new UniversalSpeedtest({ measureUpload: true, downloadUnit: SpeedUnits.MBps, }); universalSpeedtest .runSpeedtestNet() .then((result) => { res.json({ speed: result }); }) .catch((error) => { res.status(500).json({ error: error.message }); }); });
app.listen(port, () => { console.log(
Server running at http://localhost:${port}
); }); `Expected behavior expected the results of the speed test as I made an index.html with a script where Im calling the /api/speedtest: `function runSpeedtest() { startTestButton.disabled = true;
const eventSource = new EventSource("/api/speedtest");
eventSource.onmessage = function (event) { const data = JSON.parse(event.data); console.log(data);
};
eventSource.onerror = function (error) { console.error("EventSource failed:", error); eventSource.close(); startTestButton.disabled = false; }; }`
Screenshots
Desktop (please complete the following information):