A few months ago a company gave me a very fun test, it was a bit big, but a good programmer could give a good example within an hour or 2.
The test was simply: Create a hangman game (frontend + backend).
It gave developers a chance to show off if they wanted (TDD + Angular + nicely readable backend code, abstractions etc.)
Even though I eventually didnt go through with the offering they gave me, the project was so fun I kept adding more and more games in the next few months, whenever I had an hour to kill I added a game.
That code is now still my go-to when a company wants to see some example code I wrote.
That said: This company also got a lot of dead-wood programmers. Having not enough people pass your test doesn't necessarily mean that your test is bad, it could very well be the quality of the programmers.
A lot of companies I worked for in the last 15+ years had trouble finding good programmers.