Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit edc313d

Browse files
committed
Focus tests failing on windows
1 parent f3ba03c commit edc313d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

test/controllers/file-patch-controller.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ describe('FilePatchController', function() {
389389
assert.autocrlfEqual(await repository.readFileFromIndex(deletedFileAddedSymlinkPath), 'foo\n\n');
390390
});
391391

392-
it('stages symlink change when staging added lines that depend on change', async function() {
392+
it.only('stages symlink change when staging added lines that depend on change', async function() {
393393
const workingDirPath = await cloneRepository('symlinks');
394394
const repository = await buildRepository(workingDirPath);
395395

@@ -400,6 +400,12 @@ describe('FilePatchController', function() {
400400
fs.unlinkSync(path.join(workingDirPath, deletedSymlinkAddedFilePath));
401401
fs.writeFileSync(path.join(workingDirPath, deletedSymlinkAddedFilePath), 'qux\nfoo\nbar\nbaz\nzoo\n', 'utf8');
402402

403+
console.log(workingDirPath);
404+
debugger;
405+
// cd into directory and view in atom. do hunks show up?
406+
407+
// try adding 'initialStagingStatus: 'unstaged''
408+
403409
const component = createComponent(repository, deletedSymlinkAddedFilePath);
404410
const wrapper = mount(React.cloneElement(component, {filePath: deletedSymlinkAddedFilePath}));
405411

test/models/file-patch.test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ describe('FilePatch', function() {
292292
});
293293

294294
describe('typechange file patches', function() {
295-
it('handles typechange patches for a symlink replaced with a file', async function() {
295+
it.only('handles typechange patches for a symlink replaced with a file', async function() {
296296
const workdirPath = await cloneRepository('symlinks');
297297
const repository = await buildRepository(workdirPath);
298298

@@ -302,6 +302,17 @@ describe('FilePatch', function() {
302302
fs.unlinkSync(path.join(workdirPath, deletedSymlinkAddedFilePath));
303303
fs.writeFileSync(path.join(workdirPath, deletedSymlinkAddedFilePath), 'qux\nfoo\nbar\n', 'utf8');
304304

305+
console.log(workdirPath);
306+
debugger;
307+
// cd into folder and see what diff looks like
308+
// if not then perhaps symlinks are not being treated correctly on windows.
309+
// is mode changing correctly? should we manually change it?
310+
// should we ignore test? is it even relevant?
311+
// if it matches below there's app logic error
312+
// file isn't being marked as deleted
313+
// header for patch added is missing entirely
314+
// check toString method
315+
305316
const patch = await repository.getFilePatchForPath(deletedSymlinkAddedFilePath);
306317
assert.equal(patch.toString(), dedent`
307318
diff --git a/symlink.txt b/symlink.txt

0 commit comments

Comments
 (0)