My country has made this illegal. The maximum is a few hours of tests but it can not resemble any real work or help the business. Anything that resembles work must be paid. We do however allow short term contracts meant for trials. These are also paid but temporary, and are limited to 4x 3 months.
This used to be (or still is) big in retail, I heard. For most days of the week, a clothing store could get a candidate for a free trial day, they would fold clothes, move boxes, etc, helping out the employees. After that, they get the “we’ll stay in touch”, but next day, somebody else is doing their trial day, and so on. Basically the store gets one extra employee for free