Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / utile / test / format-test.js
1 /*
2  * format-test.js: Tests for `utile.format` module.
3  *
4  * (C) 2011, Nodejitsu Inc.
5  * MIT LICENSE
6  *
7  */
8
9 var vows = require('vows'),
10     assert = require('assert'),
11     utile = require('../lib');
12
13 vows.describe('utile/format').addBatch({
14
15   'Should use the original `util.format` if there are no custom parameters to replace.': function() {
16     assert.equal(utile.format('%s %s %s', 'test', 'test2', 'test3'), 'test test2 test3');
17   },
18
19   'Should use `utile.format` if custom parameters are provided.': function() {
20     assert.equal(utile.format('%a %b %c', [
21       '%a',
22       '%b',
23       '%c'
24     ], [
25       'test',
26       'test2',
27       'test3'
28     ]), 'test test2 test3');
29   }
30
31 }).export(module);