levelgraph
Version:
A graph database for Node.js and the browser built on top of LevelUp
27 lines (19 loc) • 512 B
JavaScript
var levelgraph = require('../lib/levelgraph')
, level = require('level-test')(),
os = require('os'),
path = require('path');
describe('creation api', function() {
var db;
afterEach(function(done) {
if (db) {
db.close(done);
}
});
it('should create a db passing a levelup instance', function() {
db = levelgraph(level());
});
it('should create a db passing a string', function() {
var dbPath = path.join(os.tmpdir(), 'hello');
db = levelgraph(dbPath);
});
});