From 60c90028ba76b7e291fdb8152425b93c41b117c9 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Fri, 21 Jan 2022 22:29:24 +0100 Subject: chore(test): migrate to vitest (#235) --- test/system.unit.js | 63 ----------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 test/system.unit.js (limited to 'test/system.unit.js') diff --git a/test/system.unit.js b/test/system.unit.js deleted file mode 100644 index ee279750..00000000 --- a/test/system.unit.js +++ /dev/null @@ -1,63 +0,0 @@ -if (typeof module !== 'undefined') { - var assert = require('assert'); - var sinon = require('sinon'); - var faker = require('../lib').faker; -} - -describe('system.js', function () { - describe('directoryPath()', function () { - it('returns unix fs directory full path', function () { - sinon.stub(faker.random, 'words').returns('24/7'); - var directoryPath = faker.system.directoryPath(); - assert.strictEqual( - directoryPath.indexOf('/'), - 0, - 'generated directoryPath should start with /' - ); - - faker.random.words.restore(); - }); - }); - - describe('filePath()', function () { - it('returns unix fs file full path', function () { - sinon.stub(faker.random, 'words').returns('24/7'); - var filePath = faker.system.filePath(); - assert.strictEqual( - filePath.indexOf('/'), - 0, - 'generated filePath should start with /' - ); - - faker.random.words.restore(); - }); - }); - - describe('fileName()', function () { - it('returns filenames without system path separators', function () { - sinon.stub(faker.random, 'words').returns('24/7'); - var fileName = faker.system.fileName(); - assert.strictEqual( - fileName.indexOf('/'), - -1, - 'generated fileNames should not have path separators' - ); - - faker.random.words.restore(); - }); - }); - - describe('commonFileName()', function () { - it('returns filenames without system path separators', function () { - sinon.stub(faker.random, 'words').returns('24/7'); - var fileName = faker.system.commonFileName(); - assert.strictEqual( - fileName.indexOf('/'), - -1, - 'generated commonFileNames should not have path separators' - ); - - faker.random.words.restore(); - }); - }); -}); -- cgit v1.2.3