UNPKG

742 BJavaScriptView Raw
1/*
2 * common-test.js: Tests for Loggly `common` utility module
3 *
4 * (C) 2010 Charlie Robbins
5 * MIT LICENSE
6 *
7 */
8
9var path = require('path'),
10 vows = require('vows'),
11 assert = require('assert'),
12 common = require('../lib/loggly/common');
13
14vows.describe('node-loggly/common').addBatch({
15 "When using the common module": {
16 "the clone() method": {
17 topic: function () {
18 this.obj = {
19 name: 'common',
20 deep: {
21 first: 'first',
22 second: 'second'
23 }
24 };
25 return common.clone(this.obj);
26 },
27 "should return a deep clone of the object": function (clone) {
28 assert.isFalse(this.obj.deep === clone.deep);
29 }
30 }
31 }
32}).export(module);
\No newline at end of file