kopia lustrzana https://github.com/c9/core
Fix tabManager tests
rodzic
0767d54dde
commit
363f4412d5
|
@ -247,20 +247,22 @@ require(["lib/architect/architect", "lib/chai/chai"],
|
|||
|
||||
it('should rename a directory - change tab path', function(done) {
|
||||
var vpath = "/dir/stuff.json";
|
||||
tabs.openFile(vpath, function(err, tab) {
|
||||
expect(tab.path).to.equal(vpath);
|
||||
expect(tab.title).to.equal("stuff.json");
|
||||
|
||||
fs.rename("/dir", "/dir2", function(err) {
|
||||
if (err)
|
||||
throw err;
|
||||
expect(tab.path).to.equal("/dir2/stuff.json");
|
||||
fs.rmdir("/dir2", { recursive: true }, function(){
|
||||
tabs.openFile(vpath, function(err, tab) {
|
||||
expect(tab.path).to.equal(vpath);
|
||||
expect(tab.title).to.equal("stuff.json");
|
||||
tab.unload();
|
||||
fs.rename("/dir2", "/dir", function (err) {
|
||||
|
||||
fs.rename("/dir", "/dir2", function(err) {
|
||||
if (err)
|
||||
throw err;
|
||||
done();
|
||||
expect(tab.path).to.equal("/dir2/stuff.json");
|
||||
expect(tab.title).to.equal("stuff.json");
|
||||
tab.unload();
|
||||
fs.rename("/dir2", "/dir", function (err) {
|
||||
if (err)
|
||||
throw err;
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue