Skip to content

Commit 76aef49

Browse files
authored
Add Node.js 14 to CI settings (#524)
* Add Node.js 14 to CI settings * Fix the test The following error in Node.js14. ``` TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined at Object.writeFileSync (fs.js:1380:5) at Context.<anonymous> (test/main.js:417:10) at processImmediate (internal/timers.js:456:21) at process.topLevelDomainCallback (domain.js:137:15) ```
1 parent 38d25e5 commit 76aef49

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
node-version: [10.x, 12.x]
11+
node-version: [10.x, 12.x, 14.x]
1212
os: [ubuntu-latest, windows-latest, macos-latest]
1313
steps:
1414
- uses: actions/checkout@master

test/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,9 @@ describe('lib/main', function () {
414414
fs.mkdirSync('build')
415415
fs.mkdirsSync(path.join('__unittest', 'hoge'))
416416
fs.mkdirsSync(path.join('__unittest', 'fuga'))
417-
fs.writeFileSync(path.join('__unittest', 'hoge', 'piyo'))
418-
fs.writeFileSync(path.join('__unittest', 'hoge', 'package.json'))
419-
fs.writeFileSync('fuga')
417+
fs.writeFileSync(path.join('__unittest', 'hoge', 'piyo'), '')
418+
fs.writeFileSync(path.join('__unittest', 'hoge', 'package.json'), '')
419+
fs.writeFileSync('fuga', '')
420420
})
421421
after(() => {
422422
['build', 'fuga', '__unittest'].forEach((path) => {
@@ -504,8 +504,8 @@ describe('lib/main', function () {
504504
after(() => fs.removeSync(buildDir))
505505

506506
fs.mkdirSync(buildDir)
507-
fs.writeFileSync(path.join(buildDir, 'testa'))
508-
fs.writeFileSync(path.join(buildDir, 'package.json'))
507+
fs.writeFileSync(path.join(buildDir, 'testa'), '')
508+
fs.writeFileSync(path.join(buildDir, 'package.json'), '')
509509

510510
program.excludeGlobs = '*.json'
511511
program.prebuiltDirectory = buildDir

0 commit comments

Comments
 (0)