Skip to content

Commit

Permalink
Write test file directly because grunt keeps getting EEXIST errors fr…
Browse files Browse the repository at this point in the history
…om mkdir.
  • Loading branch information
brandonramirez committed May 3, 2024
1 parent bb94486 commit 44b8d67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit-tests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const fs = require('fs');
const grunt = require('grunt');
const jsonlint = require('@prantlf/jsonlint');
const validator = require('@prantlf/jsonlint/lib/validator');
Expand Down Expand Up @@ -265,7 +266,7 @@ function testReformattingFile(indent) {
}

// Build an unformatted file for testing.
grunt.file.write(`${__dirname}/reformat-this.json`, '{"somethingsomething":"something","something":"dark side"}');
fs.writeFileSync(`${__dirname}/reformat-this.json`, '{"somethingsomething":"something","something":"dark side"}', { encoding: 'utf8' });

runWithFiles(grunt, jsonlint, [ 'test/reformat-this.json' ], options);

Expand Down

0 comments on commit 44b8d67

Please sign in to comment.