Quicksilver js algorithm tested with jest