`expect(stats.isFile).to.be.a('function');` is the right way to do this.  Change this here and elsewhere below.