Howdee,
Add this test and you will see it will fail:
assert.equal(classes('hello', {world: true, bla:true}), 'hello world bla')
I think there should be a join here as the filter returns an array and not a singleton:
item = Object.keys(item).filter(element => item[element]).join(' ')