From fed572ad28939060ac4d039001639e40240a5d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 12 Jan 2021 20:27:52 +0100 Subject: jcal_to_xcal now works. --- static/jcal-tests.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 static/jcal-tests.js (limited to 'static/jcal-tests.js') diff --git a/static/jcal-tests.js b/static/jcal-tests.js new file mode 100644 index 00000000..c84d9bd1 --- /dev/null +++ b/static/jcal-tests.js @@ -0,0 +1,32 @@ +/* "Test cases" for jcal.js. + ideally we would actually have runnable tests, but + `document' is only available in the browser. +*/ + +let doc = document.implementation.createDocument(xcal, 'icalendar'); + +jcal = ['key', {}, 'text', 'value']; + +jcal_property_to_xcal_property(doc, jcal); + + + +jcal_to_xcal(['vcalendar', [], [['vevent', [['key', {}, 'text', 'value']], []]]]).childNodes[0].outerHTML + +/* returns (except not pretty printee) + + + + + + + + value + + + + + + + +*/ -- cgit v1.2.3