Skip to content

Commit

Permalink
Merge pull request #90 from trilom/1.2.2
Browse files Browse the repository at this point in the history
Auto merge from 1.2.2 PR#90: test(integration): just handle removing test files after test.
  • Loading branch information
trilom-bot authored Mar 25, 2020
2 parents 06b2f1d + d4fe226 commit a498e89
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build-release": "yarn build-package --minify",
"test": "jest",
"test-coverage": "jest --coverage",
"test-integration": "jest -c jest.config.integration.js",
"test-integration": "jest -c jest.config.integration.js && rm -rf src/tests/outputs",
"format": "prettier --write '**/*.ts'",
"format-check": "prettier --check '**/*.ts'",
"lint": "eslint --ext .ts ./",
Expand Down
14 changes: 0 additions & 14 deletions src/tests/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ let processStdoutMock: jest.SpyInstance
let consoleLogMock: jest.SpyInstance
let output = ''

function cleanupTest(path: string, ext: string): void {
;['files', 'files_modified', 'files_added', 'files_removed'].forEach(type => {
unlinkSync(`${path}/${type}${ext}`)
})
rmdirSync(path)
}

describe.each(p.testEvents)('Testing main.ts with %s event...', event => {
/**
* @function run
Expand Down Expand Up @@ -80,13 +73,6 @@ describe.each(p.testEvents)('Testing main.ts with %s event...', event => {
}
})
afterEach(() => {
cleanupTest(
_resolve(
__dirname,
`outputs/${event}/${eventName}/o_${outputName}f_${fileOutputName}`
),
fileOutputExpected
)
process.env = {...pEnv}
output = ''
jest.restoreAllMocks()
Expand Down

0 comments on commit a498e89

Please sign in to comment.