This is false for H-1B - there is no "labor market test". Such a test is required for the PERM process in which an H-1B visa holder would seek a green card through their employer, although the definition of "prove" is up for debate [2].
[1] https://www.dol.gov/agencies/whd/fact-sheets/62o-h1b-recruit... [2] https://www.propublica.org/article/trump-immigration-h1b-vis...
H1-B applications must have a Labor Condition Application which requires a prevailing wage assessment and that hiring a foreign worker won't adversely affect US workers.
It is true that the LCA (and PERM!) processes are have grave flaws that leave them open to abuse.