diff options
| author | Shinigami <[email protected]> | 2022-01-21 22:29:24 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-21 22:29:24 +0100 |
| commit | 60c90028ba76b7e291fdb8152425b93c41b117c9 (patch) | |
| tree | cfaf146a883f902acc351c7c2cba095c459ec36f /test/system.unit.js | |
| parent | 2da0cec2f91f54f56b509414a8b29b3831d58412 (diff) | |
| download | faker-60c90028ba76b7e291fdb8152425b93c41b117c9.tar.xz faker-60c90028ba76b7e291fdb8152425b93c41b117c9.zip | |
chore(test): migrate to vitest (#235)
Diffstat (limited to 'test/system.unit.js')
| -rw-r--r-- | test/system.unit.js | 63 |
1 files changed, 0 insertions, 63 deletions
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(); - }); - }); -}); |
