Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / utile / test / helpers / macros.js
1 /*
2  * macros.js: Test macros for `utile` module.
3  *
4  * (C) 2011, Nodejitsu Inc.
5  * MIT LICENSE
6  *
7  */
8
9 var assert = require('assert'),
10     utile = require('../../lib');
11
12 var macros = exports;
13
14 macros.assertReadCorrectJson = function (obj) {
15   assert.isObject(obj);
16   utile.deepEqual(obj, {
17     hello: 'World',
18     'I am': ['the utile module'],
19     thisMakesMe: {
20       really: 1337,
21       'right?': true
22     }
23   });
24 };
25
26 macros.assertDirectoryRequired = function (obj) {
27   assert.isObject(obj);
28   utile.deepEqual(obj, {
29     directory: {
30       me: 'directory/index.js'
31     },
32     helloWorld: {
33       me: 'helloWorld.js'
34     }
35   });
36 };
37