Sha256: a1b3b370cb5e572ee5bb72ed28297d07b222b393d355f71cc50cebec64fd348c
Contents?: true
Size: 853 Bytes
Versions: 19
Compression:
Stored size: 853 Bytes
Contents
'use strict'; var FsTools = require('../'); var Assert = require('assert'); require('vows').describe('tmpdir()').addBatch({ 'each time': { topic: [ FsTools.tmpdir(), FsTools.tmpdir() ], 'returns random string': function (result) { var a = result.shift(), b = result.shift(); Assert.isString(a); Assert.isString(b); Assert.notEqual(a, b); } }, 'with invalid template': { 'throws an error': function () { Assert.throws(function () { FsTools.tmpdir('/foo'); }); } }, 'with valid template': { topic: FsTools.tmpdir('/XXXXXXXXX-XXXX'), 'Respects length of template': function (result) { Assert.equal(15, result.length); }, 'respects only first XXX... group': function (result) { Assert.match(result, /^\/.{9}-XXXX$/); } }, }).export(module);
Version data entries
19 entries across 19 versions & 1 rubygems