Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('returns true if the path is deleted', () => {
fs.removeSync(filePath);
expect(repo.isPathModified(filePath)).toBeTruthy();
});
afterEach(() => {
if (fs.existsSync(projectPath)) {
fs.removeSync(projectPath)
}
})
beforeEach(function() {
spyOn(atom, 'open');
packageRoot = temp.mkdirSync('atom');
packageName = 'sweet-package-dude';
packagePath = path.join(packageRoot, packageName);
return fs.removeSync(packageRoot);
});
beforeEach(async done => {
buffer.setText('I WAS MODIFIED')
expect(buffer.isModified()).toBeTruthy()
buffer.file.onDidDelete(() => done())
fs.removeSync(filePath)
})
afterEach(() => fs.removeSync(packageRoot))