Skip to content

Commit

Permalink
test: use tmpdir vs homedir for finding tmp files
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 31, 2019
1 parent 0e88ef5 commit e614821
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/body-parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// <reference path="../adonis-typings/index.ts" />

import { join } from 'path'
import { homedir } from 'os'
import { tmpdir } from 'os'
import * as test from 'japa'
import { merge } from 'lodash'
import { createServer } from 'http'
Expand Down Expand Up @@ -404,8 +404,8 @@ test.group('BodyParser Middleware | multipart', () => {

assert.equal(text, 'E_REQUEST_ENTITY_TOO_LARGE: request entity too large')

const file1 = await pathExists(join(homedir(), '0.tmp'))
const file2 = await pathExists(join(homedir(), '1.tmp'))
const file1 = await pathExists(join(tmpdir(), '0.tmp'))
const file2 = await pathExists(join(tmpdir(), '1.tmp'))

assert.isTrue(file1)
assert.isFalse(file2)
Expand Down

0 comments on commit e614821

Please sign in to comment.