Sha256: 6ffdd894be96244b5f9462baddb813872dd00219590babee2298fd3ae4afd13e

Contents?: true

Size: 704 Bytes

Versions: 19

Compression:

Stored size: 704 Bytes

Contents

/*
 * format-test.js: Tests for `utile.format` module.
 *
 * (C) 2011, Nodejitsu Inc.
 * MIT LICENSE
 *
 */

var vows = require('vows'),
    assert = require('assert'),
    utile = require('../lib');

vows.describe('utile/format').addBatch({

  'Should use the original `util.format` if there are no custom parameters to replace.': function() {
    assert.equal(utile.format('%s %s %s', 'test', 'test2', 'test3'), 'test test2 test3');
  },

  'Should use `utile.format` if custom parameters are provided.': function() {
    assert.equal(utile.format('%a %b %c', [
      '%a',
      '%b',
      '%c'
    ], [
      'test',
      'test2',
      'test3'
    ]), 'test test2 test3');
  }

}).export(module);

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/utile/test/format-test.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/utile/test/format-test.js
hooch-0.4.2 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js