Skip to content

Commit 28173ed

Browse files
authored
Fix tests on Node 14 (#800)
* Fix tests on Node 14 Fixes #798 writeFileSync requires a data parameter * Add Node 14 to CI
1 parent 957e1c3 commit 28173ed

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ node_js:
77
- 11
88
- 12
99
- 13
10+
- 14
1011
env: TEST_SUITE=unit
1112
matrix:
1213
exclude:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ environment:
44
# node.js
55
- nodejs_version: "10"
66
- nodejs_version: "12"
7-
7+
- nodejs_version: "14"
88
# Install scripts. (runs after repo cloning)
99
install:
1010
# Get the latest stable version of Node.js or io.js

lib/ensure/__tests__/create.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('fs-extra', () => {
4646
it('should give clear error if node in directory tree is a file', done => {
4747
const existingFile = path.join(TEST_DIR, Math.random() + 'ts-e', Math.random() + '.txt')
4848
fse.mkdirsSync(path.dirname(existingFile))
49-
fs.writeFileSync(existingFile)
49+
fs.writeFileSync(existingFile, '')
5050

5151
const file = path.join(existingFile, Math.random() + '.txt')
5252
fse.createFile(file, err => {
@@ -79,7 +79,7 @@ describe('fs-extra', () => {
7979
it('should give clear error if node in directory tree is a file', () => {
8080
const existingFile = path.join(TEST_DIR, Math.random() + 'ts-e', Math.random() + '.txt')
8181
fse.mkdirsSync(path.dirname(existingFile))
82-
fs.writeFileSync(existingFile)
82+
fs.writeFileSync(existingFile, '')
8383

8484
const file = path.join(existingFile, Math.random() + '.txt')
8585
try {

lib/remove/__tests__/remove.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function buildFixtureDir () {
2121

2222
const subDir = path.join(TEST_DIR, Math.random() + '')
2323
fs.mkdirSync(subDir)
24-
fs.writeFileSync(path.join(subDir, Math.random() + ''))
24+
fs.writeFileSync(path.join(subDir, Math.random() + ''), buf)
2525
return baseDir
2626
}
2727

0 commit comments

Comments
 (0)