Skip to content

Commit

Permalink
chore(client): reset node_modules in types test
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jun 2, 2020
1 parent eb3b0c1 commit 0742739
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/packages/client/src/__tests__/types/types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {
} from 'typescript'
import * as ts from 'typescript'
import { generateInFolder } from '../../utils/generateInFolder'
import rimraf from 'rimraf'
import { promisify } from 'util'
const del = promisify(rimraf)

jest.setTimeout(30000)

Expand All @@ -18,6 +21,10 @@ describe('valid types', () => {
const testName = path.basename(dir)

test(testName, async () => {
const nodeModules = path.join(dir, 'node_modules')
if (fs.existsSync(nodeModules)) {
await del(nodeModules)
}
await generateInFolder({
projectDir: dir,
useLocalRuntime: false,
Expand Down

0 comments on commit 0742739

Please sign in to comment.