modified sparkline plugin to be nodejs compatible for mocha tests, added first tests for sparkline plugin