Skip to content

Commit fed4d8b

Browse files
committed
Remove mock-fs tests
1 parent 1713153 commit fed4d8b

File tree

5 files changed

+0
-53
lines changed

5 files changed

+0
-53
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
},
2323
"devDependencies": {
2424
"mocha": "2.x",
25-
"mock-fs": "^3.8.0",
2625
"rimraf": "^2.4.0",
2726
"standard": "^6.0.8"
2827
},

test/read-file-sync.test.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var assert = require('assert')
22
var fs = require('fs')
3-
var mockfs = require('mock-fs')
43
var os = require('os')
54
var path = require('path')
65
var rimraf = require('rimraf')
@@ -168,16 +167,6 @@ describe('+ readFileSync()', function () {
168167
})
169168
})
170169

171-
describe('mockfs', function () {
172-
it('should read from a mockfs', function () {
173-
var mfs = mockfs.fs()
174-
var dataOut = {name: 'JP'}
175-
mfs.writeFileSync('test.json', JSON.stringify(dataOut), 'utf8')
176-
var dataIn = jf.readFileSync('test.json', { fs: mfs })
177-
assert.deepEqual(dataOut, dataIn)
178-
})
179-
})
180-
181170
describe('> w/ BOM', function () {
182171
it('should properly parse', function () {
183172
var file = path.join(TEST_DIR, 'file-bom.json')

test/read-file.test.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var assert = require('assert')
22
var fs = require('fs')
3-
var mockfs = require('mock-fs')
43
var os = require('os')
54
var path = require('path')
65
var rimraf = require('rimraf')
@@ -219,19 +218,6 @@ describe('+ readFile()', function () {
219218
})
220219
})
221220

222-
describe('mockfs', function () {
223-
it('should read from a mockfs', function (done) {
224-
var mfs = mockfs.fs()
225-
var dataOut = {name: 'JP'}
226-
mfs.writeFileSync('test.json', JSON.stringify(dataOut), 'utf8')
227-
jf.readFile('test.json', { fs: mfs }, function (err, dataIn) {
228-
assert.ifError(err)
229-
assert.deepEqual(dataOut, dataIn)
230-
done()
231-
})
232-
})
233-
})
234-
235221
describe('> w/ BOM', function () {
236222
it('should properly parse', function (done) {
237223
var file = path.join(TEST_DIR, 'file-bom.json')

test/write-file-sync.test.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var assert = require('assert')
22
var fs = require('fs')
3-
var mockfs = require('mock-fs')
43
var os = require('os')
54
var path = require('path')
65
var rimraf = require('rimraf')
@@ -90,15 +89,4 @@ describe('+ writeFileSync()', function () {
9089
assert.strictEqual(data, JSON.stringify(obj) + '\n')
9190
})
9291
})
93-
94-
describe('mockfs', function () {
95-
it('should write to mockfs', function () {
96-
var mfs = mockfs.fs()
97-
var dataOut = { name: 'JP' }
98-
var file = 'somefile.json'
99-
jf.writeFileSync(file, dataOut, { fs: mfs })
100-
var dataIn = JSON.parse(mfs.readFileSync(file, 'utf8'))
101-
assert.deepEqual(dataOut, dataIn)
102-
})
103-
})
10492
})

test/write-file.test.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var assert = require('assert')
22
var fs = require('fs')
3-
var mockfs = require('mock-fs')
43
var os = require('os')
54
var path = require('path')
65
var rimraf = require('rimraf')
@@ -119,18 +118,4 @@ describe('+ writeFile()', function () {
119118
})
120119
})
121120
})
122-
123-
describe('mockfs', function () {
124-
it('should write to mockfs', function (done) {
125-
var mfs = mockfs.fs()
126-
var dataOut = { name: 'JP' }
127-
var file = 'somefile.json'
128-
jf.writeFile(file, dataOut, { fs: mfs }, function (err) {
129-
assert.ifError(err)
130-
var dataIn = JSON.parse(mfs.readFileSync(file, 'utf8'))
131-
assert.deepEqual(dataOut, dataIn)
132-
done()
133-
})
134-
})
135-
})
136121
})

0 commit comments

Comments
 (0)