test files are unexpectedly removed when edited by certain editors
See original GitHub issueUsing:
$ testacular --version
Testacular version: 0.5.5
It appears that, when saving, some editors (e.g vim) move the original file (to preserve it as a backup) and create a new file, rather than updating the file in place.
As a result Testacular (almost always) removes the edited file:
info (watcher): Removed file "/path/to//test/unit/controllersSpec.js".
Future changes to the file are no longer detected. Once is forced to restart Testacular.
Note, Testacular behaves normally (recognizing the file has been updated) when one simply touches the file:
$ touch test/unit/controllersSpec.js
A workaround is to specify an explicit file backup policy, i.e. in the vim case by adding :set backupcopy=yes
to your ~/.vimrc
:
"backupcopy
" "yes" make a copy of the file and overwrite the original one
" "no" rename the file and write a new one
" "auto" one of the previous, what works best
:set backupcopy=yes
Issue Analytics
- State:
- Created 11 years ago
- Comments:28 (15 by maintainers)
Top Results From Across the Web
Troubleshoot Google Docs, Sheets, Slides & Forms error ...
If you get an error message such as "Something went wrong. Reload" or "Unable to load file" preventing you from making edits on...
Read more >File in use Error- Excel is locked for editing which is opened ...
1. Please open Excel, click File> Options> Save, under Cache Settings, tick the option “Delete files from the Office Document Cache when they ......
Read more >What Causes a File to Suddenly Disappear?
Disappearing files may be corrupted, hidden, infected or moved.
Read more >Common errors that may occur during editing—Help
You can receive an error message if you have no data sources that are editable, there is a licensing issue (such as attempting...
Read more >[Solved] : How to Fix MS Excel Crash Issue
If Excel keeps crashing on your PC while opening a workbook, saving Excel file, scrolling or editing cells, etc., it indicates a problem ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just ran into this problem with karma
1.1.2
I can confirm disabling ‘safe write’ in Intellij “solves” the problem.same issue with karma v0.13.21