Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('Load database', () => {
const Hexo = require('../../../lib/hexo');
const hexo = new Hexo(pathFn.join(__dirname, 'db_test'), {silent: true});
const loadDatabase = require('../../../lib/hexo/load_database');
const dbPath = hexo.database.options.path;
const fixture = {
meta: {
version: 1,
warehouse: require('warehouse').version
},
models: {
Test: [
{_id: 'A'},
{_id: 'B'},
{_id: 'C'}
]
}
};
before(() => fs.mkdirs(hexo.base_dir));
beforeEach(() => {
hexo._dbLoaded = false;
});