-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexandre Germain
committed
Oct 17, 2017
1 parent
3691b94
commit e13ccfa
Showing
4 changed files
with
145 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
{ | ||
"name": "diaspora-mongo", | ||
"version": "0.0.1", | ||
"description": "MongoDB adapter for Diaspora", | ||
"main": "index.js", | ||
"directories": { | ||
"lib": "lib" | ||
}, | ||
"scripts": { | ||
"test": "mocha test/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/GerkinDev/Diaspora-Mongo.git" | ||
}, | ||
"keywords": [ | ||
"MongoDB", | ||
"Diaspora", | ||
"adapter" | ||
], | ||
"author": "Gerkin", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/GerkinDev/Diaspora-Mongo/issues" | ||
}, | ||
"homepage": "https://github.com/GerkinDev/Diaspora-Mongo#readme", | ||
"dependencies": { | ||
"mongodb": "^2.2.31" | ||
}, | ||
"devDependencies": { | ||
"diaspora": "git+ssh://[email protected]/GerkinDev/Diaspora.git" | ||
}, | ||
"peerDependencies": { | ||
"diaspora": ">= 0.2.x" | ||
} | ||
"name": "diaspora-mongo", | ||
"version": "0.0.1", | ||
"description": "MongoDB adapter for Diaspora", | ||
"main": "index.js", | ||
"directories": { | ||
"lib": "lib" | ||
}, | ||
"scripts": { | ||
"test": "mocha test/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/GerkinDev/Diaspora-Mongo.git" | ||
}, | ||
"keywords": [ | ||
"MongoDB", | ||
"Diaspora", | ||
"adapter" | ||
], | ||
"author": "Gerkin", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/GerkinDev/Diaspora-Mongo/issues" | ||
}, | ||
"homepage": "https://github.com/GerkinDev/Diaspora-Mongo#readme", | ||
"dependencies": { | ||
"mongodb": "^2.2.31" | ||
}, | ||
"devDependencies": { | ||
"diaspora": "ssh+git://[email protected]:GerkinDev/Diaspora.git" | ||
}, | ||
"peerDependencies": { | ||
"diaspora": ">= 0.2.x" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
const AdapterTestUtils = require( 'diaspora/test/adapters/utils' ); | ||
const ADAPTER_LABEL = 'mongo'; | ||
|
||
const adapter = AdapterTestUtils.createDataSource( ADAPTER_LABEL, {database: 'diasporaMongoTest'}); | ||
console.log(adapter) | ||
adapter.waitReady().then(() => { | ||
adapter.db.dropCollection('test'); | ||
adapter.db.dropCollection('app1-matchmail-simple'); | ||
}).catch(() => Promise.resolve()); | ||
|
||
AdapterTestUtils.checkSpawnedAdapter( ADAPTER_LABEL, 'Mongo' ); | ||
AdapterTestUtils.checkEachStandardMethods( ADAPTER_LABEL ); | ||
AdapterTestUtils.checkApplications( ADAPTER_LABEL ); | ||
AdapterTestUtils.checkRegisterAdapter( ADAPTER_LABEL, 'mongo' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
|
||
/* globals l: false, it: false, describe: false, require: false, expect: false, Diaspora: false, getStyle: false, importTest: false */ | ||
|
||
require( 'diaspora/test/defineGlobals' ); | ||
require( '../index' ); | ||
|
||
if ( 'no' === process.env.SAUCE || 'undefined' === typeof process.env.SAUCE ) { | ||
if ( !process.browser ) { | ||
global.Diaspora = require( 'diaspora' ); | ||
} | ||
global.dataSources = {}; | ||
|
||
importTest( getStyle( 'category', 'Adapters' ), `${ __dirname }/adapters/mongo.js` ); | ||
} |