Skip to content

Commit

Permalink
Move temporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
aaharu committed Jul 13, 2021
1 parent f4d860e commit ade765b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -117,10 +117,13 @@
},
"eslintIgnore": [
"test/fixtures",
"coverage",
"temp"
"test/temp",
"coverage"
],
"ava": {
"files": [
"!test/temp"
],
"timeout": "1m"
},
"nyc": {
Expand Down
8 changes: 4 additions & 4 deletions test/cli.js
Expand Up @@ -11,7 +11,7 @@ process.chdir(__dirname);
const main = (arguments_, options) => execa(path.join(__dirname, '../cli.js'), arguments_, options);

test('fix option', async t => {
const cwd = await fs.promises.mkdtemp(path.join(__dirname, '../temp/'));
const cwd = await fs.promises.mkdtemp(path.join(__dirname, './temp/'));
const filepath = path.join(cwd, 'x.js');
await fs.promises.writeFile(filepath, 'console.log()\n');
await main(['--fix', filepath], {cwd});
Expand All @@ -34,7 +34,7 @@ test('stdin-filename option with stdin', async t => {
});

test('reporter option', async t => {
const cwd = await fs.promises.mkdtemp(path.join(__dirname, '../temp/'));
const cwd = await fs.promises.mkdtemp(path.join(__dirname, './temp/'));
const filepath = path.join(cwd, 'x.js');
await fs.promises.writeFile(filepath, 'console.log()\n');

Expand Down Expand Up @@ -101,7 +101,7 @@ test('supports being extended with a shareable config', async t => {
});

test('quiet option', async t => {
const cwd = await fs.promises.mkdtemp(path.join(__dirname, '../temp/'));
const cwd = await fs.promises.mkdtemp(path.join(__dirname, './temp/'));
const filepath = path.join(cwd, 'x.js');
await fs.promises.writeFile(filepath, '// TODO: quiet\nconsole.log()\n');
const error = await t.throwsAsync(main(['--quiet', '--reporter=json', filepath], {cwd}));
Expand All @@ -110,7 +110,7 @@ test('quiet option', async t => {
});

test('invalid node-engine option', async t => {
const cwd = await fs.promises.mkdtemp(path.join(__dirname, '../temp/'));
const cwd = await fs.promises.mkdtemp(path.join(__dirname, './temp/'));
const filepath = path.join(cwd, 'x.js');
await fs.promises.writeFile(filepath, 'console.log()\n');
const error = await t.throwsAsync(main(['--node-version', 'v', filepath], {cwd}));
Expand Down
File renamed without changes.

0 comments on commit ade765b

Please sign in to comment.