1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 719ae331ae
commit c96a84d0ff
13249 changed files with 317868 additions and 2101398 deletions

View File

@@ -1,3 +1,7 @@
'use strict';
/*globals describe, it*/
var bson = require('../bson');
var expect = require('chai').expect;
var mongodb = require('mongodb');
@@ -10,8 +14,8 @@ describe('BSON', function() {
expect(result).to.eql({
test: true,
s: "hello",
i: -99.44
s: 'hello',
i: -99.44,
});
});
@@ -83,18 +87,17 @@ describe('BSON', function() {
});
});
describe('toString', function() {
it('should convert simple documents', function() {
var test = {
bool: true,
str: "string",
str: 'string',
number: -678.53,
list: [
1,
2,
3
]
3,
],
};
var result = bson.toString(test);
var test2 = bson.toBSON(result);
@@ -105,7 +108,7 @@ describe('BSON', function() {
it('should convert ObjectID to string', function() {
var test = {
id: mongodb.ObjectID(),
id2: mongodb.ObjectID("4fb1299686a989240b000001")
id2: mongodb.ObjectID('4fb1299686a989240b000001'),
};
var result = bson.toString(test);
var test2 = bson.toBSON(result);
@@ -115,7 +118,7 @@ describe('BSON', function() {
it('should convert ISODate to string', function() {
var test = {
date: new Date()
date: new Date(),
};
var result = bson.toString(test);
var test2 = bson.toBSON(result);
@@ -126,7 +129,7 @@ describe('BSON', function() {
it('should convert Timestamp to string', function() {
var test = {
ts: mongodb.Timestamp(),
ts2: mongodb.Timestamp(100, 100)
ts2: mongodb.Timestamp(100, 100),
};
var result = bson.toString(test);
var test2 = bson.toBSON(result);
@@ -136,8 +139,8 @@ describe('BSON', function() {
it('should convert DBRef to string', function() {
var test = {
ref: mongodb.DBRef("coll", "id", ""),
ref2: mongodb.DBRef("coll", "id", "db")
ref: mongodb.DBRef('coll', 'id', ''),
ref2: mongodb.DBRef('coll', 'id', 'db'),
};
var result = bson.toString(test);
var test2 = bson.toBSON(result);
@@ -146,7 +149,7 @@ describe('BSON', function() {
});
it('should convert Symbol to string', function() {
var test = { symbol: mongodb.Symbol("test") };
var test = { symbol: mongodb.Symbol('test') };
var result = bson.toString(test);
var test2 = bson.toBSON(result);
@@ -171,7 +174,7 @@ describe('BSON', function() {
it('should convert Code to string', function() {
var test = {
code: mongodb.Code("function() { x; }")
code: mongodb.Code('function() { x; }'),
};
var result = bson.toString(test);
var test2 = bson.toBSON(result);