News for hackers. Stuff that matters.

izelnakri

  I got tired of test frameworks that require config files, plugins, and 50MB of dependencies just to run assert.equal. So I built QUnitX.

  The pitch is simple: one test file, three runtimes, no changes.

  import { module, test } from 'qunitx';

  module('Math', () => {
    test('addition', (assert) => {
      assert.equal(2 + 2, 4);
    });
  });

  node --test math-test.js
  deno test math-test.js
  qunitx math-test.js  # browser, headless

  Why QUnit?

  I know the reaction: "QUnit? That jQuery thing from 2008?" — yes, exactly. That's the point. It's been solving real edge cases for 16 years that Jest/Vitest are still catching up to. assert.deepEqual correctly handles circular references, typed arrays, Maps, Sets, prototype chains. assert.step / assert.verifySteps catches missing async callbacks that other frameworks silently swallow. assert.expect(n) fails if the wrong number of assertions ran — invaluable when async code paths are involved.

  What QUnitX actually does:

  - Wraps Node's built-in node:test runner with the QUnit lifecycle (no Jest, no Vitest, nothing extra)
  - Wraps Deno's native BDD runner the same way
  - Browser path is a thin re-export of QUnit itself — full browser UI with filterable, shareable test URLs

  TypeScript works out of the box (node --import=tsx/esm --test). Coverage via npx c8. Watch mode via --watch. Zero runtime dependencies.

  The browser demo is what I'm most proud of — the QUnit UI lets you filter to any test and share the URL, so your colleague sees the exact same filtered view. We've been using this in production for years and it never gets old.
Repo: https://github.com/izelnakri/qunitx
You had to refute my argument, make assumptions and call the framework I suggested, one of the oldest frontend frameworks a pet framework while I care less about what you think tbh. I won’t be surprised if I’m worth more than you or make more money than you do, best of luck! I’m not going to respond on this thread further.
Yeah these type of articles always have hypester tone with less substance unfortunately. RiotJS is great but ember.js API/tools are even greater, highly suggest learning ember.js, if you value good APIs, testing & good community ;)
Re:Things you forgot because of React on Tuesday August 15, 2023 @06:45AM (#37132297)
People & thinking like this makes frontend development more complicated than it already is. I refuse to work with people who has this thought, had to make my HN comment ;) I think automated acceptance testing in browser is king rather than unit tests on the frontend.
Re:Amateurs obsess over tools, pros over mastery on Sunday July 09, 2023 @03:03PM (#36657755)
I think you’re 100% on point here.
Re:How to Sell Elixir Again (2023) on Saturday May 13, 2023 @01:59PM (#35930890)
I so far agree with all you said and strong think already based on limited info available to me that you are a well-versed Elixir dev. However nothing beats the short term dev speed of scripting up some JS with npm. Have you seen the latest test runner efforts on node.js and advancements in deno? I think this gap is slowly closing but node is still not near Elixir in terms of long-term productivity, in future it will take over though I think if types dont get into the Elixir language fast.
Re:Web Push for Web Apps on iOS and iPadOS on Thursday February 16, 2023 @07:24PM (#34828861)
I strongly disagree that what he is asking is user hostile, just like asking microphone or camera permissions aren't user hostile. You also didn't need to lecture anyone like that on hacker news, thanks!
Re:When Is Short Tenure a Red Flag? on Monday October 24, 2022 @10:48PM (#33325576)
I agree more with peteradio.
Re:When Is Short Tenure a Red Flag? on Sunday October 23, 2022 @11:25PM (#33312665)
Never reaching a year at 10 jobs is something to ask I think however:

> why would any hiring manager reasonably expect that to be different after hiring them again for job 11

Thats is I think still the wrong approach, signals the wrong mentality in an IT company(a company thats greatest asset is its employees). Investing in employees can never be a saving center in a good IT business, considering all businesses are becoming IT businesses perhaps in every business in this context. If a candidate has the skills and took time to apply, if they are qualified you are responsible to hire them and keep them. If I was the manager of the hiring manager, I’d probably fire this hiring manager for keeping the organization dumber, and seeks his own interest/status-quo seeking behavior & protectionism with this behavior/approach/mentality. I do believe in moving mountains in 3-6 months, especially in badly managed projects or super fast growing companies.

Re:When Is Short Tenure a Red Flag? on Sunday October 23, 2022 @11:10PM (#33312596)
I think these should actually be written in the job ads because I wouldn’t want to work for a colleague who has your mentality. I worked with many bunch of sit-on-your-chair claim your paycheck at the end of the month types, another colleague another competition types, and this one is the most complex: overly-invested/$feelingLikeOwnerYetOwnNoShares types but yet I have no way to screen them during the interview process and a single mention in the job ad description could help me save some time: Companies should immediately tell if they would reject job-hoppers, or particularly screen for loyalist in tech(ones with delusion given commercial activity in IT), that is a company I can respect!
Re:Deep introduction to class decorators in TypeScript on Wednesday February 16, 2022 @12:03AM (#30356544)
Identity politics based, brain-washed mentality in action. I do functional programming for years now and write JS more than a decade, and don't consider this feature to be a monstrosity. If anything, it is a nice addition to the language especially when it comes to designing ORMs.

The fact that this became the most upvoted comment on hacker news signals me something sad about this sites moderation. In addition to the fact that other most upvoted comments(arguments) are lacking depth and good context:

1 - not standard so I won't use it(yet mitigating would be easy & basic and there is a major/popular implementation in typescript), 2- I don't like how it looks(decades long I'm an artist argument)

Good arguments & discussions usually require in-depth knowledge, given how fast programming communities grow, there will be people who make these shallow arguments and they will get upvoted(will have more people agreeing to them).

Sadly this means old communities like hacker news content and moderation will get spoiled by this behavior and standard committees will keep getting many noisy pushback & shallow criticisms as more people become programmers and will have tendency to share their newly formed opinions rather too quickly.

I like and ok with criticisms, however I hope and expect them to be in-depth, not disappointingly this shallow.

Re:Is the big tech era ending? on Saturday December 04, 2021 @08:14AM (#29440619)
However there is no good alternative for Meta’s Facebook, despite its degrading web UI over the years. I dont think its that much of a problem growing at 1-2% per month instead of 20-25% for any new social network.

People should ideally stop using whatsapp and move over to Telegram as it seems to be the only one that has whatsapp UX parity. Thats what I did, and I also have signal, discord etc and I own no shares of Telegram.

Re:Does ES6 make JavaScript frameworks obsolete? on Wednesday November 17, 2021 @05:31AM (#29251209)
Yes this article should be ignored because this is wrong: “ Ember, for instance, is probably the most “frameworky” of the frameworks on this list, but it suffers from performance issues, the largest download size, the largest API footprint, and the steepest learning curve of any of the frameworks on this list.”

There are no performance issues with ember.js glimmer engine, large payload argument is also old and wrong for big apps, among other wrong claims in a single sentence.

I will not argue with anyone here below on hacker news. If you reply to my comment chances are I might not respond back. I just skimmed the article and saw this part, made me realize I shouldn’t read this article further.

Re:Parcel v2 on Wednesday October 13, 2021 @09:33PM (#28859579)
Webpack is a pain to use I agree, I've never liked webpack. My comment is on the behavior of trying to look smart/funny(meme-y) while lacking actual substance.
He could have protected himself by making his shares the same voting rights as common class and not selling them, signalling his loyalty to shareholders. It should be illegal to issue shares to public with lower voting rights in my view. Our world would be a different place if google/facebook had only one type of voting class and I dont think what I view is strictly political.
Re:Gleam 0.15 on Thursday May 06, 2021 @12:11PM (#27065394)
Ive been following this project for a while, it is extremely promising considering theres an interop between elixir and rust ecosystem. Lack of first-class typing and somewhat implicit resolutions/imports are my current annoyances with Elixir although its still my go-to until deno/ts tools mature. Some people mentioned already but dedicated docs for how to run phoenix/ecto with gleam, run any rust code with gleam would be super useful for understanding & adoption. Lastly rust-like “local” docs generation from types would be amazing, biggest thing missing currently in TypeScript in my view, existing tools are very premature.
Re:Esbuild 0.9 on Tuesday March 09, 2021 @01:32PM (#26401938)
I'm actually very happy that esbuild doesnt have HMR by default. Despite the fact that most frontend devs loving/hyping HMR, I prefer live-reloads more because it refetches data/makes network calls and run my route hooks without any additional step. This is particularly important when you run your application tests in the browser(thats better than running app tests in CI btw) and change these test files constantly. The fact that most frontend devs favor HMR over live-reload signals something that I really dislike.
Re:AP reports US election results via Ethereum blockchain on Thursday November 05, 2020 @08:45AM (#24998139)
This suddenly becomes less questionable after Trump wants to legally challenge the election. Blockchain is an immutable and public database, the popular blockhains have economic incentives to be kept alive/running for the operators and protects against censor, so its an obvious place to store public data that needs/should be audited.
Re:Lovely Week with Elixir on Wednesday May 20, 2020 @04:31PM (#23251416)
You’ve just summarized my thoughts on Elixir after using it(and still loving it) for years. Thanks :)
Re:Deno 1.0 on Wednesday May 13, 2020 @09:15PM (#23174025)
I would really like a testing framework like AVA on deno, same amazing API of seperating parallel and serial tests and running them on multiple threads. Also I will need npm compatibility soon, once these are in, why would I ever write code in node.js?
ember with typescript should be an option for you

Older »