-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpunit tests converted to mocha/chai #140
base: master
Are you sure you want to change the base?
Changes from 10 commits
cfc8228
d58206e
0244f16
f4dfc10
b30737f
aae33b1
878afef
e8449db
8b7804b
bf083e1
6af7367
9e746e0
339d923
2f5ccd0
755e133
319ce22
1ee44b1
41d5981
4d7632c
e150cd1
ae270e5
0d653ed
5e21351
8e0936b
1976445
d8f3427
2e7a853
d4465f2
e7518c2
c5b1a93
640caf4
8253f4d
b2b562a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const fs = require('fs'); | ||
|
||
var config = {}; | ||
|
||
const data = fs.readFileSync('config.json'); | ||
config = JSON.parse(data); | ||
config.timeout = 60000; | ||
config.numOwnedGroups = 3; | ||
config.numPublicGroups = 2; | ||
module.exports = config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"verbose": 1, | ||
"syncURLPrefix": "http://dataserver/", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need this |
||
"apiURLPrefix": "http://localhost/", | ||
"rootUsername": "YtTnrHcWUC0FqP27xuaa", | ||
"rootPassword": "esFEIngwxnyp1kuTrUpKpH72gEftHbkiWneoeimV", | ||
"awsRegion": "us-east-1", | ||
"s3Bucket": "zotero", | ||
"awsAccessKey": "", | ||
"awsSecretKey": "", | ||
"filesystemStorage": 1, | ||
"syncVersion": 9, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need this |
||
|
||
|
||
"userID": 1, | ||
"libraryID": 1, | ||
"username": "testuser", | ||
"password": "letmein", | ||
"displayName": "testuser", | ||
"emailPrimary": "[email protected]", | ||
"emailSecondary": "[email protected]", | ||
"ownedPrivateGroupID": 1, | ||
"ownedPrivateGroupLibraryID": 1, | ||
"ownedPrivateGroupName": "Test Group", | ||
|
||
|
||
"userID2": 2, | ||
"username2": "testuser2", | ||
"password2": "letmein2", | ||
"displayName2": "testuser2", | ||
"ownedPrivateGroupID2": 0, | ||
"ownedPrivateGroupLibraryID2": 0 | ||
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<p>&nbsp;</p> | ||
<p style="margin-top: 0.18cm; margin-bottom: 0.18cm; line-height: 100%;" lang="es-ES"><br /><br /></p> | ||
<p style="margin-top: 0.18cm; margin-bottom: 0.18cm; line-height: 100%;" lang="es-ES"><br /><br /></p> | ||
<table border="1" cellspacing="0" cellpadding="7" width="614"> | ||
<colgroup><col width="598"></col> </colgroup> | ||
<p style="margin-top: 0.18cm; margin-bottom: 0.18cm;" lang="en-US"><span style="font-family: Times New Roman,serif;"><span style="font-size: x-large;"><strong>test</strong></span></span></p> |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sync1download.xml and sync2upload.xml can be removed. These were from the old sync system. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<?xml version="1.0"?> | ||
<response version="9" timestamp="" userID="23848" defaultLibraryID="21999" updateKey="" earliest=""> | ||
<updated> | ||
<creators> | ||
<creator key="DMAHQQR9" dateAdded="2009-03-07 04:59:21" dateModified="2009-03-07 04:59:23"> | ||
<firstName>Døn</firstName> | ||
<lastName>Stîllmån</lastName> | ||
</creator> | ||
<creator key="I2QFIFDT" dateAdded="2009-03-07 04:54:17" dateModified="2009-03-07 04:54:17"> | ||
<name>汉字</name> | ||
<fieldMode>1</fieldMode> | ||
</creator> | ||
<creator key="V9MECAGR" dateAdded="2009-03-07 04:53:27" dateModified="2009-03-07 04:53:28"> | ||
<firstName>Test</firstName> | ||
<lastName>Testerman</lastName> | ||
</creator> | ||
<creator key="WTEG7VPJ" dateAdded="2009-03-07 04:53:37" dateModified="2009-03-07 04:53:40"> | ||
<name>Testish McTester</name> | ||
<fieldMode>1</fieldMode> | ||
</creator> | ||
<creator key="ZT4UDTTT" dateAdded="2009-03-07 04:54:37" dateModified="2009-03-07 04:54:42"> | ||
<firstName>Testy</firstName> | ||
<lastName>Teststein</lastName> | ||
</creator> | ||
</creators> | ||
<items> | ||
<item key="2TGWDASM" itemType="note" dateAdded="2009-03-07 04:55:36" dateModified="2009-03-07 04:55:46" sourceItem="DUQPU87V"> | ||
<note><p>Here's a <strong>child</strong> note.</p></note> | ||
</item> | ||
<item key="6TKKAABJ" itemType="bookSection" dateAdded="2009-03-07 04:53:20" dateModified="2009-03-07 04:54:09"> | ||
<field name="edition">3</field> | ||
<field name="date">March 6, 2007</field> | ||
<field name="title">My Book Section</field> | ||
<creator key="V9MECAGR" creatorType="author" index="0"/> | ||
<creator key="WTEG7VPJ" creatorType="editor" index="1"/> | ||
<related>DUQPU87V</related> | ||
</item> | ||
<item key="7IMJZ8V6" itemType="attachment" dateAdded="2009-03-07 05:00:17" dateModified="2009-03-07 05:00:42" linkMode="2" mimeType="text/html" charset="utf-8"> | ||
<field name="title">amazon.html</field> | ||
<path>AAAAAAFkAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADC/J9aSCsAAAAOrpkLYW1hem9uLmh0bWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADnT/bcS9TKEAAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAAB0Rlc2t0b3AAABAACAAAwvzXmgAAABEACAAAxL2E4QAAAAEADAAOrpkADjPnAA4z5QACACpNYWNpbnRvc2ggSEQ6VXNlcnM6ZGFuOkRlc2t0b3A6YW1hem9uLmh0bWwADgAYAAsAYQBtAGEAegBvAG4ALgBoAHQAbQBsAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIAHVVzZXJzL2Rhbi9EZXNrdG9wL2FtYXpvbi5odG1sAAATAAEvAAAVAAIACv//AAA=</path> | ||
<note><p>Note on a top-level linked file</p></note> | ||
<related>DUQPU87V</related> | ||
</item> | ||
<item key="976Q6TWE" itemType="attachment" dateAdded="2009-03-07 04:55:59" dateModified="2009-03-07 04:56:16" sourceItem="DUQPU87V" linkMode="1" mimeType="text/html" charset="utf-8"> | ||
<field name="url">http://chnm.gmu.edu/</field> | ||
<field name="accessDate">2009-03-07 04:55:59</field> | ||
<field name="title">Center for History and New Media</field> | ||
<path>storage:chnm.gmu.edu.html</path> | ||
<note><p>This is a note for a snapshot.</p></note> | ||
</item> | ||
<item key="9P9UVFK3" itemType="note" dateAdded="2009-03-07 04:56:20" dateModified="2009-03-07 04:56:29"> | ||
<note><p>Here's a top-level note.</p></note> | ||
</item> | ||
<item key="C2W49E6Q" itemType="attachment" dateAdded="2009-03-07 04:56:47" dateModified="2009-03-07 04:56:47" linkMode="1" mimeType="text/html" charset="utf-8"> | ||
<field name="url">http://www.zotero.org/</field> | ||
<field name="accessDate">2009-03-07 04:56:47</field> | ||
<field name="title">Zotero: The Next-Generation Research Tool</field> | ||
<path>storage:www.zotero.org.html</path> | ||
</item> | ||
<item key="DUQPU87V" itemType="book" dateAdded="2009-03-07 04:52:56" dateModified="2009-03-07 04:55:18"> | ||
<field name="title">My Book</field> | ||
<creator key="I2QFIFDT" creatorType="translator" index="0"/> | ||
<creator key="ZT4UDTTT" creatorType="author" index="1"/> | ||
<related>6TKKAABJ 7IMJZ8V6</related> | ||
</item> | ||
<item key="G3PTXNXS" itemType="attachment" dateAdded="2009-03-07 04:56:01" dateModified="2009-03-07 04:56:10" sourceItem="DUQPU87V" linkMode="3" mimeType="text/html" charset="utf-8"> | ||
<field name="url">http://chnm.gmu.edu/</field> | ||
<field name="accessDate">2009-03-07 04:56:01</field> | ||
<field name="title">Center for History and New Media</field> | ||
<note><p>This is a note for a link.</p></note> | ||
</item> | ||
<item key="HTHD884W" itemType="attachment" dateAdded="2009-03-07 04:58:37" dateModified="2009-03-07 04:58:37" linkMode="0" mimeType="image/jpeg"> | ||
<field name="title">FILE.jpg</field> | ||
<path>storage:FILE.jpg</path> | ||
</item> | ||
<item key="T3K4BNWP" itemType="book" dateAdded="2009-03-07 04:59:04" dateModified="2009-03-07 04:59:39" deleted="1"> | ||
<field name="title">Trashed item</field> | ||
<creator key="DMAHQQR9" creatorType="author" index="0"/> | ||
</item> | ||
</items> | ||
<collections> | ||
<collection key="8VE7W6RN" name="Subcollection" dateAdded="2009-03-07 04:57:19" dateModified="2009-03-07 04:57:25" parent="KBTFHUZD"> | ||
<items>DUQPU87V</items> | ||
</collection> | ||
<collection key="9Z7WTWC2" name="Another subcollection" dateAdded="2009-03-07 04:57:53" dateModified="2009-03-07 04:58:38" parent="8VE7W6RN"> | ||
<items>HTHD884W</items> | ||
</collection> | ||
<collection key="KBTFHUZD" name="My Collection" dateAdded="2009-03-07 04:55:26" dateModified="2009-03-07 04:56:01"> | ||
<items>6TKKAABJ 9P9UVFK3</items> | ||
</collection> | ||
<collection key="M6B882D5" name="Empty subcollection" dateAdded="2009-03-07 04:57:36" dateModified="2009-03-07 04:57:36" parent="8VE7W6RN"/> | ||
</collections> | ||
<searches> | ||
<search key="W2KN2TFW" name="Me" dateAdded="2009-03-07 04:57:10" dateModified="2009-03-07 04:57:10"> | ||
<condition id="1" condition="title" operator="contains" value="My"/> | ||
<condition id="2" condition="edition" operator="is" value="2"/> | ||
</search> | ||
<search key="Q88FDVN3" name="Notes" dateAdded="2009-03-07 05:01:14" dateModified="2009-03-07 05:01:14"> | ||
<condition id="1" condition="itemTypeID" operator="is" value="1"/> | ||
</search> | ||
</searches> | ||
<tags> | ||
<tag key="MR3BTEPM" name="Birds" dateAdded="2009-03-07 04:55:05" dateModified="2009-03-07 04:55:05"> | ||
<items>6TKKAABJ</items> | ||
</tag> | ||
<tag key="TNT9H7Q2" name="Cats" dateAdded="2009-03-07 04:55:02" dateModified="2009-03-07 04:55:02"> | ||
<items>6TKKAABJ</items> | ||
</tag> | ||
<tag key="4EQG6EUX" name="Dogs" dateAdded="2009-03-07 04:54:54" dateModified="2009-03-07 04:55:04"> | ||
<items>6TKKAABJ DUQPU87V</items> | ||
</tag> | ||
<tag key="IPSDQFTW" name="Fish" dateAdded="2009-03-07 04:54:56" dateModified="2009-03-07 04:54:56"> | ||
<items>DUQPU87V</items> | ||
</tag> | ||
<tag key="EAMSZGIN" name="Frogs" dateAdded="2009-03-07 04:58:47" dateModified="2009-03-07 04:58:47"> | ||
<items>HTHD884W</items> | ||
</tag> | ||
<tag key="QU5QF6A7" name="Kumquats" dateAdded="2009-03-07 04:59:33" dateModified="2009-03-07 04:59:33"> | ||
<items>T3K4BNWP</items> | ||
</tag> | ||
</tags> | ||
</updated> | ||
</response> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<data version="9"> | ||
<creators> | ||
<creator libraryID="" dateAdded="2009-03-07 04:53:27" dateModified="2009-03-07 04:53:28" key="V9MECAGR"> | ||
<firstName>Test</firstName> | ||
<lastName>Testerman</lastName> | ||
</creator> | ||
<creator libraryID="" dateAdded="2009-03-07 04:54:17" dateModified="2009-03-07 04:54:17" key="I2QFIFDT"> | ||
<name>汉字</name> | ||
<fieldMode>1</fieldMode> | ||
</creator> | ||
<creator libraryID="" dateAdded="2009-03-07 04:54:37" dateModified="2009-03-07 04:54:42" key="ZT4UDTTT"> | ||
<firstName>Testy</firstName> | ||
<lastName>Teststein</lastName> | ||
</creator> | ||
<creator libraryID="" dateAdded="2009-03-07 04:59:21" dateModified="2009-03-07 04:59:23" key="DMAHQQR9"> | ||
<firstName>Døn</firstName> | ||
<lastName>Stîllmån</lastName> | ||
</creator> | ||
</creators> | ||
<items> | ||
<item libraryID="" itemType="bookSection" dateAdded="2009-03-07 04:53:20" dateModified="2009-03-07 04:54:09" key="6TKKAABJ"> | ||
<field name="edition">3</field> | ||
<field name="date">2007-03-06 March 6, 2007</field> | ||
<field name="title">My Book Section</field> | ||
<creator key="V9MECAGR" creatorType="author" index="0"/> | ||
<creator key="WTEG7VPJ" creatorType="editor" index="1"> | ||
<creator libraryID="" dateAdded="2009-03-07 04:53:37" dateModified="2009-03-07 04:53:40" key="WTEG7VPJ"> | ||
<name>Testish McTester</name> | ||
<fieldMode>1</fieldMode> | ||
</creator> | ||
</creator> | ||
</item> | ||
<item libraryID="" itemType="book" dateAdded="2009-03-07 04:52:56" dateModified="2009-03-07 04:55:18" key="DUQPU87V"> | ||
<field name="title">My Book</field> | ||
<creator key="I2QFIFDT" creatorType="translator" index="0"/> | ||
<creator key="ZT4UDTTT" creatorType="author" index="1"/> | ||
<related>6TKKAABJ</related> | ||
</item> | ||
<item libraryID="" itemType="note" dateAdded="2009-03-07 04:55:36" dateModified="2009-03-07 04:55:46" key="2TGWDASM" sourceItem="DUQPU87V"> | ||
<note><p>Here's a <strong>child</strong> note.</p></note> | ||
</item> | ||
<item libraryID="" itemType="attachment" dateAdded="2009-03-07 04:56:01" dateModified="2009-03-07 04:56:10" key="G3PTXNXS" sourceItem="DUQPU87V" linkMode="3" mimeType="text/html" charset="utf-8"> | ||
<field name="url">http://chnm.gmu.edu/</field> | ||
<field name="accessDate">2009-03-07 04:56:01</field> | ||
<field name="title">Center for History and New Media</field> | ||
<note><p>This is a note for a link.</p></note> | ||
</item> | ||
<item libraryID="" itemType="attachment" dateAdded="2009-03-07 04:55:59" dateModified="2009-03-07 04:56:16" key="976Q6TWE" sourceItem="DUQPU87V" linkMode="1" mimeType="text/html" charset="utf-8"> | ||
<field name="url">http://chnm.gmu.edu/</field> | ||
<field name="accessDate">2009-03-07 04:55:59</field> | ||
<field name="title">Center for History and New Media</field> | ||
<path>storage:chnm.gmu.edu.html</path> | ||
<note><p>This is a note for a snapshot.</p></note> | ||
</item> | ||
<item libraryID="" itemType="note" dateAdded="2009-03-07 04:56:20" dateModified="2009-03-07 04:56:29" key="9P9UVFK3"> | ||
<note><p>Here's a top-level note.</p></note> | ||
</item> | ||
<item libraryID="" itemType="attachment" dateAdded="2009-03-07 04:56:47" dateModified="2009-03-07 04:56:47" key="C2W49E6Q" linkMode="1" mimeType="text/html" charset="utf-8"> | ||
<field name="url">http://www.zotero.org/</field> | ||
<field name="accessDate">2009-03-07 04:56:47</field> | ||
<field name="title">Zotero: The Next-Generation Research Tool</field> | ||
<path>storage:www.zotero.org.html</path> | ||
</item> | ||
<item libraryID="" itemType="attachment" dateAdded="2009-03-07 04:58:37" dateModified="2009-03-07 04:58:37" key="HTHD884W" linkMode="0" mimeType="image/jpeg"> | ||
<field name="title">FILE.jpg</field> | ||
<path>storage:FILE.jpg</path> | ||
</item> | ||
<item libraryID="" itemType="book" dateAdded="2009-03-07 04:59:04" dateModified="2009-03-07 04:59:39" key="T3K4BNWP" deleted="1"> | ||
<field name="title">Trashed item</field> | ||
<creator key="DMAHQQR9" creatorType="author" index="0"/> | ||
</item> | ||
<item libraryID="" itemType="attachment" dateAdded="2009-03-07 05:00:17" dateModified="2009-03-07 05:00:42" key="7IMJZ8V6" linkMode="2" mimeType="text/html" charset="utf-8"> | ||
<field name="title">amazon.html</field> | ||
<path>AAAAAAFkAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADC/J9aSCsAAAAOrpkLYW1hem9uLmh0bWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADnT/bcS9TKEAAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAAB0Rlc2t0b3AAABAACAAAwvzXmgAAABEACAAAxL2E4QAAAAEADAAOrpkADjPnAA4z5QACACpNYWNpbnRvc2ggSEQ6VXNlcnM6ZGFuOkRlc2t0b3A6YW1hem9uLmh0bWwADgAYAAsAYQBtAGEAegBvAG4ALgBoAHQAbQBsAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIAHVVzZXJzL2Rhbi9EZXNrdG9wL2FtYXpvbi5odG1sAAATAAEvAAAVAAIACv//AAA=</path> | ||
<note><p>Note on a top-level linked file</p></note> | ||
<related>DUQPU87V</related> | ||
</item> | ||
</items> | ||
<collections> | ||
<collection libraryID="" name="My Collection" dateAdded="2009-03-07 04:55:26" dateModified="2009-03-07 04:56:01" key="KBTFHUZD"> | ||
<items>6TKKAABJ 9P9UVFK3</items> | ||
</collection> | ||
<collection libraryID="" name="Subcollection" dateAdded="2009-03-07 04:57:19" dateModified="2009-03-07 04:57:25" key="8VE7W6RN" parent="KBTFHUZD"> | ||
<items>DUQPU87V</items> | ||
</collection> | ||
<collection libraryID="" name="Empty subcollection" dateAdded="2009-03-07 04:57:36" dateModified="2009-03-07 04:57:36" key="M6B882D5" parent="8VE7W6RN"/> | ||
<collection libraryID="" name="Another subcollection" dateAdded="2009-03-07 04:57:53" dateModified="2009-03-07 04:58:38" key="9Z7WTWC2" parent="8VE7W6RN"> | ||
<items>HTHD884W</items> | ||
</collection> | ||
</collections> | ||
<searches> | ||
<search libraryID="" name="Me" dateAdded="2009-03-07 04:57:10" dateModified="2009-03-07 04:57:10" key="W2KN2TFW"> | ||
<condition id="1" condition="title" operator="contains" value="My"/> | ||
<condition id="2" condition="edition" operator="is" value="2"/> | ||
</search> | ||
<search libraryID="" name="Notes" dateAdded="2009-03-07 05:01:14" dateModified="2009-03-07 05:01:14" key="Q88FDVN3"> | ||
<condition id="1" condition="itemTypeID" operator="is" value="1"/> | ||
</search> | ||
</searches> | ||
<tags> | ||
<tag libraryID="" name="Fish" dateAdded="2009-03-07 04:54:56" dateModified="2009-03-07 04:54:56" key="IPSDQFTW"> | ||
<items>DUQPU87V</items> | ||
</tag> | ||
<tag libraryID="" name="Cats" dateAdded="2009-03-07 04:55:02" dateModified="2009-03-07 04:55:02" key="TNT9H7Q2"> | ||
<items>6TKKAABJ</items> | ||
</tag> | ||
<tag libraryID="" name="Dogs" dateAdded="2009-03-07 04:54:54" dateModified="2009-03-07 04:55:04" key="4EQG6EUX"> | ||
<items>6TKKAABJ DUQPU87V</items> | ||
</tag> | ||
<tag libraryID="" name="Birds" dateAdded="2009-03-07 04:55:05" dateModified="2009-03-07 04:55:05" key="MR3BTEPM"> | ||
<items>6TKKAABJ</items> | ||
</tag> | ||
<tag libraryID="" name="Frogs" dateAdded="2009-03-07 04:58:47" dateModified="2009-03-07 04:58:47" key="EAMSZGIN"> | ||
<items>HTHD884W</items> | ||
</tag> | ||
<tag libraryID="" name="Kumquats" dateAdded="2009-03-07 04:59:33" dateModified="2009-03-07 04:59:33" key="QU5QF6A7"> | ||
<items>T3K4BNWP</items> | ||
</tag> | ||
</tags> | ||
</data> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the logic for why these are in here and not in config.json?
In any case, we should use the npm
config
package and move everything into a default.json5 file inconfig
(like translation-server).And then we could either do a find-and-replace to switch to the recommended access method or we could just stick to direct property access.
get()
would let us set values (e.g.,rootUsername
/rootPassword
) toundefined
in default.json to force them to be populated in a local.json, but since these are tests anyway, they'll just fail if something isn't configured properly, so maybe it's not worth the extra noise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing specific here. I think the config.ini used in phpunit did not have those fields, and they were set in some of the other php files. I was converting files one by one, so it just turned out that way.
Anyways, after my cleanup, I removed it all and setup the node-config with default.json5