Replace global assert with chai