How to use the warehouse.version function in warehouse

To help you get started, we’ve selected a few warehouse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hexojs / hexo / test / scripts / hexo / load_database.js View on Github external
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;
  });