Skip to content

Commit

Permalink
bug(#20): tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Feb 6, 2025
1 parent 27fc650 commit 47970b2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
12 changes: 11 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@
"csv-writer": "^1.6.0",
"fs": "^0.0.1-security",
"graphql-request": "^7.0.1",
"minimist": "^1.2.8"
"minimist": "^1.2.8",
"tmp": "^0.2.3"
},
"devDependencies": {
"eslint": "9.19.0",
"eslint-config-google": "0.14.0",
"grunt": "^1.6.1",
"nyc": "^17.0.0",
"grunt-contrib-clean": "2.0.1",
"grunt-eslint": "24.3.0",
"grunt-mocha-cli": "^4.0.0",
"mocha": "^11.0.0"
"mocha": "^11.0.0",
"nyc": "^17.0.0"
}
}
10 changes: 2 additions & 8 deletions test/to-json.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,12 @@
*/
const json = require('../src/to-json.js');
const fs = require('fs');
const tmp = require('tmp');
const assert = require('assert');

describe('Test case for to-json.js', () => {
afterEach(
() => {
if (fs.existsSync('test.json')) {
fs.unlinkSync('test.json');
}
}
);
it('creates .json file and writes results as JSON', function() {
const file = 'test';
const file = tmp.fileSync({postfix: '.json'}).name.replace('.json', '');
const expected = [
{
repo: 'test/test',
Expand Down

0 comments on commit 47970b2

Please sign in to comment.