UNPKG

wiki-plugin-bikeshare

Version:
45 lines (39 loc) 1.42 kB
(function() { var bikeshare, expect; bikeshare = require('../client/bikeshare'); expect = require('expect.js'); describe('bikeshare plugin', function() { describe('parse text', function() { it('can pass text', function() { var config; config = bikeshare.parse('hello world'); return expect(config.lines).to.eql(['hello world']); }); it('can escape text', function() { var config; config = bikeshare.parse('hello <thing>'); return expect(config.lines).to.eql(['hello &lt;thing&gt;']); }); return it('can break lines', function() { var config; config = bikeshare.parse('hello\nworld'); return expect(config.lines).to.eql(['hello', 'world']); }); }); describe('parse gbfs links', function() { return it('can find station link', function() { var config; config = bikeshare.parse('STATION https://gbfs.citibikenyc.com/gbfs/en/station_information.json'); return expect(config.station).to.be('https://gbfs.citibikenyc.com/gbfs/en/station_information.json'); }); }); return describe('parsed options', function() { return it('can include nearby', function() { var config; config = bikeshare.parse('NEARBY'); return expect(config.nearby).to.be(true); }); }); }); }).call(this); //# sourceMappingURL=test.js.map