Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/mocha-3.1.2/test/acceptance/fs.spec.js')
-rw-r--r--tests/lib/mocha-3.1.2/test/acceptance/fs.spec.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/acceptance/fs.spec.js b/tests/lib/mocha-3.1.2/test/acceptance/fs.spec.js
new file mode 100644
index 0000000000..9d0357c382
--- /dev/null
+++ b/tests/lib/mocha-3.1.2/test/acceptance/fs.spec.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+var os = require('os');
+var tmpFile = path.join.bind(path, os.tmpdir());
+
+describe('fs.readFile()', function () {
+ describe('when the file exists', function () {
+ it('should succeed', function (done) {
+ fs.writeFile(tmpFile('mocha'), 'wahoo', done);
+ });
+ });
+
+ describe('when the file does not exist', function () {
+ it('should fail', function (done) {
+ // uncomment
+ // fs.readFile(tmpFile('does-not-exist'), done);
+ done();
+ });
+ });
+});