Skip to content

Commit

Permalink
Use tmp directory for files written during tests
Browse files Browse the repository at this point in the history
- Add spec/tmp directory with .gitkeep file to indicate the folder is intentional
- Add the folder contents to .gitignore
- Use this folder to output the sourcemap file during bin tests. This file is a sideeffect of the main test
  • Loading branch information
ErisDS committed Apr 1, 2020
1 parent e46baa1 commit 4671c4b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -17,3 +17,4 @@ lib/handlebars/compiler/parser.js
/coverage/
/dist/
/integration-testing/*/dist/
/spec/tmp/*
1 change: 0 additions & 1 deletion spec/artifacts/source.map.amd.txt

This file was deleted.

2 changes: 1 addition & 1 deletion spec/expected/source.map.amd.js

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

1 change: 1 addition & 0 deletions spec/tmp/.gitkeep
@@ -0,0 +1 @@
This directory is ignored in .gitignore. It can be used to write temporary files during tests.
2 changes: 1 addition & 1 deletion tasks/test-bin.js
Expand Up @@ -155,7 +155,7 @@ const testCases = [
'-N',
'test',
'--map',
'./spec/artifacts/source.map.amd.txt'
'./spec/tmp/source.map.amd.txt'
],
outputLocation: 'stdout',
expectedOutputSpec: './spec/expected/source.map.amd.js'
Expand Down

0 comments on commit 4671c4b

Please sign in to comment.