Commit graph

14 commits

Author SHA1 Message Date
Simon Kornblith
3fc38d750b Use Zotero.Item.fromJSON() for saving from translators
Also:
  - Move some canonicalization of items returned by translators to
    Zotero.Translate
  - Make Zotero.Translate#translate return a promise
  - Add tests
2015-06-07 17:30:41 -04:00
Dan Stillman
87db29f060 Add .gitignore file for PDF tool cache dir in test data directory 2015-06-02 20:32:55 -04:00
Dan Stillman
20ca8edf87 Fix getContentsAsync() with invalid characters 2015-06-02 20:32:31 -04:00
Dan Stillman
77f12527aa Fix NS_BASE_STREAM_CLOSED error, for real
The input stream produced by asyncFetch is closed automatically at EOL,
so the available() call throws this for an empty file.
2015-06-02 14:58:43 -04:00
Simon Kornblith
9bb01d737c Merge branch '4.0' into sjk/659 2015-06-01 00:03:20 -04:00
Erik Hetzner
aac1255d3d Add basic tests for full-text search
- also add importFileAttachment support function
2015-05-31 14:39:37 -07:00
Simon Kornblith
ca0af1abd6 Missed a UTC adjustment in 673168ea7b 2015-05-31 17:13:32 -04:00
Simon Kornblith
673168ea7b Don't adjust accessDate for UTC and set version to 0 in Item#toJSON
Ref discussions:
https://github.com/zotero/zotero/pull/746/files#r31394225
https://github.com/zotero/zotero/pull/746#commitcomment-11445605
2015-05-31 17:02:20 -04:00
Aurimas Vinckevicius
920969bb29 Add journalArticle JSON data for lighter testing 2015-05-26 16:11:45 -05:00
Aurimas Vinckevicius
daa92cb6ed Add auto-generated sample data
allTypesAndFields: Direct serialization of all valid fields for all valid item types
citeProcJSExport: All item types and fields as sent to citeproc-js
itemJSON: Zotero.Item::toJSON serialization of all item types and fields
translatorExport: items as presented to export translators after 4.0.27
translatorExportLegacy: items as presented to export translators before 4.0.27

(does not cover relations, collections, tags, attachments)
2015-05-26 16:11:44 -05:00
Aurimas Vinckevicius
1d1eb74e57 Add tests for Zotero.Translate.ItemGetter.prototype.nextItem 2015-05-26 16:11:43 -05:00
Dan Stillman
16d79c5cbf Add missing sample file for attachment test 2015-05-04 02:45:55 -04:00
Simon Kornblith
218917f367 Add unit test for PDF recognition without DOI 2015-03-08 16:20:57 -04:00
Simon Kornblith
3f0f7af71a Add unit test for PDF recognition with DOI
Also some support code that was useful here and will probably be
useful for other tests. This is a pretty complicated thing to test, but
it seems to work.
2015-03-08 16:02:10 -04:00